Sam Babichenko

Reading notes / Benign overfitting

Double descent

Belkin, Hsu, Ma and Mandal, 2019; Belkin, Hsu and Xu, 2020

Context. Neural networks, random-feature models and kernel machines are trained to zero training error, often on noisy labels, and still predict well, against the textbook U-curve. Belkin, Hsu, Ma and Mandal (PNAS 2019) put both on one curve: test risk follows the U while the number of parameters NN is below the sample size nn, peaks at the interpolation threshold N≈nN\approx n, and then falls again; Belkin, Hsu and Xu (2020) prove the curve exactly in two linear models with randomly chosen features. In these models, past the threshold every model fits the data, so test risk is decided by which interpolant the method picks; the minimum-norm choice spreads the noise over more directions as features are added, so risk falls again, and the peak at p=np=n comes from inverting a nearly singular Gram matrix.

The empirical setting and the inductive bias (PNAS 2019). Random Fourier features ∑k≤Nake−1⟨vk,x⟩\sum_{k\le N}a_ke^{\sqrt{-1}\langle v_k,x\rangle} are fit by least squares and, for N≥nN\ge n, by least ∥a∥2\|a\|_2, a proxy for the norm of the Gaussian RKHS H∞\mathcal H_\infty that the class HN\mathcal H_N of such sums approximates. On MNIST and four other datasets test error and norm peak at N=nN=n and then fall, and two-layer networks peak at N≈nKN\approx nK for KK outputs. The one theorem explains why small norm is the right bias without noise: for xix_i uniform on a cube Ω⊂Rd\Omega\subset\mathbb R^d and yi=h∗(xi)y_i=h^*(x_i), with high probability every interpolating h∈H∞h\in\mathcal H_\infty satisfies sup⁡x∈Ω∣h(x)−h∗(x)∣<A e−B(n/log⁡n)1/d(∥h∗∥H∞+∥h∥H∞), \sup_{x\in\Omega}|h(x)-h^*(x)| \lt A\,e^{-B(n/\log n)^{1/d}}\big(\|h^*\|_{\mathcal H_\infty}+\|h\|_{\mathcal H_\infty}\big), with A,B>0A,B>0 depending on dd, Ω\Omega and the kernel width, so the minimum-norm interpolant, which has ∥h∥≤∥h∗∥\|h\|\le\|h^*\|, gets the smallest bound.

Gaussian model (Belkin, Hsu, Xu). x∼N(0,ID)x\sim N(0,I_D), y=x∗β+σϵy=x^*\beta+\sigma\epsilon with σ>0\sigma>0, and nn i.i.d. rows form XX. For a feature set T⊆[D]T\subseteq[D], ∣T∣=p|T|=p, the estimator uses only those columns: β^T=XT†y\hat\beta_T=X_T^\dagger y, β^Tc=0\hat\beta_{T^c}=0, which is least squares for p≤np\le n and the minimum-ℓ2\ell_2-norm interpolant for p≥np\ge n. The model is misspecified whenever p<Dp\lt D.

