NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Probabilistic Linear Solvers for Machine Learning

Jonathan Wenger, Philipp Hennig

TL;DR

This paper introduces a new class of probabilistic linear solvers that treat the classic problem of solving $Ax = b$ as a Bayesian inference task. By modeling the matrix and its inverse as random variables, the solver not only finds a solution but also provides a calibrated measure of "numerical uncertainty"—the error remaining because we haven't spent enough computation to find the exact answer.

The Problem with Deterministic Solvers in ML

In machine learning, we frequently solve massive linear systems, such as in Gaussian Processes or second-order optimization. Traditionally, we rely on deterministic solvers like Conjugate Gradient (CG). However, these "black-box" solvers have three main drawbacks for probabilistic machine learning:

  1. Ignoring Priors: They do not exploit known structural information about the matrix, such as the specific spectral decay of a kernel matrix.
  2. No Uncertainty: They provide a point estimate but fail to quantify how much you should trust that estimate given limited compute time.
  3. Disconnected Pipelines: Numerical errors are usually ignored, even though they can be just as significant as data noise (aleatoric uncertainty) or model mismatch (epistemic uncertainty).

The authors aim to bridge this gap by creating a solver that integrates directly into the probabilistic framework of modern ML.

A Bayesian Inference Framework for Linear Algebra

The authors propose treating linear algebra through the lens of Bayesian inference. Instead of merely iterating toward a vector $x$, the solver maintains a posterior distribution over the matrix $A$, its inverse $H = A^{-1}$, and the solution $x_*$.

The probabilistic linear solver pipeline: updating priors over the matrix and its inverse using iterative observations to form a posterior.
  • Linear Observations: Each iteration of the solver performs a matrix-vector product $y_i = As_i$. In this framework, $y_i$ is treated as a "data point" used to update the posterior belief.
  • Recovering Conjugate Gradients: The paper presents a concrete algorithm using a model-based policy to choose search directions. Crucially, they prove that under certain prior settings, this algorithm recovers the exact iterates of the Conjugate Gradient method, but with the critical addition of uncertainty estimates.
  • Uncertainty Calibration: A major contribution is "Rayleigh regression." Because solvers usually find the largest eigenvalues first, they can become "overconfident" about the remaining error. The authors use a Gaussian Process (GP) regression on the Rayleigh quotients of the matrix to estimate the remaining spectrum and properly calibrate the solver's confidence.

Key Insights and Results

The paper evaluates the solver on several problem types, including inverting kernel Gram matrices (Matérn and RBF), large-scale real-world datasets (Airline Delay), and solving partial differential equations via the Galerkin method.

  • The "Desiderata": The authors formalize what a "good" probabilistic solver should look like: it must be computationally lightweight, encode symmetry and positive-definiteness, and maintain consistency between the matrix and its inverse.
  • Transfer Learning for Solvers: Because the solver produces a posterior over the inverse matrix $H$, you can use the result of one solve as a "warm start" (prior) for a related problem, effectively "recycling" computation.
  • Calibrated Uncertainty: Without the proposed Rayleigh regression, probabilistic solvers are wildly overconfident. With it, the "numerical uncertainty" accurately reflects the true error.
  • GP Inference: When using this solver for Gaussian Process regression, the resulting "numerical variance" can be added to the standard GP variance, providing a more honest picture of the model's total uncertainty.

Limitations and Future Work

While promising, the framework has a few limitations. The low-rank updates add a constant factor of computational overhead compared to a bare-bones CG implementation. Furthermore, the current framework assumes we can compute $As_i$ exactly. In many ML settings (like stochastic gradient descent), we only have noisy estimates of these products, and extending the inverse model to handle noise tractably remains a challenge. Finally, the solver currently does not provide beliefs over non-linear properties like the determinant or the full eigenvalue spectrum, which are often needed in advanced ML applications.

Summary updated

BibTeX
@inproceedings{wenger2020probabilistic,
  author = {Jonathan Wenger and Philipp Hennig},
  title = {{Probabilistic Linear Solvers for Machine Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
  url = {https://openreview.net/forum?id=DdJk8jITL5H},
}
Figure