# Spectral Bias and Task-Model Alignment Explain Generalization in Kernel Regression and Infinitely Wide Neural Networks

Typical-case theory explains how kernel regression generalizes from few examples

Abdulkadir Canatar, Blake Bordelon, Cengiz Pehlevan · arXiv · 2020-6-23

- **Problem** Classical generalization bounds are loose and often inaccurate, so they cannot predict how kernel regression learns on real data. This matters because large overparameterized networks still generalize well, which classical theory says should not happen.
- **Method** The authors average over training sets instead of bounding the worst case, using the replica method from statistical mechanics. The result is an analytical generalization error built from kernel eigenvalues and the target's alignment with the eigenfunctions.
- **Results** The theory agrees well with measured NTK learning curves on MNIST 0-versus-1 and 8-versus-9 tasks. It also matches experiments on real datasets and kernels.

## Why existing theory can't predict learning curves

Existing generalization theories often give impractical bounds and inaccurate estimates, so they don't predict performance on real data. The gap matters more now, because large networks with far more parameters than training samples still generalize well. Classical statistical learning theory predicts that overparameterization should lead to overfitting and worse generalization.

The authors argue that overparameterized networks must have inductive biases that suit the learning task, so a theory has to elucidate those biases.

Full deep learning is out of reach for theory, but infinitely wide networks give a tractable limit. In that limit, training with a certain random initialization reduces to ridgeless kernel regression. The Neural Network Gaussian Process kernel (NNGPK) applies when only the last layer is trained. The Neural Tangent Kernel (NTK) applies when all the layers are trained.

So the inductive biases of these kernels are a practical stand-in for understanding overparameterized networks.

Key generalization phenomena in deep learning also appear in kernel methods, so the authors argue that kernel generalization is necessary to understand deep learning. Statistical mechanics has long provided a framework for such typical-case analyses of learning algorithms. The authors use the replica method to derive an analytical expression for typical generalization error.

That expression depends on the number of training samples, the kernel's eigenvalues and eigenfunctions, and the alignment of the target with those eigenfunctions. The authors report that their analytical predictions fit experiments on various real datasets and kernels remarkably well.

## Typical-case error from the replica method

The key move is to average over training sets instead of bounding the worst case. The authors treat the training set as quenched disorder and apply the replica method from statistical mechanics. Because the free energy is self-averaging for large P, they average the free energy over all possible datasets. They use the replica trick to handle the average of the log partition function, which gives the typical behavior in the P to infinity limit.

The setup starts from the Mercer decomposition, where the kernel eigenfunctions and eigenvalues form a complete basis for the RKHS. The features are the eigenfunctions scaled by the square roots of their eigenvalues, and the target and learned functions are written as coefficients on these features. The energy function is a ridge penalty on the residuals between the target coefficients and the learned coefficients, evaluated at the training inputs.

The generalization error sums over modes, where each mode contributes its target power times a modal error. The modal error for mode ρ is E\_ρ equal to κ squared divided by (1 − γ) times (κ + Pη\_ρ) squared, with κ and γ defined by sums over all modes. The paper uses Eq. (4) with κ and γ to write the full generalization error for any kernel and data distribution.

The noise term is the only part of the error that depends on the noise variance σ². The mode error ordering follows from a derivative argument, so modes with larger eigenvalues have smaller modal errors when σ equals zero. The calculation also assumes a replica symmetric ansatz, and the authors list both assumptions as limitations.

The authors state that the result holds in the thermodynamic limit where P goes to infinity. They don't derive a finite-sample closed form, but they report that the formula fits average learning curves for finite P.

## Spectral bias and task-model alignment

Modes with larger eigenvalues are learned faster as the number of samples grows. The generalization error splits into modal errors, each weighted by its eigenvalue and the squared target coefficient. The normalized mode errors are ordered by their eigenvalues, so a larger eigenvalue gives a smaller normalized mode error. In the noise-free case, the derivative of the log mode error shows this ordering holds at every P.

The authors call this spectral bias: the error falls faster along eigenfunctions with larger eigenvalues.

The authors define C(ρ) as the share of target power carried by the first ρ modes. A target with a higher cumulative power distribution gets lower normalized generalization error at every P, under the same kernel and data distribution. The authors call C(ρ) the task-model alignment, because it measures how compatible the kernel is with the target.

The target enters the normalized error only through the differences C(ρ) − C(ρ − 1). So the kernel eigenvalues, the cumulative power distribution and the noise parameter fully set the normalized error.

