TL;DR

  1. Puzzle: deep networks have far more parameters than data points, are trained to training error 0 (they can even fit random labels), and still generalize. Classical bounds (VC, Rademacher) are vacuous here.
  2. Double descent: the test error rises towards the interpolation threshold (as many parameters as data points) and can fall again beyond it, sometimes below the classical optimum. It does not always happen (polynomial regression), and its shape depends on how parameters are counted.
  3. Implicit regularization: GD on over-parameterized least squares started at converges to the minimum norm solution (Theorem 1: GD finds the minimum norm solution). GD on the logistic loss for separable data converges in direction to the max-margin separator (Theorem 2: max-margin bias of GD). The optimizer picks one special solution among many.
  4. Benign overfitting: the minimum norm interpolator can fit pure noise and still predict well. Toy setup (true function 0): risk for (Theorem 3: benign overfitting in the toy setup). Geometry: spiky-smooth, narrow spikes at the training points with vanishing volume, smooth elsewhere.
  5. Not always benign: isotropic Gaussian inputs with a signal : variance is small, but the bias stays (Theorem 4: excess risk in both regimes). Benign overfitting needs an aligned covariance: few large eigenvalues that carry the signal plus a long, flat tail of small eigenvalues that absorbs the noise (Theorem 5: excess risk for a general covariance, four regimes).
  6. Why large models: two-layer networks are universal approximators (Theorem 6: universal approximation), but GD can need exponentially many steps to learn a small network (Theorem 7: hardness of learning a small network). Robust interpolation (Lipschitz constant 1) needs parameters (Bubeck and Selke). Over-parameterized loss landscapes have many connected global minima; very wide networks behave like kernel methods (NTK, no feature learning).

Exam relevance

Overview: 1. Puzzling empirical results, 2. The double descent curve, 3. Implicit regularization by the optimizer, 4. Benign overfitting (toy setup, isotropic model, aligned covariance, relation to classical theory), 5. Why do we need large models?, 6. The loss landscape, 7. Infinite width and the neural tangent kernel, 8. Take home.

Puzzling empirical results

Learning in the over-parameterized regime

Slides 6-7

In the over-parameterized regime we deal with models that have many more parameters than we have data points. Intuitively, the model could simply memorize the training data without any generalization. Hence it is super-surprising that machine learning works in this regime.

  • Images: a neural network with, say, 20 million parameters is trained on ImageNet (1 million images).
  • Language: GPT-4 has about parameters, its training data of the order of tokens. That sounds like more tokens than parameters, but the number of tokens may not be the right way to count: the “effective signal” in this data is believed to be much smaller. Similarly, the number of parameters might not be the best measure of model size.
  • Also in much simpler applications, people train deep networks with many parameters on relatively few points, and it often works.

Overfitting might not hurt

Slides 8-9

The first big surprise: the models are typically trained to fit the training data perfectly (training error 0), and training often continues far beyond that point. Still, the models generalize. This is all the more surprising because the large function classes contain many functions with close to 0 training error, and many of them would not generalize (recall the over-parameterized linear models of Lecture 5).

Deep networks can fit random labels (Zhang, Bengio et al., 2017)

Train an MLP on CIFAR-10 (60,000 images, 10 classes) with randomly shuffled labels. The MLP always reaches training error 0. This indicates that the shattering coefficient of the function class is maximal. On ImageNet (1 million images, 1000 random labels) the result looks very similar.

Average training loss over thousands of steps for true labels, random labels, shuffled pixels, random pixels and Gaussian inputs; all curves reach zero, random labels take longest
Slide 9: training loss on CIFAR-10. True labels, random labels, shuffled or random pixels: all reach zero training loss, random labels just take longer.

What this means for Lecture 3

If a class can fit any labeling of the training set, its growth function is and the VC and Rademacher bounds of Lecture 3 are vacuous. They are not wrong, they just say nothing about why these networks generalize on real labels.

Local optima and the need for new tools

Slides 10-11

  • Why don’t we get stuck in local optima? Deep networks induce highly non-convex optimization problems in very high-dimensional spaces. Yet the optimizers manage to find good local (global?) optima.
  • Need new tools: the traditional way of looking at machine learning is not wrong. Its results simply do not shed insight on deep learning, or they must be applied more carefully. We need other tools to explain deep networks.

The double descent curve

The statistics puzzle

Slides 13-14

(Literature: Belkin, Hsu, Ma, Mandal, PNAS 2019; Belkin, “Fit without fear”, Acta Numerica 2021; Bartlett, Montanari, Rakhlin, Acta Numerica 2021.)

In the over-parameterized regime we train to complete overfitting. The traditional bias-variance picture (Lecture 1.2) predicts that the test error explodes. Why is this not the case?

Primer: a random feature example

Slides 15-19

