Stanford Online

Loss Landscapes: Basins, River Valleys & Saddle Points | Stanford CS312 Lecture 5 with Suhas Kotha

Published 2026-11-29 · Duration 1:14:45

Summary

This lecture explores the complex geometry of the loss landscape using three mental models: basins, river valleys, and critical points. It contrasts the behavior of models during pre-training versus fine-tuning, demonstrating that weight averaging often yields superior results in the fine-tuning regime (where models share a basin), but not in pre-training. The lecture also provides a crash course on second-order methods, explaining how the Hessian and its eigenvalues characterize the sharpness and structure of local minima and saddle points.

Download summary

Key takeaways

  1. Basin Connectivity and Weight Averaging 17:10

    Weight averaging works effectively in fine-tuning settings because the resulting models tend to share a basin, moving toward the basin's center. However, in pre-training, models often reside in different basins, leading to nonsensical results when averaged, a discrepancy that ensembling (averaging predictions) does not share.

  2. The River Valley Phenomenon 41:40

    Loss landscapes can exhibit a 'river valley' structure where progress is made along a flat 'river direction' while oscillating sharply along 'valley directions.' This hidden progress is often only revealed when the learning rate is annealed (e.g., using WSD), allowing the model to reach the bottom of the valley.

  3. Critical Points and High Dimensions 1:01:40

    Critical points (where the gradient is zero) can be local minima, saddle points, or global minima. In high-dimensional spaces, theoretical analysis suggests that saddle points are far more numerous than local minima, and gradient descent is generally believed to avoid getting stuck in them.

  4. Hessian and Second-Order Methods 1:06:40

    The Hessian (the second derivative of the loss) captures curvature via its eigenvalues. Positive definite matrices correspond to local minima, while indefinite matrices correspond to saddle points. The Gauss-Newton matrix is used as a positive-definite approximation of the Hessian to maintain a well-behaved local quadratic approximation.

More digests on Loss Landscapes

Technical details

  • Loss Landscape Models 150s

    The three mental models discussed are Basins (connectivity), River Valley (oscillation and progress), and Critical Points (minima vs. saddles). The loss landscape is noted to be highly chaotic and dependent on the training setup.

  • Model Soups and Aggregation 1800s

    Model aggregation methods include: 1) Ensemble (averaging predictions, which almost always helps); 2) Uniform Soup (simple weight averaging); and 3) Greedy Soup (filtering models to improve performance).

  • Optimization Algorithms 4100s

    Newton's method uses the inverse of the Hessian for rapid convergence (1/t^2), but is computationally expensive ($p imes p$ matrix). Preconditioned gradient descent rescales curvature. The Gauss-Newton matrix is a positive-definite approximation of the Hessian.

  • Theoretical Guarantees 3900s

    Theoretical models (like random Gaussian objectives) establish a tight correspondence between the error ($\epsilon$) and the index ($\alpha$, the fraction of negative eigenvalues) at critical points. Low error suggests a minimum (low $\alpha$), while high error suggests a saddle point (high $\alpha$).

Mentioned resources

Channel & topics

Watch on YouTube · Back to latest

This independent, AI-assisted summary is provided for commentary and informational purposes. It may contain errors or omit important context. Please watch the original video for the creator's complete presentation. Video, thumbnail, and related copyrights belong to their respective owners.