Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 4.3 (as proved): the NTK of a PINN at initialization converges in probability

Proved
PINNNeuralTangent.ntk_init_converges

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

gaussian-processesgradient-flowinfinite-width-limitneural-tangent-kernelphysics-informed-neural-networks

Let σ\sigmaσ be smooth and let σ,σ˙,σ¨,σ...\sigma,\dot\sigma,\ddot\sigma,\dddot\sigmaσ,σ˙,σ¨,σ...​ grow at most polynomially: ∣σ(k)(z)∣≤C(1+∣z∣m)|\sigma^{(k)}(z)|\le C(1+|z|^m)∣σ(k)(z)∣≤C(1+∣z∣m) for k≤3k\le3k≤3. Take the model problem on Ω=(a,b)\Omega=(a,b)Ω=(a,b) with boundary points xbi∈{a,b}x_b^i\in\{a,b\}xbi​∈{a,b} and collocation points xrj∈(a,b)x_r^j\in(a,b)xrj​∈(a,b). Let K(0)K(0)K(0) be the NTK of the one-hidden-layer PINN of width NNN at the i.i.d. N(0,1)\mathcal N(0,1)N(0,1) initialization. Then, as N→∞N\to\inftyN→∞, K(0)K(0)K(0) converges in probability to the deterministic matrix

K∗=[Θuu(1)Θur(1)Θru(1)Θrr(1)].K^*=\begin{bmatrix}\Theta_{uu}^{(1)}&\Theta_{ur}^{(1)}\\\Theta_{ru}^{(1)}&\Theta_{rr}^{(1)}\end{bmatrix}.K∗=[Θuu(1)​Θru(1)​​Θur(1)​Θrr(1)​​].

That is, for every entry (i,j)(i,j)(i,j) and every ε>0\varepsilon>0ε>0, Pr⁡(∣K(0)ij−Kij∗∣≥ε)→0\Pr\big(|K(0)_{ij}-K^*_{ij}|\ge\varepsilon\big)\to0Pr(∣K(0)ij​−Kij∗​∣≥ε)→0. Here Θuu,Θur,Θrr\Theta_{uu},\Theta_{ur},\Theta_{rr}Θuu​,Θur​,Θrr​ are the Gaussian expectations in the definitions (Appendix C), and Θru(x,x′)=Θur(x′,x)\Theta_{ru}(x,x')=\Theta_{ur}(x',x)Θru​(x,x′)=Θur​(x′,x).

Formalization Note This is the statement as proved. The law-of-large-numbers steps of Appendix C determine each limit, but several printed closed forms differ from them. In Θrr\Theta_{rr}Θrr​ the factors 222, 222, 444 of J2,J3,J4J_2,J_3,J_4J2​,J3​,J4​ are dropped. BrrB_{rr}Brr​ and BurB_{ur}Bur​ evaluate the second factor at xxx instead of x′x'x′. CurC_{ur}Cur​ squares σ˙σ...\dot\sigma\dddot\sigmaσ˙σ...​. With Σ(1)\Sigma^{(1)}Σ(1) as defined in eq. (2.4), the printed Θuu\Theta_{uu}Θuu​ counts the constant 111 twice. The paper states no growth condition on σ\sigmaσ. The polynomial-growth hypothesis is added so that the expectations in K∗K^*K∗ are finite, which the law of large numbers requires. Convergence of the finite matrix is stated entrywise, which is equivalent.

Preamble
import Mathlib
import Definitions.Def_PINNNeuralTangent_Basic

open MeasureTheory ProbabilityTheory Filter Topology
open scoped ContDiff
Formal statement
namespace PINNNeuralTangent