A toy example with few points in a very high-dimensional space, built with a random feature model (Lecture 7):

  1. Original data: a low dimension and a low sample size . Sample uniformly from the sphere in , fix and define the non-linear true function and noisy labels
  1. Transformed data: sample random vectors from the sphere, map to , apply a ReLU and a linear output with parameter vector : . This is a network with hidden neurons whose first layer is random and fixed.
  2. Training: GD on the squared loss, training only the last layer:
Training and test error against the number of random features from 0 to 800; training error reaches zero at 200, test error peaks around 200 and then decreases again
Slide 18 (figure from the Bach book): training error (blue) and test error (red) against the number m of random features, n = 200. The test error peaks at m = n and falls again beyond it.

With features we have as many parameters as data points: the interpolation threshold. From here on training error 0 is possible. The surprise is the test error: it increases (as expected) as approaches the threshold from the left, but decreases afterwards. The maths of this example is Sheet 9, Exercise 1. Similar observations hold for many other models.

Double descent in practice

Slides 20-24

Two regimes

  • Under-parameterized regime: fewer parameters than data points, cannot interpolate, “traditional” behavior (U-shaped test curve).
  • Over-parameterized or interpolation regime: enough parameters to reach training error 0. Here the test risk sometimes decreases dramatically again and sometimes even gets lower than in the traditional regime.

The classical U-curve and the double descent curve of Belkin et al. are shown in Lecture 1.2. In the original paper the behavior was established empirically for a range of algorithms, including neural networks and random forests:

Zero-one loss and squared loss of a one-hidden-layer network on MNIST against the number of parameters; the test curves peak at the interpolation threshold and fall again
Slide 23: one hidden layer with H units on MNIST (n = 4000, d = 784, K = 10). Threshold at n times K parameters.
Zero-one loss and squared loss of random forests on MNIST against model complexity, first the number of leaves of one tree, then the number of trees; test error peaks and falls
Slide 24: random forests on MNIST (n = 10000). Complexity grows first with the leaves per tree, then with the number of trees.

For the network the number of parameters is and the threshold is observed at (one equation per point and class).

Other descent curves

Slides 25-28

The curves do not always show a double descent, many more shapes are possible:

  • Single descent: the risk just keeps decreasing with the complexity, with no peak (figure from the Hardt and Recht book).
  • Triple (multiple) descent: in models with several random feature layers of different sizes , several peaks can appear (Meng et al., JMLR 2024).
  • U-turn: it has been argued repeatedly that the shape strongly depends on how we count the parameters (Curth et al., NeurIPS 2023). For random forests the original paper counts the total number of leaves. But the behavior changes when going from one tree (blue part) to several trees (red part), which introduces the “kink”. Counting leaves per tree and number of trees separately gives ordinary U-shaped or monotone curves (“back to U”).
Risk and empirical risk against complexity of the model class; both decrease monotonically across the under- and over-parameterized regions
Slide 25: single descent. Risk (red) and empirical risk (blue) decrease through both regimes.

A case without double descent

Slides 29-30

Double descent does not automatically happen. An example where fitting beyond the threshold goes wrong:

  • training points uniform in with noisy labels .
  • Polynomial regression of increasing degree with the monomial features and least squares loss . The interpolation threshold is ( coefficients).
  • Test error on a dense grid in : beyond the threshold the high-degree polynomial becomes unstable and the test error grows instead of showing a second descent.
Mean squared error on a log scale against polynomial degree from 0 to 50; training error drops to about 1e-5 at degree 19, test error rises to about 1e14 and stays there
Slide 29: polynomial regression, n = 20. Training error (orange) hits zero at degree 19, the test error (blue, log scale) explodes and never comes down.

Take-home: the curve can go down again

Slides 31-32

Take-home

Learning in the over-parameterized regime can work. The exact shape of the curve is not important. What is important: the curve might (but not always does) show a smaller test error beyond the interpolation threshold.

Empirically, double or multiple descent can happen in many over-parameterized models, and in some models the curves can be derived analytically. To see the intuitive reason we first need two more topics: implicit regularization and benign overfitting. Then we come back to the question.

Task: interpolation thresholds

Exam-style task: where is the interpolation threshold? (4 P)

Math: linear systems

(a) (1 P, easy) A random feature model with ReLU features is fit by least squares to points. For which is the interpolation threshold, and what is the training error for ?

(b) (1.5 P, harder) A network with one hidden layer of units is trained with squared loss on images with pixels and classes (one output per class). The number of parameters is . For which (roughly) do you expect the test error peak?

(c) (1.5 P, transfer) A student fits polynomials of degree to noisy points with the monomial features and sees the test error rise between and . They conclude: “Beyond the test error will come down again, that is double descent.” Assess this.

Implicit regularization by the optimization algorithm

GD converges to the minimum norm solution

Slides 34-36

(Literature: Bach, Learning Theory from First Principles, Sec. 12.1.1.)

