Orply.

Learning-Rate Changes Reshape Mode Barriers, Cooldowns, and Training Loss

Tatsunori HashimotoStanford OnlineSaturday, December 5, 20268 min read

Optimization outcomes, Tatsunori Hashimoto argues in a Stanford CS312 quiz review, depend on interactions among learning-rate schedules, weight norms and optimizer dynamics. A temporary learning-rate increase can put a run ahead by lowering its effective rate when the schedule returns to baseline, yet leave it behind after the regular cooldown; in a separate experiment, Adam amplified small, noisy gradients in a narrow subspace and sharply increased validation loss.

Mode connectivity depends on how close a run is to a barrier

For the mode-connectivity question, Tatsunori Hashimoto asked students to compare three training setups under a learning rate of 0.01, rather than the assignment’s 0.03. The key was not to treat weight averaging as uniformly reliable: an ensemble is generally at least as good as the loss average, but averaging model weights can underperform the best individual model when there is a barrier between the models’ solutions.

Hashimoto used the assignment’s runs to identify which setup was most exposed to that barrier. Runs one and three were effectively alike. In run one, training was short and the shared prefix was long relative to the part of training that differed, so there was little opportunity for the models to diverge. In run three, the run was long, but the shared prefix was also long; the ensemble, weight average, and best individual model were expected to perform similarly.

Run two was the vulnerable case: it was closest to the barrier. Hashimoto reasoned that a change in learning rate would raise the barrier between modes, making run two most likely to change its relative outcomes. For that setup, he gave the ranking as ensemble first, best individual model second, and weight average third. He connected that prediction to research on linear mode connectivity, which he said finds that increasing the learning rate can raise the barrier.

The related question about when two branches split during training was also a question about the shape of the barrier. The correct curve was option two. Hashimoto ruled out the more dramatic alternatives partly because the candidate fork points ranged from zero to 4,000 updates, while training continued for 9,000 updates; that span did not seem large enough to justify the most extreme changes in final loss. He also noted that with linear learning-rate decay, averaging should not be expected to produce a huge gain over taking the better of the two models.

A learning-rate change can act like a hidden cooldown

A mid-run learning-rate intervention can help at first and still leave a lasting cost. In the assignment’s perturbation experiments, Hashimoto said, an intervention around 4,000 updates initially improved performance relative to the baseline, but the penalty persisted later. He tied the relevant timescale to learning rate multiplied by weight decay, a quantity the class had used to characterize the optimizer’s timescale; in this example it was roughly 3,000 updates.

That pattern explains why the answer to the first intervention question was “ahead, then behind.” The subtlety was why a run with a temporarily higher learning rate could get ahead of a baseline that kept its learning rate fixed. Hashimoto’s explanation drew on the class’s “River Valley” picture and the model’s weight norms. In this setup, the larger run ended with a larger RMS norm. Once the nominal learning rate was returned to baseline, those larger norms made the effective learning rate smaller. From the model’s perspective, the return to baseline therefore behaved like a cooldown.

The implicit cooldown created an early benefit. But the regular cooldown eventually arrived as well, and the intervened run then fell behind. The prediction depends on distinguishing the learning rate written in the schedule from the effective learning rate produced by the schedule together with the weight norms.

The reverse intervention—raising a learning rate that had been too low—was ranked by final validation loss, from lowest to highest: 20%, 40%, no change, then 60%. In other words, 20% performed best and 60% worst among those options. Hashimoto said the 60% intervention was especially risky because it came late enough that its transient effect would persist to the end of training. He presented this ordering as a reasoned prediction, not as something certain.

EMA helps during training, but the final cooldown still matters

For constant-learning-rate runs with exponential moving averages (EMA) of the parameters, the ranking followed the learning rates: the higher rate of 0.015 performed worse than 0.006. Hashimoto’s account of the assignment was that constant-rate EMA could close some of the gap to a decaying schedule, but did not make the higher constant learning rate optimal. The constant-rate settings were still generally too high, so EMA helped without reversing their relative ordering.

The comparison between EMA and non-EMA weights changed near the end of training. EMA remained competitive through most of the run, Hashimoto said, but became worse once the cooldown was nearly complete. The quiz’s correct curve therefore showed EMA helping in the middle and losing ground only at the end. He pointed to research comparing constant-rate EMA with cosine or linear schedules, and said that published results likewise supported EMA’s competitiveness while retaining the very end of cooldown as the stronger approach.

The area removed from the schedule predicts the lasting cost

A temporary dip in learning rate has two distinguishable effects in the resulting regret curve. In the question about a dip at 45% of training, the deeper and shallower interventions produced different troughs, but similar overshoots afterward. Hashimoto attributed the trough to the depth of the learning-rate cut. The terminal convergence, by contrast, depended on the area under the learning rate that had been removed.