theorem ntk_init_converges (σ : ℝ → ℝ) (hσ : ContDiff ℝ ∞ σ)
    (hgrowth : ∃ (C : ℝ) (m : ℕ), ∀ k ≤ 3, ∀ z, |iteratedDeriv k σ z| ≤ C * (1 + |z| ^ m))
    {Nb Nr : ℕ} (a b : ℝ) (xb : Fin Nb → ℝ) (xr : Fin Nr → ℝ) (hdata : IsModelData a b xb xr) :
    ∀ i j, ∀ ε > 0,
      Tendsto (fun N : ℕ => initMeasure N
          {θ | ε ≤ |modelNTK σ xb xr θ i j - limitNTK σ xb xr i j|}) atTop (𝓝 0) := by sorry

end PINNNeuralTangent
Source
Wang, Yu and Perdikaris, When and why PINNs fail to train: A neural tangent kernel perspective, arXiv:2007.14527v1 (2020), Section 4, Theorem 4.3, eq. (4.7), p. 6; limit K* computed in Appendix C, pp. 20-23
Read-back

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

Fix a function σ:R→R\sigma:\mathbb{R}\to\mathbb{R}σ:R→R, called the activation. Assume:

  • σ\sigmaσ is infinitely differentiable;
  • there are a real constant CCC and a natural number mmm such that, for k=0,1,2,3k=0,1,2,3k=0,1,2,3 and every z∈Rz\in\mathbb{R}z∈R,
∣σ(k)(z)∣≤C (1+∣z∣m).|\sigma^{(k)}(z)| \le C\,(1+|z|^m).∣σ(k)(z)∣≤C(1+∣z∣m).

Fix natural numbers NbN_bNb​ and NrN_rNr​; either may be 000. Fix reals a,ba,ba,b, boundary points xb1,…,xbNb∈Rx_b^1,\dots,x_b^{N_b}\in\mathbb{R}xb1​,…,xbNb​​∈R and collocation points xr1,…,xrNr∈Rx_r^1,\dots,x_r^{N_r}\in\mathbb{R}xr1​,…,xrNr​​∈R. Assume that a<ba<ba<b, that every xbix_b^ixbi​ equals aaa or bbb, and that every xrjx_r^jxrj​ lies in the open interval (a,b)(a,b)(a,b). The numbers a,ba,ba,b enter only through this hypothesis; the conclusion does not otherwise depend on them. Repeated points are allowed.

The network. For a width N∈NN\in\mathbb{N}N∈N, a parameter vector θ∈R3N+1\theta\in\mathbb{R}^{3N+1}θ∈R3N+1 has coordinates Wk(0)W^{(0)}_kWk(0)​, Wk(1)W^{(1)}_kWk(1)​, bk(0)b^{(0)}_kbk(0)​ for k=1,…,Nk=1,\dots,Nk=1,…,N, plus one coordinate b(1)b^{(1)}b(1). The network is

u(x,θ)=1N∑k=1NWk(1) σ(Wk(0)x+bk(0))+b(1).u(x,\theta)=\frac{1}{\sqrt N}\sum_{k=1}^N W^{(1)}_k\,\sigma\big(W^{(0)}_k x+b^{(0)}_k\big)+b^{(1)}.u(x,θ)=N​1​k=1∑N​Wk(1)​σ(Wk(0)​x+bk(0)​)+b(1).

For N=0N=0N=0, the factor 1/01/\sqrt 01/0​ is taken to be 000 and the sum is empty, so u=b(1)u=b^{(1)}u=b(1).

From the network, define two families of outputs:

  • the boundary outputs Ui(θ)=u(xbi,θ)U_i(\theta)=u(x_b^i,\theta)Ui​(θ)=u(xbi​,θ);
  • the residual outputs Rj(θ)=uxx(xrj,θ)R_j(\theta)=u_{xx}(x_r^j,\theta)Rj​(θ)=uxx​(xrj​,θ), the second derivative of x↦u(x,θ)x\mapsto u(x,\theta)x↦u(x,θ) at xrjx_r^jxrj​.

Partial derivatives. For a function FFF of θ\thetaθ, ∂F/∂θp\partial F/\partial\theta_p∂F/∂θp​ means the ordinary derivative, at s=θps=\theta_ps=θp​, of the one-variable function obtained by replacing coordinate ppp of θ\thetaθ by sss. It is set to 000 wherever that derivative does not exist. The same convention applies to the xxx-derivatives defining uxxu_{xx}uxx​.

