Learning incomplete factorization preconditioners for GMRES

Paul Häusner, Aleix Nieto Juscafresa, Jens Sjölund

TL;DR

The authors train a Graph Neural Network (GNN) to predict sparse Incomplete LU (ILU) preconditioners directly from matrix structure, accelerating GMRES convergence for general non-symmetric linear systems. By deriving theoretical bounds connecting Frobenius norm losses to extreme singular values, they introduce a combined loss function alongside an invertibility-guaranteeing activation function, matching classical ILU(0) performance while operating purely through data-driven inference.

What Problem Does This Paper Address?

Solving large, sparse linear systems of the form $Ax = b$ is central to scientific computing and engineering simulations. When $A$ is non-symmetric or indefinite, GMRES (Generalized Minimal Residual Method) is a standard solver, but it often stagnates unless paired with a good preconditioner $P \approx A$ such that $AP^{-1}$ is well-conditioned.

Classical algebraic preconditioners like Incomplete LU factorization (ILU) compute lower ($L$) and upper ($U$) triangular factors. However, numerical ILU algorithms are inherently sequential, difficult to parallelize on GPUs, and can suffer from numerical breakdown (e.g., zero pivots). While recent machine learning approaches have learned factorizations for symmetric positive-definite (SPD) matrices using Incomplete Cholesky, learning general ILU factorizations for arbitrary invertible matrices in GMRES has remained largely unaddressed.

Methods

The authors introduce a message-passing GNN architecture paired with theoretically grounded objective functions:

  • Coates Graph Formulation: The sparse matrix $A$ is converted into a directed graph where non-zero entries act as edge features, enriched with an indicator distinguishing upper- vs. lower-triangular entries. Self-loops are explicitly added for missing diagonal entries.
  • Guaranteed Invertibility: The network predicts both $L$ and $U$ matching the sparsity pattern of $A$ (like ILU(0)). $U$ is constrained to have unit diagonal ($u_{ii} = 1$). For $L$, diagonal entries pass through a custom threshold activation $\zeta_\epsilon(x)$ that bounds $|l_{ii}| \ge \epsilon$ (smoothed via a continuous relaxation $\hat{\zeta}_\epsilon(x)$ during training), preventing zero pivots.
  • Loss Functions Tied to Spectral Bounds:
  • $\mathcal{L}_{\max}$ (Upper Spectral Bound): Using Hutchinson’s trace estimator, minimizing $\|Aw - Pw\|_2^2$ (with random Gaussian vector $w$) minimizes an upper bound on $\sigma_{\max}(AP^{-1})$.
  • $\mathcal{L}_{\min}$ (Lower Spectral Bound): Minimizing $\|PA^{-1}w - w\|_2^2$ maximizes a lower bound on $\sigma_{\min}(AP^{-1})$, which can also be approximated in a supervised setting as $\|Px - b\|_2^2$.
  • $\mathcal{L}_{\text{com}}$ (Combined Loss): Combines both terms, $\mathcal{L}_{\text{com}} = \|Aw - Pw\|_2^2 + \alpha \|Px\|_2^2$, to regularize both ends of the singular value spectrum.

Datasets

The authors evaluate on a synthetic benchmark derived from the 2D Poisson equation on a square grid:

  • Discretized using finite elements into systems of dimension $n = 2{,}500$ with 50,000–150,000 non-zero entries.
  • To break symmetry and positive definiteness, standard Gaussian noise is added to all non-zero entries ($a'_{ij} = a_{ij} + \mathcal{N}(0, 1)$), yielding challenging, ill-conditioned matrices with condition numbers $\kappa$ between 5,000 and 50,000.
  • 200 problem instances are used for training, 10 for validation, and 10 for testing.

Key Insights and Ideas

  • Spectral Extremes Map to Concrete Norms: Rather than optimizing condition numbers directly (which is computationally intractable), Frobenius-norm differences between $A$ and $P$ naturally bound the largest singular value, while differences involving $A^{-1}$ bound the smallest.
  • Condition Number Isn’t Everything in GMRES: A lower condition number does not guarantee faster convergence. For instance, classical ILU(0) had a massive condition number ($\kappa \approx 120{,}740$) compared to the learned $\mathcal{L}_{\max}$ model ($\kappa \approx 16{,}139$), yet both converged in nearly identical iteration counts because ILU(0) tightly clustered the majority of singular values near 1.
  • Supervised Approximations Can Destabilize: While approximating $\mathcal{L}_{\min}$ via training pairs $(x_i, b_i)$ avoids costly online linear solves, it introduced numerical instabilities that severely degraded GMRES convergence, underscoring the trade-off between offline efficiency and preconditioner stability.

Key Results

Experiments on the 10 test problems demonstrate that the learned ILU model performs on par with specialized numerical implementations:

Preconditioner $\sigma_{\min} \uparrow$ $\sigma_{\max} \downarrow$ GMRES Iterations $\downarrow$ Total Time (s) $\downarrow$
No Preconditioner 0.0014 20.70 1,153 30.85
Jacobi 0.0003 5.16 1,152 30.12
ILU(0) 0.0006 30.32 413 3.33
Learned IC (Baseline) 0.0006 7.58 692 12.84
Learned LU ($\mathcal{L}_{\max}$) 0.0007 5.00 437 3.67
Learned LU ($\mathcal{L}_{\text{com}}$) 0.0017 52.92 418 3.42

The proposed model reduces GMRES iterations by over 63% compared to unpreconditioned GMRES and substantially outperforms data-driven Incomplete Cholesky baselines (418 vs. 692 iterations).

Limitations and Future Work

  • Restricted Sparsity Pattern: The model enforces the zero-fill pattern of $A$ (matching ILU(0)); it cannot dynamically discover non-zero fill-in patterns (like ILU($k$) or ILU with thresholding).
  • Narrow Synthetic Evaluation: Experiments are restricted to $n = 2{,}500$ matrices derived from perturbed Poisson problems; evaluation on large-scale, real-world non-symmetric systems is left for future work.
  • Loss Balancing Sensitivity: Tuning the trade-off parameter $\alpha$ in $\mathcal{L}_{\text{com}}$ is delicate, as the two objectives can compete and cause optimization instability.
  • Future Directions: Hybrid algorithms combining classical ILU steps with GNN corrections, as well as incorporating right-hand side directional alignment into the objective.

Summary updated

BibTeX
@inproceedings{hausner2025learning,
  author = {Paul Häusner and Aleix Nieto Juscafresa and Jens Sjölund},
  title = {{Learning incomplete factorization preconditioners for GMRES}},
  booktitle = {NLDL},
  year = {2025},
  url = {https://openreview.net/forum?id=yoSOtVwekP},
}
Figure