Foundations to Frontier
Tests
B. Statistical Learning Theory › B4 Theory of deep learning

The Neural Tangent Kernel and Infinite-Width Limits

As a network's width goes to infinity (in the NTK parameterization), two things happen: at initialization it becomes a Gaussian process (Neal 1996; Lee et al., 2018), and under gradient descent its weights move so little that it behaves like its linearization around initialization, i.e. kernel regression with a fixed kernel, the neural tangent kernel Θ(x, x′) = ∇θf(x)·∇θf(x′) (Jacot, Gabriel and Hongler, 2018). This topic derives the NTK of a two-layer ReLU network in closed form (arc-cosine kernels), proves convergence of training to kernel regression, and measures how the empirical NTK converges and how 'lazy' training becomes with width. It also discusses what the NTK misses: feature learning.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Very wide networks barely change

Imagine a choir of ten thousand singers, each told to adjust their pitch slightly to make the chord right. No singer moves much, but together they can shape the sound precisely. Very wide neural networks train like that: every weight shifts a tiny amount, so the network behaves almost like a fixed set of features with only the final mixing changing. That makes it mathematically equivalent to a kernel method, using a special kernel called the neural tangent kernel.

Wide networks train like kernel machines
relative weight change 55.4% · NTK change 42.7% · max gap net vs linearized 0.534 · train residual 0.125
Dotted: the network at initialization; orange: the trained network; thick blue: its linearization f₀ + ∇f₀·(θ − θ₀), which is kernel regression with the neural tangent kernel Θ₀. Narrow networks move their weights a lot and their kernel changes (feature learning). As width grows, each weight moves by O(1/√n), the kernel freezes and the orange and blue curves coincide (the lazy or NTK regime). Each width uses the stable step 1/λ_max(Θ₀).
Why engineers care

The NTK gives one of the few exact theories of deep-network training: when training converges, how fast, and what function it learns. It also explains why wide networks are easy to optimize. Its limits explain what makes real networks powerful: they learn features, which the NTK (by construction) does not.

📝 Quick check (Level 0)
0/3 answered
  1. 1. In very wide networks, each weight moves…
  2. 2. A very wide network trains like…
  3. 3. What does the NTK picture leave out?

Level 1: Beginner

★★☆☆☆ Basic⏱ 25 minSecondary-school mathematics: arithmetic and elementary algebra.

The tangent kernel

For a network f(x;θ)f(x;\theta), define

Θ(x,x′)=∇θf(x;θ)⋅∇θf(x′;θ).\Theta(x, x') = \nabla_\theta f(x;\theta)\cdot\nabla_\theta f(x';\theta).

Under gradient flow on 12∑i(f(xi)−yi)2\tfrac12\sum_i(f(x_i) - y_i)^2, the predictions evolve as

ddtf(x)=−∑iΘ(x,xi)(f(xi)−yi),\frac{d}{dt}f(x) = -\sum_i\Theta(x, x_i)\big(f(x_i) - y_i\big),

so the NTK is exactly the kernel that couples the training points’ errors to the prediction at x.

NTK parameterization

Write a layer as 1nWh\tfrac1{\sqrt n}Wh with Wij∼N(0,1)W_{ij}\sim\mathcal N(0, 1). Then at width n → ∞:

  1. f at initialization is a Gaussian process.
  2. Θθ\Theta_\theta at initialization converges to a deterministic Θ∞\Theta_\infty.
  3. Θ\Theta stays constant during training.
📝 Quick check (Level 1)
0/3 answered
  1. 1. Θ(x, x′) is the inner product of…
  2. 2. Under gradient flow, df(x)/dt = …
  3. 3. At infinite width, the NTK during training…

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 40 minUndergraduate students and practising engineers.

Two-layer ReLU NTK in closed form

For f(x)=1n∑jaj relu(wj⋅u)f(x) = \tfrac1{\sqrt n}\sum_ja_j\,\mathrm{relu}(w_j\cdot u) with u = (x, 1) and Gaussian aj,wja_j, w_j, the gradient with respect to aja_j gives relu(wj⋅u)/n\mathrm{relu}(w_j\cdot u)/\sqrt n, and with respect to wjw_j gives aj1(wj⋅u>0)u/na_j\mathbf 1(w_j\cdot u\gt0)u/\sqrt n. Averaging over j (law of large numbers):