The finite-width kernel. The kernel KN(θ)K_N(\theta)KN​(θ) is a square matrix indexed by the disjoint union of the NbN_bNb​ boundary indices and the NrN_rNr​ residual indices. Its blocks are

KN(θ)=(KuuKurKruKrr),(KFG)ij=∑p∂Fi∂θp(θ) ∂Gj∂θp(θ).K_N(\theta)=\begin{pmatrix}K_{uu}&K_{ur}\\ K_{ru}&K_{rr}\end{pmatrix},\qquad (K_{FG})_{ij}=\sum_{p}\frac{\partial F_i}{\partial\theta_p}(\theta)\,\frac{\partial G_j}{\partial\theta_p}(\theta).KN​(θ)=(Kuu​Kru​​Kur​Krr​​),(KFG​)ij​=p∑​∂θp​∂Fi​​(θ)∂θp​∂Gj​​(θ).

Here the sum runs over all 3N+13N+13N+1 coordinates, and F,G∈{U,R}F,G\in\{U,R\}F,G∈{U,R}.

The limiting kernel. Let E\mathbb{E}E denote expectation over independent standard Gaussians w,v∼N(0,1)w,v\sim\mathcal{N}(0,1)w,v∼N(0,1). The expectation is defined as a Lebesgue integral and is taken to be 000 when the integrand is not integrable. Write σ′,σ′′,σ′′′\sigma',\sigma'',\sigma'''σ′,σ′′,σ′′′ for the derivatives of σ\sigmaσ.

Define:

