When Do Neural Networks Outperform Kernel Methods?

Behrooz Ghorbani, Song Mei, Theodor Misiakiewicz, Andrea Montanari

Introduction

In recent years, theoretical machine learning has made strides in understanding neural networks (NNs) by studying their infinite-width limits, where they behave like linear models governed by the Neural Tangent Kernel (NTK) or Random Features (RF). This "lazy regime" creates a paradox: empirically, kernel methods can sometimes replace NNs on image classification tasks with minimal performance drops. Yet, theoretically, NNs can easily learn certain functions that cause kernel methods to suffer from the "curse of dimensionality."

How can we reconcile these conflicting claims, and when exactly do NNs outperform kernel methods? This paper bridges the theoretical gap by introducing the spiked covariates model, proving that kernel methods avoid the curse of dimensionality only when the input data inherently possesses a low-dimensional structure that aligns with the target function.

The Spiked Covariates Model

To solve this puzzle, the authors introduce a stylized mathematical framework:

  1. Low-dimensional target: The true function to be learned depends only on a small, low-dimensional subspace of the input data (the "signal").
  2. Anisotropic data: The input data is not a uniform sphere. It consists of a "signal subspace" and a "noise subspace," governed by a signal-to-noise ratio (SNR).

Using this model, the authors derive sharp asymptotic bounds for the approximation and generalization errors of Kernel Ridge Regression (KRR), RF, and NT models in a high-dimensional regime.

Key Insights: The Role of Effective Dimension

The performance of kernel methods is governed by an effective dimension ($d_{\text{eff}}$), which depends on both the true signal dimension and the data's SNR. If the data is isotropic (spread equally in all directions), $d_{\text{eff}}$ is huge, and kernels fail. If the data is highly anisotropic (concentrated in the signal subspace), $d_{\text{eff}}$ shrinks, and kernels perform well.

Unlike kernels, fully-trained NNs can dynamically learn the low-dimensional projection. Their performance depends mostly on the true signal dimension, making them highly robust to isotropic noise in the input data.

This resolves the paradox: NTK/RF perform well on standard image datasets because natural images already have a low-dimensional structure (most variance is concentrated in low frequencies) that perfectly aligns with the target labels. The data itself rescues the kernel methods from the curse of dimensionality.

Experimental Results

The theoretical sample complexity reveals that to fit a polynomial of degree $\ell$, KRR requires a sample size of $n \sim d_{\text{eff}}^\ell$. An NT model requires width $N \sim d_{\text{eff}}^\ell$, while an RF model requires a much wider $N \sim d_{\text{eff}}^{\ell+1}$.

To validate these bounds, the authors tested synthetic data generated to fit the spiked covariates model. As the input data was made more isotropic (lowering the SNR), the error of RF and NTK models degraded severely, while the NN error remained low and stable.

FMNIST Perturbation Experiment

Furthermore, the authors manipulated the frequency spectrum of Fashion MNIST (FMNIST) images. By adding noise to the high-frequency components, they made the data more isotropic without changing the core low-frequency signal. As predicted, the accuracy of RF, NT, and KRR plummeted rapidly (dropping from ~89% to ~82%). The fully trained NN was much more resilient, maintaining an accuracy of ~88% under the same noise conditions.

Limitations and Future Work

The spiked covariates model assumes the low-dimensional structure is linear (orthogonal subspaces). In reality, the latent structure of images is highly nonlinear (e.g., complex manifolds). While the linear model provides excellent qualitative predictions, it remains a simplification. Additionally, while NNs are much more robust to decreasing SNR than kernel methods, their error does still deteriorate slightly—a mechanism left for future investigation.

Summary updated

BibTeX
@inproceedings{ghorbani2020when,
  author = {Behrooz Ghorbani and Song Mei and Theodor Misiakiewicz and Andrea Montanari},
  title = {{When Do Neural Networks Outperform Kernel Methods?}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
  url = {https://openreview.net/forum?id=IO9Lp5IFCSD},
}
Figure