Setup: GD for over-parameterized linear least squares

  • Over-parameterized: . Data , . Assume has full row rank (true with probability 1 for Gaussian points). Then is invertible and perfect interpolation is possible: some has .
  • Objective , gradient descent initialized at :

Theorem 1 (convergence to the minimum norm solution)

In this setup:

  1. The GD iterates converge to .
  2. is the minimum norm solution: it solves , and among all solutions it has the smallest Euclidean norm . It is the unique solution with this property.

A similar result holds for SGD.

The start at zero matters

Neither the proof nor the result carries over to an arbitrary starting vector . The general result is weaker: GD converges to the interpolating solution that is closest to the initialization. (Reason: the component of in is never changed by the updates.)

Implicit regularization

Slide 42

GD regularizes without being asked

Among the many solutions that interpolate the data, GD always selects the one with the smallest norm. Elsewhere we would achieve this with explicit regularization (Lecture 5); here it happens automatically, implicitly. The choice of the optimization algorithm (GD or SGD) ensures not only a small objective value but also other nice properties. This is not obvious at all: other procedures for solving the same problem might not have this property (and thus might not generalize).

This is the same theme as in Lecture 2, where SGD (the perceptron) does not pick just any ERM minimizer.

Memory aid

GD never walks into directions the data does not see (the kernel of ), so from it ends at the shortest solution.

Task: the minimum norm solution by hand

Exam-style task: GD and the minimum norm interpolator (4 P)

Math: 2x2 inverse, kernel and range · eigenvalues

Two points in : with and with , so , .

(a) (1 P, easy) Show that interpolates the data. Compute and the largest step size for which GD is guaranteed to converge.

(b) (1.5 P, harder) Compute the minimum norm solution , check that it interpolates, and compare with .

(c) (1.5 P, transfer) Run two GD steps from with . Then: to which solution does GD converge if it starts at instead?

GD on the logistic loss converges to the max-margin direction

Slides 43-45

(Literature: Bach, Sec. 12.1.2.)

Theorem 2 (implicit bias of GD for logistic regression; Soudry et al., JMLR 2018)

Data with , , linearly separable (so we can “interpolate”). Logistic loss , GD from any initialization with a sufficiently small constant step size. Then the iterates diverge, , but the direction converges:

the maximum margin linear separator (margin, Lecture 2).

Proof skipped (see the Bach book). A related result for SGD exists, but needs stronger assumptions.

Why the norm diverges

On separable data the logistic loss is never exactly 0, it only gets smaller as grows along a separating direction. So GD keeps growing ; what settles is only the direction, and it is the one with the largest margin.

Implicit bias of neural networks

Slides 47-48

Some results describe the implicit bias of neural networks:

  • Wide, shallow networks converge to the minimum RKHS norm interpolant in the corresponding kernel space (Jacot et al., 2018; Arora et al., 2019), see the NTK below.
  • Deep linear networks trained with GD converge towards max-margin predictors with respect to an architecture-dependent norm (Gunasekar et al., 2018).
  • Homogeneous networks on separable data often maximize the margin under an implicit path-type norm (Lyu and Li, 2019).
  • In matrix factorization and low-rank models, GD implicitly favors low-rank / minimum nuclear norm solutions (Gunasekar et al., 2017).

However: for non-linear deep networks trained with SGD the implicit bias is not well understood and may depend on optimization noise and initialization (Blanc et al., 2020; Damian et al., 2021). Implicit regularization formally explains many simple cases, but no strong results (yet?) exist for the complex architectures used in practice.

Benign overfitting

What is benign overfitting?

Slides 49-50

(Literature: not really in text books. Bartlett, Long, Lugosi, Tsigler, “Benign overfitting in linear regression”, PNAS 2020; Tsigler and Bartlett, JMLR 2023; Hastie, Montanari, Rosset, Tibshirani, Annals of Statistics 2022; Bartlett, Montanari, Rakhlin 2021.)

  • Classical statistical wisdom: interpolating many data points leads to bad overfitting, low training error but high test error.
  • In modern high-dimensional models this intuition can fail: deep networks are fit to training error 0 and still have good test performance.
  • Situations where this happens are called benign overfitting (term coined by Bartlett, Long, Lugosi, Tsigler).
  • The question: how can a function interpolate noise and still predict well? We study it for different setups of linear regression.

Toy setup: learning the constant 0 function

Slides 52-57

The function to learn is constant 0, and all we observe are noisy observations of it. “Classical intuition”: if we interpolate the noise, we cannot generalize. This is correct for many interpolating solutions, but wrong for one very specific solution: the minimum norm interpolator.

Formal setup

  • Inputs i.i.d. from , data matrix .
  • True output 0 everywhere (the Bayes predictor is the constant 0 function); we observe it with i.i.d. additive noise: .
  • Linear prediction in the over-parameterized regime .

Theorem 3 (benign overfitting in the toy setup)

The minimum norm interpolator has expected true risk (least squares loss)