Σ˙(x,x′)=E[σ′(wx+v) σ′(wx′+v)],\dot\Sigma(x,x')=\mathbb{E}\big[\sigma'(wx+v)\,\sigma'(wx'+v)\big],Σ˙(x,x′)=E[σ′(wx+v)σ′(wx′+v)], Θuu(x,x′)=Σ˙(x,x′) xx′+E[σ(wx+v)σ(wx′+v)]+Σ˙(x,x′)+1,\Theta_{uu}(x,x')=\dot\Sigma(x,x')\,xx'+\mathbb{E}\big[\sigma(wx+v)\sigma(wx'+v)\big]+\dot\Sigma(x,x')+1,Θuu​(x,x′)=Σ˙(x,x′)xx′+E[σ(wx+v)σ(wx′+v)]+Σ˙(x,x′)+1, Θur(x,x′)=E[w2σ′(wx+v)σ′′′(wx′+v)] xx′+2 E[w σ′(wx+v)σ′′(wx′+v)] x+E[w2σ(wx+v)σ′′(wx′+v)]+E[w2σ′(wx+v)σ′′′(wx′+v)],\begin{aligned}\Theta_{ur}(x,x')={}&\mathbb{E}\big[w^2\sigma'(wx+v)\sigma'''(wx'+v)\big]\,xx'+2\,\mathbb{E}\big[w\,\sigma'(wx+v)\sigma''(wx'+v)\big]\,x\\&+\mathbb{E}\big[w^2\sigma(wx+v)\sigma''(wx'+v)\big]+\mathbb{E}\big[w^2\sigma'(wx+v)\sigma'''(wx'+v)\big],\end{aligned}Θur​(x,x′)=​E[w2σ′(wx+v)σ′′′(wx′+v)]xx′+2E[wσ′(wx+v)σ′′(wx′+v)]x+E[w2σ(wx+v)σ′′(wx′+v)]+E[w2σ′(wx+v)σ′′′(wx′+v)],​ Θrr(x,x′)=E[w4σ′′′(wx+v)σ′′′(wx′+v)] xx′+2 E[w3σ′′′(wx+v)σ′′(wx′+v)] x+2 E[w3σ′′′(wx′+v)σ′′(wx+v)] x′+4 E[w2σ′′(wx+v)σ′′(wx′+v)]+E[w4σ′′(wx+v)σ′′(wx′+v)]+E[w4σ′′′(wx+v)σ′′′(wx′+v)].\begin{aligned}\Theta_{rr}(x,x')={}&\mathbb{E}\big[w^4\sigma'''(wx+v)\sigma'''(wx'+v)\big]\,xx'+2\,\mathbb{E}\big[w^3\sigma'''(wx+v)\sigma''(wx'+v)\big]\,x\\&+2\,\mathbb{E}\big[w^3\sigma'''(wx'+v)\sigma''(wx+v)\big]\,x'+4\,\mathbb{E}\big[w^2\sigma''(wx+v)\sigma''(wx'+v)\big]\\&+\mathbb{E}\big[w^4\sigma''(wx+v)\sigma''(wx'+v)\big]+\mathbb{E}\big[w^4\sigma'''(wx+v)\sigma'''(wx'+v)\big].\end{aligned}Θrr​(x,x′)=​E[w4σ′′′(wx+v)σ′′′(wx′+v)]xx′+2E[w3σ′′′(wx+v)σ′′(wx′+v)]x+2E[w3σ′′′(wx′+v)σ′′(wx+v)]x′+4E[w2σ′′(wx+v)σ′′(wx′+v)]+E[w4σ′′(wx+v)σ′′(wx′+v)]+E[w4σ′′′(wx+v)σ′′′(wx′+v)].​

Two expectations appear twice as written:

  • in Θur\Theta_{ur}Θur​, the first expectation reappears as the last term, without the factor xx′xx'xx′;
  • in Θrr\Theta_{rr}Θrr​, the first expectation likewise reappears as the last term, without the factor xx′xx'xx′.

The limiting matrix K∗K^*K∗ has the same index set as KN(θ)K_N(\theta)KN​(θ). Its entries are:

  • Θuu(xbi,xbj)\Theta_{uu}(x_b^i,x_b^j)Θuu​(xbi​,xbj​) for boundary iii and boundary jjj;
  • Θur(xbi,xrj)\Theta_{ur}(x_b^i,x_r^j)Θur​(xbi​,xrj​) for boundary iii and residual jjj;
  • Θur(xbj,xri)\Theta_{ur}(x_b^j,x_r^i)Θur​(xbj​,xri​) for residual iii and boundary jjj;
  • Θrr(xri,xrj)\Theta_{rr}(x_r^i,x_r^j)Θrr​(xri​,xrj​) for residual iii and residual jjj.

K∗K^*K∗ does not depend on NNN or θ\thetaθ.

Conclusion. Let μN\mu_NμN​ be the probability measure on R3N+1\mathbb{R}^{3N+1}R3N+1 under which all 3N+13N+13N+1 coordinates are independent N(0,1)\mathcal{N}(0,1)N(0,1). The theorem asserts that, for every pair of indices i,ji,ji,j and every ε>0\varepsilon>0ε>0,

lim⁡N→∞ μN({θ: ∣KN(θ)ij−Kij∗∣≥ε})=0.\lim_{N\to\infty}\ \mu_N\Big(\big\{\theta:\ |K_N(\theta)_{ij}-K^*_{ij}|\ge\varepsilon\big\}\Big)=0.N→∞lim​ μN​({θ: ∣KN​(θ)ij​−Kij∗​∣≥ε})=0.

In words: each entry of the kernel at a random initialization converges in probability to the corresponding entry of K∗K^*K∗ as the width N→∞N\to\inftyN→∞.

The statement is entrywise only. It says nothing about any matrix norm or about joint convergence of the entries. It concerns only the initialization: no loss, training data values g,fg,fg,f, or gradient flow appear. If Nb=Nr=0N_b=N_r=0Nb​=Nr​=0, there are no indices and the conclusion holds vacuously.

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

    Confirmed by the moderator at approval.

  • Endorsed by Xeroth · Nov 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