Because the two schedules removed roughly the same area despite having different widths and depths, the later overshoot was expected to be similar. Hashimoto said that researchers had made related observations: the area removed from a learning-rate schedule is an important variable for predicting how loss changes after an intervention.

This area-based reasoning also explained why gradual rewarming was worse than an immediate return from the cooldown. The tuned schedule used in the class rose, stayed horizontal, and then declined. Both rewarming choices removed useful steps from the high-learning-rate part of that schedule, which meant undertraining. The more area removed, the larger the expected penalty; gradual rewarming removed more useful progress, so it performed worse. Hashimoto cautioned that rewarming could have different dynamics in adaptation and generalization, which the class might investigate separately.

Hashimoto summarized the connection between the two questions this way: “The lesson across the previous question and this one is basically that we should think about area removed as being a very important ingredient in terms of how much progress we make.”

Edge-of-stability behavior shifts with learning rate and dataset size

The edge-of-stability questions varied both the learning rate and the number of training sequences. Hashimoto emphasized that the observed curves depended on both. In the assignment, sharpness overshot the regime around two divided by the learning rate, then gradually fell back. The rate of that fall depended on dataset size: with more data, overfitting proceeded more slowly, and the system took longer to move back below the critical sharpness.

For the quiz’s larger learning rate and dataset size of 256, Hashimoto predicted that the maximum learning-rate behavior would stay in a band between three and six. The higher learning rate pushed the initial overshoot higher than two; the larger dataset slowed the return from the edge. In the plot he discussed, the result was a prolonged stay in that band, rather than a curve hovering near two as in the assignment’s lower-learning-rate setting. He noted that related plots in the edge-of-stability paper showed similar overshoot and decline patterns.

Network depth affected how quickly the system reached the edge: deeper networks reached it sooner. Hashimoto connected this to progressive sharpening, which he said occurs more rapidly in deeper, more expressive networks. He also added a qualification: comparisons by update count can be confounded by differences in training speed. When plotted against training loss rather than updates, loss itself appeared to drive much of the edge-of-stability behavior. In response to a student’s question about shallow networks training faster, Hashimoto clarified that larger networks can also reduce training and test loss faster over a fixed number of steps.

Weight decay controls sharpness even when the optimizer product is fixed

Applying weight decay to every tensor changed the role of RMSNorm gains. In the assignment, increasing weight decay raised terminal sharpness. Hashimoto explained this as a reparameterization effect: the network could shrink some weights while shifting scale into the RMSNorm gains, changing sharpness through a change in parameterization. If the gains are also decayed, they cannot absorb that scale. The components must shrink together, removing the same route to higher sharpness.

The measured final maximum-eigenvalue ratios for the “every tensor decayed” runs were about 0.67 to 0.72 of the corresponding default runs, across three seeds. Hashimoto identified the correct multiple-choice range as below 0.8: decaying the gains flattened the head and reduced sharpness.

A follow-up compared runs with the same product of peak learning rate and weight decay: 0.001 with 0.3, the default 0.003 with 0.1, and 0.01 with 0.03. Despite the matched product, their final sharpness values differed substantially: 11.5, 6.0, and 3.0, respectively. The run with the highest weight decay had the highest sharpness.

The distinction was that learning rate times weight decay remained useful for optimization, but did not determine sharpness in this comparison. With the default decay mask, weight decay itself set the direction of the sharpness change: more weight decay produced higher sharpness. Treating the matched product as sufficient to predict sharpness would therefore give the wrong ranking.

Adam can amplify small, noisy gradients in a narrow subspace

The final question changed an earlier top-eigenspace experiment. In the assignment, using only the top ten Hessian directions with SGD made almost no progress; those directions contained little of the gradient energy. The quiz instead projected the gradient into that subspace before feeding it to AdamW, carrying over AdamW’s moment estimates from the checkpoint.

Hashimoto predicted a blowup. The issue was not simply that the selected directions had high curvature. They also supplied small, noisy gradients. Adam’s second-moment normalization does not preserve their small scale: it divides by an estimate of the gradients’ magnitude, making the resulting updates effectively large. Combining a low-magnitude signal that had made little progress under SGD with that normalization could drive the model in damaging directions.

The on-screen results showed validation loss rising from 3.39 to 6.89 after 300 steps when AdamW received only the top-subspace component. With the full gradient, it moved from 3.32 to 3.28. Hashimoto’s explanation was that small gradient norm combined with normalization could produce a blowup. A student added the intuition that high-curvature directions can correspond to oscillation across a narrow valley. Hashimoto agreed, while the quiz’s central contrast remained the difference between SGD’s near-inaction on the small top-subspace signal and Adam’s amplification of it.

The frontier, in your inbox tomorrow at 9:00.

Sign up free. A Brief lands every morning and every evening at 9:00 Eastern. No credit card.

Sign up free