Sam Babichenko

Reading notes / Benign overfitting

Kernel interpolation

Liang and Rakhlin, 2020; Belkin, Rakhlin and Tsybakov, 2019

Context. Interpolating rules were widely expected to overfit: classical RKHS theory trades bias against variance through a tuned ridge and gives ridgeless kernel regression no guarantee, and the classical interpolator, 1-nearest-neighbor, is inconsistent (asymptotic risk up to twice Bayes). Two papers show that kernel interpolation can generalize, by different mechanisms. Liang and Rakhlin (LR, 2020) study the minimum-RKHS-norm interpolant f^(x)=K(x,X)K(X,X)−1Y\hat f(x)=K(x,X)K(X,X)^{-1}Y for d≍nd\asymp n, motivated by MNIST, where it beat every λ>0\lambda>0 they tried on all but one digit pair. Belkin, Rakhlin and Tsybakov (BRT, 2019) ask whether an estimator can fit every training point exactly and still attain the minimax rate, and show that Nadaraya-Watson with a kernel that is infinite at zero does. In both, how closely a procedure fits the data is separate from where it sits on the bias-variance trade-off. In high dimensions the curvature of a smooth kernel matters only on the diagonal, so K(X,X)≈βXX⊤/d+α11⊤+γIK(X,X)\approx\beta XX^\top/d+\alpha11^\top+\gamma I while the test vector has no γ\gamma term, and at new points the interpolant is ridge regression on linear features with implicit ridge γ\gamma. In low dimensions a singular kernel forces an exact fit on a set of vanishing measure while the bandwidth still averages about nhdnh^d points everywhere else.

