Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Result 1: a one-hidden-layer network converges to a Gaussian process as n→∞n\to\inftyn→∞

Proved
LesHouchesWidth.nngp_limit_one_hidden_layer

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

machine-learningneural-networksprobability

Consider a fully connected network with one hidden layer of width nnn, input width n0n_0n0​ and output width n2n_2n2​, with independent parameters

bi(1)∼N(0,σb2),Wij(1)∼N(0,σw2n0),bi(2)∼N(0,σb2),Wij(2)∼N(0,σw2n),b^{(1)}_i\sim\mathcal N(0,\sigma_b^2),\quad W^{(1)}_{ij}\sim\mathcal N\Big(0,\frac{\sigma_w^2}{n_0}\Big),\quad b^{(2)}_i\sim\mathcal N(0,\sigma_b^2),\quad W^{(2)}_{ij}\sim\mathcal N\Big(0,\frac{\sigma_w^2}{n}\Big),bi(1)​∼N(0,σb2​),Wij(1)​∼N(0,n0​σw2​​),bi(2)​∼N(0,σb2​),Wij(2)​∼N(0,nσw2​​),

and a measurable nonlinearity φ\varphiφ. Fix inputs x1,…,xmx_1,\dots,x_mx1​,…,xm​ such that φ2\varphi^2φ2 is integrable against N(0,K(1)(xa,xa))\mathcal N(0,K^{(1)}(x_a,x_a))N(0,K(1)(xa​,xa​)) for each aaa. Then, as n→∞n\to\inftyn→∞, the vector (zi(2)(xa))i≤n2, a≤m(z^{(2)}_i(x_a))_{i\le n_2,\,a\le m}(zi(2)​(xa​))i≤n2​,a≤m​ converges in distribution to a centered Gaussian vector with covariance

δij K(2)(xa,xb),K(2)(x,x′)=σb2+σw2 E(u1,u2)∼N(0,Σ)[φ(u1)φ(u2)],\delta_{ij}\,K^{(2)}(x_a,x_b),\qquad K^{(2)}(x,x')=\sigma_b^2+\sigma_w^2\,\mathbb E_{(u_1,u_2)\sim\mathcal N(0,\Sigma)}[\varphi(u_1)\varphi(u_2)],δij​K(2)(xa​,xb​),K(2)(x,x′)=σb2​+σw2​E(u1​,u2​)∼N(0,Σ)​[φ(u1​)φ(u2​)],

with Σ\SigmaΣ the 2×22\times22×2 matrix of K(1)(x,x′)=σb2+σw2x⋅x′/n0K^{(1)}(x,x')=\sigma_b^2+\sigma_w^2x\cdot x'/n_0K(1)(x,x′)=σb2​+σw2​x⋅x′/n0​ values. In particular the output is a Gaussian process with mean 000 and kernel K(2)K^{(2)}K(2), and distinct outputs are independent.

This is Neal's observation that wide single-hidden-layer networks define Gaussian process priors over functions.

Formalization Note Convergence in distribution is expressed with bounded continuous test functions. Lecture 1 writes z1z^1z1 and K1K^1K1 for what is z(2)z^{(2)}z(2) and K(2)K^{(2)}K(2) here.

Preamble
import Mathlib
import Definitions.Def_LesHouchesWidth_GaussianMLP
Formal statement
namespace LesHouchesWidth

open MeasureTheory ProbabilityTheory

theorem nngp_limit_one_hidden_layer (σb σw : ℝ) (φ : ℝ → ℝ) (hφ : Measurable φ)
    (n0 n2 m : ℕ) (xs : Fin m → Fin n0 → ℝ)
    (hφ2 : ∀ a, Integrable (fun u => φ u ^ 2)
      (gaussianReal 0 (nngpKernel (σb ^ 2) (σw ^ 2) φ 1 (xs a) (xs a)).toNNReal))
    (g : BoundedContinuousFunction (EuclideanSpace ℝ (Fin n2 × Fin m)) ℝ) :
    Filter.Tendsto
      (fun N : ℕ => ∫ θ, g (outputVector (σb ^ 2) (σw ^ 2) φ
          (uniformWidths_last n0 n2 1 N) xs θ)
        ∂(stdGaussianParams (uniformWidths n0 n2 1 N) 1))
      Filter.atTop
      (nhds (∫ v, g v ∂(multivariateGaussian 0
        (blockDiagCov (k := n2) fun a b => nngpKernel (σb ^ 2) (σw ^ 2) φ 2 (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. 3, Result 1, eqs. (5)–(7) (Lecture 1, Section 1.3).
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 measurable. Let n0,n2,m∈Nn_0,n_2,m\in\mathbb Nn0​,n2​,m∈N and inputs x1,…,xm∈Rn0x_1,\dots,x_m\in\mathbb R^{n_0}x1​,…,xm​∈Rn0​. Assume that for each aaa the function u↦φ(u)2u\mapsto\varphi(u)^2u↦φ(u)2 is integrable against the centered normal law with variance max⁡(K1(xa,xa),0)\max(K_1(x_a,x_a),0)max(K1​(xa​,xa​),0), where K1(x,y)=σb2+σw2(x⋅y)/n0K_1(x,y)=\sigma_b^2+\sigma_w^2(x\cdot y)/n_0K1​(x,y)=σb2​+σw2​(x⋅y)/n0​. Let ggg be any bounded continuous real function on the Euclidean space indexed by pairs (i,a)(i,a)(i,a), i<n2i<n_2i<n2​, a<ma<ma<m. For each NNN, take the depth-one network (one hidden layer) with widths (n0,N,n2)(n_0,N,n_2)(n0​,N,n2​), biases ∣σb∣θ|\sigma_b|\theta∣σb​∣θ and weights σw2/nℓ θ\sqrt{\sigma_w^2/n_\ell}\,\thetaσw2​/nℓ​​θ for i.i.d. standard normal θ\thetaθ. Let aN=E g((zi(2)(xa))i,a)a_N=\mathbb E\,g\big((z^{(2)}_i(x_a))_{i,a}\big)aN​=Eg((zi(2)​(xa​))i,a​). The theorem asserts aN→∫g dN(0,C)a_N\to\int g\,d\mathcal N(0,C)aN​→∫gdN(0,C) as N→∞N\to\inftyN→∞. Here C(i,a),(j,b)=δijK2(xa,xb)C_{(i,a),(j,b)}=\delta_{ij}K_2(x_a,x_b)C(i,a),(j,b)​=δij​K2​(xa​,xb​) and

K_2(x,y)=\sigma_b^2+\sigma_w^2\int\varphi(u_0)\varphi(u_1)\,d\mathcal N\Big(0,\begin{psmallmatrix}K_1(x,x)&K_1(x,y)\\K_1(x,y)&K_1(y,y)\end{psmallmatrix}\Big)(u).

No integrability of φ\varphiφ beyond the stated square-integrability, and no continuity, is assumed.

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