Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Eqs. (13)–(14): deep networks converge to the NNGP (simultaneous infinite-width limit)

Open
LesHouchesWidth.nngp_limit_deep

by LG · Sep 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

machine-learningneural-networksprobability

Let φ\varphiφ be continuous with a linear envelope, ∣φ(u)∣≤c+M∣u∣|\varphi(u)|\le c+M|u|∣φ(u)∣≤c+M∣u∣. Fix a depth LLL, input width n0n_0n0​, output width noutn_{\mathrm{out}}nout​ and inputs x1,…,xm∈Rn0x_1,\dots,x_m\in\mathbb R^{n_0}x1​,…,xm​∈Rn0​. Consider the network with all hidden widths equal to NNN and Gaussian initialization (σb2\sigma_b^2σb2​, σw2/nℓ−1\sigma_w^2/n_{\ell-1}σw2​/nℓ−1​). As N→∞N\to\inftyN→∞ the vector (zi(L+1)(xa))i≤nout, a≤m(z^{(L+1)}_i(x_a))_{i\le n_{\mathrm{out}},\,a\le m}(zi(L+1)​(xa​))i≤nout​,a≤m​ converges in distribution to the centered Gaussian with covariance

Cov(zi(L+1)(xa),zj(L+1)(xb))=δij K(L+1)(xa,xb),\mathrm{Cov}\big(z^{(L+1)}_i(x_a),z^{(L+1)}_j(x_b)\big)=\delta_{ij}\,K^{(L+1)}(x_a,x_b),Cov(zi(L+1)​(xa​),zj(L+1)​(xb​))=δij​K(L+1)(xa​,xb​),

where K(ℓ)K^{(\ell)}K(ℓ) is the NNGP kernel recursion (13)–(14). That is, for every bounded continuous ggg, E g(z(L+1))→∫g dN(0,δijK(L+1))\mathbb E\,g(z^{(L+1)})\to\int g\,d\mathcal N(0,\delta_{ij}K^{(L+1)})Eg(z(L+1))→∫gdN(0,δij​K(L+1)).

This extends Result 1 to finite depth in the simultaneous limit.

Formalization Note The notes do not state conditions on φ\varphiφ. The continuity and linear-envelope condition is taken from Matthews et al. (2018).

Preamble
import Mathlib
import Definitions.Def_LesHouchesWidth_GaussianMLP
Formal statement
namespace LesHouchesWidth

open MeasureTheory ProbabilityTheory

theorem nngp_limit_deep (σb σw : ℝ) (φ : ℝ → ℝ) (hφ : Continuous φ)
    (hφ_env : ∃ c M : ℝ, ∀ u, |φ u| ≤ c + M * |u|)
    (L n0 nOut m : ℕ) (xs : Fin m → Fin n0 → ℝ)
    (g : BoundedContinuousFunction (EuclideanSpace ℝ (Fin nOut × Fin m)) ℝ) :
    Filter.Tendsto
      (fun N : ℕ => ∫ θ, g (outputVector (σb ^ 2) (σw ^ 2) φ
          (uniformWidths_last n0 nOut L N) xs θ)
        ∂(stdGaussianParams (uniformWidths n0 nOut L N) L))
      Filter.atTop
      (nhds (∫ v, g v ∂(multivariateGaussian 0
        (blockDiagCov (k := nOut) fun a b => nngpKernel (σb ^ 2) (σw ^ 2) φ (L + 1) (xs a) (xs b))))) := by sorry

end LesHouchesWidth
Source
Bahri, Hanin, Brossollet, Erba, Keup, Pacelli, Simon, *Les Houches Lectures on Deep Learning at Large & Infinite Width*, arXiv:2309.01592v3 (https://arxiv.org/abs/2309.01592), p. 5, Section 1.4, eqs. (13)–(14) (simultaneous limit; the notes refer to refs. [2,3] for proofs).
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic) - non-blind, same agent as drafter

Non-blind read-back. This read-back was written by the same agent (Aristotle, by Harmonic) that drafted the Lean statement, with full knowledge of the source and of the intended meaning. It is not independent testimony and should not be treated as a blind audit; an independent read-back is still recommended before launch.

Let σb,σw∈R\sigma_b,\sigma_w\in\mathbb Rσb​,σw​∈R, and let φ\varphiφ be continuous with constants c,Mc,Mc,M such that ∣φ(u)∣≤c+M∣u∣|\varphi(u)|\le c+M|u|∣φ(u)∣≤c+M∣u∣ for all uuu. Let L,n0,nout,m∈NL,n_0,n_{\mathrm{out}},m\in\mathbb NL,n0​,nout​,m∈N be arbitrary (including L=0L=0L=0), let x1,…,xm∈Rn0x_1,\dots,x_m\in\mathbb R^{n_0}x1​,…,xm​∈Rn0​, and let ggg be any bounded continuous real function on the Euclidean space indexed by pairs (i,a)(i,a)(i,a), i<nouti<n_{\mathrm{out}}i<nout​, a<ma<ma<m. For each NNN, take the network with widths n0n_0n0​ at layer 000, noutn_{\mathrm{out}}nout​ at layer L+1L+1L+1 and NNN elsewhere, with biases ∣σb∣θ|\sigma_b|\theta∣σb​∣θ and weights σw2/nℓ θ\sqrt{\sigma_w^2/n_\ell}\,\thetaσw2​/nℓ​​θ (θ\thetaθ i.i.d. standard normal). Let aNa_NaN​ be the expectation of ggg applied to the vector (zi(L+1)(xa))i,a(z^{(L+1)}_i(x_a))_{i,a}(zi(L+1)​(xa​))i,a​. The theorem asserts that aN→∫g dN(0,C)a_N\to\int g\,d\mathcal N(0,C)aN​→∫gdN(0,C) as N→∞N\to\inftyN→∞ along the natural numbers. Here C(i,a),(j,b)=KL+1(xa,xb)C_{(i,a),(j,b)}=K_{L+1}(x_a,x_b)C(i,a),(j,b)​=KL+1​(xa​,xb​) if i=ji=ji=j and 000 otherwise, and KKK is nngpKernel with Cb=σb2C_b=\sigma_b^2Cb​=σb2​, CW=σw2C_W=\sigma_w^2CW​=σw2​. For N=0N=0N=0 the hidden layers are empty, which does not affect the limit. If CCC were not positive semidefinite, Mathlib's multivariateGaussian would be the point mass at 000.

Human review
  • Endorsed by Shuze Chen · Sep 24, 2026

    Confirmed by the moderator at approval.

  • Endorsed by LG · Sep 24, 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