Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 1 (3): the gap of the VNMC bound is an expected KL divergence

Proved
VariationalBOED.vnmc_bound_gap_eq_expected_kl

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

bayesian-experimental-designexpected-information-gainkl-divergencemonte-carlovariational-bounds

Let p(θ)p(y∣θ,d)p(\theta)p(y\mid\theta,d)p(θ)p(y∣θ,d) be a model with EIG(d)\mathrm{EIG}(d)EIG(d) finite, let qvq_vqv​ be a valid VNMC proposal, and let L≥1L\ge1L≥1. For each yyy put

P(θ1:L∣y,d)=1L∑ℓ=1Lp(θℓ∣y,d)∏k≠ℓqv(θk∣y,d).P(\theta_{1:L}\mid y,d)=\frac1L\sum_{\ell=1}^Lp(\theta_\ell\mid y,d)\prod_{k\ne\ell}q_v(\theta_k\mid y,d).P(θ1:L​∣y,d)=L1​ℓ=1∑L​p(θℓ​∣y,d)k=ℓ∏​qv​(θk​∣y,d).

Then UVNMC(d,L)\mathcal U_{\mathrm{VNMC}}(d,L)UVNMC​(d,L) is finite if and only if Ep(y∣d)[KL(∏ℓ=1Lqv(θℓ∣y,d) ∥ P(θ1:L∣y,d))]<∞\mathbb E_{p(y\mid d)}\big[\mathrm{KL}\big(\prod_{\ell=1}^Lq_v(\theta_\ell\mid y,d)\,\|\,P(\theta_{1:L}\mid y,d)\big)\big]<\inftyEp(y∣d)​[KL(∏ℓ=1L​qv​(θℓ​∣y,d)∥P(θ1:L​∣y,d))]<∞. In that case

UVNMC(d,L)−EIG(d)=Ep(y∣d)[KL(∏ℓ=1Lqv(θℓ∣y,d) ∥ P(θ1:L∣y,d))].\mathcal U_{\mathrm{VNMC}}(d,L)-\mathrm{EIG}(d)=\mathbb E_{p(y\mid d)}\Big[\mathrm{KL}\Big(\prod_{\ell=1}^Lq_v(\theta_\ell\mid y,d)\,\Big\|\,P(\theta_{1:L}\mid y,d)\Big)\Big].UVNMC​(d,L)−EIG(d)=Ep(y∣d)​[KL(ℓ=1∏L​qv​(θℓ​∣y,d)​P(θ1:L​∣y,d))].

The gap of the VNMC bound is thus an expected KL divergence between the proposal's product law on ΘL\Theta^LΘL and a mixture that places the true posterior in one coordinate.

Formalization Note The paper's identity is in extended reals. Here EIG(d)\mathrm{EIG}(d)EIG(d) is assumed finite, and the case UVNMC(d,L)=+∞\mathcal U_{\mathrm{VNMC}}(d,L)=+\inftyUVNMC​(d,L)=+∞ is stated as the equivalence between finiteness of the two sides.

Preamble
import Mathlib
import Definitions.Def_VariationalBOED_Basic

open MeasureTheory ProbabilityTheory InformationTheory Filter Topology
open scoped ENNReal
Formal statement
namespace VariationalBOED

theorem vnmc_bound_gap_eq_expected_kl {Th Y : Type*} [MeasurableSpace Th] [MeasurableSpace Y]
    (nuT : Measure Th) (nuY : Measure Y) [SigmaFinite nuT] [SigmaFinite nuY]
    (p : Th → ℝ) (lik : Th → Y → ℝ) (hM : IsModel nuT nuY p lik)
    (qv : Y → Th → ℝ) (hq : IsValidVNMCProposal nuT p lik qv)
    (hEIG : Integrable (eigIntegrand nuT p lik) (jointLaw nuT nuY p lik))
    (L : ℕ) (hL : 1 ≤ L) :
    (Integrable (vnmcIntegrand p lik qv L) (vnmcLaw nuT nuY p lik qv L) ↔
      (∫⁻ y, klDiv (vnmcProposalProd nuT qv L y) (vnmcMixture nuT p lik qv L y)
        ∂marginalLaw nuT nuY p lik) ≠ ⊤) ∧
    (Integrable (vnmcIntegrand p lik qv L) (vnmcLaw nuT nuY p lik qv L) →
      vnmcBound nuT nuY p lik qv L - eig nuT nuY p lik =
        (∫⁻ y, klDiv (vnmcProposalProd nuT qv L y) (vnmcMixture nuT p lik qv L y)
          ∂marginalLaw nuT nuY p lik).toReal) := by sorry

