Simple Algorithm
Deep Learning · Representation · 24 min

Loss Landscapes

Saddles, lazy versus rich training, and why overparameterized networks are easy to train.

For decades the fear was that gradient descent on a neural network would get stuck in a bad local minimum. Real landscapes turned out stranger and kinder: high-loss critical points are mostly saddles, very wide networks can train like linear models, the learning rate caps how sharp a minimum can be, and with more parameters than examples the minima form vast manifolds. This lesson derives each picture and shows how to look at a landscape without being fooled by it.

What you’ll learn

  • Classify critical points by their Hessian eigenvalues, derive how long gradient descent lingers near a strict saddle, and state what is proven about saddles and bad local minima.
  • Read one- and two-dimensional views of a landscape, explain filter normalization, and use a loss barrier between two solutions as a certificate of nonconvexity.
  • Derive the function-space dynamics of a linearized network, and explain the neural tangent kernel, lazy training and how it differs from feature learning.
  • Derive the stability threshold η<2/λmax⁡\eta<2/\lambda_{\max}, describe the edge of stability, and show that overparameterized networks have manifolds of minima and a PL inequality set by the tangent kernel.

Saddles, not traps

A network with PP parameters has a loss landscape L(θ)\loss(\boldsymbol\theta) over RP\R^P. Its critical points are where ∇L=0\nabla\loss=\mathbf 0, and near one of them, θc\boldsymbol\theta_c, the Hessian H=∇2L(θc)H=\nabla^2\loss(\boldsymbol\theta_c) decides the shape. Write H=∑iλiqiqi⊤H=\sum_i\lambda_i\mathbf q_i\mathbf q_i^\top with orthonormal eigenvectors qi\mathbf q_i. If every λi>0\lambda_i>0 the point is a strict local minimum; if the signs are mixed it is a saddle point. The fraction of negative eigenvalues is the point's index (Morse theory counts them instead of taking the fraction), and a saddle with at least one strictly negative eigenvalue is a strict saddle.

L(θc+δ)≈L(θc)+12 δ⊤Hδ=L(θc)+12∑i=1Pλi ci2,ci=qi⊤δ\loss(\boldsymbol\theta_c+\boldsymbol\delta)\approx\loss(\boldsymbol\theta_c)+\tfrac12\,\boldsymbol\delta^\top H\boldsymbol\delta=\loss(\boldsymbol\theta_c)+\frac12\sum_{i=1}^{P}\lambda_i\,c_i^2,\qquad c_i=\mathbf q_i^\top\boldsymbol\delta
Along each eigenvector the loss is a one-dimensional parabola, opening up where λi>0\lambda_i>0 and down where λi<0\lambda_i<0.
DerivationGradient descent near a critical point
  1. ci(t)=(1−ηλi)t ci(0)c_i(t)=(1-\eta\lambda_i)^t\,c_i(0)

    On the quadratic model the gradient is HδH\boldsymbol\delta, so a step δ←δ−ηHδ\boldsymbol\delta\leftarrow\boldsymbol\delta-\eta H\boldsymbol\delta acts on each eigen-coordinate on its own:

  2. tescape≈ln⁡(r/∣c0∣)ln⁡(1+η∣λi∣)≈ln⁡(r/∣c0∣)η∣λi∣t_{\text{escape}}\approx\frac{\ln(r/\abs{c_0})}{\ln(1+\eta\abs{\lambda_i})}\approx\frac{\ln(r/\abs{c_0})}{\eta\abs{\lambda_i}}

    A negative curvature multiplies its coordinate by 1+η∣λi∣>11+\eta\abs{\lambda_i}>1 at every step, so any nonzero offset grows until it leaves the quadratic region, of size rr say. Starting from an offset c0c_0, that takes

  3. {δ: ci=0  for every i with λi<0}\big\{\boldsymbol\delta:\ c_i=0\ \text{ for every }i\text{ with }\lambda_i<0\big\}

    The delay grows only logarithmically as the start approaches the ridge, but inversely with the curvature: a saddle whose negative eigenvalues are tiny shows up as a long plateau in the loss curve. Gradient descent converges to the saddle only from starts with no component along any negative direction, a set whose dimension is the number of nonnegative eigenvalues, so it has measure zero.

