Sam Babichenko

Reading notes / Benign overfitting

Harmless interpolation of noisy data in regression

Muthukumar, Vodrahalli, Subramanian and Sahai, 2020

Context. Deep networks fit noisy labels and still predict well, while the variance of least squares diverges as d→nd\to n. In a well-specified linear model with d>nd>n features, this paper (alongside Hastie et al. and Bartlett et al.) asks whether an interpolator, which must fit the noise, can still have vanishing excess test error, and which interpolators do, and answers both non-asymptotically. An interpolator must put the noise somewhere, and the test error is smallest when the noise is spread thinly over many directions that the test distribution weights little; the unavoidable excess error (the paper's price of interpolation) is then about σ2n/d\sigma^2 n/d, so harmless interpolation needs d≫nd\gg n. Spreading treats signal and noise alike, so it also moves part of the signal into aliases, where it adds test error (contamination); a good interpolator needs a few strong directions that carry the signal and very many weak ones that absorb the noise.

Setting. Y=⟨a(X),α∗⟩+WY=\langle a(X),\alpha^*\rangle+W with features a(X)∈Rda(X)\in\mathbb{R}^d, W∼N(0,σ2)W\sim N(0,\sigma^2) independent, and Σ=E[a(X)a(X)⊤]≻0\Sigma=\mathbb{E}[a(X)a(X)^\top]\succ0. The design A∈Rn×dA\in\mathbb{R}^{n\times d} has rank n<dn<d; an interpolator is any α\alpha with Aα=YA\alpha=Y, and Etest(α)\mathcal{E}_{\rm test}(\alpha) is the excess MSE on a fresh pair. The whitened design B=AΣ−1/2B=A\Sigma^{-1/2} has iid isotropic rows, assumed (A1) bounded by d\sqrt d (e.g. Fourier features), (A2) sub-Gaussian, or (A3) iid N(0,1)N(0,1).

Theorem 1 (ideal interpolator). For every joint law of (X,Y)(X,Y) and every realization of AA and WW, every interpolator satisfies Etest(α)≥Etest∗=W⊤(BB⊤)−1W\mathcal{E}_{\rm test}(\alpha)\ge\mathcal{E}^*_{\rm test}=W^\top (BB^\top)^{-1} W, with equality at α^ideal=α∗+Σ−1/2B⊤(BB⊤)−1W\hat\alpha_{\rm ideal} = \alpha^* + \Sigma^{-1/2}B^\top(BB^\top)^{-1}W. It depends on α∗\alpha^*, so it serves only as a benchmark.

Corollaries 1 and 2 (the price of interpolation). With high probability the lower bound shared by all interpolators satisfies Etest∗≥nσ2(1−δ)/(d+2n)2\mathcal{E}^*_{\rm test}\ge n\sigma^2(1-\delta)/(\sqrt d+2\sqrt n)^2 under (A3), up to constants under (A2), and with dln⁡d\sqrt{d\ln d} for d\sqrt d under (A1); with d=γnd=\gamma n this bound stays at order σ2/γ\sigma^2/\gamma, so harmless interpolation needs d/n→∞d/n\to\infty. Conversely, under (A3) with d>4nd>4n, Etest∗ ≤ nσ2(1+δ)(d−2n)2=O ⁣(σ2nd), \mathcal{E}^*_{\rm test}\ \le\ \frac{n\sigma^2(1+\delta)}{(\sqrt d-2\sqrt n)^2} = O\!\left(\frac{\sigma^2 n}{d}\right), and similarly for independent sub-Gaussian entries. The paper proves no upper bound under (A1) or (A2) alone.

Survival and contamination (Section 4). Take Fourier features fk(x)=e2πikxf_k(x)=e^{2\pi i kx}, k<d=(M+1)nk<d=(M+1)n, on regularly spaced points xj=j/nx_j=j/n, and the weighted minimum-norm interpolator arg⁡min⁡∑k∣αk∣2/wk2\arg\min\sum_k|\alpha_k|^2/w_k^2, which is minimum-ℓ2\ell_2 interpolation with covariance eigenvalues λk=wk2\lambda_k=w_k^2. For labels y=fk∗(xtrain)y=f_{k^*}(x_{\rm train}), k∗<nk^*<n, with alias set S(k∗)={k∗+ℓn: ℓ=1,…,M}S(k^*)=\{k^*+\ell n:\ \ell=1,\dots,M\}, the fit is α^j=λj/V\hat\alpha_j=\lambda_j/V on {k∗}∪S(k∗)\{k^*\}\cup S(k^*), and SU(k∗)=λk∗V,C(k∗)=(∑S(k∗)λj2)1/2V,V=λk∗+∑S(k∗)λj, \mathrm{SU}(k^*)=\frac{\lambda_{k^*}}{V},\qquad C(k^*)=\frac{\big(\sum_{S(k^*)}\lambda_j^2\big)^{1/2}}{V},\qquad V=\lambda_{k^*}+\sum_{S(k^*)}\lambda_j, with test error (1−SU)2+C2(1-\mathrm{SU})^2+C^2 on this component. Signal bleed is the lost fraction 1−SU1-\mathrm{SU}; signal contamination CC is the error the bled energy causes in the alias directions. Spiked weights put λj=γd/s\lambda_j=\gamma d/s on s<ns<n favored features and (1−γ)d/(d−s)(1-\gamma)d/(d-s) on the rest.

Theorem 2 (parsimonious interpolators overfit noise). Let Σ=I\Sigma=I. An interpolating operator is β\beta-parsimonious if keeping its nn largest coefficients preserves at least the fraction β\beta of ∥Y∥2\|Y\|^2 in the fit, for every YY. Under (A3), or (A2) with constants depending on KK, at α∗=0\alpha^*=0, Etest(α^) ≥ βσ2(1−δ)Cln⁡(d/n) \mathcal{E}_{\rm test}(\hat\alpha)\ \ge\ \frac{\beta\sigma^2(1-\delta)}{C\ln(d/n)} with high probability, where in the Gaussian case C=(2+2ln⁡(d/n)+1)2/ln⁡(d/n)→4C=(2+2\sqrt{\ln(d/n)+1})^2/\ln(d/n)\to4. OMP to completion and basis pursuit are 1-parsimonious, so their error cannot decay faster than σ2/((q−1)ln⁡n)\sigma^2/((q-1)\ln n) for d=nqd=n^q.

Proposition 1 and Corollary 5 (hybrid interpolation is order-optimal). Given any first-stage estimator α^1\hat\alpha_1, let α^hyb=α^1+A⊤(AA⊤)−1(Y−Aα^1)\hat\alpha_{\rm hyb}=\hat\alpha_1+A^\top(AA^\top)^{-1}(Y-A\hat\alpha_1), the interpolator closest to α^1\hat\alpha_1. With Eest=∥α^1−α∗∥2\mathcal{E}_{\rm est}=\|\hat\alpha_1-\alpha^*\|^2 and Epred=1n∥A(α^1−α∗)∥2\mathcal{E}_{\rm pred}=\tfrac1n\|A(\hat\alpha_1-\alpha^*)\|^2, Etest(α^hyb)≤Eest+∥W∥2/λmin⁡(AA⊤)\mathcal{E}_{\rm test}(\hat\alpha_{\rm hyb})\le\mathcal{E}_{\rm est}+\|W\|^2/\lambda_{\min}(AA^\top) (Step 10; the paper's bound carries an extra 2nEpred2n\mathcal E_{\rm pred} and a factor 2 on ∥W∥2\|W\|^2). For iid N(0,1)N(0,1) AA, d>4nd>4n, and a first stage with rate σ2kln⁡(d/k)/n\sigma^2 k\ln(d/k)/n (e.g. SLOPE), Etest(α^hyb)≲σ2kln⁡(d/k)/n+σ2n/(d−2n)2\mathcal{E}_{\rm test}(\hat\alpha_{\rm hyb})\lesssim\sigma^2k\ln(d/k)/n+\sigma^2n/(\sqrt d-2\sqrt n)^2, matching up to constants a lower bound every interpolator must satisfy on some instance.

Step 1

The ideal interpolator is the whitened minimum-norm fit of the noise (Theorem 1). With Δ=α−α∗\Delta=\alpha-\alpha^*, the test error is ∥Σ1/2Δ∥2\|\Sigma^{1/2}\Delta\|^2 and interpolation reads AΔ=WA\Delta=W. In whitened coordinates u=Σ1/2Δu=\Sigma^{1/2}\Delta this is the minimum-norm point of {u:Bu=W}\{u:Bu=W\}: u⋆=B⊤(BB⊤)−1W,∥u⋆∥2=W⊤(BB⊤)−1W. u^\star=B^\top(BB^\top)^{-1}W,\qquad \|u^\star\|^2=W^\top(BB^\top)^{-1}W. Nothing random is used. Each extra feature adds a PSD term to BB⊤BB^\top and lowers this minimum; with d≫nd\gg n, BB⊤≈dInBB^\top\approx dI_n and the noise energy nσ2n\sigma^2 is divided among dd weak directions.

Step 2

The price of interpolation is bounded by the extreme singular values of BB, and the lower bound on the smallest one is the hard part (Corollaries 1 and 2). Both corollaries come from ∥W∥2/σmax⁡(B)2≤W⊤(BB⊤)−1W≤∥W∥2/σmin⁡(B)2\|W\|^2/\sigma_{\max}(B)^2\le W^\top(BB^\top)^{-1}W\le\|W\|^2/\sigma_{\min}(B)^2. Bounding σmax⁡\sigma_{\max} above is easy (Davidson-Szarek, Vershynin, and matrix Bernstein for bounded rows, which introduces the ln⁡d\sqrt{\ln d}). Bounding σmin⁡\sigma_{\min} below is delicate: the Gaussian tail gives d−2n\sqrt d-2\sqrt n (hence d>4nd>4n) and Rudelson-Vershynin covers independent entries, but sub-Gaussian rows alone do not force σmin⁡\sigma_{\min} to concentrate, and for lifted features on random points the paper's experiments find it heavy-tailed near d≈nd\approx n.

Step 3

On a regular grid, aliases absorb noise at exactly the ideal rate, and a true frequency survives in proportion to its share of the cohort's weight. Since e2πi(k+ℓn)j/n=e2πikj/ne^{2\pi i(k+\ell n)j/n}=e^{2\pi ikj/n}, the dd features fall into nn cohorts of identical training columns, distinct cohorts are orthogonal on the sample, and all features are orthonormal at test time. Expand the noise as W=∑k<nckfk(xtrain)W=\sum_{k<n}c_kf_k(x_{\rm train}), E∣ck∣2=σ2/n\mathbb{E}|c_k|^2=\sigma^2/n. Minimum norm splits ckc_k evenly over its d/nd/n cohort members (equality in Cauchy-Schwarz), so the total is ∥W∥2/d≈σ2n/d\|W\|^2/d\approx\sigma^2n/d. Here BB∗=dInBB^*=dI_n, so on pure noise the minimum-ℓ2\ell_2 interpolator is the ideal one. With weights, the fit within a cohort is a matched filter: in rescaled coefficients ξj=αj/wj\xi_j=\alpha_j/w_j the problem is min⁡∥ξ∥2\min\|\xi\|^2 subject to ⟨ξ,w⟩=1\langle\xi,w\rangle=1, so ξ=w/∥w∥2\xi=w/\|w\|^2, α^j=wj2/V\hat\alpha_j=w_j^2/V, and SU\mathrm{SU} as above. The signal survives only if its weight dominates the total alias weight, which the weighting fixes before any data are seen; with uniform weights SU=n/d→0\mathrm{SU}=n/d\to0, which is why in the isotropic Gaussian case the minimum-ℓ2\ell_2 interpolator tends to the null risk.

Step 4

The energy bled into the aliases is the contamination. Exact interpolation puts the energy taken from the true feature on its aliases, which are orthogonal at test time and so add error there: orthonormality gives E∣Y^−fk∗(X)∣2=(1−SU)2+C2\mathbb{E}|\hat Y-f_{k^*}(X)|^2=(1-\mathrm{SU})^2+C^2 with C2=∑Sα^j2C^2=\sum_{S}\hat\alpha_j^2. Contamination is a separate condition from bleed: uniform weights bleed completely yet have C≈n/d→0C\approx\sqrt{n/d}\to0, while a few heavy aliases keep SU\mathrm{SU} away from 1 and CC away from 0.

Step 5

Summing over cohorts gives the consistency conditions. Cohorts are orthogonal at training and test time and the fit is linear in YY, so for α∗\alpha^* supported on {0,…,n−1}\{0,\dots,n-1\}, in expectation over the noise, E Etest=∑k∗<n∣αk∗∗∣2[(1−SU)2+C2]+σ2n∑k∗<n[SU2+C2]. \mathbb{E}\,\mathcal{E}_{\rm test}=\sum_{k^*<n}|\alpha^*_{k^*}|^2\big[(1-\mathrm{SU})^2+C^2\big]+\frac{\sigma^2}{n}\sum_{k^*<n}\big[\mathrm{SU}^2+C^2\big]. This assembly is mine; the paper states the conclusions in words. Consistency needs SU→1\mathrm{SU}\to1 and C→0C\to0 where the signal lives and SU2+C2→0\mathrm{SU}^2+C^2\to0 on all but o(n)o(n) cohorts, so the surviving frequencies must grow sub-linearly in nn and the rest must bleed out.

Step 6

Spiked weights meet both conditions with a few strong features and many weak ones. For k∗<sk^*<s every alias is unfavored, and with M≈d/nM\approx d/n, SU≈11+sn(1γ−1),C≈s/ndγ1−γ+sn, \mathrm{SU}\approx\frac{1}{1+\frac sn\big(\frac1\gamma-1\big)},\qquad C\approx\frac{s/\sqrt{nd}}{\frac{\gamma}{1-\gamma}+\frac sn}, while for k∗≥sk^*\ge s the cohort is uniform and SU2+C2=n/d\mathrm{SU}^2+C^2=n/d. The noise term is then about σ2(s/n+n/d)\sigma^2(s/n+n/d) and the signal term, for a signal in the favored set, ((s/n)(1/γ−1))2+O(s2/(nd))((s/n)(1/\gamma-1))^2+O(s^2/(nd)), so for fixed γ∈(0,1)\gamma\in(0,1) consistency holds iff s/n→0s/n\to0 and d/n→∞d/n\to\infty (my assembly; the paper gives only the per-cohort SU\mathrm{SU} and CC). The strong features carry the signal and also fit their own share of the noise; the weak ones absorb the rest.

Step 7

Ridge is minimum-norm interpolation with nn extra features, so it reduces contamination but increases bleed. Eliminating the residual shows that ridge with penalty λ2α⊤Γα\lambda^2\alpha^\top\Gamma\alpha is the minimum-norm interpolator on the augmented design [AΓ−1/2, λIn][A\Gamma^{-1/2},\ \lambda I_n]. The ridge columns are indicators of the training points and vanish at test time, so energy bled into them causes no contamination; but they are aliases that need smaller coefficients as λ\lambda grows, so they increase bleed. So optimally tuned ridge beats the minimum-ℓ2\ell_2 interpolator (Hastie et al.) by reducing contamination, and only a reweighting Γ\Gamma aligned with the signal reduces bleed.

Step 8

A parsimonious interpolator fits the noise with nn columns, and no nn columns have a large top eigenvalue (Theorem 2). Take α∗=0\alpha^*=0, so Etest=∥α^∥2≥∥α^S∥2\mathcal{E}_{\rm test}=\|\hat\alpha\|^2\ge\|\hat\alpha_S\|^2 on the top-nn support SS. Parsimony gives ∥ASα^S∥2≥β∥W∥2\|A_S\hat\alpha_S\|^2\ge\beta\|W\|^2, and ∥ASα^S∥2≤λmax⁡(AS⊤AS)∥α^S∥2\|A_S\hat\alpha_S\|^2\le\lambda_{\max}(A_S^\top A_S)\|\hat\alpha_S\|^2, so ∥α^S∥2 ≥ β∥W∥2max⁡∣S′∣=nλmax⁡(AS′⊤AS′). \|\hat\alpha_S\|^2\ \ge\ \frac{\beta\|W\|^2}{\max_{|S'|=n}\lambda_{\max}(A_{S'}^\top A_{S'})}. The maximum over all nn-subsets is needed because SS depends on WW. A Gaussian tail per block and a union bound over (dn)≤(ed/n)n\binom dn\le(ed/n)^n subsets give max⁡λmax⁡≈4nln⁡(d/n)\max\lambda_{\max}\approx4n\ln(d/n). In Step 1 all dd columns carry the noise and λ≈d\lambda\approx d; here only nn do, and the logarithm from the union bound accounts for the whole 1/ln⁡(d/n)1/\ln(d/n) rate.

Step 9

OMP to completion and basis pursuit are hard-sparse, so β=1\beta=1. Both return interpolators on at most nn columns: OMP reaches zero residual after nn steps, and basis pursuit as an LP in α=u−v\alpha=u-v has a basic optimum with at most nn nonzeros, one per equality constraint. Uniqueness (or a solver that returns a vertex) makes the output this sparse optimum, and it holds a.s. when AA has a density, since a tie between optimal vertices forces an algebraic identity in AA; the paper's extra claim of support exactly nn is not needed.

Step 10

The hybrid's error splits orthogonally into missed signal and refitted noise (Proposition 1). The second stage is Step 1 applied to the residual. With PP the projection onto the row space of AA, α^hyb−α∗=(I−P)(α^1−α∗)+A⊤(AA⊤)−1W, \hat\alpha_{\rm hyb}-\alpha^*=(I-P)(\hat\alpha_1-\alpha^*)+A^\top(AA^\top)^{-1}W, and the two terms are orthogonal, so Etest(α^hyb)≤Eest+∥W∥2/λmin⁡(AA⊤)\mathcal{E}_{\rm test}(\hat\alpha_{\rm hyb})\le\mathcal{E}_{\rm est}+\|W\|^2/\lambda_{\min}(AA^\top). The refit restores the row-space part of missed signal, so the signal term is at most Eest\mathcal{E}_{\rm est}.

Step 11

Plug in first-stage rates and match a lower bound (Corollaries 5 to 7). The hybrid's error is at most the first-stage rate plus the price of interpolation: SLOPE supplies kln⁡(d/k)/nk\ln(d/k)/n, the Lasso (under a restricted eigenvalue condition) and the σ\sigma-free square-root Lasso kln⁡d/nk\ln d/n, and OMP with a noise-level stopping rule kσ2/nk\sigma^2/n under incoherence and a minimum signal size. Every interpolator has error at least the bound of Corollary 1, and every estimator at least the minimax rate on some kk-sparse instance, and the max of the two is at least half their sum. As dd grows the noise term falls like n/dn/d while the signal term grows like ln⁡d\ln d, so the best dd is large but finite.

Consequences and limits. Interpolating noise is harmless only with d/n→∞d/n\to\infty. For the minimum-ℓ2\ell_2 interpolator the outcome is fixed by the spectrum before any data are seen: it needs o(n)o(n) strong directions that contain the truth and a weak tail of effective rank ≫n\gg n, Bartlett et al.'s pair of conditions read as survival and contamination. Sparse interpolators keep the signal but put the noise into nn coefficients; fitting the signal sparsely and spreading the residual with minimum norm achieves both. Limits: in this well-specified model interpolation gives no rate gain over a well-tuned regularizer; the upper bounds need Gaussian or independent-entry designs; the Fourier analysis needs exact aliasing, so for general designs it is a heuristic; and the peak at d≈nd\approx n is studied only empirically.

Terms

Etest(α)\mathcal{E}_{\rm test}(\alpha)
Excess test MSE; equals ∥Σ1/2(α−α∗)∥2\|\Sigma^{1/2}(\alpha-\alpha^*)\|^2 in the well-specified model.
Ideal interpolator
α∗+Σ−1/2B⊤(BB⊤)−1W\alpha^*+\Sigma^{-1/2}B^\top(BB^\top)^{-1}W: the whitened minimum-norm fit of the noise; needs α∗\alpha^*.
Price of interpolation Etest∗\mathcal{E}^*_{\rm test}
W⊤(BB⊤)−1W≍σ2n/dW^\top(BB^\top)^{-1}W\asymp\sigma^2 n/d; a lower bound for every interpolator.
Aliases
Features equal on the training points; regular Fourier has nn cohorts of d/nd/n exact aliases fk+ℓnf_{k+\ell n}.
Signal bleed, SU\mathrm{SU}
Shrinkage of a true coefficient into its aliases; SU=λk/(λk+∑aliasesλj)\mathrm{SU}=\lambda_{k}/(\lambda_k+\sum_{\rm aliases}\lambda_j).
Signal contamination, CC
Test-error std from bled energy in alias directions; C=∑λj2/(λk+∑λj)C=\sqrt{\sum\lambda_j^2}/(\lambda_k+\sum\lambda_j).
Spiked weights
ss favored features share γ\gamma of total weight, the other d−sd-s share 1−γ1-\gamma; consistent iff s=o(n)s=o(n), d/n→∞d/n\to\infty.
β\beta-parsimonious
The top nn coefficients reproduce at least a fraction β\beta of any label vector's energy; OMP and BP have β=1\beta=1.
Hybrid interpolator
α^1+A⊤(AA⊤)−1(Y−Aα^1)\hat\alpha_1+A^\top(AA^\top)^{-1}(Y-A\hat\alpha_1): sparse fit of the signal, then minimum-norm spread of the residual.
Ridge features
Tikhonov regularization is minimum-norm interpolation on [AΓ−1/2,λIn][A\Gamma^{-1/2},\lambda I_n]; the extra columns vanish at test time.

Quiz

  1. Theorem 1 gives the ideal test error as W⊤(BB⊤)−1WW^\top(BB^\top)^{-1}W, with no dependence on α∗\alpha^*. Why does α∗\alpha^* drop out?
  2. In the spiked-weight example, ss favored features carry a fixed share γ∈(0,1)\gamma\in(0,1) of the weight. Why must s=o(n)s=o(n) for consistency, and not merely γ\gamma close to 1?
  3. In the proof of Theorem 2, why must λmax⁡(AS′⊤AS′)\lambda_{\max}(A_{S'}^\top A_{S'}) be bounded over all nn-subsets S′S', and not just one?
  4. Why does a 1-parsimonious interpolator (BP, OMP to completion) have noise error of order σ2/ln⁡(d/n)\sigma^2/\ln(d/n) instead of σ2n/d\sigma^2 n/d?

Sources