All models

Learning Sparse Approximate Inverse Preconditioners

A graph neural network that predicts a sparse approximate inverse preconditioner for conjugate gradient solvers.

Physics and weather · 203 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (32 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
17K
Operations
203
Framework
PyTorch
Recurrent
No
Published
NeurIPS 2025
Cited by
0 (as of 24 October 2026)
Authors
Zherui Yang, Zhehao Li, Kangbo Lyu and others
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m17899
Graph hash
54d3c0a73de49417b9e0208555c7ee0cfe0ad39cb0cc62586fd4c56f12731999
Skeleton hash
57c46186f266783d6cadd1abd838a06cee9c90276e9428b05aa14170f6e3c684
Architecture hash
62a349944b15fc029fa2810825a1c0c4b1ac6e3eb2910f8453fa4d25497ef9eb
Diagram SHA-256
51db09c10274cfbd48b9a142dd2cba666304a7116798b06ed8ee7e9ea9fd31c5
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

This model is a graph neural network that builds a preconditioner for the conjugate gradient solver, a widely used method for symmetric and positive definite linear systems Ax=b. The paper's starting point is that earlier learned preconditioners relied on incomplete factorization, whose triangular solve hinders GPU parallelization.

Here the network instead constructs a sparse approximate inverse of the matrix, which avoids triangular solves and needs only two matrix-vector products at each solver step. The matrix is treated as a graph whose edges are its nonzero entries. The network follows an encoder-processor-decoder design, processes node and edge features through message passing and outputs the entries of a sparse matrix G. The preconditioner is formed from G, with a small positive constant added so that it stays symmetric and positive definite.

Training uses a scale-invariant loss, chosen because the convergence rate of conjugate gradient depends on the condition number and not on the absolute scale of the matrix. The paper reports a 40%-53% reduction in solution time on GPUs in its evaluations on three PDE-derived datasets and one synthetic dataset.

Key idea. The authors train a graph neural network to construct sparse approximate inverse preconditioners for conjugate gradient, which avoids triangular solves and needs only two matrix-vector products per step.

  • learning sparse approximate inverse preconditioners
  • SPAI
  • neural SPAI preconditioner
  • learned preconditioner
  • conjugate gradient
  • sparse linear systems
  • GPU preconditioner
  • SAI loss
  • graph neural network preconditioner

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{yang2025learningsparseapproximateinverse,
      title={Learning Sparse Approximate Inverse Preconditioners for Conjugate Gradient Solvers on GPUs}, 
      author={Zherui Yang and Zhehao Li and Kangbo Lyu and Yixuan Li and Tao Du and Ligang Liu},
      year={2025},
      eprint={2510.27517},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2510.27517}, 
}