Efficient preconditioning for iterative methods with graph neural networks

Vladislav Trifonov, Alexander Rudikov, Oleg Iliev, Yuri M. Laevsky, Ivan Oseledets, Ekaterina MuravlevaAI4X 2025

TL;DR

This paper introduces "PreCorrector," a novel approach that combines graph neural networks (GNNs) with classical linear algebra techniques to create more efficient preconditioners for solving large linear systems. By learning corrections to existing preconditioners rather than building them from scratch, PreCorrector significantly reduces the number of iterations needed for solvers like the Conjugate Gradient (CG) method, leading to faster overall computation times.

What Problem Does This Paper Address?

Many modern scientific and engineering problems, particularly those involving parametric partial differential equations (PDEs), result in large, sparse systems of linear algebraic equations of the form Ax = b. Solving these systems efficiently is crucial. A common bottleneck is the "condition number" of the matrix A, denoted κ(A). A high condition number means the matrix is ill-conditioned, making iterative solvers like the Conjugate Gradient (CG) method converge very slowly. Preconditioners (P) are used to transform the system into P⁻¹Ax = P⁻¹b, aiming to reduce κ(P⁻¹A) and thus speed up convergence. While classical preconditioners like incomplete Cholesky (IC) decomposition exist, they often don't achieve the best possible reduction in condition numbers. Recent attempts to use GNNs for preconditioner design have shown promise but haven't consistently outperformed classical methods in terms of spectral effect and iteration count. This paper addresses the challenge of creating preconditioners that are both efficient and achieve a better spectral effect than existing methods, bridging the gap between classical techniques and the potential of GNNs.

Methods

The core innovation is the "PreCorrector" approach. Instead of having a GNN directly construct a preconditioner from the original matrix A, PreCorrector takes a different route:

  • Leveraging Classical Preconditioners: It starts with a classical preconditioner, specifically an incomplete Cholesky (IC) decomposition, denoted as L.
  • Learning Corrections: A GNN is then used to learn a correction to this initial IC factor. The GNN predicts a correction term that is added to the initial L, resulting in an updated preconditioner: L_updated = L + α * GNN(L). Here, α is a learnable parameter.
  • Sparsity Pattern Preservation: A key advantage is that the GNN is trained to preserve the sparsity pattern of the initial IC decomposition. This ensures that the resulting preconditioner has the same computational complexity for matrix-vector products as the classical one, allowing for a fair comparison of their effectiveness.
  • Input Representation: The GNN takes the lower triangular matrix L from the IC decomposition as input, rather than the full matrix A. This allows the approach to be more general and not tied to a specific sparsity pattern of A. To simplify the model and reduce parameters, a vector of ones is used as node input to the message-passing layer, rather than the right-hand side vector b.

Datasets

The paper evaluates its approach on matrices derived from the discretization of a 2D diffusion equation: -∇·(k(x)∇u(x)) = f(x). This is a standard benchmark for testing numerical solvers and preconditioners in computational science. No new datasets were introduced; rather, the authors used a representative problem from this domain.

Key Insights and Ideas

  • Learning Corrections is More Stable: Training a GNN from scratch to generate a preconditioner can be unstable and may not outperform classical methods. Learning corrections to existing, well-established preconditioners appears to be a more robust and effective strategy.
  • Classical Methods as a Strong Baseline: The success of PreCorrector highlights that classical preconditioners provide a strong foundation. The GNN's role is to refine and improve upon these existing structures, rather than reinventing the wheel.
  • Generalizability through Input Choice: By using the lower triangular factor (L) of an IC decomposition as input to the GNN, rather than the full matrix A, PreCorrector becomes more versatile. It can potentially be applied to any matrix for which an IC decomposition can be computed, regardless of its specific sparsity pattern.
  • Efficiency Gains are Significant: The combination of a GNN-based correction and classical methods leads to a substantial reduction in the number of CG iterations required to reach a desired tolerance, directly translating to faster solution times.

Key Results

The paper demonstrates that PreCorrector significantly outperforms classical preconditioners (IC(0) and ICt(1)) in terms of the number of CG iterations required to achieve specific tolerances (10⁻³, 10⁻⁶, 10⁻⁹, and 10⁻¹²).

  • Reduced Iterations: For example, PreCor[IC(0)] required fewer iterations than IC(0) to reach the same tolerance. Similarly, PreCor[ICt(1)] showed improved spectral effects compared to classical ICt(1).
  • Competitive Pre-computation Time: While PreCorrector involves a GNN inference step, its pre-computation time is comparable to or only slightly higher than classical methods. Crucially, this pre-computation time is a small fraction of the total time-to-solution, making the overall approach highly efficient.
  • Outperforming Pure GNNs: The paper notes that GNNs trained from scratch (as in prior work) struggled to converge to the required tolerance, whereas PreCorrector, by learning corrections, achieved better results.

Limitations and Future Work

  • Limitations:
    • The paper acknowledges that while PreCorrector improves upon classical methods, it still relies on the initial sparsity pattern of the classical preconditioner.
  • The GNN architecture and training process, while effective, could potentially be further optimized.
  • Future Work:
    • The authors suggest exploring different GNN architectures and aggregation functions.
  • Investigating the use of other classical preconditioners as a starting point for PreCorrector is a natural extension.
  • Further research into how to adapt the GNN to different types of matrices and problem domains could expand its applicability.

Summary updated

BibTeX
@inproceedings{trifonov2025efficient,
  author = {Vladislav Trifonov and Alexander Rudikov and Oleg Iliev and Yuri M. Laevsky and Ivan Oseledets and Ekaterina Muravleva},
  title = {{Efficient preconditioning for iterative methods with graph neural networks}},
  booktitle = {AI4X},
  year = {2025},
  url = {https://openreview.net/forum?id=PjDJonBo9T},
}
Figure