with the expectation over the training points , their labels and the test point . If is very large compared to , the excess risk tends to 0, although interpolates pure noise.

Mini example: , . For the risk is , for it is . The same interpolator on the same noise, just in a higher dimension, and the risk drops by a factor of 10.

What happens geometrically: spiky-smooth structure

Slides 58-63

Sketch: the true function is the zero line, noisy samples lie above and below it, the interpolating function follows the zero line and has narrow spikes up or down to each sample
Slide 58: the interpolating function (green) follows the true function (red) and reaches each noisy sample (blue) with a narrow spike. The loss (orange) is only large inside the spikes.

Large spikes interpolate the noisy labels ; in high dimensions these regions have vanishing volume. Outside the spikes the function approximates the true function (here the 0 function). The maths in six steps:

  1. Form of the prediction function. The solution lies in the span of the data points, so .
  2. It interpolates. At the training points it takes the (potentially large) values .
  3. The spike. The region around a training point where is still large:

the set of points whose normalized projection onto exceeds . 4. Concentration of random projections. In high dimensions random projections are highly concentrated. For drawn uniformly from the unit sphere in :

with a constant . 5. The volume of the spikes is small. Union bound over the spikes:

This explains why the spikes do not hurt consistency: if , the error bound in the theorem goes to 0. 6. Outside the spikes the function is close to 0. In high dimensions the data points are nearly orthogonal. The function must be large at the training points to interpolate; this is possible because each point essentially “opens up” a new dimension, and there are enough parameters to memorize it there. A random test point is with high probability not aligned with any training point, so it lies outside the spikes. And because we take the minimum norm solution, the function has small norm in all directions without training points, so the prediction there is close to 0.

Why the minimum norm matters

An arbitrary interpolator could put large values anywhere in the directions that the data never sees. The minimum norm solution puts nothing there ( from Theorem 1: GD finds the minimum norm solution). So it is spiky exactly at the data and flat everywhere else.

Memory aid

Spiky at the data, smooth everywhere else. In high dimensions the spikes are thin needles: almost no test point hits one.

Task: the spikes have vanishing volume

Exam-style task: spiky-smooth interpolation (4 P)

Math: union bound · logs

Use with , and spikes of width .

(a) (1 P, easy) Evaluate the bound for training points in dimensions.

(b) (1.5 P, harder) For , from which dimension on is the probability of landing in a spike guaranteed to be at most ? How does this change if is multiplied by 10?

(c) (1.5 P, transfer) Theorem 3 (benign overfitting in the toy setup) gives the risk . Which dimension is needed for so that the risk is at most of ? Compare with (b): which effect limits benign overfitting, the volume of the spikes or the variance?

Not so benign: isotropic Gaussian inputs

Slides 64-68

(Literature: Bach, Sec. 12.2.3; Bartlett, Long, Lugosi, Tsigler 2020; Bartlett, Montanari, Rakhlin 2021.)

Do similar results hold for linear regression with a real signal? Partially yes, but with caveats.

Setup: linear model, isotropic Gaussian sampling

  • Inputs i.i.d.
  • Responses with the true signal and i.i.d. (overall ).
  • Design matrix , empirical covariance .
  • Excess risk at a test point: , then averaged over the training data: .

Theorem 4 (expected excess risk, linear model, Gaussian data)

  • Under-parameterized regime (OLS):
  • Over-parameterized regime (minimum norm interpolator):
Excess risk against dimension d: rises to infinity as d approaches n from the left, comes down from infinity to the right of n; variance falls and bias rises towards a plateau
Slide 68: excess risk (blue) against d. Left of n only variance; right of n the variance (falling) and the bias (rising) add up.

In particular:

  • The variance terms are nice in both regimes (they look alike with the roles of and switched) and small far from the threshold.
  • In the under-parameterized regime the estimate is unbiased.
  • The bias in the over-parameterized regime does not explode (good), but it remains large unless we make strong assumptions.
  • Here we would not say that benign overfitting takes place. Learning works better in the under-parameterized regime.

What the bias term means (slide 85)

  • If , the bias is 0: that is the toy setup, benign overfitting.
  • If : for the factor is of order 1. It does not vanish; we cannot recover the true model. Intuitively, with points we only capture an fraction of the signal, the rest “gets lost”. We interpolate, but a large bias remains: not benign overfitting in general.

Task: evaluating Theorem 4 (excess risk in both regimes)

Exam-style task: under vs. over-parameterized (4 P)

Math: bias and variance

Isotropic Gaussian inputs, , , .

(a) (1 P, easy) Compute the expected excess risk for and for .

(b) (1.5 P, harder) Compute variance, bias and excess risk of the minimum norm interpolator for , and .

(c) (1.5 P, transfer) Compare with the trivial predictor . Is this benign overfitting? What changes if ?

Benign overfitting with an aligned covariance

Slides 86-95

