🤖 AI Summary
Conventional bipartite coloring for automatic differentiation of rectangular sparse Jacobian matrices—particularly those containing dense rows or columns—suffers from low efficiency and excessive chromatic numbers.
Method: This paper proposes a novel unified bipartite coloring framework integrating star coloring and acyclic coloring. It innovatively extends the concept of neutral colors to symmetric coloring scenarios, formulates a unified bipartite coloring model based on an augmented symmetric matrix, and introduces a color-neutralization post-processing mechanism to substantially reduce the chromatic number. The approach further incorporates vertex reordering and optimized sparse compression/decompression.
Contribution/Results: Implemented in the open-source Julia package SparseMatrixColorings, the method achieves 30–50% fewer colors than the state-of-the-art tool ColPack across diverse sparse Jacobian benchmarks, while also improving decompression speed and robustness.
📝 Abstract
Sparse matrix coloring and bicoloring are fundamental building blocks of sparse automatic differentiation. Bicoloring is particularly advantageous for rectangular Jacobian matrices with at least one dense row and column. Indeed, in such cases, unidirectional row or column coloring demands a number of colors equal to the number of rows or columns. We introduce a new strategy for bicoloring that encompasses both direct and substitution-based decompression approaches. Our method reformulates the two variants of bicoloring as star and acyclic colorings of an augmented symmetric matrix. We extend the concept of neutral colors, previously exclusive to bicoloring, to symmetric colorings, and we propose a post-processing routine that neutralizes colors to further reduce the overall color count. We also present the Julia package SparseMatrixColorings, which includes these new bicoloring algorithms alongside all standard coloring methods for sparse derivative matrix computation. Compared to ColPack, the Julia package also offers enhanced implementations for star and acyclic coloring, vertex ordering, as well as decompression.