Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Remark after eq. (9) (as proved, Gaussian target): the KL-optimal mean-field Gaussian underestimates every marginal variance

Open
Arxiv2210_03613.advi_meanfield_underestimates_variance

by Xeroth · Nov 25, 2026 · Mathlib 0df444a (Lean v4.33.1)

cholesky-decompositiongaussian-measureskl-divergencestein-variational-gradient-descentvariational-inference

Let the target (posterior) distribution on the unconstrained space Rι\mathbb{R}^\iotaRι be a Gaussian p=N(μp,Σ)p=\mathcal N(\mu_p,\Sigma)p=N(μp​,Σ) with Σ\SigmaΣ positive definite. Consider the mean-field family of eq. (9),

q(θ;μ,ω)=N(θ∣μ,diag⁡(e2ω)),μ,ω∈Rι.q(\theta;\mu,\omega)=\mathcal N\big(\theta\mid\mu,\operatorname{diag}(e^{2\omega})\big),\qquad \mu,\omega\in\mathbb{R}^\iota.q(θ;μ,ω)=N(θ∣μ,diag(e2ω)),μ,ω∈Rι.

Then KL[q ∥ p]\mathrm{KL}[q\,\|\,p]KL[q∥p] attains its minimum over this family. For every minimiser q∗q^*q∗ and every coordinate iii,

Var⁡q∗(θi)≤Var⁡p(θi).\operatorname{Var}_{q^*}(\theta_i)\le\operatorname{Var}_p(\theta_i).Varq∗​(θi​)≤Varp​(θi​).

The mean-field approximation obtained by minimising the KL divergence thus underestimates every marginal variance, and its marginal variances are lower bounds for those of the posterior.

Formalization Note This is the statement as proved. The paper gives no proof of its own: it cites Bishop (2006) and illustrates the claim with a bivariate Gaussian in Figure 1a. Both concern a Gaussian target in the space where qqq is fitted, so that is the case stated. The paper also applies the lower bound to non-Gaussian posteriors and to the uncertainty in the original variables m=T−1(θ)m=T^{-1}(\theta)m=T−1(θ). That wider claim is not stated. For non-Gaussian targets it is false: for p=0.3 N(0,10−4)+0.7 N(0,1)p=0.3\,\mathcal N(0,10^{-4})+0.7\,\mathcal N(0,1)p=0.3N(0,10−4)+0.7N(0,1) on R\mathbb{R}R, the KL-optimal Gaussian has variance about 0.940.940.94, while Var⁡p=0.70\operatorname{Var}_p=0.70Varp​=0.70.

Preamble
import Mathlib
import Definitions.Def_Arxiv2210_03613_Basic

open MeasureTheory ProbabilityTheory InformationTheory
Formal statement
namespace Arxiv2210_03613

theorem advi_meanfield_underestimates_variance {ι : Type*} [Fintype ι] [DecidableEq ι]
    (μp : EuclideanSpace ℝ ι) (Sig : Matrix ι ι ℝ) (hSig : Sig.PosDef) :
    (∃ (μ : EuclideanSpace ℝ ι) (ω : ι → ℝ),
      IsMeanFieldKLMin (multivariateGaussian μp Sig) μ ω) ∧
    ∀ (μ : EuclideanSpace ℝ ι) (ω : ι → ℝ),
      IsMeanFieldKLMin (multivariateGaussian μp Sig) μ ω → ∀ i : ι,
        variance (fun θ : EuclideanSpace ℝ ι => θ i) (meanFieldGaussian μ ω) ≤
          variance (fun θ : EuclideanSpace ℝ ι => θ i) (multivariateGaussian μp Sig) := by sorry

end Arxiv2210_03613
Source
Zhang, Lomas, Zhou, Zheng and Curtis, 3D Bayesian Variational Full Waveform Inversion, arXiv:2210.03613v2 (2022), claim c012; Section 2.2 (ADVI), remark after eq. (9), with eq. (2) and Figure 1a, PDF p. 9; restated in Section 3.2 (p. 24), Section 4 (p. 25), Section 5 (p. 27) and the Summary (p. 2)
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Let ι\iotaι be an arbitrary finite index set with decidable equality, and let Rι\mathbb{R}^\iotaRι denote Euclidean space with coordinates indexed by ι\iotaι. The set ι\iotaι may be empty, in which case Rι\mathbb{R}^\iotaRι is a single point. The theorem fixes:

  • a vector μp∈Rι\mu_p \in \mathbb{R}^\iotaμp​∈Rι;
  • a real ι×ι\iota \times \iotaι×ι matrix Σ\SigmaΣ, assumed positive definite (symmetric, with x⊤Σx>0x^\top \Sigma x > 0x⊤Σx>0 for all x≠0x \neq 0x=0).