Fewest samples go to kernel and target pairs whose target power sits in the top eigenmodes. Re-allocating target power toward top modes lowers the error, but comparing kernels needs both the spectrum and the C(ρ) curve. The bias decreases monotonically with P, so the variance term alone can make the total error non-monotonic.

## Testing on MNIST and CIFAR-10

The authors test the theory on MNIST with a 2-layer NTK, using a vector target that maps digits to one-hot labels. They run two binary tasks, 0s versus 1s and 8s versus 9s, and treat each one-hot output channel as its own target function. The eigenfunctions come from uncentered kernel PCA on the finite dataset, so the eigenproblem is solved on the samples themselves.

The generalization error of each channel is computed from the theory and then summed across channels. The theoretical learning curves agree strongly with the measured curves, which are averaged over 50 trials.

The 0-versus-1 task looks more separable in the top two kernel principal components than the 8-versus-9 task. Its generalization error falls more rapidly with sample size, so the easier task needs fewer samples. The cumulative power distribution C(ρ) rises faster for the 0-versus-1 task, which offers a heuristic explanation for this gap. The two tasks use different data distributions, yet C(ρ) still tracks the difficulty, so it stays informative.

![Figure 1: Eﬀect of task-model alignment on the generalization of kernel regression. a, b.Projec- tions of digits from MNIST along the top two (uncentered) kern…](https://refivu.com/papers/0dfeefcb-6d9e-459c-9bec-7d099df6b4b6/figures/figure-bd2bd7a31ce2bdce067c2117e0cc95c1.png?thumb=512)

**Fig. 1** :Eﬀect of task-model alignment on the generalization of kernel regression. a, b.Projec- tions of digits from MNIST along the top two (uncentered) kernel principal components of 2-layer NTK for 0s vs. 1s and 8s vs. 9s, respectively.c. Learning curves for both tasks. The theoretical learning curves (Eq. (4), dashed lines) show strong agreement with experiment (dots).d. The kernel eigenspectra for the respective datasets. e. The cumulative power distributionsC(ρ). Error bars show the standard deviation over 50 trials.

[Original paper](https://arxiv.org/abs/2006.13198v6) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Abdulkadir Canatar, Blake Bordelon, Cengiz Pehlevan · Spectral Bias and Task-Model Alignment Explain Generalization in Kernel Regression and Infinitely Wide Neural Networks · Original paper figure · Extracted the figure area from page 5 of the original PDF.

For Gaussian RBF kernel regression, the authors use bandwidth ω = 0.1 and ridge parameter λ = 0.01 on MNIST and CIFAR-10. With zero label noise, the theory agrees well with experiments on both datasets. The kernel eigenvalues are similar for the two datasets, but their cumulative powers differ a lot. Placing more power in the first few modes makes learning faster, which is why CIFAR-10 is the harder case here.

With label noise variance σ² = 0.5, the generalization error becomes non-monotonic and shows a peak. The bias-variance split shows that the variance term causes this non-monotonicity.

## Double descent in a band-limited model

The white band-limited RKHS has N equal nonzero eigenvalues, and the target power truncates after the same N modes. Its eigenvalues are set to 1/N for modes 1 to N and zero thereafter, with the target power normalized to N. Linear regression with isotropic data is a special case of this model, where D equals N and the features are the coordinates x\_ρ.

The simulations use N = 800 dimensional uncorrelated Gaussian features, with a linear target function whose norm is N. The authors take P and N to infinity with α = P/N held at order one, which gives a closed-form generalization error that doesn't depend on the teacher weights.

With no ridge and no noise, the error falls linearly with more data and reaches zero at the critical point. With noise present, the error diverges at α = 1, where the number of samples equals N and the number of target parameters. The authors call this a first order phase transition, because the error is non-analytic there and the first derivative of the free energy shows it.

At α = 1 the kernel machine fits every data point, including the noise, which produces the singular peak. Beyond α = 1 the machine averages over the noise, and the error falls as σ² over α.

A positive ridge removes the sharp divergence, but a peak can remain when the noise is large relative to the ridge. The maximum sits near α ≈ 1 + λ, and the authors give a boundary in λ and σ² that separates monotonic from non-monotonic curves. Larger ridge values make learning slower, so more training samples are needed for the same error.

Setting the derivative of the error with respect to λ to zero gives λ\* = σ², which minimizes the error at all α. The bias–variance view shows the average estimator approaches the target as α approaches 1, so the peak comes from the variance term.

## Learning stages and wide networks

On high dimensional spheres, rotation invariant kernels split their Mercer eigenfunctions into radial and angular parts. The angular parts decompose into spherical harmonics of the unit vectors, where k is the degree and m is the order. Because the eigenvalues don't depend on the harmonic order m, the minimal degeneracy equals the number of degree k harmonics, which scales as D^k/k!

in the limit D to infinity. The authors denote degenerate eigenvalues as eta\_K, with eigenfunctions phi\_{K,rho}, and they focus on degeneracy N(D,K) scaling as O(D^(DK)). Each degenerate eigenvalue L gets its own limit, with alpha = P/N(D,L) kept finite, so each limit defines one learning stage.

Within stage L, the target modes with K greater than L act as noise, which the authors call the effective noise parameter. Kernel eigenvalues with K greater than L act as a regularizer, giving the effective ridge parameter lambda tilde L. Stage L generalization error has a term that falls with alpha and a term that peaks at alpha = 1 + lambda tilde L.

Optimal regularization in each stage sets the effective ridge equal to the effective noise, lambda tilde L = sigma tilde L squared. The authors note this result extends earlier linear regression findings to the large class of rotation invariant kernels.

For infinitely wide networks, the learning curves take the same form as in the stage analysis, evaluated with NTK eigenvalues and lambda equal to 0. The match to NTK training is excellent, and neural network training follows NTK regression up to a certain P. Beyond that sample size the correspondence breaks down because finite-width effects dominate the generalization error.

For rectifier networks, the NTK spectrum whitens with depth, giving larger effective ridge and more regularization for small learning stages.

## Limitations of the theory

The theory has three limitations, and the authors state them directly in the closing discussion. On real data, the eigenvalues and eigenfunctions come from solving an uncentered kernel PCA problem on the dataset. The second is scope: its use for state-of-the-art networks is limited to the kernel regime, which doesn't capture many deep learning phenomena.

The paper cites \[78, 62\] for these missing deep learning phenomena.

The third limitation concerns the derivation itself, which rests on a Gaussian approximation and a replica symmetric ansatz. The Gaussian approximation averages over the dataset in the feature space, and the replica symmetric ansatz evaluates the saddle point equations. The authors argue that the remarkable fit to experiments validates these assumptions.

They leave open whether relaxing these assumptions would reveal new insights.

The real-data evidence covers two MNIST digit tasks, 0s versus 1s and 8s versus 9s, with a 2-layer NTK. The Gaussian RBF kernel is tested on MNIST and CIFAR-10, with ridge parameter λ = 0.01 and bandwidth ω = 0.1. These are the only real-data settings in the paper, so the claim of applicability to real datasets rests on them.

## Paper info

- **Authors**: Abdulkadir Canatar, Blake Bordelon, Cengiz Pehlevan
- **Venue**: arXiv · Preprint
- **First published**: 2020-6-23
- **Added**: 2026-11-6
- **Updated**: 2022-2-4
- **Version**: v6
- **arXiv**: 2006.13198
- **DOI**: 10.1038/s41467-021-23103-1
- **Category**: stat.ML · cond-mat.dis-nn · cs.LG
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info, commentary and permitted figures from the original paper

[Original paper ↗](https://arxiv.org/abs/2006.13198v6) · [PDF ↗](https://arxiv.org/pdf/2006.13198v6)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Abstract

Generalization beyond a training dataset is a main goal of machine learning, but theoretical understanding of generalization remains an open problem for many models. The need for a new theory is exacerbated by recent observations in deep neural networks where overparameterization leads to better performance, contradicting the conventional wisdom from classical statistics. In this paper, we investigate generalization error for kernel regression, which, besides being a popular machine learning method, also includes infinitely overparameterized neural networks trained with gradient descent. We use techniques from statistical mechanics to derive an analytical expression for generalization error applicable to any kernel or data distribution. We present applications of our theory to real and synthetic datasets, and for many kernels including those that arise from training deep neural networks in the infinite-width limit. We elucidate an inductive bias of kernel regression to explain data with "simple functions", which are identified by solving a kernel eigenfunction problem on the data distribution. This notion of simplicity allows us to characterize whether a kernel is compatible with a learning task, facilitating good generalization performance from a small number of training examples. We show that more data may impair generalization when noisy or not expressible by the kernel, leading to non-monotonic learning curves with possibly many peaks. To further understand these phenomena, we turn to the broad class of rotation invariant kernels, which is relevant to training deep neural networks in the infinite-width limit, and present a detailed mathematical analysis of them when data is drawn from a spherically symmetric distribution and the number of input dimensions is large.

## Quote from the paper

Abdulkadir Canatar, Blake Bordelon, Cengiz Pehlevan (2020). Spectral Bias and Task-Model Alignment Explain Generalization in Kernel Regression and Infinitely Wide Neural Networks. arXiv:2006.13198v6. https://doi.org/10.1038/s41467-021-23103-1

**BibTeX**

```
@article{canatar2020spectral,
  title = {{Spectral Bias and Task-Model Alignment Explain Generalization in Kernel Regression and Infinitely Wide Neural Networks}},
  author = {Abdulkadir Canatar and Blake Bordelon and Cengiz Pehlevan},
  year = {2020},
  eprint = {2006.13198},
  archivePrefix = {arXiv},
  doi = {10.1038/s41467-021-23103-1},
  url = {https://arxiv.org/abs/2006.13198v6}
}
```

## Other paper commentary

- [mixup: Beyond Empirical Risk Minimization](https://refivu.com/en/papers/cc1e3261-af7e-47fa-99d8-0806fbe6afcf-mixup-beyond-empirical-risk-minimization.md)
- [Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks](https://refivu.com/en/papers/c1050ccf-ffa6-4158-8fff-24b3a8223df6-weight-normalization-a-simple-reparameterization-to.md)
- [The Lottery Ticket Hypothesis: Finding Sparse, Trainable Neural Networks](https://refivu.com/en/papers/9c072b5c-bd96-4202-8960-653ce6a7f2fb-the-lottery-ticket-hypothesis-finding-sparse-trainable.md)
- [Adam: A Method for Stochastic Optimization](https://refivu.com/en/papers/1e4ce3cf-c297-4440-9078-a86a09a9caca-adam-a-method-for-stochastic-optimization.md)
- [Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift](https://refivu.com/en/papers/bd3e1105-da91-407a-8b28-4217cd2afedf-batch-normalization-accelerating-deep-network-training-by.md)
- [Instance Normalization: The Missing Ingredient for Fast Stylization](https://refivu.com/en/papers/d30fae5e-d1ad-4ef1-9b41-da9a7a9f25cf-instance-normalization-the-missing-ingredient-for-fast.md)
- [ROAD: The ROad event Awareness Dataset for Autonomous Driving](https://refivu.com/en/papers/01e6bd29-da3b-4a4b-a7bd-d94b12442017-road-the-road-event-awareness-dataset-for-autonomous.md)
- [LPAC: Learnable Perception-Action-Communication Loops with Applications to Coverage Control](https://refivu.com/en/papers/c2b80a60-dd94-4389-b898-b6edeb33088f-lpac-learnable-perception-action-communication-loops-with.md)
- [Reinventing 2D Convolutions for 3D Images](https://refivu.com/en/papers/6c574208-811f-453b-ad33-424db79250ce-reinventing-2d-convolutions-for-3d-images.md)
- [Visual Spatial Reasoning](https://refivu.com/en/papers/21c16be4-8990-40f5-8849-b7c6f46d36b4-visual-spatial-reasoning.md)
- [Mastering the Game of Stratego with Model-Free Multiagent Reinforcement Learning](https://refivu.com/en/papers/c8ba1a5f-8040-4096-92b0-d848951ca124-mastering-the-game-of-stratego-with-model-free.md)
- [Scientific multi-agent reinforcement learning for wall-models of turbulent flows](https://refivu.com/en/papers/3c11ac24-7249-4feb-b3d5-60b00a138213-scientific-multi-agent-reinforcement-learning-for-wall.md)

## Terms in this paper

- [MNIST](https://refivu.com/en/terms/28b9bb66d1c6-mnist)
- [CIFAR-10](https://refivu.com/en/terms/19035a518d0a-cifar-10)
- [generalization error](https://refivu.com/en/terms/f3d23f0e34d3-generalization-error)
- [Linear Regression](https://refivu.com/en/terms/772ea5657e9d-linear-regression)
- [reproducing kernel Hilbert space](https://refivu.com/en/terms/646016350e6f-reproducing-kernel-hilbert-space)
- [Gaussian RBF kernel](https://refivu.com/en/terms/542578fcd45c-gaussian-rbf-kernel)
- [kernel regression](https://refivu.com/en/terms/349dc6a69b9e-kernel-regression)
- [Neural Tangent Kernel](https://refivu.com/en/terms/38179d48dc7d-neural-tangent-kernel)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/0dfeefcb-6d9e-459c-9bec-7d099df6b4b6-spectral-bias-and-task-model-alignment-explain)
