ML Systems Lab Open interactive version →
Advanced 55 min read saddle-pointsflat-minimasharp-minimaSAMdouble-descent

Loss Landscape Geometry

Saddle points dominate in high dimensions, flat minima generalize, and why sharp minima are the enemy.

Classical optimization theory built its intuitions on low-dimensional problems with well-behaved loss surfaces.

Deep network loss landscapes violate essentially every assumption. The first assumption to fall was that local minima are the main obstacle. In n dimensions, a true local minimum requires all n eigenvalues of the Hessian to be positive — meaning the loss rises in every possible direction. If each eigenvalue is independently positive with probability 0.5, the chance that all n are positive is (0.5)^n. For n=10^6 parameters, this is astronomically improbable. Saddle points — where some directions go up and others go down — dominate the landscape.

The second assumption to fall was that all minima are equivalent. Hochreiter & Schmidhuber (1997) proposed, and Keskar et al. (2017) confirmed, that sharp minima (narrow basins, high curvature) generalize poorly while flat minima (wide basins, low curvature) generalize well. A sharp minimum sits at the bottom of a narrow valley — shift the parameters slightly and the loss spikes. A flat minimum sits in a broad bowl — the loss stays low across a wide region of parameter space. Test data is not identical to training data, so test-time parameters are always slightly shifted from training-time parameters. Flat minima survive this shift; sharp minima do not. The third assumption to fall was the classical bias-variance tradeoff: that overfitting necessarily worsens past the interpolation threshold. Double descent showed the opposite — overparameterized models generalize better than models at the interpolation boundary, because gradient descent finds the simplest interpolating solution, which happens to generalize well.

Key points

Takeaway

Local minima are not the obstacle — they barely exist in high dimensions. Sharp minima are the obstacle: they achieve low training loss but generalize poorly because the solution is fragile to parameter perturbation. Every generalization-focused technique in modern deep learning — small batches, weight decay, dropout, SAM — is ultimately a mechanism for steering the optimizer away from sharp minima and into flat, wide basins.

Recap

Check your understanding

Q1. Why are local minima less of a concern in high-dimensional deep network loss landscapes than in classical 1D or 2D optimization? Give the probabilistic argument.

Q2. Keskar et al. showed that large-batch training finds sharper minima than small-batch training. What is the mechanistic explanation, and what does this predict about test accuracy?

Q3. Explain the double descent phenomenon. Why does classical bias-variance theory predict it should not exist, and what landscape geometry explains it?

Q4. SAM requires two gradient evaluations per step instead of one. Which two of the following correctly describe when this 2x compute cost is worth paying?

Try it interactively

ML Systems Lab is a free interview-prep platform for ML engineers — work through the full interactive module, quizzes, and drills.

Open ML Systems Lab →