Theorem 1 (exact risk for any fixed TT). For every pp and TT with ∣T∣=p|T|=p, with the expectation over the training sample and the test point, E[(y−x∗β^)2]={(∥βTc∥2+σ2)(1+pn−p−1)p≤n−2,+∞n−1≤p≤n+1,∥βT∥2(1−np)+(∥βTc∥2+σ2)(1+np−n−1)p≥n+2. \mathbb E[(y-x^*\hat\beta)^2]=\begin{cases}(\|\beta_{T^c}\|^2+\sigma^2)\Big(1+\dfrac{p}{n-p-1}\Big) & p\le n-2,\\ +\infty & n-1\le p\le n+1,\\ \|\beta_T\|^2\Big(1-\dfrac np\Big)+(\|\beta_{T^c}\|^2+\sigma^2)\Big(1+\dfrac{n}{p-n-1}\Big) & p\ge n+2.\end{cases} In the last line the first term is the bias of the minimum-norm choice.

Corollary 1 (random feature selection). If TT is a uniformly random pp-subset of [D][D], independent of the data, E[(y−x∗β^)2]={((1−pD)∥β∥2+σ2)(1+pn−p−1)p≤n−2,∥β∥2(1−nD(2−D−n−1p−n−1))+σ2(1+np−n−1)p≥n+2. \mathbb E[(y-x^*\hat\beta)^2]=\begin{cases}\Big(\big(1-\tfrac pD\big)\|\beta\|^2+\sigma^2\Big)\Big(1+\dfrac{p}{n-p-1}\Big) & p\le n-2,\\ \|\beta\|^2\Big(1-\dfrac nD\Big(2-\dfrac{D-n-1}{p-n-1}\Big)\Big)+\sigma^2\Big(1+\dfrac{n}{p-n-1}\Big) & p\ge n+2.\end{cases} For D>n+1D\gt n+1 the risk increases on p≤n−2p\le n-2 and decreases on p≥n+2p\ge n+2, so among p≤np\le n the risk is smallest at p=0p=0. At p=Dp=D the risk is ∥β∥2(1−n/D)+σ2D−1D−n−1\|\beta\|^2(1-n/D)+\sigma^2\frac{D-1}{D-n-1}, below the risk at every p≤np\le n exactly when ∥β∥2/σ2>D/(D−n−1)\|\beta\|^2/\sigma^2\gt D/(D-n-1); then using all features is optimal.

Theorem 2 and Proposition 1 (one draw is typical). With α=p/n>1\alpha=p/n\gt1 and R=σ2+∥β−β^∥2\mathcal R=\sigma^2+\|\beta-\hat\beta\|^2 the conditional prediction risk, for ϵ∈(0,1)\epsilon\in(0,1) R∈∥βT∥2(1−(1±ϵ)np)+(∥βTc∥2+σ2)(1+1±ϵ1∓ϵ np−n+1) \mathcal R\in\|\beta_T\|^2\Big(1-(1\pm\epsilon)\tfrac np\Big)+(\|\beta_{T^c}\|^2+\sigma^2)\Big(1+\tfrac{1\pm\epsilon}{1\mp\epsilon}\,\tfrac{n}{p-n+1}\Big) outside an event of probability a sum of e−cne^{-cn} terms (cc depending on ϵ,α\epsilon,\alpha), useful when α\alpha is a constant away from 1; α<1\alpha\lt1 is analogous. Proposition 1 bounds ∣∥βT∥2−pD∥β∥2∣\big|\|\beta_T\|^2-\tfrac pD\|\beta\|^2\big| for a random pp-subset in terms of the spikiness μ=max⁡i∣βi∣/∥β∥∈[1/D,1]\mu=\max_i|\beta_i|/\|\beta\|\in[1/\sqrt D,1], so with many weak features (small μ\mu) the Corollary 1 averages describe a single draw of TT.

Fourier model and Theorem 3. FF is the unitary DFT and the noiseless target is μ=Fβ\mu=F\beta. Row set SS and column set TT are independent Bernoulli subsets with rates ρn=n/D<ρp=p/D\rho_n=n/D\lt\rho_p=p/D; one fits β^T=FS,T†μS\hat\beta_T=F_{S,T}^\dagger\mu_S, β^Tc=0\hat\beta_{T^c}=0, for random β\beta, independent of S,TS,T, with Eββ∗=I/D\mathbb E\beta\beta^*=I/D. As D,n,p→∞D,n,p\to\infty with ρn,ρp\rho_n,\rho_p fixed, the limit (Step 9) is lim⁡E∥β−β^∥2=1−2ρn+ρn(1−ρn)ρp−ρn=1−nD(2−D−np−n), \lim\mathbb E\|\beta-\hat\beta\|^2=1-2\rho_n+\frac{\rho_n(1-\rho_n)}{\rho_p-\rho_n}=1-\frac nD\Big(2-\frac{D-n}{p-n}\Big), the σ=0\sigma=0 case of Corollary 1 with D−n−1, p−n−1D-n-1,\,p-n-1 replaced by D−n, p−nD-n,\,p-n: infinite as ρp↓ρn\rho_p\downarrow\rho_n, decreasing in ρp\rho_p, and 1−ρn1-\rho_n at ρp=1\rho_p=1.

Step 1

The risk is σ2\sigma^2 plus the parameter error, and omitted features act as extra label noise. Isotropy gives risk σ2+∥β−β^∥2=σ2+∥βTc∥2+∥βT−β^T∥2\sigma^2+\|\beta-\hat\beta\|^2=\sigma^2+\|\beta_{T^c}\|^2+\|\beta_T-\hat\beta_T\|^2 in expectation, so only the last term needs analysis. Write y=XTβT+ηy=X_T\beta_T+\eta with η=XTcβTc+σϵ\eta=X_{T^c}\beta_{T^c}+\sigma\epsilon. Independent Gaussian coordinates make XTcX_{T^c} and ϵ\epsilon independent of XTX_T, so η∣XT∼N(0,(∥βTc∥2+σ2)In).\eta\mid X_T\sim N\big(0,(\|\beta_{T^c}\|^2+\sigma^2)I_n\big). Misspecification is label noise of variance ∥βTc∥2\|\beta_{T^c}\|^2, and this independence (Gaussian, identity covariance) lets every later expectation factor.

Step 2

Below the threshold the variance is an inverse Wishart trace (Breiman and Freedman). For p≤np\le n, conditioning on XTX_T gives E∥β^T−βT∥2=(∥βTc∥2+σ2) Etr⁡(XT∗XT)−1\mathbb E\|\hat\beta_T-\beta_T\|^2=(\|\beta_{T^c}\|^2+\sigma^2)\,\mathbb E\operatorname{tr}(X_T^*X_T)^{-1}. By the Schur complement, 1/[(XT∗XT)−1]jj1/[(X_T^*X_T)^{-1}]_{jj} is the squared distance from column jj to the span of the others, a χn−p+12\chi^2_{n-p+1}, and E[1/χk2]=1/(k−2)\mathbb E[1/\chi^2_k]=1/(k-2) for k≥3k\ge3 and ∞\infty for k≤2k\le2. So the trace has mean p/(n−p−1)p/(n-p-1) for p≤n−2p\le n-2 and is infinite at p∈{n−1,n}p\in\{n-1,n\}.

Step 3

Above the threshold the error splits into a component in ker⁡XT\ker X_T and fitted noise. For p≥np\ge n, with K=XTXT∗K=X_TX_T^* and ΠT\Pi_T the projection onto the row space, βT−β^T=(I−ΠT)βT−XT∗K−1η,\beta_T-\hat\beta_T=(I-\Pi_T)\beta_T-X_T^*K^{-1}\eta, a vector in ker⁡XT\ker X_T plus one in the row space, and Pythagoras separates bias and variance. The row space is uniformly random, so EΠT=(n/p)I\mathbb E\Pi_T=(n/p)I and the bias is ∥βT∥2(1−n/p)\|\beta_T\|^2(1-n/p), which grows with pp for fixed βT\beta_T. Under random selection its mean ∥β∥2(p−n)/D\|\beta\|^2(p-n)/D grows exactly as fast as ∥βTc∥2\|\beta_{T^c}\|^2 falls, keeping their sum at ∥β∥2(1−n/D)\|\beta\|^2(1-n/D). So the second descent comes from the variance alone and levels off at a positive value.

Step 4

The variance is tr⁡K−1\operatorname{tr}K^{-1}, finite only from p=n+2p=n+2. The fitted noise has squared norm η∗K−1η\eta^*K^{-1}\eta, with mean (∥βTc∥2+σ2) Etr⁡K−1(\|\beta_{T^c}\|^2+\sigma^2)\,\mathbb E\operatorname{tr}K^{-1}. The Schur complement argument of Step 2, now on rows, makes 1/(K−1)ii1/(K^{-1})_{ii} a χp−n+12\chi^2_{p-n+1}, so Etr⁡K−1=n/(p−n−1)\mathbb E\operatorname{tr}K^{-1}=n/(p-n-1) for p≥n+2p\ge n+2 and is infinite at p∈{n,n+1}p\in\{n,n+1\}. Since σ>0\sigma\gt0, the risk is infinite at p∈{n−1,n,n+1}p\in\{n-1,n,n+1\}, where the smallest singular value of XTX_T (about ∣p−n∣|\sqrt p-\sqrt n|) is near zero.

Step 5

Averaging over a random TT gives Corollary 1 and the shape of the curve. Theorem 1 is affine in (∥βT∥2,∥βTc∥2)(\|\beta_T\|^2,\|\beta_{T^c}\|^2) given ∣T∣|T|, and exchangeability gives E∥βT∥2=pD∥β∥2\mathbb E\|\beta_T\|^2=\frac pD\|\beta\|^2, so averaging amounts to substituting this mean. For p≤n−2p\le n-2 the risk is (a−bp)n−1n−1−p(a-bp)\frac{n-1}{n-1-p} with a=∥β∥2+σ2a=\|\beta\|^2+\sigma^2, b=∥β∥2/Db=\|\beta\|^2/D; its derivative has the sign of a−b(n−1)>0a-b(n-1)\gt0, so the minimum over p≤np\le n is at p=0p=0, and comparing with p=Dp=D gives the threshold D/(D−n−1)D/(D-n-1). For p≥n+2p\ge n+2 both coefficients in Corollary 1 decrease in pp when D>n+1D\gt n+1.

Step 6

Theorem 2 follows by concentrating the bias and the variance separately. By the invariance of Step 3 the bias is ∥βT∥2(1−L)\|\beta_T\|^2(1-L) with L∼Beta(n/2,(p−n)/2)L\sim\mathrm{Beta}(n/2,(p-n)/2), concentrated by the Johnson-Lindenstrauss Chernoff bound. The variance η∗K−1η\eta^*K^{-1}\eta given KK is a weighted sum of χ12\chi^2_1 variables, which concentrates around its conditional mean at the rate Pr⁡[η∗K−1η∉(1±ϵ)(∥βTc∥2+σ2)tr⁡K−1∣K]≤2exp⁡ ⁣(−nϵ224 κ(XT)2),\Pr\big[\eta^*K^{-1}\eta\notin(1\pm\epsilon)(\|\beta_{T^c}\|^2+\sigma^2)\operatorname{tr}K^{-1}\mid K\big]\le2\exp\!\Big(-\frac{n\epsilon^2}{24\,\kappa(X_T)^2}\Big), with the condition number κ\kappa controlled by Gordon/Davidson-Szarek singular-value bounds. A union bound over the χp−n+12\chi^2_{p-n+1} diagonals centers tr⁡K−1\operatorname{tr}K^{-1} at the typical value n/(p−n+1)n/(p-n+1) rather than the mean n/(p−n−1)n/(p-n-1). For α<1\alpha\lt1 there is no bias, and the same argument runs on η∗K†η\eta^*K^\dagger\eta with (n,p,α)→(p,n,α−1)(n,p,\alpha)\to(p,n,\alpha^{-1}).

Step 7

Proposition 1 is Bernstein for sampling without replacement. ∥βT∥2\|\beta_T\|^2 sums pp draws without replacement from (β12,…,βD2)(\beta_1^2,\dots,\beta_D^2), and Hoeffding's convex-order comparison transfers Bernstein's inequality from sampling with replacement. The population range μ2∥β∥2\mu^2\|\beta\|^2 and variance at most ∥β∥4D(μ2−1D)\frac{\|\beta\|^4}{D}(\mu^2-\frac1D) give its two terms.

Step 8

In the Fourier model, unitarity reduces the risk to one inverse moment. With P=FS,T†FS,TP=F_{S,T}^\dagger F_{S,T}, Pythagoras splits the error into ∥β∥2−∥PβT∥2+∥FS,T†FS,TcβTc∥2\|\beta\|^2-\|P\beta_T\|^2+\|F_{S,T}^\dagger F_{S,T^c}\beta_{T^c}\|^2, and Eββ∗=I/D\mathbb E\beta\beta^*=I/D turns each norm into a trace. For full-rank FS,TF_{S,T}, tr⁡P=min⁡{∣S∣,∣T∣}\operatorname{tr}P=\min\{|S|,|T|\}, and for ∣T∣≥∣S∣|T|\ge|S| orthonormal rows give FS,TFS,T∗=I−FS,TcFS,Tc∗F_{S,T}F_{S,T}^*=I-F_{S,T^c}F_{S,T^c}^*, and E∥β−β^∥2=1−2 Emin⁡{∣S∣D,∣T∣D}+nD (∗),(∗)=E[1ntr⁡(FS,TFS,T∗)−1].\mathbb E\|\beta-\hat\beta\|^2=1-2\,\mathbb E\min\Big\{\frac{|S|}D,\frac{|T|}D\Big\}+\frac nD\,(*),\qquad(*)=\mathbb E\Big[\frac1n\operatorname{tr}(F_{S,T}F_{S,T}^*)^{-1}\Big].

Step 9

The limit of (∗)(*), computed from a Haar block. By Farrell (2011) the squared singular values of a random DFT restriction have the same Wachter (MANOVA) limit as an n×pn\times p block of a Haar unitary, with support bounded away from 00 when ρp>ρn\rho_p\gt\rho_n. For the Haar block the inverse moment is exact: writing US,⋅=d(ZZ∗)−1/2ZU_{S,\cdot}\overset d=(ZZ^*)^{-1/2}Z with ZZ complex Gaussian, A=ZTZT∗A=Z_TZ_T^* and B=ZTcZTc∗B=Z_{T^c}Z_{T^c}^* independent complex Wisharts, tr⁡(US,TUS,T∗)−1=n+tr⁡(A−1B),E=n(D−n)p−n,\operatorname{tr}(U_{S,T}U_{S,T}^*)^{-1}=n+\operatorname{tr}(A^{-1}B),\qquad\mathbb E=\frac{n(D-n)}{p-n}, so (∗)→(1−ρn)/(ρp−ρn)(*)\to(1-\rho_n)/(\rho_p-\rho_n). A simulation (D=1031D=1031, n=258n=258, p=400p=400: 1.89 against 1.86) agrees.

Step 10

The PNAS noiseless bound, which favors the minimum-norm interpolant. A Gaussian-RKHS function that vanishes on a dense set is uniformly small relative to its norm, and f=h−h∗f=h-h^* vanishes at every xix_i with ∥f∥≤∥h∥+∥h∗∥\|f\|\le\|h\|+\|h^*\|. The sample has fill distance κn=max⁡x∈Ωmin⁡j∥x−xj∥=O((n/log⁡n)−1/d)\kappa_n=\max_{x\in\Omega}\min_j\|x-x_j\|=O((n/\log n)^{-1/d}) with high probability, and Wendland's sampling inequality for Gaussian native spaces gives ∥f∥∞≤e−c∣log⁡κ∣/κ∥f∥H∞≤e−c/κ∥f∥H∞\|f\|_\infty\le e^{-c|\log\kappa|/\kappa}\|f\|_{\mathcal H_\infty}\le e^{-c/\kappa}\|f\|_{\mathcal H_\infty} for small κ\kappa. Substituting κn\kappa_n gives the theorem.

Consequences and limits. Whether passing the peak pays depends on feature choice: with random, individually weak features each one removes little misspecification and adds variance, so the classical optimum is p=0p=0 and using all DD features is best above the SNR threshold; with prescient selection (features in decreasing βj2\beta_j^2), ∥βTc∥2\|\beta_{T^c}\|^2 drops fast, the optimum sits at some p<np\lt n, and interpolation does not help. The results are exact only for isotropic Gaussian or DFT features, a linear model and the ridgeless estimator, and optimally tuned ridge removes the peak (Hastie et al.). Under random selection the risk never goes below ∥β∥2(1−n/D)+σ2\|\beta\|^2(1-n/D)+\sigma^2, so this is double descent without benign overfitting in the consistency sense. For networks and forests the curves are empirical and the minimum-norm mechanism a conjecture.

Terms

Interpolation threshold
p≈np\approx n (or N≈nKN\approx nK for KK outputs): the smallest model that fits the training data exactly; risk peaks there.
Minimum-norm estimator
β^T=XT†y\hat\beta_T=X_T^\dagger y: least squares for p≤np\le n, the interpolant of least ℓ2\ell_2 norm for p≥np\ge n.
Misspecification noise
η=XTcβTc+σϵ∼N(0,(∥βTc∥2+σ2)I)\eta=X_{T^c}\beta_{T^c}+\sigma\epsilon\sim N(0,(\|\beta_{T^c}\|^2+\sigma^2)I), independent of XTX_T in the Gaussian model.
Bias past threshold
∥(I−ΠT)βT∥2\|(I-\Pi_T)\beta_T\|^2, mean ∥βT∥2(1−n/p)\|\beta_T\|^2(1-n/p): signal in ker⁡XT\ker X_T, set to zero by the min-norm rule.
Variance factor
Etr⁡(XT∗XT)−1=pn−p−1\mathbb E\operatorname{tr}(X_T^*X_T)^{-1}=\frac p{n-p-1} or Etr⁡(XTXT∗)−1=np−n−1\mathbb E\operatorname{tr}(X_TX_T^*)^{-1}=\frac n{p-n-1}; infinite for p∈{n−1,n,n+1}p\in\{n-1,n,n+1\}.
Inverse-Wishart diagonal
1/(K−1)ii∼χp−n+121/(K^{-1})_{ii}\sim\chi^2_{p-n+1}: squared distance from a Gaussian row to the span of the others.
SNR threshold
Under random selection, using all DD features beats every p≤np\le n iff ∥β∥2/σ2>D/(D−n−1)\|\beta\|^2/\sigma^2>D/(D-n-1).
Prescient selection
Features added in decreasing βj2\beta_j^2; optimum at some p<np<n, interpolation does not help.
Spikiness μ\mu
max⁡i∣βi∣/∥β∥∈[D−1/2,1]\max_i|\beta_i|/\|\beta\|\in[D^{-1/2},1]; small μ\mu (weak features) makes ∥βT∥2≈pD∥β∥2\|\beta_T\|^2\approx\frac pD\|\beta\|^2 for one draw of TT.
Fourier limit (corrected)
lim⁡E∥β−β^∥2=1−2ρn+ρn(1−ρn)ρp−ρn\lim\mathbb E\|\beta-\hat\beta\|^2=1-2\rho_n+\frac{\rho_n(1-\rho_n)}{\rho_p-\rho_n}; the paper's printed version has an extra factor ρp\rho_p.

Quiz

  1. In the Gaussian model, why is the expected risk infinite exactly for p∈{n−1,n,n+1}p\in\{n-1,n,n+1\}?
  2. Why does prescient selection (features in decreasing βj2\beta_j^2) favor some p<np<n, unlike random selection?
  3. In Theorem 2, why does the condition number κ(XT)\kappa(X_T) enter the probability bound?
  4. Under random feature selection, why does the second descent (past p=np=n) come entirely from the variance term?

Sources