end VariationalBOED
Source
Foster, Jankowiak, Bingham, Horsfall, Teh, Rainforth and Goodman, Variational Bayesian Optimal Experimental Design, arXiv:1903.05480v3 (NeurIPS 2019), Section 3, Lemma 1 (3), eq. (10), p. 4; proof in Appendix A.3, eqs. (40)-(44), pp. 14-15
Read-back

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

Setting. The statement involves the following objects:

  • Θ\ThetaΘ and Y\mathcal YY are arbitrary measurable spaces, with σ\sigmaσ-finite reference measures νΘ\nu_\ThetaνΘ​ on Θ\ThetaΘ and νY\nu_{\mathcal Y}νY​ on Y\mathcal YY.
  • p:Θ→Rp:\Theta\to\mathbb Rp:Θ→R and ℓ:Θ×Y→R\ell:\Theta\times\mathcal Y\to\mathbb Rℓ:Θ×Y→R (written ℓ(θ,y)\ell(\theta,y)ℓ(θ,y)) are real-valued functions forming a model:
    • ppp is measurable, nonnegative, and ∫p dνΘ=1\int p\,d\nu_\Theta = 1∫pdνΘ​=1.
    • (θ,y)↦ℓ(θ,y)(\theta,y)\mapsto \ell(\theta,y)(θ,y)↦ℓ(θ,y) is jointly measurable and nonnegative.
    • For every θ\thetaθ, ∫ℓ(θ,y) νY(dy)=1\int \ell(\theta,y)\,\nu_{\mathcal Y}(dy) = 1∫ℓ(θ,y)νY​(dy)=1.
  • LLL is a natural number with L≥1L\ge 1L≥1.

Derived quantities. Write

m(y)=∫Θp(θ) ℓ(θ,y) νΘ(dθ)m(y)=\int_\Theta p(\theta)\,\ell(\theta,y)\,\nu_\Theta(d\theta)m(y)=∫Θ​p(θ)ℓ(θ,y)νΘ​(dθ)

for the marginal. Since this is a Bochner integral, m(y)=0m(y)=0m(y)=0 whenever the integrand is not integrable in θ\thetaθ.

The posterior is

πy(θ)=p(θ) ℓ(θ,y)m(y),\pi_y(\theta)=\frac{p(\theta)\,\ell(\theta,y)}{m(y)},πy​(θ)=m(y)p(θ)ℓ(θ,y)​,

with the convention x/0=0x/0=0x/0=0, so πy≡0\pi_y\equiv 0πy​≡0 wherever m(y)=0m(y)=0m(y)=0.

The measures used are:

  • The joint law JJJ on Θ×Y\Theta\times\mathcal YΘ×Y, which has density p(θ)ℓ(θ,y)p(\theta)\ell(\theta,y)p(θ)ℓ(θ,y) with respect to νΘ⊗νY\nu_\Theta\otimes\nu_{\mathcal Y}νΘ​⊗νY​.
  • The marginal law MMM on Y\mathcal YY, which has density mmm with respect to νY\nu_{\mathcal Y}νY​.

Throughout, the real logarithm follows the conventions log⁡0=0\log 0=0log0=0 and log⁡x=log⁡∣x∣\log x=\log|x|logx=log∣x∣ for x<0x<0x<0.

The proposal qvq_vqv​. The function qv:Y×Θ→Rq_v:\mathcal Y\times\Theta\to\mathbb Rqv​:Y×Θ→R (written qv(θ∣y)q_v(\theta\mid y)qv​(θ∣y)) is assumed to be a valid VNMC proposal. This means:

  1. (y,θ)↦qv(θ∣y)(y,\theta)\mapsto q_v(\theta\mid y)(y,θ)↦qv​(θ∣y) is jointly measurable and nonnegative, and ∫qv(θ∣y) νΘ(dθ)=1\int q_v(\theta\mid y)\,\nu_\Theta(d\theta)=1∫qv​(θ∣y)νΘ​(dθ)=1 for every yyy.
  2. For every yyy with m(y)>0m(y)>0m(y)>0 and every θ\thetaθ, we have qv(θ∣y)>0  ⟺  πy(θ)>0q_v(\theta\mid y)>0 \iff \pi_y(\theta)>0qv​(θ∣y)>0⟺πy​(θ)>0.
  3. For every yyy with m(y)>0m(y)>0m(y)>0, there is a real BBB such that p(θ)ℓ(θ,y)/qv(θ∣y)≤Bp(\theta)\ell(\theta,y)/q_v(\theta\mid y)\le Bp(θ)ℓ(θ,y)/qv​(θ∣y)≤B for all θ\thetaθ. Here the ratio is 000 wherever qv=0q_v=0qv​=0.

Integrability hypothesis. It is assumed that the function

(θ,y)↦log⁡ℓ(θ,y)m(y)(\theta,y)\mapsto \log\frac{\ell(\theta,y)}{m(y)}(θ,y)↦logm(y)ℓ(θ,y)​