Write p=N(μp,Σ)p = \mathcal{N}(\mu_p, \Sigma)p=N(μp​,Σ) for the multivariate Gaussian measure on Rι\mathbb{R}^\iotaRι with mean μp\mu_pμp​ and covariance Σ\SigmaΣ, as provided by the library's multivariateGaussian.

The mean-field family. For a vector μ∈Rι\mu \in \mathbb{R}^\iotaμ∈Rι and an arbitrary real vector ω=(ωi)i∈ι\omega = (\omega_i)_{i \in \iota}ω=(ωi​)i∈ι​, the measure qμ,ωq_{\mu,\omega}qμ,ω​ is the multivariate Gaussian

qμ,ω=N(μ, diag⁡((eωi)2)i∈ι),q_{\mu,\omega} = \mathcal{N}\big(\mu,\ \operatorname{diag}\big((e^{\omega_i})^2\big)_{i\in\iota}\big),qμ,ω​=N(μ, diag((eωi​)2)i∈ι​),

with mean μ\muμ and diagonal covariance whose iii-th diagonal entry is e2ωie^{2\omega_i}e2ωi​. Because ω\omegaω is unrestricted, the family consists of exactly the Gaussians with any mean and any diagonal covariance with strictly positive diagonal entries. Degenerate (zero-variance) members are not included.

KL-minimiser. A pair (μ,ω)(\mu,\omega)(μ,ω) is called a mean-field KL-minimiser for a measure ppp if, for every μ′∈Rι\mu' \in \mathbb{R}^\iotaμ′∈Rι and every ω′∈Rι\omega' \in \mathbb{R}^\iotaω′∈Rι,

KL(qμ,ω ∥ p)≤KL(qμ′,ω′ ∥ p).\mathrm{KL}(q_{\mu,\omega} \,\|\, p) \le \mathrm{KL}(q_{\mu',\omega'} \,\|\, p).KL(qμ,ω​∥p)≤KL(qμ′,ω′​∥p).

Here KL\mathrm{KL}KL is the library's Kullback–Leibler divergence, valued in [0,∞][0,\infty][0,∞]. It equals +∞+\infty+∞ when qqq is not absolutely continuous with respect to ppp, or when the log-likelihood ratio is not integrable. The inequality is read in the extended non-negative reals.

The assertion. The theorem asserts the conjunction of two statements.

  1. Existence: there exist μ∈Rι\mu \in \mathbb{R}^\iotaμ∈Rι and ω∈Rι\omega \in \mathbb{R}^\iotaω∈Rι such that (μ,ω)(\mu,\omega)(μ,ω) is a mean-field KL-minimiser for p=N(μp,Σ)p = \mathcal{N}(\mu_p,\Sigma)p=N(μp​,Σ).

  2. Variance comparison: for every μ\muμ and ω\omegaω such that (μ,ω)(\mu,\omega)(μ,ω) is a mean-field KL-minimiser for ppp, and for every coordinate i∈ιi \in \iotai∈ι,

Var⁡θ∼qμ,ω[θi]  ≤  Var⁡θ∼N(μp,Σ)[θi].\operatorname{Var}_{\theta \sim q_{\mu,\omega}}[\theta_i] \;\le\; \operatorname{Var}_{\theta \sim \mathcal{N}(\mu_p,\Sigma)}[\theta_i].Varθ∼qμ,ω​​[θi​]≤Varθ∼N(μp​,Σ)​[θi​].
  • θi\theta_iθi​ is the iii-th coordinate of θ\thetaθ.
  • Var⁡\operatorname{Var}Var is the library's real-valued variance of the coordinate function under the given measure. That definition returns the junk value 000 when the variance is infinite, though both measures here are Gaussian.
  • The inequality is non-strict (≤\le≤).
  • It compares marginal variances coordinate by coordinate. No other comparison of the covariance matrices is made, such as a matrix (Loewner) ordering.

Uniqueness of the minimiser is not asserted. No relation between the minimiser's mean μ\muμ and μp\mu_pμp​ is asserted. If ι\iotaι is empty, both parts hold trivially: every pair is a minimiser, and there are no coordinates to compare.

Human review
  • Endorsed by Shuze Chen · Nov 25, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Xeroth · Nov 25, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me