Computational Constraints on Probabilistic Solvers
Summary
A probabilistic linear solver is only useful if it costs essentially the same as CG. This note shows how: run CG, treat its collected action–output pairs as data, and combine them with a structured Gaussian prior so the posterior mean is plus a low-rank term (cheap to store and apply) and CG’s convergence properties transfer to the Gaussian posterior. It records the computationally-favoured prior choices (, , giving a diagonal Gram matrix and -tridiagonal factorisation), the empirical-Bayes tension ( kills the variance), and the cheaper solution-based view (a prior on / directly), which infers only the numbers .
Overview
Ch. 20 draws a practical corollary of the equivalence results: rather than building a bespoke “algorithm for inference”, one can wrap a probabilistic interpretation around an existing, highly optimised solver — “inference interpretation of an algorithm”. Since CG is the posterior mean of a Gaussian model (see Conjugate Gradients as Probabilistic Inference), the data it produces by running on can be fed to a structured Gaussian prior to obtain posteriors on and with convenient low-rank structure.
Two desiderata then arise:
- Computational efficiency: the posterior should have low storage/evaluation cost, reusing CG’s known properties (orthogonal gradients, conjugate directions).
- Uncertainty calibration: the posterior covariance should be analytically linked to the estimation error (the topic of Uncertainty Calibration for Linear Solvers).
Main Content
CG’s convergence transfers to the posterior mean
CG convergence and the low-rank mean ^def-convergence
CG after steps finds the estimate where is the degree- polynomial minimising , (20.1). If has eigenvalues , the -norm error after steps is roughly
If has large eigenvalues and small ones, CG finds a good estimate in only steps. Since estimates lie in the Krylov span of , the low-rank term in the posterior mean approximately covers the dominant eigenvalues of — the good convergence of CG becomes good convergence of the Gaussian posterior.
The computationally-favoured prior
Inference on with symmetry-encoding prior . Both efficiency and calibration point to:
Diagonal Gram matrix under CG directions ^def-diag-gram
With CG-produced (conjugate) directions, the Gram matrix is diagonal (conjugacy makes for ). Setting makes all terms vanish, and the posterior mean (19.21) reduces to a bare outer product:
Since has strictly positive diagonal (spd ), its square root is just . Storage is a single matrix .
For scalar , the matrix is symmetric tridiagonal (since ), and spd — so the required inverse is solvable in time by a positive-definite tridiagonal solver (LAPACK xPTSV, ~ flops). Tridiagonal problems are “essentially trivial”.
Calibration and the empirical-Bayes tension
The hypothetical and its perfect calibration
The (inaccessible) choice is also favourable for calibration: the prior assigns element-wise variance (20.4). For diagonal elements this gives perfect calibration — the expected square error equals the true square error:
For off-diagonal elements the variance is an upper error bound (ratio ), since spd implies (20.6). So symmetric-Kronecker structure forces a trade-off: perfect on the diagonal, under-confident (conservative) off it.
But is unusable ( is the very unknown). The empirical-Bayes substitute ensures but makes the posterior variance vanish:
So a smarter estimate of — consistent with the chosen mean but giving non-zero variance — is required; that is Ch. 21.
Pseudoinverse for the estimator
With , is rank-deficient, so the matrix inversion lemma cannot form . The Moore–Penrose pseudoinverse works instead: , and is tridiagonal spd, invertible in operations. is also the small- limit of arising from .
Inferring the solution x directly (solution-based inference)
If only one matters, threading through the full matrix inverse is wasteful. Because is a linear map of , any Gaussian prior on induces a Gaussian prior on :
Solution-based Gaussian model ^def-solution-based
with induces
The noise-free observations read, in the solution view, as linear projections of :
This is a statement about only the numbers in , not the numbers in — so inference on is more limited but less expensive than inference on plus a projection. The direct posterior is
Worked induced priors: a symmetric-Kronecker prior induces with , ; the matrix inversion lemma yields a manageable (20.10), computable by tracking the -vector and the matrix (tridiagonal spd when comes from CG and ). This solution-based view — inference on as a limited but cheap alternative to matrix-based inference — is the setting of Cockayne et al. (2019a) / Bartels et al. (2019).
Examples
"Algorithms for inference" vs "inference interpretations of algorithms"
Two stances: (1) design a probabilistic algorithm from scratch whose prior is consistent with the actions; (2) run vanilla CG, then interpret its output as data under a convenient Gaussian prior. The practical stance (2) no longer cares whether the prior is consistent with CG’s actions — it just wants a cheap, well-calibrated posterior mean ( + low rank) and covariance. Cost stays at CG’s .
Cost accounting for the tridiagonal factorisation
Running CG with makes tridiagonal spd. The needed inverse is then (LAPACK
xPTSV), not . So the full probabilistic wrap adds no order-of-magnitude overhead to CG.
Connections
- Resolves the “means only need accessible ” observation from Conjugate Gradients as Probabilistic Inference into concrete cheap algorithms.
- The failure motivates the projection-complement covariance of Uncertainty Calibration for Linear Solvers.
- Solution-based inference on is the linear-algebra analogue of only tracking the quantity of interest, cf. Bayesian Quadrature tracking only the integral.
See Also
- Uncertainty Calibration for Linear Solvers — how to pick so variance is non-zero yet consistent with .
- Conjugate Gradients as Probabilistic Inference — establishes that CG’s output is legitimate posterior-mean data.
- Probabilistic Linear Solvers - Algorithmic Scaffold — the posterior formulas (19.10/19.11/19.21) specialised here.
- Gaussian Priors over Matrices and the Symmetric Kronecker Product — the Kronecker/pseudoinverse machinery used.