Learning Sparse Approximate Inverse Preconditioners for Conjugate Gradient Solvers on GPUs
Zhehao Li, Kangbo Lyu, Yixuan Li, Tao Du, Ligang Liu
Abstract
The conjugate gradient solver (CG) is a prevalent method for solving symmetric and positive definite linear systems Ax=b, where effective preconditioners are crucial for fast convergence. Traditional preconditioners rely on prescribed algorithms to offer rigorous theoretical guarantees, while limiting their ability to exploit optimization from data. Existing learning-based methods often utilize Graph Neural Networks (GNNs) to improve the performance and speed up the construction. However, their reliance on incomplete factorization leads to significant challenges: the associated triangular solve hinders GPU parallelization in practice, and introduces long-range dependencies which are difficult for GNNs to model. To address these issues, we propose a learning-based method to generate GPU-friendly preconditioners, particularly using GNNs to construct Sparse Approximate Inverse (SPAI) preconditioners, which avoids triangular solves and requires only two matrix-vector products at each CG step. The locality of matrix-vector product is compatible with the local propagation mechanism of GNNs. The flexibility of GNNs also allows our approach to be applied in a wide range of scenarios. Furthermore, we introduce a statistics-based scale-invariant loss function. Its design matches CG's property that the convergence rate depends on the condition number, rather than the absolute scale of A, leading to improved performance of the learned preconditioner. Evaluations on three PDE-derived datasets and one synthetic dataset demonstrate that our method outperforms standard preconditioners (Diagonal, IC, and traditional SPAI) and previous learning-based preconditioners on GPUs. We reduce solution time on GPUs by 40%-53% (68%-113% faster), along with better condition numbers and superior generalization performance. Source code available at https://github.com/Adversarr/LearningSparsePreconditioner4GPU
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers3
- Mixture-of-Experts Operator Transformer for Large-Scale PDE Pre-TrainingHong Wang, Haiyang Xin, Jie Wang, Xuanze Yang et al.NeurIPS 2025 · 15 citations
- SymMaP: Improving Computational Efficiency in Linear Solvers through Symbolic PreconditioningHong Wang, Jie Wang, Minghao Ma, Haoran Shao et al.NeurIPS 2025 · 6 citations
- STNet: Spectral Transformation Network for Solving Operator Eigenvalue ProblemHong Wang, Yixuan Jiang, Jie Wang, Xinyi Li et al.NeurIPS 2025 · 4 citations
Builds on6
- Optimization-Based Algebraic Multigrid Coarsening Using Reinforcement LearningAli Taghibakhshi, Scott P. MacLachlan, Luke N. Olson, Matthew WestNeurIPS 2021 · 43 citations
- Learning Preconditioners for Conjugate Gradient PDE SolversYichen Li, Peter Yichen Chen, Tao Du, Wojciech MatusikICML 2023 · 38 citations
- Neural Krylov Iteration for Accelerating Linear System SolvingJian Luo, Jie Wang, Hong Wang, Huanshuo Dong et al.NeurIPS 2024 · 23 citations
- Neural operators meet conjugate gradients: The FCG-NO method for efficient PDE solvingAlexander Rudikov, Vladimir Fanaskov, Ekaterina A. Muravleva, Yuri M. Laevsky et al.ICML 2024 · 14 citations
- A Neural-Preconditioned Poisson Solver for Mixed Dirichlet and Neumann Boundary ConditionsKai Weixian Lan, Elias Gueidon, Ayano Kaneda, Julian Panetta et al.ICML 2024 · 4 citations
Related papers
- Graph Neural Preconditioners for Iterative Solutions of Sparse Linear SystemsJie ChenICLR 2025
- Extending Sparse Patterns to Improve Inverse Preconditioning on GPU ArchitecturesSergi Laut, Ricard Borrell, Marc CasasHPDC 2024 · 3 citations
- Sparsified Preconditioned Conjugate Gradient Solver on GPUsDa Ma, Khalid Ahmad, Kazem Cheshmi, Hari Sundar et al.SC 2025 · 1 citation
- Learning Algebraic Multigrid Using Graph Neural NetworksIlay Luz, Meirav Galun, Haggai Maron, Ronen Basri et al.ICML 2020 · 95 citations
- RAPNet: Accelerating Algebraic Multigrid with Learned Sparse CorrectionsYali Fink, Ido Ben-Yair, Lars Ruthotto, Eran TreisterICML 2026
