Loss Landscapes: Basins, River Valleys & Saddle Points | Stanford CS312 Lecture 5 with Suhas Kotha
Browse Stanford's online courses in deep learning: https://stanford.io/4zhLWFNWhy can you average fine-tuned models but not two models pre-trained from scratch? In this Stanford CS312: Deep Learning Alchemy lecture, PhD student Suhas Kotha presents three mental models of the loss landscape, covering loss basins and mode connectivity, from model soups and task arithmetic to when pre-training runs become averageable, then gives a crash course on the Hessian and second-order methods. Kotha explains the river valley picture of why WSD learning rate decay reveals hidden progress, and closes with saddle points and why gradient descent rarely gets stuck in high dimensions.
Key questions answered in this lecture:
Q: Why can't you average the weights of two separately pre-trained models?
A: Two d8 runs with seeds 42 and 43 each reach about 2.93 loss, but their weight average is basically nonsensical, near random guessing, so they sit in different basins. Kotha finds the permutation symmetry explanation only partly convincing, since matched averaging still trails ensembling.
Q: What are model soups and why does weight averaging work for fine-tuning?
A: Fine-tunes of the same pre-trained model land in a shared basin, so averaging their weights moves toward its center. A uniform soup comes close to the best single model and is best out of distribution; a greedy soup dominates every individual model, and gains grow when the models are further apart.
Q: Is ensembling the same as weight averaging?
A: No. Ensembling averages predictions and almost always helps even for models in different basins, but costs a forward pass per model; weight averaging produces one model and only works when the models share a basin.
Q: What is the river valley loss landscape and how does it explain WSD learning rate schedules?
A: Training at a high learning rate bounces across sharp valley walls while making hidden progress along a flat river direction; full-batch gradient descent shows successive gradients with cosine similarity near -1. Cooling down the learning rate, or averaging weights, drops the model to the river bottom and reveals that progress, which is why WSD loss falls sharply at the end.
Q: Do neural networks get stuck at saddle points or bad local minima?
A: Kotha presents the folklore case that they mostly do not: in high dimensions, saddles outnumber minima by a ratio that grows exponentially, any local minima tend to have error close to the global minimum, and gradient descent almost never gets stuck at a saddle. Kotha cautions that this theory was largely a reaction to practitioners not needing to worry about it.
Q: Why don't we train neural networks with Newton's method?
A: The Hessian is a p by p matrix and can have negative eigenvalues, so practitioners turn to the always-positive Gauss-Newton matrix. One paper shows Gauss-Newton hitting a target loss in around 50 steps versus hundreds or thousands for Adam, but each step costs far more, and Kotha calls the plot suspicious.
Chapters:
0:00 The geometry of the loss landscape
4:20 Three mental models: basins, rivers, saddles
7:24 Averaging two pre-trained seeds fails
8:56 Model soups: weight averaging in fine-tuning
18:23 Task arithmetic in the fine-tuning landscape
19:56 Permutation symmetry and weight matching
22:29 Shared training makes pre-training averageable
26:14 Hessian crash course: eigenvalues and curvature
28:32 Newton, Gauss-Newton, and second-order speedups
38:26 River valley: learning rate decay vs averaging
40:40 Anticorrelated gradients and WSD hidden progress
48:12 Case study: one run for many token horizons
54:18 Saddle points vs local minima in high dimensions
1:10:27 Summary and preview of sharpness
About the speaker:
Suhas Kotha is a Computer Science PhD student at Stanford advised by Percy Liang and Tatsunori Hashimoto, researching language model pre-training, including how to train when compute is abundant relative to data. Suhas co-created CS312: Deep Learning Alchemy and previously studied at Carnegie Mellon University.
Readings:
- Mode connectivity: https://arxiv.org/abs/1802.10026
- River valley: https://arxiv.org/abs/2410.05192
- Dauphin et al. (2014), Identifying and attacking the saddle point problem: https://arxiv.org/abs/1406.2572
Course website: https://deep-learning-alchemy.github.io/
Watch the full CS312 playlist: https://www.youtube.com/playlist?list=PLXRTcAYPI4AU
Recorded October 13, 2026, in CS312: Deep Learning Alchemy, a Stanford University course taught by Tatsunori Hashimoto and Suhas Kotha.
#DeepLearning #LossLandscape #MachineLearning Receive SMS online on sms24.me
TubeReader video aggregator is a website that collects and organizes online videos from the YouTube source. Video aggregation is done for different purposes, and TubeReader take different approaches to achieve their purpose.
Our try to collect videos of high quality or interest for visitors to view; the collection may be made by editors or may be based on community votes.
Another method is to base the collection on those videos most viewed, either at the aggregator site or at various popular video hosting sites.
TubeReader site exists to allow users to collect their own sets of videos, for personal use as well as for browsing and viewing by others; TubeReader can develop online communities around video sharing.
Our site allow users to create a personalized video playlist, for personal use as well as for browsing and viewing by others.
@YouTubeReaderBot allows you to subscribe to Youtube channels.
By using @YouTubeReaderBot Bot you agree with YouTube Terms of Service.
Use the @YouTubeReaderBot telegram bot to be the first to be notified when new videos are released on your favorite channels.
Look for new videos or channels and share them with your friends.
You can start using our bot from this video, subscribe now to Loss Landscapes: Basins, River Valleys & Saddle Points | Stanford CS312 Lecture 5 with Suhas Kotha
What is YouTube?
YouTube is a free video sharing website that makes it easy to watch online videos. You can even create and upload your own videos to share with others. Originally created in 2005, YouTube is now one of the most popular sites on the Web, with visitors watching around 6 billion hours of video every month.