Sam Babichenko

Reading notes / Scaling laws

Spectrum-dependent learning curves

Bordelon et al., 2020; Maloney et al., 2022

Context. Test loss falls as a power law in data and in parameters, and two papers explain the exponents; their spectral results reduce to one equation. Bordelon et al. (2020, with Canatar et al., 2021) compute kernel ridge regression's average error mode by mode, and Maloney et al. (2022) solve a model with all resources finite. At sample size PP all eigenmodes share one effective ridge κ(P)\kappa(P). Mode ρ\rho is learned once Pηρ≫κP\eta_\rho\gg\kappa, so modes are learned in order of eigenvalue, and the error is the target power left in unlearned modes times one shared factor 1/(1−γ)1/(1-\gamma). A power-law spectrum has no natural cutoff, so a power-law spectrum gives a power-law learning curve. Only the smaller of the two resources moves the cutoff and sets the exponent; the larger enters through a variance factor that blows up only when the two are equal. Data and features enter symmetrically, and the law ends when either reaches the task's latent dimension.

Main result: the self-consistent learning curve. A kernel has Mercer eigenvalues ηρ\eta_\rho under the data distribution, the target fˉ=∑ρwˉρψρ\bar f=\sum_\rho\bar w_\rho\psi_\rho (ψρ=ηρϕρ\psi_\rho=\sqrt{\eta_\rho}\phi_\rho) puts power ηρwˉρ2\eta_\rho\bar w_\rho^2 on mode ρ\rho, labels carry noise variance σ2\sigma^2, and kernel ridge uses a penalty λ\lambda not divided by PP (λ→0\lambda\to0 is the interpolant, NTK training of an infinitely wide network). Then κ=λ+∑ρκηρκ+Pηρ,γ=∑ρPηρ2(κ+Pηρ)2,Eg=11−γ∑ρηρ(κ2wˉρ2+σ2Pηρ)(κ+Pηρ)2.\kappa=\lambda+\sum_\rho\frac{\kappa\eta_\rho}{\kappa+P\eta_\rho},\qquad \gamma=\sum_\rho\frac{P\eta_\rho^2}{(\kappa+P\eta_\rho)^2},\qquad E_g=\frac{1}{1-\gamma}\sum_\rho\frac{\eta_\rho\left(\kappa^2\bar w_\rho^2+\sigma^2P\eta_\rho\right)}{(\kappa+P\eta_\rho)^2}. Each mode is fit like ridge on its own eigenvalue with penalty κ/P\kappa/P, and κ\kappa is λ\lambda plus the kernel mass of the modes the data cannot yet resolve; γ\gamma is the variance factor df2/n\mathrm{df}_2/n of linear ridge.

Step 1

The error is a quadratic form in which the teacher and the sample separate. With noiseless labels, wˉ−w=λ(ΨΨ⊤+λI)−1wˉ\bar w-w=\lambda(\Psi\Psi^\top+\lambda I)^{-1}\bar w, and whitening gives Eg=Tr (D ⟨G2⟩),G=(1λΦΦ⊤+Λ−1)−1,D=Λ−1/2wˉwˉ⊤Λ−1/2,E_g=\mathrm{Tr}\,\big(D\,\langle G^2\rangle\big),\qquad G=\Big(\tfrac1\lambda\Phi\Phi^\top+\Lambda^{-1}\Big)^{-1},\quad D=\Lambda^{-1/2}\bar w\bar w^\top\Lambda^{-1/2}, with the target only in DD and the sample only in GG, whose whitened columns have identity second moment. The rest is computing ⟨G2⟩\langle G^2\rangle.

Step 2