(Literature: Bartlett, Montanari, Rakhlin, “Deep learning: a statistical viewpoint”, Acta Numerica 2021.)

More general setup

  • Inputs from some distribution on with and covariance , . W.l.o.g. the eigenvectors are the unit vectors in this order.
  • Linear truth ; over-parameterized, .

There is not enough data to learn all directions of . It becomes possible only if the covariance has a nice structure that separates the directions used for learning the signal from the directions used for interpolating the noise.

Theorem 5 (excess risk of the minimum norm interpolator, general case)

Let . Choose such that the tail is not dominated by only a few eigenvalues (details skipped). Then

The proof is difficult (papers by Bartlett et al.), we skip it and look at the two terms separately.

Variance term. : the first part is the variance in the signal itself, the second the tail weight from the interpolation part. It depends on the input covariance and on , not on . It is small if the tail has many small eigenvalues and large if it has one (or few) dominant tail eigenvalues:

  • Flat tail : . For small , small and large this is small. Good.
  • One tail eigenvalue , all others 0: , which does not vanish. Bad.

Bias term. With the signal strength along eigenvector , the bias is roughly with :

  • Signal aligned with the top eigenvectors: the covariance mainly lives in the first dimension (, and that tail sum is small) and . All terms but the first vanish, and the first is small because . Good.
  • Signal in the tail: and the remaining large. The first terms vanish, the others are large because is small compared to . Bad.

Good and bad situations (slides 94-95)

Good (benign overfitting): the spectrum has few large eigenvalues and then many tiny ones, and is aligned with the top eigenvalues. Signal and data essentially live in the same -dimensional subspace, so bias and variance are both small. The top directions represent the signal (like the under-parameterized regime), the remaining directions interpolate the noise without accumulating bias.

Bad:

  • The tail has too much weight: bias accumulates. The interpolator catches only an fraction of the signal and noise (the isotropic case above).
  • The tail has few dominant eigenvalues: the variance does not go to 0.
  • is not aligned with the dominating eigenvalues: the bias does not go to 0, there is not enough data to learn the signal.

Memory aid

A few loud directions carry the signal, many quiet ones soak up the noise. Too few quiet ones: variance. Too many loud ones or signal in the quiet ones: bias.

Four regimes in a Fourier example

Slides 96-102

A toy example that shows the behavior:

  • points uniform on , represented in a Fourier basis in dimension (different below).
  • The eigenvectors of the true covariance are the basis vectors, so the covariance is diagonal with eigenvalues .
  • True function , the first basis function: , always perfectly aligned with the first eigenvector.
  • Noisy outputs with ; we look at the minimum norm interpolator. Plots: true function green, data blue, minimum norm solution red.
RegimeSpectrumBehavior
1few large eigenvalues, then many 0like the under-parameterized regime: no interpolation possible, but learning works if the signal is aligned with the covariance
2few large, then few small onesinterpolation possible once there are enough small tail eigenvalues (essentially non-zero ones), but the variance stays large; it decreases with the number of small non-zero eigenvalues
3few large, many small onesbenign overfitting
4many large eigenvaluesimpossible to learn, bias remains high (essentially the isotropic Gaussian case)
Regime 3: eigenvalue spectrum with three large values and a long flat tail; the fitted function follows cos x closely with tiny spikes at the data points
Slide 100, regime 3: few large eigenvalues and a long flat tail. The fit follows cos(x) and only spikes at the points.
Regime 4: all eigenvalues large; the fitted function oscillates around zero with spikes at the data points and misses the cos x shape
Slide 101, regime 4: many large eigenvalues. The fit interpolates but is pulled towards 0 away from the data: the signal is lost.

Explore: the four regimes and the double descent formula

Top: the Fourier example of slides 96-101, recomputed live (n = 60, d = 2000, noise variance 0.01). Presets for the four regimes; the sliders change the number of large eigenvalues, the tail length and the tail height. Bottom: Theorem 4 (excess risk in both regimes) as a function of d, with variance and bias.

Things to try: in regime 2 move the tail length from 57 to 147 to 1997 and watch the variance (the wild oscillations) shrink. In regime 3 raise the tail height: the tail steals weight from the signal, the fit flattens (bias). In the lower plot set the signal to 0: only the variance is left, and the curve goes to 0 for large d (Theorem 3: benign overfitting in the toy setup).

Summary for linear regression (slide 102)

Whether benign overfitting can take place depends on the covariance matrix of the data and whether it is aligned with the signal . It can happen if the effective dimension of the signal is small compared to and the remaining dimensions contain isotropic small noise that allows the interpolation. The analysis is difficult, and little is known beyond the linear setting.

Task: which spectrum is benign?

Exam-style task: reading the terms of Theorem 5, the excess risk for a general covariance (4 P)

Math: eigenvalues of a covariance

, , signal , large eigenvalues .

(a) (1 P, easy) Compute the variance term for a flat tail of eigenvalues .