Θ∞(u,u′)=∥u∥∥u′∥2π(sin⁡θ+(π−θ)cos⁡θ)⏟κ1: output layer+(u⋅u′)π−θ2π⏟κ0: hidden layer,\Theta_\infty(u, u') = \underbrace{\frac{\|u\|\|u'\|}{2\pi}\big(\sin\theta + (\pi - \theta)\cos\theta\big)}_{\kappa_1:\ \text{output layer}} + (u\cdot u')\underbrace{\frac{\pi - \theta}{2\pi}}_{\kappa_0:\ \text{hidden layer}},

where θ is the angle between u and u′ (the arc-cosine kernels of Cho and Saul).

Training = kernel regression

If Θ is constant, the ODE above is linear. With squared loss the training residual decays as rt=e−tΘr0r_t = e^{-t\Theta}r_0, and the final predictor is

f∞(x)=f0(x)+Θ(x,X)Θ(X,X)−1(y−f0(X)),f_\infty(x) = f_0(x) + \Theta(x, X)\Theta(X, X)^{-1}(y - f_0(X)),

kernel regression with the NTK plus the initial function. Convergence speed is set by λmin⁡(Θ(X,X))\lambda_{\min}(\Theta(X, X)), and stability needs a step size below 2/λmax⁡2/\lambda_{\max}.

🐍 Exercise 1: empirical vs analytic NTK
Compute the Jacobian of a two-layer ReLU net in NTK parameterization (check it against finite differences), form the empirical NTK on a grid of inputs, and measure its distance from the closed-form arc-cosine NTK as width grows from 10 to 10 000.
📝 Quick check (Level 2)
0/3 answered
  1. 1. κ₀(θ) = (π − θ)/(2π) at θ = π/2:
  2. 2. In the NTK regime, the training residual decays as…
  3. 3. Training convergence speed is controlled by…

Level 3: Advanced

★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.

Why the kernel freezes (sketch)

In NTK parameterization each weight’s gradient is O(1/√n). Training to fit O(1) targets needs only ∥θt−θ0∥=O(1)\|\theta_t - \theta_0\| = O(1) in total, so each individual weight moves O(1/√n). The NTK depends on the weights through averages over n units, so it changes by O(1/√n) too. In the limit, f(θt)≈f(θ0)+∇f(θ0)(θt−θ0)f(\theta_t)\approx f(\theta_0) + \nabla f(\theta_0)(\theta_t - \theta_0) exactly: the linearized model. Chizat, Oyallon and Bach (2019) show the same “lazy” behaviour for any model scaled so the output moves much faster than the weights.

Gaussian process at initialization

For a fixed input, the output 1n∑jajσ(wj⋅u)\tfrac1{\sqrt n}\sum_ja_j\sigma(w_j\cdot u) is a normalized sum of n i.i.d. terms, so it is Gaussian by the CLT, with covariance E[σ(w⋅u)σ(w⋅u′)]\mathbb E[\sigma(w\cdot u)\sigma(w\cdot u')] (the NNGP kernel). Deep networks give a layer-by-layer recursion for both the NNGP kernel and the NTK.

What the NTK misses

A frozen kernel means no feature learning: the representation never adapts to the data. NTK predictors often underperform trained finite networks (for example on images), and cannot learn tasks like sparse parities efficiently. Real networks live between the lazy regime and the feature-learning (mean-field or μP) regime of the next topic.

📝 Quick check (Level 3)
0/3 answered
  1. 1. Each weight's movement in NTK parameterization scales as…
  2. 2. At initialization, an infinitely wide network is…
  3. 3. The main limitation of the NTK regime is…

Level 4: Expert

★★★★★ Expert⏱ 35 minResearchers: original papers and open problems.

The NTK, measured

Exercise 1. The Jacobian matches finite differences, and the analytic NTK is a valid PSD kernel. The relative Frobenius distance between the empirical and analytic NTK on 9 inputs is 0.419, 0.183, 0.037 and 0.016 for widths 10, 100, 1000 and 10 000: roughly 1/√n, about 3× per decade of width.

Exercise 2: lazy training (8 points, sin 2x, 1000 GD steps at η = 1/λ_max(Θ₀)):

width weight change NTK change max gap net vs linearized train residual
50 0.526 0.867 0.655 0.071
200 0.196 0.091 0.345 0.026
800 0.089 0.021 0.245 0.029
3200 0.051 0.018 0.194 0.029

The weight change follows about 1/√n (×10 for ×64 width), and the kernel essentially freezes. The trained network approaches its linearization but slowly: the largest gaps sit outside the data range, where small kernel changes are amplified.

🐍 Exercise 2 (research): how lazy is training?
Train two-layer ReLU nets of increasing width by full-batch GD, and compare each with its linearization run for the same number of steps (closed form). Measure the relative weight change, the relative NTK change and the prediction gap.

The NTK in AI, robotics and aerospace

  • Trainability diagnostics: the NTK’s condition number predicts how fast a network trains, and which initialization or normalization helps.
  • Uncertainty: NNGP/NTK Gaussian processes give principled uncertainty for wide networks used in control.
  • Data selection and influence: NTK-based scores estimate how much each training example affects predictions.
  • Limits: for perception from raw sensors, feature learning beyond the NTK matters. Don’t mistake the lazy regime for the whole story.

References

  1. A. Jacot, F. Gabriel, C. Hongler (2018). “Neural tangent kernel: convergence and generalization in neural networks.” NeurIPS.
  2. J. Lee, L. Xiao, S. Schoenholz, Y. Bahri, R. Novak, J. Sohl-Dickstein, J. Pennington (2019). “Wide neural networks of any depth evolve as linear models under gradient descent.” NeurIPS.
  3. R. M. Neal (1996). Bayesian Learning for Neural Networks. Springer.
  4. Y. Cho, L. K. Saul (2009). “Kernel methods for deep learning.” NeurIPS.
  5. L. Chizat, E. Oyallon, F. Bach (2019). “On lazy training in differentiable programming.” NeurIPS.
  6. S. Arora, S. S. Du, W. Hu, Z. Li, R. Salakhutdinov, R. Wang (2019). “On exact computation with an infinitely wide neural net.” NeurIPS.