Conjugate Gradients as Probabilistic Inference
Summary
This note states and proves the central equivalence of Part III: the iterates of Conjugate Gradients are the posterior means of a specific Gaussian probabilistic linear solver. Formally, for scalar-mean symmetric-Kronecker Gaussian priors on (or ) with covariance parameter (Theorem 19.16), the abstract solver Algorithm 17.2 produces exactly the CG sequence . The result rests on three pillars: symmetric estimator ⇒ conjugate directions (Thm 18.2), conjugate + Krylov ⇒ CG (Thm 18.4 / Cor 18.5), and Gaussian consistency. Full proof sketches from Ch. 22 are reproduced.
Overview
CG (Algorithm 16.1) is an efficient, purely deterministic algorithm. The claim is that it is also a probabilistic numerical method: there is a Gaussian prior such that running Bayesian inference over the matrix (or its inverse), collecting matrix-vector products along conjugate directions, yields posterior means identical to CG’s iterates. This makes CG “a probabilistic agent choosing which matrix-vector products to observe” — the recurring thesis, now a theorem.
The logical chain (see Classic Linear Solvers - A Review for the classical half, Probabilistic Linear Solvers - Algorithmic Scaffold for the Gaussian half):
Main Content
The classical characterisation of CG
CG is the conjugate-direction method that is also a Krylov subspace method.
Theorem 18.4 (conditions making the skeleton = CG directions) ^thm-184
If is spd, is symmetric for all , the Krylov assumption (18.3) holds, and Algorithm 17.2 has not terminated before step , then residuals are mutually orthogonal (, ) and there exist with
Hence : identical up to a scalar.
Corollary 18.5 ^thm-185
Under Theorem 18.4’s assumptions, Algorithm 17.2 produces the exact same estimate sequence as CG initialised at . The scaling is absorbed by the step size , so estimates coincide.
The probabilistic version
Theorem 19.16 (Probabilistic Conjugate Gradients) ^thm-1916
Consider a prior . For all parameter choices with scalar and (for , ), Algorithm 17.2 is equivalent to the method of conjugate gradients — it produces the exact same sequence of estimates . The same is true for the model class with scalar and .
Symbols: = scalar prior mean level; = covariance-parameter scalars; = symmetric Kronecker product; formally includes the inaccessible true (and the true ).
Why the inaccessible / can appear
The posterior means contain only through (using ), and (using ). These are computable at runtime, so the mean/iterate is well-defined even though the “prior covariance” references the unknown matrix. Only the covariance genuinely needs , which is why error bars require the empirical-Bayes calibration of Uncertainty Calibration for Linear Solvers.
Proof (of Theorem 19.16). By Theorem 19.15 (symmetric Kronecker covariance ⇒ conjugate directions), the constructed algorithm is a conjugate-direction method. For Theorem 18.4 to apply we must verify the Krylov assumption (18.3): that the estimator maps the gradient into .
Inspecting the posterior-mean image of (right column of Table 19.1), maps any into . For scalar and (so , using ), is mapped into — exactly (18.3). For the -model, maps into ; for scalar , and this is . Either way (18.3) holds, so Theorem 18.4 and Corollary 18.5 give equivalence to CG.
Proof sketches from Chapter 22
Proof of Theorem 18.2 (symmetric ⇒ conjugate directions)
By induction. Base (): with , using symmetry of in the third-to-last equality,
Inductive step: assume pairwise -conjugate. For , applying the assumption twice,
Proof of Theorem 18.4 (structure ⇒ CG) ^proof-184
Because symmetric, Thm 18.2 gives conjugacy, so and ; non-termination gives . Induction:
- : empty, so , i.e. ; this yields , , , so .
- Compute ; imposing -conjugacy fixes , and algebra using yields the required form .
- General step: assume () and for . Write (22.3). Conjugacy with the induction hypothesis for forces for ; one remaining degree of freedom (conjugacy to ) gives , hence (22.4). Finally, using the recursion to rewrite past gradients as combinations of search directions and the updated-gradient identity , one shows for all , closing the induction.
Proof of Lemma 18.3 (Krylov equivalence) ^proof-183
Since , , , Eq. (18.3) shortens to (22.1). A trivial induction (: ; assume ) yields (18.4), the Krylov property. Equivalent spans: .
Proof sketch of Theorem 19.10 (hereditary pos-def via inflated prior) ^proof-1910
For scalar , so cancels in the pos-def condition (19.27), and is the projection of onto the complement of . Inductively assuming pos-def, the subtracted term in (19.27) is strictly positive, so the RHS is below ; the LHS . Using from (19.24), conjugacy gives , , , reducing to with as , so . Thus for large enough the inequality holds and is pos-def. Informally, since , choose .
Examples
BayesCG in one line
Take (scalar mean, scalar symmetric-Kronecker covariance). Running Algorithm 17.2 with this prior reproduces CG’s exactly, while additionally maintaining a Gaussian posterior over (or ). Setting the prior mean scalar large enough (Thm 19.10) even keeps every posterior-mean estimate spd. This is the model that in Ch. 21 is chosen for its cheap, positive-semi-definite, fast-converging mean and then equipped with a calibrated covariance.
Two "natural" derivations of CG
CG can be derived from a prior on or on its inverse (Theorem 19.16 covers both), and — by posterior correspondence (Def. 19.11) — the two resulting uncertainties can be made closely related, though not identical. This is the Part III echo of “one algorithm, several probabilistic readings”.
Connections
- Depends entirely on Classic Linear Solvers - A Review (Thms 18.2/18.4, Cor 18.5) and Probabilistic Linear Solvers - Algorithmic Scaffold (Gaussian models, Thm 19.15).
- The scalar prior is the starting point of Uncertainty Calibration for Linear Solvers and the conjugate-prior treatment in Ch. 22.5.
- The “means need only accessible /” trick feeds directly into Computational Constraints on Probabilistic Solvers.
See Also
- Classic Linear Solvers - A Review — the classical theorems this note completes with proofs.
- Probabilistic Linear Solvers - Algorithmic Scaffold — the Gaussian models and Theorem 19.15/19.16 context.
- Uncertainty Calibration for Linear Solvers — supplies the covariance the equivalence leaves free.
- The Linear Algebra Problem and Evaluation Strategies — Algorithm 17.2 and CG Algorithm 16.1.