Adding one sample gives a PDE in the sample size. Reach the second moment through a first moment by shifting, G~(p,v)=(1λΦΦ⊤+Λ−1+vI)−1\tilde G(p,v)=(\frac1\lambda\Phi\Phi^\top+\Lambda^{-1}+vI)^{-1}, so G2=−∂vG~G^2=-\partial_v\tilde G at v=0v=0. A new sample is a rank-one update, and Sollich's approximation averages the Sherman-Morrison numerator and denominator separately; with pp continuous, ∂p⟨G~⟩=1λ+Tr⟨G~⟩ ∂v⟨G~⟩,⟨G~(0,v)⟩=(Λ−1+vI)−1.\partial_p\langle\tilde G\rangle=\frac{1}{\lambda+\mathrm{Tr}\langle\tilde G\rangle}\,\partial_v\langle\tilde G\rangle,\qquad \langle\tilde G(0,v)\rangle=(\Lambda^{-1}+vI)^{-1}.

Step 3

Characteristics give the self-consistent ridge. The trace t=Tr⟨G~⟩t=\mathrm{Tr}\langle\tilde G\rangle solves ∂pt=(λ+t)−1∂vt\partial_pt=(\lambda+t)^{-1}\partial_vt, so it is constant along lines on which vv falls at rate 1/(λ+t)1/(\lambda+t); following one back to p=0p=0, gρ(p,v)=(1ηρ+v+pλ+t)−1,t(p,v)=∑ρgρ(p,v).g_\rho(p,v)=\Big(\frac1{\eta_\rho}+v+\frac{p}{\lambda+t}\Big)^{-1},\qquad t(p,v)=\sum_\rho g_\rho(p,v). At v=0v=0, with κ=λ+t\kappa=\lambda+t, the second identity is the κ\kappa equation: each mode is ridge on its own eigenvalue with penalty κ/p\kappa/p.

Step 4

Differentiating in vv gives the mode errors and the shared factor. ⟨G2⟩ρρ=−∂vgρ∣v=0\langle G^2\rangle_{\rho\rho}=-\partial_vg_\rho|_{v=0}, and the chain rule through t(p,v)t(p,v) gives Eρ=ηρwˉρ2 κ2(κ+Pηρ)2⋅11−γ.E_\rho=\eta_\rho\bar w_\rho^2\,\frac{\kappa^2}{(\kappa+P\eta_\rho)^2}\cdot\frac{1}{1-\gamma}. The first factor is the mode's ridge shrinkage; the second, shared by all modes, accounts for fluctuations of the sample Gram matrix, and with noise it amplifies an added σ2γ/(1−γ)\sigma^2\gamma/(1-\gamma).

Step 5

