NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

An Agnostic View on the Cost of Overfitting in (Kernel) Ridge Regression

Lijia Zhou, James B. Simon, Gal Vardi, Nathan Srebro

TL;DR

This paper introduces a new way to measure the "cost of overfitting" in Kernel Ridge Regression by comparing a model that perfectly fits noisy data (interpolating) to one that is perfectly tuned. By taking an "agnostic" view—making no assumptions about the target function—the authors provide a unified mathematical framework that explains when overfitting is harmless (benign), slightly damaging (tempered), or a total disaster (catastrophic).

What Problem Does This Paper Address?

In classical statistics, we are taught that overfitting—fitting the noise in our training data—is a cardinal sin that destroys generalization. However, modern deep learning has turned this on its head: large neural networks often "interpolate" (reach zero training error) and still perform beautifully on new data. This phenomenon is known as benign overfitting.

While researchers have started to understand why this happens in specific cases, most existing theories are "well-specified." They assume the target function we are trying to learn is "nice"—specifically, that it lives within the Reproducing Kernel Hilbert Space (RKHS) of our model.

But what if the world is messy? What if our target function is outside our model's "comfort zone," or we don't have enough data for the model to ever truly converge? This paper tackles the agnostic case, seeking to isolate the specific cost of choosing to overfit rather than regularizing, regardless of how difficult the underlying learning task is.

Methods

The authors analyze Kernel Ridge Regression (KRR), a standard tool in machine learning. They define the Cost of Overfitting as a simple ratio: $$\text{Cost} = \frac{\text{Test Error of the Ridgeless (Interpolating) Model}}{\text{Test Error of the Optimally-Tuned Model}}$$

To calculate this, they use several key tools:

  • The Gaussian Universality Ansatz: A theoretical assumption (supported by empirical evidence) that the risk of these models depends primarily on the "eigenstructure" (the eigenvalues) of the data covariance, rather than the specific distribution of the features.
  • Effective Rank: They use measures of how "flat" or "spread out" the eigenvalues of the kernel are. If many eigenvalues are roughly equal, the model has many "directions" to hide the noise, which usually leads to better generalization.
  • Omniscient Risk Estimates: They leverage recently developed closed-form equations that predict test error based on the sample size ($n$) and the task's eigenvalues ($\lambda_i$).

Datasets

As a theoretical paper, it does not use standard image or text datasets. Instead, it validates its findings using synthetic mathematical examples that represent different data "spectrums":

  • Benign Covariance: Where eigenvalues decay slowly (logarithmically).
  • Junk Features: A model with a few strong signals and many weak, isotropic "junk" features.
  • Power Law Decay: Common in physical systems and some neural network kernels (like the Laplace kernel).
  • Exponential Decay: Where eigenvalues drop off very quickly.

Key Insights and Ideas

  • The Overfitting Coefficient is Universal: The authors show that the cost of overfitting is upper-bounded by a single value ($\mathcal{E}_0$) that depends only on the data distribution and sample size, not on the target function. This means the "penalty" for overfitting is a property of the data's geometry, not the specific pattern you're trying to find.
  • The $k/r_k$ Taxonomy: The paper provides a clean "cheat sheet" for predicting overfitting behavior based on the ratio of the index $k$ to the effective rank $r_k$:
  • Benign: If $k/r_k \to 0$, overfitting is essentially free.
  • Tempered: If $k/r_k$ is a constant, overfitting hurts, but performance remains stable.
  • Catastrophic: If $k/r_k \to \infty$, overfitting causes the test error to explode.
  • Agnosticism Matters: By not assuming the target function is in the RKHS, the authors show that even if your model can't perfectly learn the target (high "bias"), the relative cost of overfitting can still be small.

Key Results

  • Theorem 1: Formally proves that the "overfitting coefficient" is the tightest possible agnostic bound on the cost of overfitting.
  • Refining Benign Overfitting: They recover and simplify the famous "benign overfitting" conditions from Bartlett et al. (2020), showing they emerge naturally from their ratio-based framework.
  • Multiple Descent Curves: They apply their theory to "inner-product kernels" and successfully recover the "multiple descent" phenomenon, where the test error curve wiggles up and down as the number of features passes through different polynomial thresholds.
  • Taxonomy Resolution: They resolve an open problem regarding the characterization of "tempered" overfitting, showing exactly how the eigenvalue decay rate dictates the transition from benign to catastrophic.

Limitations and Future Work

  • The Gaussian Assumption: While the "Gaussian universality ansatz" is powerful and widely used, it is still a theoretical simplification. Proving these results for more general, non-Gaussian data distributions remains a challenge.
  • Square Loss Only: The analysis is specific to Ridge Regression (square loss). It’s unclear if the same "agnostic ratio" approach would work for other loss functions like cross-entropy or for classification tasks.
  • Beyond KRR: The authors suggest that extending this theory to Kernel SVMs or actual deep neural networks is the next logical step to fully understand generalization in the wild.

Summary updated

BibTeX
@inproceedings{zhou2024agnostic,
  author = {Lijia Zhou and James B. Simon and Gal Vardi and Nathan Srebro},
  title = {{An Agnostic View on the Cost of Overfitting in (Kernel) Ridge Regression}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=YrTI2Zu0dd},
}
Figure