(b) (1.5 P, harder) Compute the variance term for a tail with only one non-zero eigenvalue , and for a flat tail of eigenvalues. Rank the three spectra.

(c) (1.5 P, transfer) For the flat tail of (a), compute the bias term. Then assume the signal is , a tail direction with . What fraction of this signal is lost?

Does benign overfitting contradict classical learning theory?

Slides 103-108

(Literature: Zhou, Sutherland, Srebro, “On uniform convergence and low-norm interpolation learning”, NeurIPS 2020.)

Hang on: the function classes of deep learning are so large that classical generalization bounds are not informative. But Vapnik’s theorem (Lecture 3) says uniform convergence is not only sufficient but also necessary for consistency. Where is the catch?

The catch

  • The function class a network can represent is huge, but we select the solution from a tiny subset of it (implicit regularization).
  • For the minimum norm interpolator in linear regression, Zhou, Sutherland and Srebro (2020) prove that the set of functions of small norm is still too large for uniform convergence: “uniformly bounding the difference between empirical and population errors cannot show any learning in the norm ball, and cannot show consistency for any set, even one depending on the exact algorithm and distribution.”
  • But uniform convergence can be proven if one further restricts to functions that have a small norm and interpolate. See also Shamir, “The implicit bias of benign overfitting”, 2022.

Summary of "modern" learning theory (slides 106-108)

The current chain of arguments for why deep networks generalize:

  1. Consider the highly over-parameterized, high-dimensional setting.
  2. By the geometry of the loss landscape, SGD (or other algorithms) finds global optima, i.e. interpolating solutions, easily.
  3. Under certain conditions, implicit regularization gives this solution nice properties (e.g. minimum norm).
  4. For such solutions one can prove generalization under certain assumptions (e.g. through the simple-plus-spiky decomposition).

This explains why deep networks might work. It does not explain whether we need them: perhaps we just haven’t found a simpler approach. Perhaps not: the arguments on smooth interpolation show that robust solutions need large models (not necessarily networks, but models with many parameters). Many results hold only in special cases under special assumptions; none has been extended to the really interesting scenarios yet.

Why do we need large models?

Representation power of neural networks

Slides 111-118

Two very different questions:

  • Representation power: which functions can a specific network represent at all? How can we describe this function space mathematically?
  • Trainability: if a network can represent a function and we observe training data from it, can we actually find a parameter vector that represents it?

Networks with one hidden layer with units, continuous activation and one linear output neuron represent the family

Theorem 6 (universal approximation; Pinkus, Acta Numerica 1999)

Let be compact. If the activation is continuous and not a polynomial, then is dense in (continuous functions, sup-norm): for every and every there are a number of hidden units and parameters with

What universal approximation does not say

So two-layer networks suffice for pretty much everything? Yes, but the theorem says nothing about

  • how large must be depending on and the complexity of ,
  • the complexity of the solution (e.g. its Lipschitz constant),
  • whether such a function can be found from training data, and how much data it needs,
  • generalization outside the training set.

Depth can be more expressive than width (Telgarsky, COLT 2016): fix a depth . There is a function exactly represented by a ReLU network of depth and width , but approximating it with depth at most up to constant accuracy (in ) needs width of order .

Gradient descent might not learn a small network

Slides 119-122

Is it always easy to find a function that a network can represent? There are negative results. Setup:

  • A “nice” input distribution on (uniform on , standard Gaussian, uniform on the sphere).
  • Any architecture with parameters (a “small” network).
  • An idealized learner that queries the gradient of the true population loss, , and runs GD, SGD, Adam, … from some . No finite-sample and no computational issues.

Theorem 7 (hardness of learning a simple network; Shamir, JMLR 2018)

There is a family of targets such that

  1. every is exactly computed by for some (a small network suffices), and
  2. any (randomized, computationally unbounded) algorithm that sees the data only through (possibly noisy) gradient queries and outputs with for a uniformly random must use queries.

So a small network exists, but no gradient-based algorithm finds it in polynomial time. Representation is not the whole story: we need to look at specific algorithms to understand what they can and cannot learn.

Large models are necessary for robust interpolation

Slides 123-130

(Literature: Bubeck and Selke, “A universal law of robustness via isoperimetry”, NeurIPS 2021; extended version Journal of the ACM 2023.)

Robustness means a function that is “not too wiggly”, measured by the Lipschitz constant

The higher , the less robust. Ideally is a constant that does not depend on or .

Interpolation: to solve equations you typically need only unknowns, but that solution can have a very high Lipschitz constant. A larger function class has more interpolating solutions; is there one with a low Lipschitz constant? Empirically, larger networks help tremendously for robustness.

Result by Bubeck and Selke (in words)

Let be smoothly parameterized by parameters and the -dimensional data come from a somewhat nice distribution. Then any function in that fits the training data below the noise level (e.g. interpolates) must have

