30초 요약
Two neural networks can each work well while the average of their weights fails. Stanford researcher Suhas Kotha explains why fine-tunes from a common starting model can instead share a low-loss region, allowing weight averages to improve results without the inference cost of an ensemble. A second picture treats training as movement down a river while bouncing between steep walls: reducing the learning rate can reveal progress hidden by that oscillation. Kotha also surveys theoretical reasons saddle points may be less troublesome than they look in simple drawings, while stressing the limits of those models.
- 1Good endpoints can average into a broken modelTwo independently pretrained models each reach about 2.93 loss, yet their weight average approaches random performance. Good individual models are not automatically compatible in parameter space.
- 2A model soup can combine fine-tunes into one modelFine-tunes from a common pretrained model can be averaged. A greedy soup keeps only candidates that improve the combination, while an ensemble keeps separate models and averages their predictions at higher inference cost.
- 3Shared early training can make later branches averageableA cited pretraining experiment branches one shared run into separate models. After enough shared early training, the branches can be averaged without the severe failure seen between independent runs.
- 4Fewer optimizer steps do not necessarily mean less computeA study reports a Gauss–Newton method reaching a target loss in far fewer steps, but each step is much more expensive. Kotha also questions part of the reported optimizer comparison.
- 5Opposing gradients can hide progress along a valleySuccessive full-batch gradients in a cited study become nearly opposite even as the parameters move. Cooling the learning rate can reveal lower loss after a period of oscillation.
- 6One training run can support checks at multiple budgetsShort cooldown branches from a shared run estimate performance at several token horizons. A constant peak learning rate may still be suboptimal for some budgets.
- 7Saddle-point theory is useful but rests on model assumptionsHigh-dimensional random objectives can have many more saddles than minima, and particular theorems show saddle avoidance. Kotha distinguishes those simplified results from a general guarantee for all neural networks.
핵심 정리
- Do not assume independently pretrained models can be combined by averaging weights; test whether the interpolation maintains low loss.
- Fine-tunes from a common pretrained model can often be averaged into one model, avoiding the inference cost of an ensemble.
- Prediction ensembles and weight averages are different: the former can help even when the models occupy different basins.
- Compare cooldowns or trajectory averages to assess progress hidden by a high learning rate.
- Second-order methods may need fewer updates, but their higher per-step compute can erase that advantage.
- Theorems about saddle avoidance and favorable minima rely on assumptions and simplified settings.
챕터별로 다듬은 전문 읽기
Why a one-dimensional loss curve is incomplete
Model architecture and many parameter directions make the true loss landscape hard to picture. Kotha introduces basins, river valleys and critical points as partial mental models.
A loss landscape maps a model's parameters to its error. Gradient descent looks locally at which direction reduces that error and repeatedly updates the parameters. The familiar one-dimensional drawing is useful but leaves unanswered how many minima exist, whether training gets stuck, and how sharply the landscape curves.
The answer can also depend on the model itself: adding residual connections can change a very bumpy picture into a smoother one. There is no guarantee that an arbitrary loss landscape has the convenient properties in our sketches. Researchers instead use slices, experiments and summary statistics to develop limited but useful intuitions.
Today I will use three models: basins, river valleys and critical points. If two trained models lie in a shared basin, averaging their weights may produce another good model. If they lie in different basins, the average may perform badly.
In the river-valley picture, there is a relatively flat direction along which training makes progress, and steep directions across the valley. Instead of moving smoothly down the river, training can oscillate between the valley walls while progressing along it. The third picture concerns points where the gradient vanishes: minima and saddle points can each stop a naive update if reached exactly.
When model weights can be averaged
Independent pretrained runs can average badly, while related fine-tunes can produce useful model soups. Prediction ensembles are a different and more expensive operation.
Consider two models trained from scratch with different random seeds. Each reaches loss around 2.93, but a model made by averaging their weights is essentially nonsensical, close to random guessing. The interpolation between their weights goes through high loss, suggesting they do not share a basin in this sense.
Fine-tuning gives a contrasting example. In the Model Soups study, researchers begin with a shared pretrained model and fine-tune multiple versions for ImageNet, varying hyperparameters. They compare performance both on the target distribution and on changed, out-of-distribution data.
One choice is to select the single best model. Another is an ensemble: keep the models separate, run every one at inference and average their predictions. That can improve performance, but an ensemble of 20 requires 20 forward passes for each input.
A uniform soup instead averages all the model weights to create one model. A greedy soup sorts candidate models by performance and adds an ingredient only when it improves the aggregate. In the reported experiment, the uniform soup is close to the best individual model and best on the out-of-distribution evaluation, while the greedy soup outperforms each individual model on the plotted measures.
A cleaner experiment fine-tunes five models with the same settings and different seeds. Both ensembling and weight averaging improve on the individual fine-tunes. In this paper the ensemble is slightly better in distribution, while weight averaging is slightly better out of distribution; this is an observed result for this setting, not a universal rule.
A student asks whether averaging weights generally helps. It does in the fine-tuning examples, but the naive average of separately pretrained models failed. Ensembling can improve predictions even when models are in different basins, so ensemble success alone does not show that their weights are connected.
One geometric interpretation is that fine-tunes from the same initialization settle around a common basin. Their average moves toward its center and can improve performance. The study also finds larger averaging gains when the fine-tuned models are further apart, measured by the angle between their weights.
Changing hyperparameters as well as random seeds makes models more different and can improve the aggregate. But it can also produce bad candidates, so the greedy procedure filters out those that hurt. Which combination is best remains dependent on the models and evaluation.
Fine-tuning weights can support other arithmetic. A change in weights induced by fine-tuning can be added, subtracted, or combined with another task's change. Reversing a task-specific change can hurt performance on that task while affecting a control task less, showing a degree of structure in that region of weight space.
Matching neurons and sharing early training
Permutation matching improves some averages but leaves a gap with ensembling in the example. Branching after shared early training offers another way to create compatible models.
Why is averaging independent pretraining runs much harder? One proposed explanation is permutation symmetry: rearranging corresponding neurons and their incoming and outgoing weights can preserve a network's function while changing its parameter coordinates. Matching those coordinates before averaging may bring models closer.
I find the evidence mixed. Weight-matching methods can substantially improve an average that was originally nonsensical, but in the shown comparison an ensemble of the same endpoints still performs better. The remaining gap could mean permutation alone is insufficient, or that the matching method needs improvement.
Another strategy is to make pretraining resemble fine-tuning. Train one model jointly at first, then branch it into separate runs and test whether their weights can be averaged. In the cited experiment, a relatively short shared early phase was enough for the later branches to become averageable; branching immediately resembled independent pretraining.
This gives a practical question for experiments: how much training must be shared before two branches can be combined? A student also asks whether differing weight magnitudes should be normalized before averaging. I do not have a settled intuition, although reparameterization and tangent-space averaging may be relevant.
What curvature adds to an optimization step
The Hessian describes local curvature but is expensive to compute and can contain negative directions. Gauss–Newton provides another approximation, with potential step-count gains and substantial computational cost.
To understand the remaining pictures, consider the Hessian: a matrix of second derivatives describing local curvature of loss with respect to the model's parameters. With p parameters it has p by p entries. Its eigenvectors describe directions in parameter space, and their eigenvalues describe curvature along those directions.
A large-magnitude eigenvalue indicates a sharp direction; one near zero indicates a flat direction. Positive curvature opens upward, and negative curvature opens downward. At a stationary point, positive curvature in every direction indicates a local minimum, while a mixture of positive and negative curvature indicates a saddle.
The Hessian supplies a local quadratic approximation. If we could invert it, we could rescale the gradient differently in each direction: that is the idea behind Newton's method. Under suitable theoretical assumptions, second-order information can reduce the number of updates, but computing and storing a full p-by-p matrix is prohibitively expensive for large networks.
A noisy quadratic model illustrates preconditioning. Without it, the steepest direction restricts the learning rate needed to keep updates stable. Ideal preconditioning rescales directions so that progress is more uniform, although noise and the eventual steady-state error also matter.
The Hessian has another difficulty: negative eigenvalues make the local quadratic model open downward in some directions. That approximation can suggest unbounded improvement even though it cannot be trusted arbitrarily far away. A Gauss–Newton approximation captures positive-semidefinite curvature and avoids that particular problem.
Measurements on transformers show both positive and negative Hessian eigenvalues, with a group of large values and a decaying bulk. The corresponding Gauss–Newton spectrum is nonnegative. These plots are formed by estimating the eigenvalues and sorting them; their count corresponds to the number of parameter dimensions.
One study comparing optimizers reports that full Gauss–Newton reaches a target loss in roughly 50 steps, while Adam and other methods can take hundreds or thousands. Each second-order step costs much more, so fewer steps do not automatically mean less total compute. A layer-wise approximation treats the layers separately and can be more tractable.
Asked about Adam, I suggest thinking of it as diagonal preconditioning rather than full quadratic preconditioning, while noting uncertainty about the precise relationship. There may be situations where step count itself matters, such as when abundant parallel compute makes each expensive step fast in wall-clock time.
I would not take the illustrated optimizer comparison too literally: its apparent tenfold advantage for SGD over AdamW looks suspicious to me. The broad possibility that Gauss–Newton needs substantially fewer steps is interesting, but the reported empirical comparison warrants skepticism.
How cooling reveals progress in a river valley
Successive updates can alternate across steep directions while making progress in flatter ones. Learning-rate decay and averaging offer ways to reduce the effects of oscillation.
In the river-valley picture, the Hessian gives a way to describe steep and flat directions. A noisy quadratic model also predicts a residual risk when training keeps a constant learning rate. Two classical ways to reduce that residual are decreasing the learning rate and averaging the weights along the training trajectory.
Polyak averaging maintains an equal-weight average of past iterates. Intuitively, if a high learning rate makes weights bounce around a minimum, the average can concentrate nearer its center. The relevant convergence result for the simplified model eliminates the residual as the number of steps grows, unlike the constant-rate steady-state term.
A study of full-batch gradient descent measured the cosine similarity of consecutive gradients. After some time it was near minus one: successive gradients pointed almost directly opposite ways. Stochastic gradients also show negative correlation, though random noise obscures it because unrelated noise vectors tend to have cosine similarity near zero.
Despite those opposing gradients, the parameters continue moving away from initialization. In the valley analogy, the optimizer bounces across steep walls while also progressing in a flatter direction. An apparently poor current checkpoint can therefore conceal progress that becomes visible after the learning rate falls.
A warmup–stable–decay schedule keeps the learning rate high through a stable phase and then cools it down. The observed loss can stay relatively high before dropping during decay. The river picture interprets that drop as reduced oscillation revealing the lower valley reached through prior training.
A student points out that a noisy quadratic model can predict a similar effect without a separate river story. That is right: a quadratic with one sharp and one flat direction is compatible with the valley picture, and the classic results for averaging and learning-rate reduction come from analyzing such quadratics.
The valley picture also motivates trying repeated cooling and rewarming. After lowering the learning rate to inspect performance, one can raise it again, resume movement along the valley and cool later. Whether this incurs a meaningful penalty is an empirical question to test, not a guaranteed consequence of the sketch.
Weight averaging offers another possible way to reveal progress. It can use an equal average of previous weights or an exponential moving average that favors recent weights. The comparison to cooling down must be measured: averaging may match, exceed or leave performance on the table.
A fine-tuning study also averages the pretrained starting point with the final fine-tuned model and obtains a favorable tradeoff between target and out-of-distribution performance. An exponential moving average during training helps too, but does not recover all the gain available from averaging with the initialization.
That difference is a way to compare mental models. Both the basin and river stories predict some benefit from averaging, yet their gains need not be identical. If combining two interventions improves performance beyond either alone, it suggests they may explain different aspects of training rather than the same phenomenon.
Comparing token budgets with a shared run
Short cooldown branches and alternative schedules can estimate quality at several training horizons. Their tradeoffs must be checked because a single peak rate need not suit every budget.
Consider a practical problem: comparing model quality at several training-token budgets. Running a separately tuned learning-rate schedule for each budget is expensive. One alternative is a shared stable-rate run with short cooldown branches at chosen checkpoints, revealing performance at multiple horizons.
A constant peak rate is not necessarily optimal at every budget: the best rate may fall as the token horizon grows. A horizon-free schedule can slowly lower the peak while still cooling at each measured endpoint; cyclic schedules and weight averaging offer other approaches. These alternatives trade compute and possible loss in quality, so they should be compared experimentally.
A student asks why more high-rate training counts as hidden progress if the visible loss hardly improves. The practical test is to cool several checkpoints: later checkpoints may reach lower losses after cooling even when their high-rate losses look similar. The sloping river is an intuition for this result, and I defer a fuller explanation of the dynamics to the next lecture.
Why high-dimensional saddles need different intuition
Random-objective and simplified-network theories suggest that saddles can greatly outnumber minima, and that some bad minima may be uncommon. The assumptions constrain how far those results can be generalized.
High-dimensional landscapes are difficult to visualize directly. A noisy quadratic can include many independent directions even if our drawing has only two. This matters when reasoning about critical points, because one-dimensional pictures encourage intuitions that may not hold in many dimensions.
Historically, researchers worried that training would stop at a bad local minimum or a saddle where the gradient is zero. In practice, standard methods often work without elaborate mechanisms explicitly designed to escape such points. The following explanations are more theoretical and rely more on simplified models than the preceding averaging experiments.
Three common arguments are that high-dimensional landscapes have many more saddles than minima; that some studied problems have no bad local minima, or that their local minima have low error; and that gradient descent almost surely avoids strict saddles under the conditions of the relevant theorems. These are intuitions and results for particular settings, not a blanket guarantee for every neural network.
One statistical-physics approach studies random loss functions rather than an arbitrary trained network. Define error as the gap from the global minimum, and index as the fraction of Hessian eigenvalues that are negative. In the random model discussed, those quantities concentrate around a relationship: larger error is associated with a larger negative-curvature fraction.
The consequence in that model is that high-error critical points tend to be saddles, while points with no negative curvature tend to have low error. The reasoning uses random-matrix theory: a suitable Gaussian random matrix has eigenvalues distributed according to a semicircle, and at a critical point the model's spectrum is shifted according to the error.
In the low-error case, the shifted spectrum falls mostly on the positive side; at high error, more eigenvalues are negative. In the random model, increasing the number of dimensions greatly increases the ratio of saddle points to local minima. A one-dimensional drawing therefore gives a misleading sense of which critical points dominate.
A student asks how a random objective relates to an actual training problem. In practice researchers can directly measure error and the fraction of negative eigenvalues at observed points. The plot shown has a correlation broadly consistent with the theoretical picture, though it does not make a random-objective theorem universal.
Other theoretical examples include particular matrix-completion problems with no spurious local minima and simplified one-layer networks with favorable critical points. Other constructions do have local minima. These cases are useful for building intuition, but their assumptions matter.
Researchers have proposed perturbing parameters to escape saddles, which can still slow training. Separate theoretical work shows that ordinary gradient descent almost surely avoids certain saddles under its assumptions and, when convergence conditions hold, reaches a local minimum. That does not identify which minimum a real model will reach.
In a deep linear network, another simplified setting, training can move through regions near successive saddles. The number of positive-curvature directions rises along this conceptual path toward a minimum. These pictures suggest experiments, rather than establishing that every modern network follows the same trajectory.
Where the mental models stop
The lecturer discusses plateaus, summarizes the three pictures and answers questions about multiple flat directions and complementary forms of averaging.
A student asks why a training curve eventually levels out if the optimizer need not be trapped. Model size can limit performance, and the number of parameters can itself affect the landscape and training speed. I do not claim that the saddle analysis fully answers why a particular run plateaus.
We have three complementary pictures. Shared basins explain when a single averaged model may work; the river valley suggests why cooling or trajectory averaging can expose progress; and critical-point theory offers reasons not to assume every plateau is a bad minimum. The theory was developed partly in response to practitioners finding that ordinary training already worked.
A final question asks whether a language model has one river direction. Not necessarily: many small eigenvalues can correspond to flatter directions and larger ones to sharper directions, without a precise one-to-one mapping from eigenvectors to rivers and walls. These are deliberately soft mental models.
Another student asks again about the comparison between fine-tune averaging and the moving average. A moving average improves on the standard fine-tune, but averaging it with the original pretrained initialization can improve results further. That is evidence in the shown experiment that the basin perspective retains explanatory value beyond the river-valley account.
같은 채널의 다른 글
20:46EN
1:20:02EN
1:08:53EN
1:10:50EN
1:18:42EN
1:21:11EN