Why expect saddles rather than bad minima? At a high-loss critical point of a random function of PP variables, all PP curvatures being positive is exponentially unlikely. For random Gaussian fields, critical points concentrate on a curve along which the index rises with the loss (Bray & Dean, 2007), and Dauphin et al. (2014) found the same qualitative picture for small networks, with many near-zero eigenvalues that turn saddles into plateaus. That is an analogy, not a theorem about networks. Deep linear networks provably have no spurious local minima (Kawaguchi, 2016; Learning Dynamics of Deep Linear Networks), but two-layer ReLU networks with 6≤k≤206\le k\le20 units fit to a same-size teacher on Gaussian inputs do, and random starts often reach them; mild overparameterization made them far rarer (Safran & Shamir, 2018).

Predict before you look

On this saddle the offset from the ridge grows by a factor 1.051.05 per step (η=0.05\eta=0.05, curvature −1-1). If gradient descent starts ten times closer to the ridge, how many extra steps does it spend near the saddle?

Show the answer

47

ln⁡10/ln⁡1.05≈47.2\ln10/\ln1.05\approx47.2 steps. Each factor of ten costs the same delay, so a start exponentially close to the ridge costs only linearly more time. The curvature matters far more: with a negative eigenvalue of −10−3-10^{-3}, the same factor of ten costs about 2,3002{,}300 steps even at η=1\eta=1.

Seeing a landscape

Lines. The cheapest picture evaluates L\loss on the segment (1−α)θ0+αθ⋆(1-\alpha)\boldsymbol\theta_0+\alpha\boldsymbol\theta^\star from the initialization to the trained weights. Goodfellow, Vinyals & Saxe (2015) found that for a variety of state-of-the-art networks the loss falls along this line without meeting any significant obstacle: whatever detours SGD takes, a smooth downhill path exists. This monotonic linear interpolation is common but not a law: Lucas et al. (2021) produced violations systematically with large learning rates, Adam and batch normalization, all of which carry the weights far from their start.