is integrable with respect to JJJ. Its JJJ-integral is denoted EIG\mathrm{EIG}EIG.

The VNMC objects. Let θ1:L=(θ1,…,θL)∈ΘL\theta_{1:L}=(\theta_1,\dots,\theta_L)\in\Theta^Lθ1:L​=(θ1​,…,θL​)∈ΘL.

The law VLV_LVL​ on (Θ×Y)×ΘL(\Theta\times\mathcal Y)\times\Theta^L(Θ×Y)×ΘL has density

p(θ0) ℓ(θ0,y)∏i=1Lqv(θi∣y)p(\theta_0)\,\ell(\theta_0,y)\prod_{i=1}^L q_v(\theta_i\mid y)p(θ0​)ℓ(θ0​,y)i=1∏L​qv​(θi​∣y)

with respect to νΘ⊗νY⊗νΘ⊗L\nu_\Theta\otimes\nu_{\mathcal Y}\otimes\nu_\Theta^{\otimes L}νΘ​⊗νY​⊗νΘ⊗L​.

The integrand is

gL(θ0,y,θ1:L)=log⁡ℓ(θ0,y)−log⁡(1L∑i=1Lp(θi) ℓ(θi,y)qv(θi∣y)),g_L(\theta_0,y,\theta_{1:L})=\log \ell(\theta_0,y)-\log\Big(\frac1L\sum_{i=1}^L\frac{p(\theta_i)\,\ell(\theta_i,y)}{q_v(\theta_i\mid y)}\Big),gL​(θ0​,y,θ1:L​)=logℓ(θ0​,y)−log(L1​i=1∑L​qv​(θi​∣y)p(θi​)ℓ(θi​,y)​),

and UL=∫gL dVLU_L=\int g_L\,dV_LUL​=∫gL​dVL​, with the Bochner convention that UL=0U_L=0UL​=0 if gLg_LgL​ is not integrable.

For each yyy, two measures on ΘL\Theta^LΘL are defined, both with respect to νΘ⊗L\nu_\Theta^{\otimes L}νΘ⊗L​:

  • QyQ_yQy​ has density ∏i=1Lqv(θi∣y)\prod_{i=1}^L q_v(\theta_i\mid y)∏i=1L​qv​(θi​∣y).
  • RyR_yRy​ has density
1L∑l=1Lπy(θl)∏k≠lqv(θk∣y).\frac1L\sum_{l=1}^L \pi_y(\theta_l)\prod_{k\ne l} q_v(\theta_k\mid y).L1​l=1∑L​πy​(θl​)k=l∏​qv​(θk​∣y).

Where m(y)=0m(y)=0m(y)=0, this density is 000, so RyR_yRy​ is the zero measure.

KL divergence. KL(μ ∥ ρ)∈[0,∞]\mathrm{KL}(\mu\,\|\,\rho)\in[0,\infty]KL(μ∥ρ)∈[0,∞] is defined as follows:

  • If μ≪ρ\mu\ll\rhoμ≪ρ and log⁡dμdρ\log\frac{d\mu}{d\rho}logdρdμ​ is μ\muμ-integrable, then
KL(μ ∥ ρ)=max⁡(0, ∫log⁡dμdρ dμ+ρ(total)−μ(total)).\mathrm{KL}(\mu\,\|\,\rho)=\max\Big(0,\ \int\log\tfrac{d\mu}{d\rho}\,d\mu+\rho(\text{total})-\mu(\text{total})\Big).KL(μ∥ρ)=max(0, ∫logdρdμ​dμ+ρ(total)−μ(total)).
  • Otherwise, KL(μ ∥ ρ)=+∞\mathrm{KL}(\mu\,\|\,\rho)=+\inftyKL(μ∥ρ)=+∞.

For probability measures this is the usual KL divergence.

Set

K=∫Y−KL(Qy ∥ Ry) M(dy)∈[0,∞].K=\int^{-}_{\mathcal Y}\mathrm{KL}(Q_y\,\|\,R_y)\,M(dy)\in[0,\infty].K=∫Y−​KL(Qy​∥Ry​)M(dy)∈[0,∞].

This is a lower (extended nonnegative) integral, and the divergence is taken in the direction proposal-product ∥\|∥ mixture.

Conclusion. The theorem asserts both of the following:

  1. gLg_LgL​ is integrable with respect to VLV_LVL​ if and only if K<∞K<\inftyK<∞.
  2. If gLg_LgL​ is integrable with respect to VLV_LVL​, then
UL−EIG=K,U_L-\mathrm{EIG}=K,UL​−EIG=K,

where KKK is read as a real number. Under this hypothesis KKK is finite by part 1.

When gLg_LgL​ is not integrable, no statement is made about UL−EIGU_L-\mathrm{EIG}UL​−EIG.

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