Spectral bias and task alignment follow from the shape of EρE_\rho. Differentiating the κ\kappa equation gives κ′(P)=−κγ/(P(1−γ))<0\kappa'(P)=-\kappa\gamma/(P(1-\gamma))\lt0, and then ddPlog⁡EρEρ′=−2[κ′+ηρκ+Pηρ−κ′+ηρ′κ+Pηρ′]<0for ηρ>ηρ′,\frac{d}{dP}\log\frac{E_\rho}{E_{\rho'}}=-2\Big[\frac{\kappa'+\eta_\rho}{\kappa+P\eta_\rho}-\frac{\kappa'+\eta_{\rho'}}{\kappa+P\eta_{\rho'}}\Big]\lt0\quad\text{for }\eta_\rho\gt\eta_{\rho'}, with ratio 1 at P=0P=0, so normalized errors are ordered opposite to the eigenvalues at every PP. By summation by parts, a target whose cumulative power curve C(ρ)C(\rho) is pointwise larger has lower Eg(P)/Eg(0)E_g(P)/E_g(0) at every PP.

Step 6

Power-law spectra give power-law curves. Ridgeless, the substitution ρ=(P/κ)1/bu\rho=(P/\kappa)^{1/b}u in the κ\kappa equation gives κ∝P1−b\kappa\propto P^{1-b}, so the cutoff Pηρ∗=κP\eta_{\rho^*}=\kappa sits at ρ∗∝P\rho^*\propto P, γ\gamma tends to a constant, and the error splits there: Eg≍∑ρ>Pρ−a+∑ρ<Pρ−a(κPηρ)2≍P−(a−1)+P−2b∑ρ<Pρ2b−a.E_g\asymp\sum_{\rho\gt P}\rho^{-a}+\sum_{\rho\lt P}\rho^{-a}\Big(\frac{\kappa}{P\eta_\rho}\Big)^2\asymp P^{-(a-1)}+P^{-2b}\sum_{\rho\lt P}\rho^{2b-a}. The unlearned tail gives P−(a−1)P^{-(a-1)}; the residual shrinkage of learned modes gives P−2bP^{-2b} only for very smooth targets, a−1>2ba-1\gt2b, so the kernel caps the rate at 2b2b. With a fixed ridge, once P1−b<λP^{1-b}\lt\lambda, κ≈λ\kappa\approx\lambda, the cutoff moves to (P/λ)1/b(P/\lambda)^{1/b}, and both exponents are divided by bb. A numerical solve reproduces the slopes (−1.50-1.50 for b=2,a=2.5b=2,a=2.5; −3.99-3.99 for b=2,a=6b=2,a=6).

Step 7

On the sphere each polynomial degree is a white band-limited problem. A dot-product kernel on SD−1S^{D-1} has degree-kk multiplicity N(D,k)∼Dk/k!N(D,k)\sim D^k/k! and ηk∼N(D,k)−1\eta_k\sim N(D,k)^{-1}. At P=αN(D,L)P=\alpha N(D,L), lower degrees have PηK→∞P\eta_K\to\infty and drop out as learned; higher ones keep their power, add their kernel mass to κ\kappa like a multiple of the identity, and enter the variance exactly as label noise does. What remains is N(D,L)N(D,L) equal eigenvalues, where the κ\kappa equation is quadratic: the noiseless ridgeless error is (1−α)+(1-\alpha)_+ times the stage power, with noise it peaks at α=1\alpha=1 (γ→1\gamma\to1), and the optimal ridge equals the effective noise at every α\alpha.

A solvable model with both resources finite (Maloney et al.). Latent data x∼N(0,Λ)x\sim N(0,\Lambda) in RM\mathbb R^M with λI=λ+I−(1+α)\lambda_I=\lambda_+I^{-(1+\alpha)}; labels y=wxy=wx using all MM directions, wI∼N(0,σw2/M)w_I\sim N(0,\sigma_w^2/M), plus noise σϵ2\sigma_\epsilon^2; NN random linear features ϕ=ux\phi=ux; ridge γ\gamma on TT samples. Both ingredients are needed (isotropic data gives no power law; without separate features there is no NN-scaling), and the projection stands in for the way a nonlinear layer extends a spectrum. For N,T<MN,T\lt M and γ→0\gamma\to0, at leading order, L(N,T;M)=σw22M⋅Δ−1(min⁡{N,T})1−min⁡{N,T}/max⁡{N,T},1=tr[Λ(Δ−1IM+μΛ)−1],L(N,T;M)=\frac{\sigma_w^2}{2M}\cdot\frac{\Delta_{-1}(\min\{N,T\})}{1-\min\{N,T\}/\max\{N,T\}},\qquad 1=\mathrm{tr}\big[\Lambda(\Delta_{-1}I_M+\mu\Lambda)^{-1}\big], for any Λ\Lambda, plus a noise term σϵ22Δ0\frac{\sigma_\epsilon^2}2\Delta_0 with Δ0=N/(T−N)\Delta_0=N/(T-N) for T>NT\gt N and α+T/(N−T)\alpha+T/(N-T) for T<NT\lt N. For the power law Δ−1≈λ+kμ−α\Delta_{-1}\approx\lambda_+k\mu^{-\alpha}, so L∼N−αL\sim N^{-\alpha} or T−αT^{-\alpha}, with a plateau set by the smaller resource.

Step 8

The averages reduce to traces of resolvents. Expanding in ϵ\epsilon splits the loss into a label term and a noise term, and the ww average is one Gaussian contraction. Two identities are used, q2=−∂γqq^2=-\partial_\gamma q and (γI+ϕϕ⊤)q=I(\gamma I+\phi\phi^\top)q=I for q=(γIN+ϕϕ⊤)−1q=(\gamma I_N+\phi\phi^\top)^{-1}, and the test average replaces ϕ^ϕ^⊤\hat\phi\hat\phi^\top by T^ Ω\hat T\,\Omega, Ω=uΛu⊤\Omega=u\Lambda u^\top, so noise term=σϵ22⟨(1+γ∂∂γ)tr{Ωqˉ}⟩u,qˉ=⟨q⟩x,\text{noise term}=\frac{\sigma_\epsilon^2}{2}\Big\langle\Big(1+\gamma\frac{\partial}{\partial\gamma}\Big)\mathrm{tr}\{\Omega\bar q\}\Big\rangle_u,\qquad \bar q=\langle q\rangle_x , and what remains is the training-set average of one resolvent.

Step 9

That average is the Marchenko-Pastur self-consistency, found by summing planar diagrams. For fixed uu the columns of ϕ\phi are i.i.d. N(0,Ω)N(0,\Omega); expanding qq in 1/γ1/\gamma and keeping the non-crossing Wick pairings, which dominate at large N,TN,T, resums to qˉ=(γIN+T Ω1+Δ)−1,Δ=tr{Ωqˉ}.\bar q=\Big(\gamma I_N+\frac{T\,\Omega}{1+\Delta}\Big)^{-1},\qquad \Delta=\mathrm{tr}\{\Omega\bar q\}. As γ→0\gamma\to0, Δ=Δ−1/γ+Δ0+O(γ)\Delta=\Delta_{-1}/\gamma+\Delta_0+O(\gamma), and 1+γ∂γ1+\gamma\partial_\gamma removes the pole, so the ridgeless noise term is σϵ22Δ0\frac{\sigma_\epsilon^2}2\Delta_0, which underparameterized is the least-squares variance N/(T−N)N/(T-N) whatever the spectrum.

Step 10

The label term is an unseen variance times a variance inflation factor. The same machinery leaves a latent-space resolvent whose uu average has the same form as the xx average, and the prefactor drops out: L=σw22M⋅Δ−1(N)1−N/T(N<T).L=\frac{\sigma_w^2}{2M}\cdot\frac{\Delta_{-1}(N)}{1-N/T}\qquad(N\lt T). The numerator is the latent covariance projected onto the null space of the NN random directions, the variance the features cannot see. The factor 1/(1−N/T)=1+Δ01/(1-N/T)=1+\Delta_0 is least-squares variance inflation: the random features are noisy proxies of the latent ones, so even noiseless labels look noisy, which is why the loss peaks at N=TN=T with σϵ=0\sigma_\epsilon=0.

Step 11

Data and features are dual. Since ϕ=ux\phi=ux with x=Λ1/2zx=\Lambda^{1/2}z, the feature matrix is G1Λ1/2G2G_1\Lambda^{1/2}G_2 for i.i.d. Gaussian factors (our gloss), and its transpose has the same law with NN and TT exchanged. The paper rewrites the label term with the data-data resolvent and checks that swapping x⊤x^\top with uu and TT with NN maps the N>TN\gt T computation onto the N<TN\lt T one, giving Δ−1(T)/(1−T/N)\Delta_{-1}(T)/(1-T/N); the noise term is not symmetric, because the noise is added per sample.

Step 12

The power-law solution, and why every exponent here is α\alpha. Try Δ−1=λ+kμ−α\Delta_{-1}=\lambda_+k\mu^{-\alpha} in the integral form of the defining equation; the substitution I=s μ k−1/(1+α)I=s\,\mu\,k^{-1/(1+\alpha)} turns it into a Beta integral, k1/(1+α)=∫0∞ds1+s1+α.k^{1/(1+\alpha)}=\int_0^\infty\frac{ds}{1+s^{1+\alpha}}. The defining equation is the ridgeless κ\kappa equation with ηI=λI\eta_I=\lambda_I and P=μP=\mu, so Δ−1=κ\Delta_{-1}=\kappa. An isotropic teacher puts power σw2λI/M\sigma_w^2\lambda_I/M on mode II; since the κ\kappa equation gives κ∑IλI(κ+μλI)−2=1−γ\kappa\sum_I\lambda_I(\kappa+\mu\lambda_I)^{-2}=1-\gamma, Canatar's error is then exactly σw2κ/M\sigma_w^2\kappa/M, twice Maloney's label term at N=∞N=\infty because his loss carries a 12\frac12 (our check). In Bordelon's notation a=b=1+αa=b=1+\alpha and min⁡{a−1,2b}=α\min\{a-1,2b\}=\alpha: the unlearned tail always dominates.

Regularization, allocation, and where the law ends. A numerically tuned ridge removes the peak at N=TN=T, and simulations fit L0(1N+1T−1M)αL_0\big(\frac1N+\frac1T-\frac1M\big)^\alpha, Kaplan's form with equal exponents corrected for finite MM; the fit is not derived. With one exponent the paper concludes N∝TN\propto T, consistent with Chinchilla: each new sample reveals one more latent direction, which needs one more feature. Past the latent dimension the law breaks: with N>MN\gt M, the noiseless loss falls to zero as T→MT\to M, and with noise it becomes the parametric 1/T1/T, so a slope change to 1/T1/T at an unexplained scale would signal reaching MM. Its own limit: a random ReLU layer on its features extends the spectrum, yet the loss plateaus at T=NinT=N_{\rm in} where MNIST keeps improving, which the paper attributes to the projection having already discarded label-relevant directions.

Consequences and limits. Two spectra fix the curve, and κ\kappa turns a resource into a cutoff index: the exponent is a spectral decay rate, the plateau is the tail beyond the smaller resource, and the latent dimension ends the law. With label noise and a ridgeless power law, γ→1−1/b\gamma\to1-1/b and the excess error tends to σ2(b−1)\sigma^2(b-1), the tempered regime of Mallinar et al. (our computation from the formula, not in the papers). Limits: the derivations are non-rigorous (separate averaging, Gaussian features, replica symmetry, planar diagrams without error bounds), features are fixed (no feature learning), and training is to convergence, so compute does not appear.

Terms

κ=λ+∑ρκηρ/(κ+Pηρ)\kappa=\lambda+\sum_\rho\kappa\eta_\rho/(\kappa+P\eta_\rho)
effective ridge: explicit λ\lambda plus the mass of modes the sample cannot resolve
κ/(κ+Pηρ)\kappa/(\kappa+P\eta_\rho)
fraction of mode ρ\rho not yet learned; small once Pηρ≫κP\eta_\rho\gg\kappa
γ=∑ρPηρ2/(κ+Pηρ)2\gamma=\sum_\rho P\eta_\rho^2/(\kappa+P\eta_\rho)^2
variance factor (df2/n\mathrm{df}_2/n); 1/(1−γ)1/(1-\gamma) inflates bias and noise alike
ηρ=ρ−b, ηρwˉρ2=ρ−a\eta_\rho=\rho^{-b},\ \eta_\rho\bar w_\rho^2=\rho^{-a}
ridgeless Eg∼P−min⁡{a−1,2b}E_g\sim P^{-\min\{a-1,2b\}}; with fixed ridge, exponent divided by bb
Δ−1(μ)\Delta_{-1}(\mu)
root of 1=tr Λ(ΔI+μΛ)−11=\mathrm{tr}\,\Lambda(\Delta I+\mu\Lambda)^{-1}; latent variance unseen with μ\mu directions; equals the ridgeless κ\kappa
Label term
σw22MΔ−1(min⁡)/(1−min⁡/max⁡)\frac{\sigma_w^2}{2M}\Delta_{-1}(\min)/(1-\min/\max), symmetric in N↔TN\leftrightarrow T
Breakdown
N,T>MN,T\gt M: noiseless loss reaches zero at T=MT=M; with noise, 1/T1/T

Quiz

  1. The ridgeless loss diverges at N=TN=T even with noiseless labels. Why?
  2. Which statement about the optimally regularized loss L0(1N+1T−1M)αL_0(\frac1N+\frac1T-\frac1M)^\alpha is accurate?
  3. With no feature bottleneck (N→∞N\to\infty) and T≪MT\ll M, how does Maloney et al.'s loss relate to Canatar et al.'s ridgeless formula?

Sources