Conversely, for Lipschitz constant we need parameters.

  • Construction showing suffices: uniform distribution on the unit sphere in , random points (moderate ). With probability at least any two points are at distance at least 1 (concentration). Choose any labels and put a “bump” (some RBF) on every point: . It interpolates, has Lipschitz constant 1 and needs parameters (the centers).
  • Proof idea for a finite class of functions with Lipschitz constant : by concentration, a fixed fits random labels with probability at most . Union bound: some fits with probability at most . This only becomes large if is of order : any interpolating function must have at least of that order. For infinite classes an -net argument replaces by . The results extend to generalization bounds.
  • ImageNet: the authors estimate that a robust estimator needs of the order parameters (models in 2021 had about ). If correct, robust ImageNet classification is only a matter of time: no new tools, just larger models.

Mini example with own numbers

training points in dimensions. For : parameters. A model with only parameters can interpolate, but then . With : . Doubling robustness (halving ) costs four times the parameters.

The loss landscape in our favor

Slides 132-139

Minimizing a loss over a complex network is typically not convex, yet standard optimizers do a surprisingly good job at finding good local or even global optima. Some hypotheses why (not explored in depth; many results hold only for specific architectures and losses):

Left: a loss surface with two isolated local minima for under-parametrized models; right: a surface with a connected curve of global minima for over-parametrized models
Slide 133: (a) under-parameterized: isolated local minima, the result depends on the start. (b) over-parameterized: a connected manifold of global minima (Belkin 2021).
  • Why SGD finds a global optimum: we expected non-convex problems to look like the left picture (lots of local optima). In the over-parameterized regime they rather look like the right one: no matter where we start, we end in a global minimum, and there are many of them. This can be characterized and proved (Belkin 2021 and references).
  • Many connected global minima: with parameters and points, , the set of global minima is usually not discrete but an -dimensional submanifold (Cooper, 2018). Making a network wider can connect previously discrete minima into one manifold (Simsek et al., ICML 2021).
  • Low-loss paths: the minima found by two networks are connected by a path of non-increasing error (Frankle et al., ICML 2020, linear mode connectivity).
  • Width removes bad basins: from narrow to wide networks there is a phase transition from suboptimal basins to none (Li, Tang, Sun, SIAM J. Optimization 2022). Over-parameterized deep networks have no strict local minima for any continuous activation (Li, Ding, Sun): the landscape can have bad plateaus, but no strict bad basin.
  • Training dynamics, e.g. edge of stability: one might expect large learning rates to push training toward flatter solutions because sharp regions are unstable. Instead GD often sits right at the maximum sharpness compatible with the step size (Cohen, Damian, Talwalkar, Kolter, Lee, ICLR 2025; blog: centralflows.github.io).
  • Architecture matters: skip connections make the loss landscape smoother (Li et al., “Visualizing the loss landscape of neural nets”, NeurIPS 2018, ResNet-56 with and without skip connections).

Summary

Many papers show that for certain architectures, losses and optimizers something nice happens. General tenor: a large number of parameters helps. Many papers also explain tricks of the trade through the landscape. There is no single reason that explains the success of network optimization, but together the results paint a picture.

Infinite width theory and the neural tangent kernel

Slides 140-147

(Literature: Jacot, Gabriel, Hongler, “Neural tangent kernel”, NeurIPS 2018; Arora, Du, Hu, Li, Salakhutdinov, Wang, “On exact computation with an infinitely wide neural net”, NeurIPS 2019; Chizat, Oyallon, Bach, “On lazy training in differentiable programming”, NeurIPS 2019.)

A branch of theory studies wide shallow networks, e.g. one very wide hidden layer, to see why very wide networks might or might not be good.

Gradient flow is GD with infinitesimal step size (Bach, Sec. 12.3). Let be the predictions on the training points at time . For a fully connected differentiable network trained with squared loss (Arora et al., Lemma 3.1):

is an inner product matrix of gradients, i.e. a kernel matrix.

NTK regime and the neural tangent kernel

  • For a two-layer ReLU network that is very wide, barely changes during training: (Arora et al., App. D).
  • As the width goes to infinity, converges to a kernel function, the neural tangent kernel

with the random initialization. It measures how similarly the predictions at and change under an infinitesimal parameter update.

  • Consequence: in the infinite-width regime, training the network behaves like training a kernel method with ; the limiting solutions can be computed exactly for several losses.

No feature learning in the NTK regime

  • In very wide networks every parameter changes only by a minuscule amount (lazy training): the gradient signal is spread over so many neurons that tiny changes add up to something substantial in the output, while the weights hardly move.
  • So the network does not learn a new representation; it sticks to the random one from the initialization and behaves like a random feature model.
  • In practice, networks trained in the lazy regime perform worse and do not exceed some classical linear methods.
  • Limitations: the network stays close to its initialization, the tangent features stay essentially fixed, the model behaves like a kernel method, representation learning is largely absent. NTK theory explains optimization of very wide networks, but not feature learning as it happens in practical networks.