Planes. Two random directions give the slice L(θ⋆+ad1+bd2)\loss(\boldsymbol\theta^\star+a\mathbf d_1+b\mathbf d_2). Raw Gaussian directions mislead, because weight scale is partly arbitrary: by the rescaling symmetry of ReLU networks, and the scale invariance that normalization layers create, a network with large weights can compute the same function as one with small weights, yet a perturbation of fixed size barely affects the first and wrecks the second. Li, Xu, Taylor, Studer & Goldstein (2018) therefore rescale each filter of a random direction (for a fully connected layer, each unit's incoming weights) to the norm of the same filter in θ⋆\boldsymbol\theta^\star:

di,j  ←  di,j∥di,j∥ ∥θi,j⋆∥(filter j of layer i)\mathbf d_{i,j}\;\leftarrow\;\frac{\mathbf d_{i,j}}{\norm{\mathbf d_{i,j}}}\,\norm{\boldsymbol\theta^\star_{i,j}}\qquad(\text{filter }j\text{ of layer }i)
Filter normalization. With it, slices of different networks become comparable. Li et al. saw networks without skip connections turn from nearly convex to chaotic as depth grew (ResNet-56 with its shortcuts removed was already chaotic), while residual networks and wider networks kept broad, convex-looking basins.

Two solutions. The third picture joins two networks θA,θB\boldsymbol\theta_A,\boldsymbol\theta_B trained from different random starts. A convex loss stays below the chord between the end values, so a positive barrier max⁡α[L((1−α)θA+αθB)−(1−α)L(θA)−αL(θB)]\max_\alpha\big[\loss((1-\alpha)\boldsymbol\theta_A+\alpha\boldsymbol\theta_B)-(1-\alpha)\loss(\boldsymbol\theta_A)-\alpha\loss(\boldsymbol\theta_B)\big] certifies nonconvexity. Permutation symmetry makes barriers unavoidable: reorder the hidden units of θA\boldsymbol\theta_A with their weights and you get a second minimum computing the same function, while the average of the two mixes unrelated units.

What the pictures hide. A random unit direction d\mathbf d is nearly orthogonal to the few sharpest Hessian eigenvectors, and its curvature d⊤Hd\mathbf d^\top H\mathbf d is close to the average eigenvalue Tr⁡H/P\Tr H/P: slices show the bulk of the curvature and can look convex where the Hessian has negative eigenvalues. Training trajectories are nearly invisible in random planes, since they move in a very low-dimensional subspace (Training in a Tiny Subspace). Pictures are evidence, not proof.

Lazy versus rich training

How far do the weights move during training? If not far, the network is well described by its first-order Taylor expansion around the initialization θ0\boldsymbol\theta_0:

f(x;θ)≈f(x;θ0)+ϕ(x)⊤(θ−θ0),ϕ(x)=∇θf(x;θ0)f(\mathbf x;\boldsymbol\theta)\approx f(\mathbf x;\boldsymbol\theta_0)+\boldsymbol\phi(\mathbf x)^\top(\boldsymbol\theta-\boldsymbol\theta_0),\qquad\boldsymbol\phi(\mathbf x)=\nabla_{\boldsymbol\theta}f(\mathbf x;\boldsymbol\theta_0)
The linearized network is linear in its parameters but not in its input: a linear model on the fixed features ϕ(x)\boldsymbol\phi(\mathbf x), one per parameter. Their inner products define the neural tangent kernel Θ(x,x′)=ϕ(x)⊤ϕ(x′)\Theta(\mathbf x,\mathbf x')=\boldsymbol\phi(\mathbf x)^\top\boldsymbol\phi(\mathbf x').
DerivationTraining in function space
  1. dθdt=−J⊤r⟹dudt=J dθdt=−K r,K=JJ⊤∈Rn×n\frac{d\boldsymbol\theta}{dt}=-J^\top\mathbf r\quad\Longrightarrow\quad\frac{d\mathbf u}{dt}=J\,\frac{d\boldsymbol\theta}{dt}=-K\,\mathbf r,\qquad K=JJ^\top\in\R^{n\times n}

    Stack the outputs on the nn training inputs into u∈Rn\mathbf u\in\R^n, with Jacobian J=∂u/∂θ∈Rn×PJ=\partial\mathbf u/\partial\boldsymbol\theta\in\R^{n\times P} and residual r=u−y\mathbf r=\mathbf u-\mathbf y. Gradient flow on L=12∥u−y∥2\loss=\frac12\norm{\mathbf u-\mathbf y}^2 moves the parameters along −J⊤r-J^\top\mathbf r, and the chain rule turns this into an equation for the outputs:

  2. r(t)=e−Kt r(0)\mathbf r(t)=e^{-Kt}\,\mathbf r(0)

    Kij=Θ(xi,xj)K_{ij}=\Theta(\mathbf x_i,\mathbf x_j) is the tangent-kernel matrix. If it stays constant, as it does exactly for the linearized model, the equation is linear: the residual decays along each eigenvector of KK at a rate equal to its eigenvalue.

  3. f∞(x)=f(x;θ0)+k(x)⊤K−1(y−u(0))f_\infty(\mathbf x)=f(\mathbf x;\boldsymbol\theta_0)+\mathbf k(\mathbf x)^\top K^{-1}\big(\mathbf y-\mathbf u(0)\big)

    A new input x\mathbf x moves by ddtf(x)=−k(x)⊤r(t)\frac{d}{dt}f(\mathbf x)=-\mathbf k(\mathbf x)^\top\mathbf r(t), with ki(x)=Θ(xi,x)k_i(\mathbf x)=\Theta(\mathbf x_i,\mathbf x). Integrating, with KK invertible, the trained network is kernel regression with the NTK, started from the initial function:

When does the kernel stay constant? Jacot, Gabriel & Hongler (2018) proved that as the widths of a network in the NTK parameterization (each layer's output scaled by one over the square root of its fan-in) tend to infinity, the NTK becomes deterministic and stays constant over any fixed training horizon; for data on a sphere and a non-polynomial activation it is positive definite, so the loss goes to zero and the result is the kernel regressor above. The reason is a separation of scales: at width mm the Hessian of the output has norm of order 1/m1/\sqrt m in a ball of fixed radius around the initialization, while its gradient stays of order one, so the gradient, and with it the kernel, barely changes anywhere in that ball (Liu, Zhu & Belkin, 2020). The weights do travel a distance of order one; it is the curvature that is small, not the movement, even though each single weight moves by only O(1/m)\order{1/\sqrt m}. The network fits the data without changing its features: lazy training.

Chizat, Oyallon & Bach (2019) showed that laziness comes from scale, not width as such: multiply a model's centered output by α\alpha and divide the loss by α2\alpha^2, and the quantity bounding the departure from the linearization falls like 1/α1/\alpha, so any model trains lazily for large α\alpha. For a two-layer network α(m)∑i=1mϕ(θi)\alpha(m)\sum_{i=1}^m\phi(\boldsymbol\theta_i), the NTK choice α(m)=1/m\alpha(m)=1/\sqrt m becomes lazy as m→∞m\to\infty, while the mean-field choice 1/m1/m keeps the units moving. Laziness is not what makes practical networks good: on CIFAR-10, widened VGG-11 and ResNet models trained lazily reached 61.7% and 56.7% test accuracy, against 89.7% and 91.0% when trained normally.

Networks trained with standard settings change their hidden representations, which is what feature learning means. How SGD Learns Features proves what this buys, μP & Hyperparameter Transfer keeps features moving as width grows, and Spectral Bias & Fourier Features uses the kernel dynamics above to explain why networks fit low frequencies first.

python
import torch
from torch.func import functional_call, jacrev, vmap

def empirical_ntk(model, X):
    params = {k: v.detach() for k, v in model.named_parameters()}
    def f(p, x):                                        # scalar output for one input
        return functional_call(model, p, (x.unsqueeze(0),)).squeeze()
    grads = vmap(jacrev(f), in_dims=(None, 0))(params, X)      # one gradient per input
    J = torch.cat([g.reshape(len(X), -1) for g in grads.values()], dim=1)  # n × P
    return J @ J.T                                      # K_ij = ∇f(x_i) · ∇f(x_j)

model = torch.nn.Sequential(torch.nn.Linear(10, 1024), torch.nn.Tanh(),
                            torch.nn.Linear(1024, 1)).double()
X = torch.randn(64, 10, dtype=torch.float64)
K = empirical_ntk(model, X)                             # 64 × 64, from P = 12,289 parameters
mu = torch.linalg.eigvalsh(K)[0]                        # λ_min(K), the PL constant of ½‖u − y‖²

The empirical NTK of a finite network with torch.func: one gradient per training input, stacked into the n×Pn\times P Jacobian, and K=JJ⊤K=JJ^\top. Its smallest eigenvalue returns in the last step as a PL constant. For inputs of very low dimension and a smooth activation, KK can be so ill-conditioned that rounding swamps its smallest eigenvalue, hence the 64-bit floats.

Check your understanding

Which change pushes the training of a network toward the lazy regime?

  1. Switching a two-layer network from the NTK output scaling 1/m1/\sqrt m to the mean-field scaling 1/m1/m
  2. Multiplying all initial weights of a two-layer ReLU network without biases by 0.10.1
  3. Multiplying the network's centered output by α=100\alpha=100 and dividing the loss by α2\alpha^2
  4. Narrowing the network while keeping the NTK parameterization
Show the answer

C. Multiplying the network's centered output by α=100\alpha=100 and dividing the loss by α2\alpha^2

Scaling the centered output by α\alpha shrinks the quantity that measures departure from the linearization by 1/α1/\alpha (Chizat, Oyallon & Bach, 2019): the weights need to move α\alpha times less to fit the data, so the Jacobian hardly changes. The other three changes make training less lazy.

Sharpness and the stability threshold

Near a minimum θ⋆\boldsymbol\theta^\star every curvature is nonnegative, and the eigen-decomposition from the first step decides whether gradient descent settles there or is thrown out.

DerivationWhich minima can gradient descent converge to?
  1. ∣1−ηλi∣<1⟺0<ηλi<2\abs{1-\eta\lambda_i}<1\quad\Longleftrightarrow\quad0<\eta\lambda_i<2

    With δ=θ−θ⋆\boldsymbol\delta=\boldsymbol\theta-\boldsymbol\theta^\star and λi≥0\lambda_i\ge0, each eigen-coordinate is multiplied by 1−ηλi1-\eta\lambda_i per step. It shrinks only if ηλi<2\eta\lambda_i<2; beyond that it flips sign and grows.

  2. η<2λmax⁡(H)⟺λmax⁡(H)<2η\eta<\frac{2}{\lambda_{\max}(H)}\quad\Longleftrightarrow\quad\lambda_{\max}(H)<\frac2\eta

    Every positive curvature must satisfy this, so the sharpest one binds: the stability threshold. Directions with λi=0\lambda_i=0, the flat directions along a valley of minima, neither grow nor shrink.

  3. η=0.1:only minima with λmax⁡<20 are stable\eta=0.1:\qquad\text{only minima with }\lambda_{\max}<20\text{ are stable}

    Read backwards, the inequality is a selection rule: gradient descent with step η\eta cannot settle at a minimum whose sharpness exceeds 2/η2/\eta, because any small perturbation along the top eigenvector grows. A larger learning rate can only end in flatter minima. SGD's noise tightens the constraint further: a minimum stays stable under SGD only if the per-example curvatures also roughly agree (low non-uniformity), and the smaller the batch, the stricter that requirement (Wu, Ma & E, 2018; the noise itself is analyzed in Gradient Noise, Batch Size & Scaling Rules).

Predict before you look

At a minimum the Hessian's nonzero eigenvalues are 4040, 55 and 0.10.1. What is the largest learning rate at which gradient descent can converge to it?

Show the answer

0.05

Every positive curvature needs ηλi<2\eta\lambda_i<2, and the sharpest binds: η<2/40=0.05\eta<2/40=0.05. Even near that limit the flattest direction contracts by only 1−0.05×0.1=0.9951-0.05\times0.1=0.995 per step, about 200200 steps per factor ee: the sharpest curvature sets the limit, and the ratio of the largest to the smallest sets the speed.

The edge of stability. Cohen, Kaur, Li, Kolter & Talwalkar (2021) tracked the sharpness during full-batch gradient descent across architectures and tasks. Below 2/η2/\eta it tends to keep rising (progressive sharpening). Once it reaches 2/η2/\eta the iterates oscillate along the top eigenvector, yet training does not diverge: the sharpness hovers at or just above 2/η2/\eta, and the loss rises and falls over short timescales while decreasing over long ones. For standard CIFAR-10 networks this happened at every reasonable step size. This edge of stability contradicts the classical picture, and what pins the sharpness near 2/η2/\eta is an active topic of theory. Under SGD the sharpness does not settle at a fixed value, but larger steps and smaller batches both steer training toward flatter regions.

So the learning rate limits the sharpness of the regions training can occupy, and a sharpness value means little without the learning rate that produced it or a fixed parameterization (rescaling symmetries change the Hessian without changing the function). Whether flat minima generalize better is the subject of Sharpness-Aware Minimization.

Why overparameterized networks are easy to train

Suppose a network with a smooth activation can fit its data exactly: PP parameters, nn examples with scalar targets, squared loss. The zero-loss set {θ:f(xi;θ)=yi for all i}\{\boldsymbol\theta:f(\mathbf x_i;\boldsymbol\theta)=y_i\text{ for all }i\} is cut out by nn equations in PP unknowns, and Cooper (2018) proved that for P>nP>n it is generically (after an arbitrarily small change to the data) empty or a smooth manifold of dimension P−nP-n. The global minima of an overparameterized network are not isolated points but enormous continuous families. At each of them the residuals vanish, so the Hessian is exactly the Gauss–Newton matrix J⊤JJ^\top J: at most nn positive eigenvalues and at least P−nP-n zeros, the directions along the manifold.

Liu, Zhu & Belkin (2022) drew a sharp consequence: the manifold of solutions is curved, so the loss is not convex in any neighborhood of a global minimizer, and local-convexity arguments fail exactly where an underparameterized analysis would use them. What replaces convexity is a lower bound on the gradient.

DerivationA PL inequality from the tangent kernel
  1. 12∥∇L∥2=12 r⊤JJ⊤r=12 r⊤Kr  ≥  12 λmin⁡(K)∥r∥2=λmin⁡(K) L\tfrac12\norm{\nabla\loss}^2=\tfrac12\,\mathbf r^\top JJ^\top\mathbf r=\tfrac12\,\mathbf r^\top K\mathbf r\;\ge\;\tfrac12\,\lambda_{\min}(K)\norm{\mathbf r}^2=\lambda_{\min}(K)\,\loss

    With L=12∥r∥2\loss=\frac12\norm{\mathbf r}^2 and ∇L=J⊤r\nabla\loss=J^\top\mathbf r, the squared gradient is a quadratic form in the tangent kernel K=JJ⊤K=JJ^\top:

  2. rank⁡K≤min⁡(n,P)⟹λmin⁡(K)=0  whenever P<n\operatorname{rank}K\le\min(n,P)\quad\Longrightarrow\quad\lambda_{\min}(K)=0\ \text{ whenever }P<n

    So wherever λmin⁡(K)≥μ>0\lambda_{\min}(K)\ge\mu>0, the loss satisfies the Polyak–Łojasiewicz inequality with L⋆=0\loss^\star=0, which Liu, Zhu & Belkin call PL*: the gradient can be small only where the loss is. KK is n×nn\times n with rank at most min⁡(n,P)\min(n,P), so this needs P≥nP\ge n. Overparameterization is what makes a well-conditioned kernel possible.

  3. L(θt+1)≤L(θt)−η2∥∇L(θt)∥2≤(1−ημ) L(θt)⟹L(θt)≤(1−ημ)t L(θ0)\loss(\boldsymbol\theta_{t+1})\le\loss(\boldsymbol\theta_t)-\frac\eta2\norm{\nabla\loss(\boldsymbol\theta_t)}^2\le(1-\eta\mu)\,\loss(\boldsymbol\theta_t)\quad\Longrightarrow\quad\loss(\boldsymbol\theta_t)\le(1-\eta\mu)^t\,\loss(\boldsymbol\theta_0)

    On a Λ\Lambda-smooth loss a step η≤1/Λ\eta\le1/\Lambda lowers the loss by at least η2∥∇L∥2\frac\eta2\norm{\nabla\loss}^2 (the argument of Mini-Batch SGD & Momentum, without noise). PL turns that into linear convergence to zero loss, with no convexity anywhere:

The catch is that KK changes as the weights move. Liu, Zhu & Belkin (2022) proved that if PL* holds with constant μ\mu on a ball around the initialization of radius R=2LF∥u(0)−y∥/μR=2L_F\norm{\mathbf u(0)-\mathbf y}/\mu, with LFL_F a Lipschitz constant of the map from weights to outputs, then the ball contains a global minimizer and gradient descent with a small enough step converges to one linearly; and that wide enough networks satisfy PL* on such balls when their initial tangent kernel is well-conditioned. Du, Zhai, Póczos & Singh (2019) had shown this for two-layer ReLU networks with width polynomial in nn, by bounding how far the kernel matrix drifts. These proofs live near the lazy regime; that feature-learning networks also drive their training loss to near zero, even on random labels (The Generalization Puzzle), is observed far more widely than it is proven.

Predict before you look

A network with P=10,000P=10{,}000 parameters fits n=1,000n=1{,}000 scalar targets exactly under the squared loss, and its Jacobian has full rank at the solution. How many eigenvalues of the Hessian are exactly zero there?

Show the answer

9000

H=J⊤JH=J^\top J has rank n=1,000n=1{,}000, so P−n=9,000P-n=9{,}000 eigenvalues vanish, one for each direction of the 9,0009{,}000-dimensional manifold of solutions through that point. Measured Hessians of trained classifiers show the same structure, a huge bulk of eigenvalues at or near zero (The Hessian of a Deep Network).

Key takeaways

  • Near a strict saddle the offset along a negative direction grows by 1+η∣λ∣1+\eta\abs\lambda per step: escape time is logarithmic in the start's distance from the ridge but inversely proportional to ∣λ∣\abs\lambda. Random starts almost surely avoid strict saddles, perturbations make escape efficient, and high-loss critical points are believed to be mostly saddles.
  • Landscapes are viewed along the line from initialization to solution, on filter-normalized random planes and on the segment between two solutions. Raw directions confuse sharpness with weight scale, and any barrier between two solutions certifies nonconvexity.
  • A linearized network trains by du/dt=−K(u−y)d\mathbf u/dt=-K(\mathbf u-\mathbf y) with the neural tangent kernel K=JJ⊤K=JJ^\top. When KK stays fixed (infinite width in the NTK parameterization, or a large output scale) training is lazy kernel regression; practical networks learn features and do much better.
  • Gradient descent can converge only to minima with λmax⁡<2/η\lambda_{\max}<2/\eta; in full-batch training the sharpness rises to about 2/η2/\eta and hovers there, the edge of stability.
  • With P>nP>n the zero-loss set is generically a (P−n)(P-n)-dimensional manifold with at least P−nP-n zero Hessian eigenvalues. If λmin⁡(K)≥μ>0\lambda_{\min}(K)\ge\mu>0 the loss satisfies PL and gradient descent converges linearly, which wide networks provably achieve near their initialization.

Check yourself

In the interactive lesson these are scored with your confidence, and what you miss comes back for review.

Question 1

At a critical point the Hessian has eigenvalues 3.03.0, 0.50.5 and −0.002-0.002, and gradient descent runs with η=0.1\eta=0.1. What happens to an iterate that starts close to this point?

  1. It converges to the point, a local minimum, because most eigenvalues are positive
  2. It escapes along the negative direction, but slowly: the offset there grows by only a factor 1.00021.0002 per step
  3. It diverges, because one eigenvalue is negative
  4. It escapes at once along the direction with eigenvalue 3.03.0
Show the answer

B. It escapes along the negative direction, but slowly: the offset there grows by only a factor 1.00021.0002 per step

One negative eigenvalue makes this a strict saddle. Along it the offset grows by 1+η∣λ∣=1.00021+\eta\abs\lambda=1.0002 per step, so growing an offset of 10−310^{-3} to size 11 takes about ln⁡1000/0.0002≈35,000\ln1000/0.0002\approx35{,}000 steps: a plateau, not a trap.

Question 2

Which statement describes the lazy (kernel) regime of training?

  1. The tangent kernel stays nearly constant, so the trained network is kernel regression on the fixed features ∇θf(x;θ0)\nabla_{\boldsymbol\theta}f(\mathbf x;\boldsymbol\theta_0)
  2. The weights do not change at all during training
  3. The network cannot reach zero training loss
  4. Only networks of infinite width can be in it
Show the answer

A. The tangent kernel stays nearly constant, so the trained network is kernel regression on the fixed features ∇θf(x;θ0)\nabla_{\boldsymbol\theta}f(\mathbf x;\boldsymbol\theta_0)

The weights move enough to fit the data but too little to change the Jacobian, so du/dt=−K(u−y)d\mathbf u/dt=-K(\mathbf u-\mathbf y) with a fixed KK: a kernel method, which reaches zero training loss when KK is positive definite.

Question 3

The PL argument above bounds 12∥∇L∥2≥λmin⁡(K) L\frac12\norm{\nabla\loss}^2\ge\lambda_{\min}(K)\,\loss with K=JJ⊤K=JJ^\top. Why does it require at least as many parameters as training examples?

  1. Because the Hessian must be positive definite
  2. Because KK is an n×nn\times n matrix of rank at most min⁡(n,P)\min(n,P), so λmin⁡(K)=0\lambda_{\min}(K)=0 whenever P<nP<n
  3. Because gradient descent needs at least PP steps
  4. Because with fewer parameters than examples the loss would be convex
Show the answer

B. Because KK is an n×nn\times n matrix of rank at most min⁡(n,P)\min(n,P), so λmin⁡(K)=0\lambda_{\min}(K)=0 whenever P<nP<n

K=JJ⊤K=JJ^\top with J∈Rn×PJ\in\R^{n\times P}, so its rank cannot exceed PP. With fewer parameters than equations some residual direction lies in the null space of KK, the bound degenerates, and zero loss is in general not even reachable.

Question 4

Full-batch gradient descent runs with η=0.02\eta=0.02. Late in training you measure a sharpness λmax⁡≈101\lambda_{\max}\approx101, while the loss keeps decreasing, though not monotonically. What is the best interpretation?

  1. A bug: a sharpness above 2/η=1002/\eta=100 means the run must diverge within a few steps
  2. The minimum is flat, since 101101 is a small number
  3. The learning rate is too small to matter
  4. Training is at the edge of stability: the sharpness rose until it reached about 2/η2/\eta and now hovers just above it
Show the answer

D. Training is at the edge of stability: the sharpness rose until it reached about 2/η2/\eta and now hovers just above it

Cohen et al. (2021) found exactly this across architectures: progressive sharpening up to 2/η2/\eta, then a long phase with the sharpness just above the threshold and a loss that oscillates over short timescales but decreases over long ones. The quadratic theory predicts divergence only on a region of fixed curvature, which this is not.

Go deeper

Further reading

  • Y. Dauphin, R. Pascanu, C. Gulcehre, K. Cho, S. Ganguli & Y. Bengio, "Identifying and attacking the saddle point problem in high-dimensional non-convex optimization," NeurIPS (2014).
  • H. Li, Z. Xu, G. Taylor, C. Studer & T. Goldstein, "Visualizing the loss landscape of neural nets," NeurIPS (2018).
  • L. Chizat, E. Oyallon & F. Bach, "On lazy training in differentiable programming," NeurIPS (2019).
  • J. Cohen, S. Kaur, Y. Li, J. Z. Kolter & A. Talwalkar, "Gradient descent on neural networks typically occurs at the edge of stability," ICLR (2021).
  • C. Liu, L. Zhu & M. Belkin, "Loss landscapes and optimization in over-parameterized non-linear systems and neural networks," Applied and Computational Harmonic Analysis (2022).