Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Eq. (124): E[(∂zq(L+1)/∂xp)2]=2/n0\mathbb E[(\partial z^{(L+1)}_q/\partial x_p)^2]=2/n_0E[(∂zq(L+1)​/∂xp​)2]=2/n0​ for random ReLU networks

Proved
LesHouchesWidth.jacobian_second_moment

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

machine-learningneural-networksprobability

Let μ\muμ be a probability measure on R\mathbb RR that has a density with respect to Lebesgue measure, is symmetric about 000, and has variance 111. Let L≥1L\ge1L≥1 and n0,…,nL+1≥1n_0,\dots,n_{L+1}\ge1n0​,…,nL+1​≥1, and consider the ReLU network with weights Wij(ℓ)=(2/nℓ−1)1/2W^ij(ℓ)W^{(\ell)}_{ij}=(2/n_{\ell-1})^{1/2}\widehat W^{(\ell)}_{ij}Wij(ℓ)​=(2/nℓ−1​)1/2Wij(ℓ)​, W^ij(ℓ)\widehat W^{(\ell)}_{ij}Wij(ℓ)​ i.i.d. ∼μ\sim\mu∼μ, and zero biases. Then for every fixed input x≠0x\neq0x=0 and all p≤n0p\le n_0p≤n0​, q≤nL+1q\le n_{L+1}q≤nL+1​,

E[(∂zq(L+1)∂xp(x))2]=2n0.\mathbb E\Big[\Big(\frac{\partial z^{(L+1)}_q}{\partial x_p}(x)\Big)^2\Big]=\frac{2}{n_0}.E[(∂xp​∂zq(L+1)​​(x))2]=n0​2​.

The second moment of the input–output Jacobian is independent of depth and of the hidden widths. This is the exact sense in which CW=2C_W=2CW​=2 is the critical initialization for ReLU networks.

Formalization Note The Jacobian entry is the Fréchet derivative, taken to be 000 where the network is not differentiable. Since 2/n0≠02/n_0\neq02/n0​=0, the equation also asserts integrability.

Preamble
import Mathlib
import Definitions.Def_LesHouchesWidth_ReLUNet
Formal statement
namespace LesHouchesWidth

open MeasureTheory ProbabilityTheory

theorem jacobian_second_moment (μ : Measure ℝ) [IsProbabilityMeasure μ]
    (hμ_ac : μ ≪ volume) (hμ_symm : μ.map (fun t : ℝ => -t) = μ)
    (hμ_var : ∫ t, t ^ 2 ∂μ = 1)
    (L : ℕ) (hL : 1 ≤ L) (n : ℕ → ℕ) (hn : ∀ ℓ ≤ L + 1, 1 ≤ n ℓ)
    (x : Fin (n 0) → ℝ) (hx : x ≠ 0) (p : Fin (n 0)) (q : Fin (n (L + 1))) :
    ∫ ω, (jacobianEntry ω x p q) ^ 2 ∂(weightLaw n L μ) = 2 / (n 0 : ℝ) := 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. 41, eq. (124) (Section 5.5.1), under the assumptions of Section 5.3 (p. 39).
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.

The measure μ\muμ is a probability measure on R\mathbb RR, absolutely continuous with respect to Lebesgue measure. It is invariant under t↦−tt\mapsto-tt↦−t (its pushforward under negation equals μ\muμ), and ∫t2 dμ(t)=1\int t^2\,d\mu(t)=1∫t2dμ(t)=1. Since the integral of a non-integrable function is 000 by convention, the last condition also forces t2t^2t2 to be μ\muμ-integrable. The depth satisfies L≥1L\ge1L≥1, and the widths satisfy nℓ≥1n_\ell\ge1nℓ​≥1 for all ℓ≤L+1\ell\le L+1ℓ≤L+1. The input x∈Rn0x\in\mathbb R^{n_0}x∈Rn0​ is nonzero, and p<n0p<n_0p<n0​, q<nL+1q<n_{L+1}q<nL+1​. Write J(ω)J(\omega)J(ω) for jacobianEntry ω x p q: the Fréchet derivative at xxx of y↦zq(L+1)(ω,y)y\mapsto z^{(L+1)}_q(\omega,y)y↦zq(L+1)​(ω,y) in direction epe_pep​, set to 000 if not differentiable. Here zzz is the zero-bias ReLU network with weights 2/nℓ ωℓ,i,j\sqrt{2/n_\ell}\,\omega_{\ell,i,j}2/nℓ​​ωℓ,i,j​. The theorem asserts

∫J(ω)2 dμ⊗(ω)=2n0.\int J(\omega)^2\,d\mu^{\otimes}(\omega)=\frac{2}{n_0}.∫J(ω)2dμ⊗(ω)=n0​2​.

Because the right-hand side is nonzero and a non-integrable function has integral 000 in Mathlib, the statement also asserts that J2J^2J2 is integrable.

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