Theory regarding depth Slide 149: there are isolated results on very deep networks, but they are specific to individual architectures and do not tell a coherent story. Currently there is no convincing line of work explaining why networks need to be deep; it is a widely open research question.

Take home

Under- vs. over-parameterized learning

Slides 151-157

Under-parameterized regimeOver-parameterized regime
setupnot so many data pointshuge number of sample points
featuresexplicit prior knowledge: feature representation, similarity, distance, kernelno explicit representation; features learned by the network (hard to interpret), raw pixels or tokens
trainingcontrol the capacity of the function class, be careful not to overfitcomplex architecture, often trained to 0 training error and beyond
guiding principlesbias-variance decomposition, small function classes or regularization, stability; enforced explicitlythe same “old” principles at work implicitly: bias-variance beyond the interpolation threshold, implicit regularization by the algorithm, stability of the optimizers; analysis shifts from statistics to the optimization algorithm

Old principles in new disguise. On the downside: most theoretical results hold for rather simple models, and it is not proven that they hold in complex ones; there might be other powerful principles we haven’t identified. There is no magic involved, but it is sometimes hard to see behind the curtain. We are still very far from really understanding learning in the over-parameterized regime.

Which approach to use? Many applications still need the under-parameterized regime: there is not enough data to train a complex network. Neural networks are super-helpful when we have or can generate a lot of data (images, text, but also e.g. simulation-based inference in science). As an ML engineer you need to be confident in both worlds.

New failure modes

Deep learning shows failure modes that partly exist in the classical regime but are more pronounced now: adversarial examples, spurious features, shortcut learning, … Reasons: raw data without much pre-processing (hoping ML discovers whatever is needed), complex architectures that are hard to gain intuition about, black-box models that even ML engineers cannot understand. Together with the lack of strong theory: careful testing, benchmarking and validating play a central role now (see validity, Lecture 7).

Summary

TopicKey message
puzzlenetworks interpolate (even random labels) and still generalize; classical bounds vacuous
double descenttest error peaks at the interpolation threshold (parameters = data points) and can fall again; not always (polynomials), shape depends on how parameters are counted
implicit regularizationGD from 0 on least squares: , minimum norm; logistic GD on separable data: max-margin direction
benign overfitting, toy: risk ; spiky-smooth, spikes of volume
isotropic modelvariance small, bias stays; under-param: ; at
aligned covariancebenign if few large eigenvalues carry the signal and a long flat tail of small ones absorbs the noise
classical theoryuniform convergence fails on the norm ball, holds on low-norm interpolating functions
large modelsuniversal approximation; GD can need steps; robust interpolation needs
landscape, NTKmany connected global minima; very wide nets are lazy, kernel-like, no feature learning

Self-Test

Multiple Choice

Cheat sheet and full integration tasks

The two tasks below use every calculation of this lecture once: the minimum norm solution with gradient descent by hand, then thresholds, the risk formulas of both regimes, the spikes and the terms of the general bound. Write your own sheet first, solve the tasks with it next to you, then open the sheet at the bottom and compare. The letters in brackets name the block of the sheet that a subtask needs.

Full integration task: minimum norm solution and gradient descent (12 P)

Math: 2x2 inverse, kernel and range · eigenvalues

Two points in : with and with , so and .

(a) (2 P, block C) Show that interpolates the data and compute .

(b) (3 P, block C) Compute the minimum norm solution , check that it interpolates and compare its norm with that of .

(c) (2 P, block C) Show that the difference of the two solutions lies in . Why can gradient descent started at 0 never pick up such a component?

(d) (3 P, block C) The largest eigenvalue of is about . Is the step size allowed? Run two steps of gradient descent from .

(e) (2 P, block C) To which solution does gradient descent converge from , and what is its squared norm?

Full integration task: thresholds, risks and benign overfitting (14 P)

Math: bias and variance · union bound · logs

Throughout: training points and .

(a) (2 P, block B) Where is the interpolation threshold for a random feature model with features, for polynomial regression of degree , and for a network with inputs, hidden units and outputs, which has parameters?

(b) (3 P, block D) Isotropic Gaussian inputs and . Compute the expected excess risk for and , and variance, bias and excess risk of the minimum norm interpolator for and .

(c) (2 P, block D) Compare the results of (b) with the predictor . Is this benign overfitting? What changes if ?

(d) (2 P, block D) With : which dimension makes the risk at most of ?

(e) (2 P, block E) Use with and . From which dimension on is the probability of landing in a spike at most ? Which of the two conditions, (d) or (e), is the stricter one?

(f) (3 P, block F) General covariance with large eigenvalues . Compute the variance term for a flat tail of eigenvalues , for a flat tail of and for a single tail eigenvalue. For the first tail, which fraction of a signal is lost if it sits on , and which if it sits on a tail direction?

References