Setting (LR). Data i.i.d. from μ\mu, f∗=E[y∣x]f_*=\mathbb E[y\mid x] in the RKHS H\mathcal H of K(x,x′)=h(⟨x,x′⟩/d)K(x,x')=h(\langle x,x'\rangle/d), hh smooth near 0 and K(x,x)≤MK(x,x)\le M. Assume c≤d/n≤Cc\le d/n\le C, ∥Σd∥op≤1\|\Sigma_d\|_{op}\le1, whitened coordinates i.i.d. with 8+m8+m moments, and conditional noise variance at most σ2\sigma^2. With τ=Tr⁡(Σd)/d\tau=\operatorname{Tr}(\Sigma_d)/d, α=h(0)+12h′′(0)Tr⁡(Σd2)d2,β=h′(0),γ=h(τ)−h(0)−h′(0)τ, \alpha = h(0) + \tfrac12 h''(0)\frac{\operatorname{Tr}(\Sigma_d^2)}{d^2}, \qquad \beta = h'(0), \qquad \gamma = h(\tau) - h(0) - h'(0)\tau , and the implicit ridge ratio is r=γ/β≈h′′(0)2h′(0)τ2r=\gamma/\beta\approx\frac{h''(0)}{2h'(0)}\tau^2 for small τ\tau.

Risk of the interpolant (LR, Theorems 1 to 3). For dd large enough, with probability 1−2δ−d−21-2\delta-d^{-2} over XX, EY∣X∥f^−f∗∥Lμ22≤8σ2∥Σd∥opd∑jλj[r+λj]2⏟V+∥f∗∥H2inf⁡0≤k≤n{1n∑j>kλj(K(X,X))+2Mk/n}⏟B+ϵ(n,d), \mathbb{E}_{Y\mid X}\|\hat f - f_*\|_{L^2_\mu}^2 \le \underbrace{\frac{8\sigma^2\|\Sigma_d\|_{op}}{d}\sum_j \frac{\lambda_j}{\left[r + \lambda_j\right]^2}}_{V} + \underbrace{\|f_*\|_{\mathcal H}^2 \inf_{0 \le k \le n}\Big\{\frac1n\sum_{j>k}\lambda_j(K(X,X)) + 2M\sqrt{k/n}\Big\}}_{B} + \epsilon(n,d), with λj=λj(XX⊤/d+αβ11⊤)\lambda_j=\lambda_j(XX^\top/d+\frac\alpha\beta11^\top) in VV and ϵ(n,d)=O(d−m/(8+m)log⁡4.1d)+O(n−1/2log⁡0.5(n/δ))\epsilon(n,d)=O(d^{-m/(8+m)}\log^{4.1}d)+O(n^{-1/2}\log^{0.5}(n/\delta)). Each variance summand is at most 1/(4r)1/(4r). The bias bound needs only K(x,x)≤MK(x,x)\le M and i.i.d. data. For the exponential kernel and Gaussian xx: with n>dn>d, V≲Tr⁡(Σd−1)/nV\lesssim\operatorname{Tr}(\Sigma_d^{-1})/n and B≲r+τB\lesssim r+\tau; with d>nd>n, V≲nd⋅14rV\lesssim\frac nd\cdot\frac1{4r} and B≲r+τB\lesssim r+\tau, so since r≍τ2r\asymp\tau^2, a spectrum with τ≍(n/d)1/3\tau\asymp(n/d)^{1/3} makes both terms O((n/d)1/3)O((n/d)^{1/3}). Polynomial decay λj(Σ)=j−a\lambda_j(\Sigma)=j^{-a}, a<1a<1, gives the nonparametric rate n−a/(2a+1)n^{-a/(2a+1)} after balancing.

Step 1 (LR)

The risk splits exactly into variance and bias. Write f^−f∗\hat f-f_* as the interpolant of the noise plus the projection residual (PX−I)f∗(P_X-I)f_*, with PXP_X the projection of H\mathcal H onto span⁡{K(⋅,xi)}\operatorname{span}\{K(\cdot,x_i)\}. The cross term has conditional mean zero, so the risk is exactly V+BV+B, and V≤σ2 Ex∥K(X,X)−1K(X,x)∥22V\le\sigma^2\,\mathbb E_x\|K(X,X)^{-1}K(X,x)\|_2^2: the variance depends only on the training matrix and the vector for a fresh test point, and the next two steps linearize each.

Step 2 (LR)

The training kernel matrix is a linear kernel plus an implicit ridge. This is El Karoui's linearization, made non-asymptotic. In high dimension normalized inner products are nearly deterministic: ∣xi⊤xj/d∣≲d−θ|x_i^\top x_j/d|\lesssim d^{-\theta} for i≠ji\ne j and ∥xi∥2/d=τ+O(d−θ)\|x_i\|^2/d=\tau+O(d^{-\theta}), with θ=12−28+m\theta=\tfrac12-\tfrac2{8+m} reflecting that only 8+m8+m moments are assumed. Taylor-expand hh entrywise. Off the diagonal the argument is small, so the linear term gives βXX⊤/d\beta XX^\top/d and the quadratic term, whose matrix of squares is close to its mean, gives α11⊤\alpha11^\top. On the diagonal the argument is τ\tau, which is not small, so Kii≈h(τ)K_{ii}\approx h(\tau) while the off-diagonal formula would predict h(0)+h′(0)τh(0)+h'(0)\tau, and the gap is γI\gamma I. The centered quadratic part is controlled only through a fourth-moment trace bound, so Markov gives ∥K(X,X)−Klin(X,X)∥≤η:=d−θ(δ−1/2+log⁡0.51d)\|K(X,X)-K^{lin}(X,X)\|\le\eta:=d^{-\theta}(\delta^{-1/2}+\log^{0.51}d), the one place the confidence level enters polynomially. Since Klin⪰γIK^{lin}\succeq\gamma I, Weyl gives ∥K−1∥≤2/γ\|K^{-1}\|\le2/\gamma and ∥K−1Klin∥≤2\|K^{-1}K^{lin}\|\le2 once η≤γ/2\eta\le\gamma/2. Without curvature there is no such control: a linear kernel has γ=0\gamma=0, and the bound on K−1K^{-1} fails.

Step 3 (LR)

The test vector is linear and carries no ridge. For a fresh xx every argument x⊤xj/dx^\top x_j/d is small, including the one that would have been a diagonal entry, so K(x,xj)=h(0)+βx⊤xj/d+O((x⊤xj/d)2)K(x,x_j)=h(0)+\beta x^\top x_j/d+O((x^\top x_j/d)^2) with no γ\gamma. Bernstein bounds each remainder by d−2θd^{-2\theta} up to logs, and summing nn of them gives a squared error of order d−(4θ−1)log⁡4.1dd^{-(4\theta-1)}\log^{4.1}d. This vanishes iff θ>1/4\theta>1/4, that is m>0m>0, so the 8+m8+m moments are exactly what makes this summed error vanish.

Step 4 (LR)

With both surrogates in place, the variance is that of ridge regression on linear features. Insert A−1AA^{-1}A with A=Klin(X,X)A=K^{lin}(X,X) and use Steps 2 and 3 to get V≤8σ2 Eμ∥A−1βXx/d∥2V\le8\sigma^2\,\mathbb E_\mu\|A^{-1}\beta Xx/d\|^2 plus the linearization error. Averaging over the test point bounds XΣX⊤X\Sigma X^\top by ∥Σ∥XX⊤\|\Sigma\|XX^\top, and adding the PSD term αβ11⊤\alpha\beta11^\top turns the middle matrix into β(A−γI)\beta(A-\gamma I), which commutes with AA, so the trace becomes a function of AA's spectrum: Eμ∥A−1βXx/d∥2≤∥Σ∥dTr⁡(A−1β(A−γI)A−1)=∥Σ∥d∑jλj(γ/β+λj)2. \mathbb E_\mu\|A^{-1}\beta Xx/d\|^2 \le \frac{\|\Sigma\|}{d}\operatorname{Tr}\big(A^{-1}\beta(A-\gamma I)A^{-1}\big) = \frac{\|\Sigma\|}{d}\sum_j\frac{\lambda_j}{(\gamma/\beta + \lambda_j)^2}. This is the variance of ridge regression with ridge r=γ/βr=\gamma/\beta.

Step 5 (LR)

The bias is a projection residual, bounded by the tail of the kernel spectrum. In the feature coordinates of the integral operator, Cauchy-Schwarz gives B≤∥f∗∥H2∫∥P⊥ϕ(x)∥2dμ(x)B\le\|f_*\|_{\mathcal H}^2\int\|P^\perp\phi(x)\|^2d\mu(x), with PP the projection onto span⁡{ϕ(xi)}\operatorname{span}\{\phi(x_i)\}. That span contains the top-kk eigenspace U^k\hat U_k of the empirical feature covariance for every k≤nk\le n, so the residual is at most the kernel-PCA residual of U^k\hat U_k, which on the sample is exactly 1n∑j>kλj(K(X,X))\frac1n\sum_{j>k}\lambda_j(K(X,X)). Nothing here uses the dimension or the linearization.

Step 6 (LR)

The population residual tracks the sample residual uniformly over rank-kk subspaces. Because U^k\hat U_k is fitted to the same points, bound the gap uniformly over all UU with U⊤U=IkU^\top U=I_k, as in Shawe-Taylor and Cristianini's kernel-PCA analysis. By Pythagoras ∥PU⊥ϕ∥2=K(x,x)−⟨UU⊤,ϕϕ⊤⟩F\|P_U^\perp\phi\|^2=K(x,x)-\langle UU^\top,\phi\phi^\top\rangle_F, so after McDiarmid and symmetrization the class is linear in UU⊤UU^\top, and Cauchy-Schwarz with ∥UU⊤∥F=k\|UU^\top\|_F=\sqrt k bounds its Rademacher complexity by Mk/nM\sqrt{k/n}. A union bound over k=0,…,nk=0,\dots,n (at level δ/(2n)\delta/(2n)) lets kk be chosen after seeing the data, and adding this bias bound to Step 4's variance bound gives the theorem.

Step 7 (LR)

For the exponential kernel the bound becomes explicit. For the bias, Weyl linearizes the kernel spectrum too, λj(K)=λj(Klin)±η\lambda_j(K)=\lambda_j(K^{lin})\pm\eta. The block α11⊤\alpha11^\top contributes one eigenvalue of order αn\alpha n, which one projected direction removes, adding 2M/n2M/\sqrt n. What remains averages to about γ+βTr⁡(XX⊤)/(nd)≈γ+βτ\gamma+\beta\operatorname{Tr}(XX^\top)/(nd)\approx\gamma+\beta\tau, so B≲r+τB\lesssim r+\tau, and the implicit ridge adds bias just as an explicit one would. For the variance with d>nd>n there are at most nn nonzero summands, each at most 1/(4r)1/(4r); with n>dn>d, t/(c+t)2≤1/tt/(c+t)^2\le1/t gives V≤Tr⁡((X⊤X)−1)≤Tr⁡(Σ−1)/λmin⁡(Z⊤Z)V\le\operatorname{Tr}((X^\top X)^{-1})\le\operatorname{Tr}(\Sigma^{-1})/\lambda_{\min}(Z^\top Z) for Z=XΣ−1/2Z=X\Sigma^{-1/2}, and Bai-Yin bounds the last factor.

Setting and results (BRT). I.i.d. pairs on Rd×R\mathbb R^d\times\mathbb R, noise variance at most σξ2\sigma_\xi^2, and a design density with 0<pmin⁡≤p≤pmax⁡0<p_{\min}\le p\le p_{\max} on its support; ff lies in the Hölder class Σ(β,L)\Sigma(\beta,L), β∈(0,2]\beta\in(0,2] (for β>1\beta>1, a first-order Taylor remainder bound). The estimator is Nadaraya-Watson with the singular kernel K(u)=∥u∥−a1{∥u∥≤1}K(u)=\|u\|^{-a}\mathbf 1\{\|u\|\le1\}, a>0a>0, Kh(x)=K(x/h)K_h(x)=K(x/h), set to YiY_i at x=Xix=X_i and to 0 where no point lies within hh. It interpolates by continuity: as x→Xix\to X_i the ii-th weight tends to infinity while the others stay finite. (A heuristic of these notes, not in the paper: each point dominates within radius about h(nhd)−1/ah(nh^d)^{-1/a}, so the spikes cover measure about (nhd)1−d/a→0(nh^d)^{1-d/a}\to0.) Theorems 1 and 2: for 0<a<d/20<a<d/2 and h=n−1/(2β+d)h=n^{-1/(2\beta+d)}, E[(fn(x0)−f(x0))2]≤Cn−2β/(2β+d)E[(f_n(x_0)-f(x_0))^2]\le Cn^{-2\beta/(2\beta+d)}, the minimax rate, at any x0x_0 in the support when β≤1\beta\le1; for β∈(1,2]\beta\in(1,2] this needs also ∣p(x)−p(y)∣≤Lp∥x−y∥β−1|p(x)-p(y)|\le L_p\|x-y\|^{\beta-1} on the support and B(x0,h)B(x_0,h) inside it. For β≤1\beta\le1 and bounded ff the rate integrates to L2(PX)L_2(P_X). Under well-specification, E[ξ∣X]=0E[\xi\mid X]=0 makes the excess square loss over the class exactly E(fn(X)−f(X))2E(f_n(X)-f(X))^2, so an estimator that fits the data exactly and is improper (fn∉Σ(β,L)f_n\notin\Sigma(\beta,L)) attains the optimal excess-loss rate.

Step 8 (BRT)

Localize, discard the empty ball, and split conditional on the design. Take x0=0x_0=0. The estimator fails to be a kernel average only if no point lands within hh, which has probability ≤e−cnhd\le e^{-cnh^d} because pˉ=P(∥X1∥≤h)≥c0pmin⁡hd\bar p=P(\|X_1\|\le h)\ge c_0p_{\min}h^d (this needs a fixed fraction of the hh-ball inside the support). Otherwise fn(0)=∑iwiYif_n(0)=\sum_iw_iY_i with normalized weights wiw_i, and conditioning on the design separates the noise term σξ2σX2\sigma_\xi^2\sigma_X^2, σX2=E[∑iwi21E]\sigma_X^2=E[\sum_iw_i^2\mathbf 1_E], from the bias b2(0)=E[(∑iwi(f(Xi)−f(0)))21E]b^2(0)=E[(\sum_iw_i(f(X_i)-f(0)))^2\mathbf 1_E]. By exchangeability σX2=nE[w121E]\sigma_X^2=nE[w_1^2\mathbf 1_E], so the variance reduces to the second moment of a single weight.

Step 9 (BRT)

The variance is O(1/(nhd))O(1/(nh^d)), and this is the only step that uses a<d/2a<d/2. The singularity only increases the denominator: Kh≥1K_h\ge1 on the ball, so ∑iKh(Xi)\sum_iK_h(X_i) is at least the count NN of points in the ball, and N≤npˉ/2N\le n\bar p/2 is exponentially rare (there use w1≤1w_1\le1). Off that event the denominator exceeds npˉ/2n\bar p/2, and the numerator needs E[Kh2(X1)]≤pmax⁡hd∫K2=pmax⁡∣Sd−1∣d−2a hd,E[K_h^2(X_1)]\le p_{\max}h^d\int K^2=\frac{p_{\max}|S^{d-1}|}{d-2a}\,h^d, finite iff a<d/2a<d/2. So σX2≲1/(nhd)\sigma_X^2\lesssim1/(nh^d), with a constant that diverges as a↑d/2a\uparrow d/2.

Step 10 (BRT)

The bias is O(hβ)O(h^\beta), deterministically for β≤1\beta\le1 and by symmetry for β∈(1,2]\beta\in(1,2]. On EE the weights are nonnegative, sum to one and vanish outside the hh-ball, so for β≤1\beta\le1 the error is a convex combination of local increments, each at most LfhβL_fh^\beta; a weight, however large, sits on a point within distance hh, so the spikes are harmless for the bias, and nothing about pp is used. For β>1\beta>1 that bound leaves a linear term of size ∥∇f(0)∥h\|\nabla f(0)\|h, so it must cancel on average. In each off-diagonal pair term the weight product depends on xix_i only through ∥xi∥\|x_i\| because KK is radial, and the linear part is odd, so its integral against p(0)p(0) over the full ball vanishes; what is left is controlled by ∣p(x)−p(0)∣≤Lphβ−1|p(x)-p(0)|\le L_ph^{\beta-1}, and this bound on the whole ball, with p≥pmin⁡p\ge p_{\min} for turning dxdx integrals into pp-integrals, is why the ball must lie inside the support. Completing the square, each pair term is at most h2β(Lf+∥∇f(0)∥Lppmin⁡)2E[wiwj1E],h^{2\beta}\Big(L_f+\frac{\|\nabla f(0)\|L_p}{p_{\min}}\Big)^2E[w_iw_j\mathbf 1_E], and the n(n−1)n(n-1) pairs total O(h2β)O(h^{2\beta}) because ∑i≠jE[wiwj1E]≤1\sum_{i\ne j}E[w_iw_j\mathbf 1_E]\le1, and the diagonal terms are bounded by σX2\sigma_X^2.

Step 11 (BRT)

Balancing the bandwidth gives the minimax rate. The risk is ≲(σξ2+1)/(nhd)+h2β\lesssim(\sigma_\xi^2+1)/(nh^d)+h^{2\beta} plus terms of order ne−cnhdne^{-cnh^d}, and h=n−1/(2β+d)h=n^{-1/(2\beta+d)} balances the first two at n−2β/(2β+d)n^{-2\beta/(2\beta+d)}, the textbook kernel-smoothing trade-off, unaffected by interpolation. The lower bound is cited (Stone 1982, Tsybakov 2009), not proved; the textbook argument is Le Cam's two-point method, comparing f0=0f_0=0 with a bump of height LhβLh^\beta and width hh, whose KL divergence over nn samples is O(nh2β+d)=O(1)O(nh^{2\beta+d})=O(1) at this bandwidth.

Consequences and limits. Exact fit is not evidence of overfitting. In LR's high-dimensional regime interpolation with a curved kernel behaves like ridge regression, and the data spectrum produces a U-shaped trade-off with no tuning parameter: fast decay (small τ\tau) makes the implicit ridge tiny and the variance large, slow decay makes the bias r+τr+\tau large, and intermediate decay is best, as their synthetic experiments confirm. Isotropic data is the bad case, since τ=1\tau=1 makes the bias term order one, and the authors assert, without proof, that the true variance is then large too. In BRT's low-dimensional regime hh sets the trade-off and the singularity sets the fit, and the two do not interact: the spikes occupy a set of vanishing measure and enter the risk only through ∫K2\int K^2, and against 1-NN the difference is the effective neighborhood, one point versus nhd→∞nh^d\to\infty. Limits: LR is only an upper bound, so it can show that interpolation works but not that it fails; its moment assumption is strong, the linearization error decays only like d−m/(8+m)d^{-m/(8+m)}, and with d≍nd\asymp n the nonlinear part of KK reduces to γI\gamma I, so it explains benign interpolation of the linear component and says nothing about learning nonlinear structure; the corollaries also step outside d≍nd\asymp n. BRT need β≤2\beta\le2, a bandwidth tuned to β\beta, and a<d/2a<d/2, and for a≥d/2a\ge d/2 it is the proof that breaks down, with no failure of the estimator shown; this is low-dimensional local smoothing, unlike the global minimum-norm interpolation studied for networks. A consequence not in the paper, from the standard plug-in inequality: for Y∈{0,1}Y\in\{0,1\} and β≤1\beta\le1, the interpolating plug-in classifier has excess risk O(n−β/(2β+d))O(n^{-\beta/(2\beta+d)}); BRT themselves prove no classification result.

Terms

Ridgeless interpolant
f^(x)=K(x,X)K(X,X)−1Y\hat f(x) = K(x,X)K(X,X)^{-1}Y, the minimum-RKHS-norm function fitting the data exactly
γ\gamma (implicit ridge)
h(τ)−h(0)−h′(0)τh(\tau) - h(0) - h'(0)\tau, curvature of hh seen only on the diagonal of K(X,X)K(X,X)
Klin(X,X)K^{lin}(X,X)
γI+α11⊤+βXX⊤/d\gamma I + \alpha 11^\top + \beta XX^\top/d, El Karoui's operator-norm surrogate for K(X,X)K(X,X)
r=γ/βr = \gamma/\beta
implicit ridge ratio, ≍τ2\asymp \tau^2 for the exponential kernel
Variance functional
1d∑jλj/(r+λj)2\frac1d\sum_j \lambda_j/(r+\lambda_j)^2, λj\lambda_j eigenvalues of XX⊤/dXX^\top/d (centered data); each term ≤1/(4r)\le 1/(4r)
Bias functional
inf⁡k{1n∑j>kλj(K(X,X))+2Mk/n}\inf_k\{\frac1n\sum_{j>k}\lambda_j(K(X,X)) + 2M\sqrt{k/n}\}, kernel tail mass plus a rank-kk complexity term
singular kernel
K(u)=∥u∥−a1{∥u∥≤1}K(u)=\|u\|^{-a}\mathbf 1\{\|u\|\le1\}; infinite at 0, so Nadaraya-Watson interpolates
a<d/2a<d/2
makes ∫K2<∞\int K^2<\infty, the only use of the singularity bound (variance step)
bandwidth
h=n−1/(2β+d)h=n^{-1/(2\beta+d)}, balancing h2βh^{2\beta} against 1/(nhd)1/(nh^d)
improper estimator
fn∉Σ(β,L)f_n\notin\Sigma(\beta,L), yet its excess square loss over the class is optimal

Quiz

  1. What fails in the proof if the kernel is linear, h(a)=ah(a) = a?
  2. In the proof, where is the restriction a<d/2a<d/2 on the singularity exponent actually used?
  3. With a∈(0,d/2)a\in(0,d/2) fixed, take h=n−1/dh=n^{-1/d}, so that about one design point lies in each hh-ball. What happens?
  4. Why is the estimator's excess square loss over Σ(β,L)\Sigma(\beta,L) exactly E(fn(X)−f(X))2E(f_n(X)-f(X))^2, even though fnf_n is not in the class?

Sources