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

Introduction

In modern deep learning, models frequently "overfit" by perfectly interpolating noisy training data, yet they still manage to generalize remarkably well. This phenomenon, often termed "benign overfitting," contradicts classical statistical intuition, which dictates that fitting noise should destroy predictive performance.

While recent theoretical work has made strides in explaining this phenomenon for kernel methods, most existing results are either asymptotic or "well-specified." That is, they assume the target function belongs to a specific mathematical space (the Reproducing Kernel Hilbert Space, or RKHS) or that the sample size is large enough for the model to be consistent. The authors of this paper argue that this perspective confounds two distinct issues: the inherent difficulty of the learning task and the specific penalty incurred by choosing to overfit. To resolve this, they introduce an agnostic view, asking: how much does it hurt to overfit for any target function and any sample size, even if the model is fundamentally incapable of learning that target perfectly?

The Cost of Overfitting Framework

The researchers analyze this problem through the lens of Kernel Ridge Regression (KRR). They establish a comparison between the "ridgeless" solution—the minimum-norm interpolant that fits the training data perfectly—and the "optimally tuned" ridge solution, which utilizes the best possible regularization parameter $\delta$ to minimize test error.

To quantify the penalty of interpolation, they define the Cost of Overfitting ($C$): $$C = \frac{\text{Test Error of Interpolating Model}}{\text{Test Error of Optimally Tuned Model}}$$

By using a ratio, the authors successfully isolate the "harm" of interpolation. Even if a model exhibits high test error because the underlying task is difficult, the cost of overfitting might still be low if the ridgeless model performs similarly to the best possible ridge model.

To make the mathematics tractable, the analysis employs a Gaussian universality ansatz. This assumption posits that the test risk of a kernel model depends exclusively on the "task eigenstructure"—the eigenvalues of the kernel and the coefficients of the target function—and behaves as if the features were Gaussian. While technically non-rigorous, this ansatz is widely supported by empirical evidence in physics-inspired machine learning.

Target Agnosticism and the Taxonomy of Overfitting

The most striking insight from this framework is the principle of Target Agnosticism. The authors demonstrate that the upper bound on the cost of overfitting (denoted as $E_0$) depends solely on the marginal distribution of the inputs (the eigenvalues of the covariance matrix) and is entirely independent of the target function's coefficients or labels. If the underlying data structure permits benign overfitting, it will remain benign regardless of whether the model is predicting a simple linear function or random noise.

Building on this, the paper provides an elegant taxonomy of overfitting regimes based on the ratio of an index $k$ to the effective rank $r_k$ (which measures how "flat" or "spread out" the tail of the data's eigenvalue spectrum is):

  1. Benign Overfitting: If $k/r_k \to 0$, the cost of overfitting approaches 1. In this regime, overfitting is essentially "free."
  2. Tempered Overfitting: If $k/r_k$ is a constant, the cost is bounded by a constant. Overfitting hurts performance, but not fatally.
  3. Catastrophic Overfitting: If $k/r_k \to \infty$, the cost explodes, and overfitting destroys the model's ability to generalize.

Key Theoretical Results

The paper formalizes these insights through several key theorems:

  • Theorem 1 proves that the cost of overfitting is universally bounded by the overfitting coefficient $E_0$, independent of the target function.
  • Finite-Sample Bounds (Theorem 2) provide concrete conditions for benign overfitting. Specifically, if one can identify a small index $k$ relative to the sample size $n$ such that the effective rank $R_k$ is significantly larger than $n$, overfitting is guaranteed to be benign.
  • Polynomial Regime Analysis: By applying their theory to inner-product kernels (commonly used to approximate neural networks), the authors successfully recover "multiple descent" curves, illustrating how risk fluctuates as the sample size crosses different polynomial thresholds.

Limitations and Future Directions

While the framework offers a powerful new perspective, it has limitations. The reliance on the Gaussian universality ansatz, though empirically validated in many contexts, means the results lack a formal, rigorous proof for all possible data distributions. Furthermore, the analysis is strictly confined to KRR and the square loss function. Extending this agnostic cost framework to other loss functions (such as cross-entropy) or different algorithms (like Support Vector Machines) remains an open challenge. Finally, while kernels can represent non-linearities, the underlying mechanics are linear in the feature space; bridging these insights to fully understand generalization in deep, non-linear neural networks remains the ultimate goal.

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