Predicting Training Loss from Learning Rates and Loss Geometry

Stanford’s Tatsunori Hashimoto explains how schedule changes, weight averaging and curvature shaped the course’s optimization experiments.

THTatsunori HashimotoPonente · Stanford University
Canal
Stanford Online
Publicado
5 dic 2026
Vídeo
23:23
Lectura
7 min
Diapositivas
9
Original
inglés
Abrir en YouTube
Al desplazarte, el vídeo se reduce a la esquina inferior derecha y sigue reproduciéndose. Los subtítulos siguen tu idioma de lectura.
Idioma de lecturaDisponible en 2 idiomas
Este artículo aún no está en español, así que se muestra el original en inglés.
RESUMEN

En 30 segundos

A mid-training learning-rate fix can improve validation loss briefly and still leave a model worse at the end. In a CS312 quiz review, Tatsunori Hashimoto explains why the earlier training trajectory, weight norms and later cooldown matter. He also shows that exponential weight averaging can help constant-rate training but lose to a completed cooldown, and that measured sharpness changes when normalization parameters are rescaled or decayed. A final experiment illustrates how feeding small projected gradients into Adam can amplify noise and increase loss.

  1. 1A weight average can cross a higher-loss barrierHashimoto says the higher learning rate changes one ordering because the path between the trained endpoints has a larger loss barrier.
  2. 2Fixing a high rate can help briefly, then fall behindThe earlier trajectory changes weight norms and effective step sizes; the baseline’s later cooldown eventually wins in the displayed run.
  3. 3Averaged weights stay competitive until late cooldownEMA improves the constant-rate examples, but in the displayed decaying run its advantage disappears near the end.
  4. 4Similar removed schedule area can yield similar later penaltiesTwo rate dips with different shapes remove a similar amount of learning-rate area and show similar later overshoot in the course experiment.
  5. 5Measured sharpness depends on how the network is parameterizedDecay applied to normalization gains changes the rescaling available to the model and lowers measured curvature in the quiz runs.
  6. 6Projecting gradients before Adam can amplify noiseThe top-curvature directions have little gradient energy in this assignment; Adam’s normalization produces a large loss increase in the displayed example.

Conclusiones

  1. Assess a learning-rate change over the remaining training run, not only by its immediate effect.
  2. Compare the amount of learning-rate schedule removed as well as the shape of a temporary dip.
  3. Treat weight-averaging and cooldown results as dependent on the schedule and training setup.
  4. Check which parameters are rescaled or decayed before interpreting measured sharpness.
  5. Distinguish projecting gradients before Adam from projecting the updates after its normalization.
TEXTO COMPLETO

Lee el texto editado por capítulos

Solo la transcripción
01

Averaging models depends on their shared training history

Hashimoto compares ensemble predictions and averaged weights at a higher learning rate. He uses a loss barrier to explain why one comparison changes.

Tatsunori Hashimoto reviews quiz predictions about training loss and optimization. The first question revisits an assignment grid with a higher learning rate and asks how three choices compare: averaging model weights, averaging their predictions as an ensemble, and choosing the better individual model.

In the assignment’s examples, the ensemble is at least as good as the average loss of the individual models. Weight averaging can also work when the trained solutions are connected by a low-loss path, but it can be worse than selecting the best endpoint when a barrier separates them.

For the first and third cases, Hashimoto expects the earlier ordering to remain: the short run changes little, while the other has a long shared training prefix. In the second case, increasing the learning rate raises the barrier enough that the best individual model and weight average exchange their positions.

Weight averaging and ensemble loss at a higher learning rate
DIAPOSITIVA 1 / 9Weight averaging and ensemble loss at a higher learning rateThe slide compares losses across three shared-training configurations and shows the changed ordering in one case.

He relates that prediction to linear mode connectivity: one can examine the loss along a straight line between two sets of weights. A higher barrier along that line means a simple weight average may pass through a poorer region, even if the separate endpoints perform well.

The next question asks how the loss gap between the averaged model and the better endpoint changes with the point at which training runs fork. Hashimoto chooses a gradual shape rather than a sharp cliff, based on the assignment’s range of fork points relative to the remaining training.

He also rules out a large advantage for averaging in the plotted setup: with linear learning-rate decay, he does not expect the average to beat the best endpoint by a large amount.

02

Changing the learning rate has lingering effects

Fixing an initially high rate can temporarily improve validation loss before the baseline catches up. A late correction to a low rate can be worse than leaving it alone in this example.

Question two starts with an excessively high learning rate and restores it to the intended value partway through training. The comparison asks how validation loss behaves immediately after that correction and by the end of the run.

Hashimoto points to a characteristic transient of roughly 3,000 updates in this setup. The rate correction can produce an initial gain, while an effect of the earlier trajectory persists for much of the remaining run.

A rate correction helps briefly, then falls behind
DIAPOSITIVA 2 / 9A rate correction helps briefly, then falls behindThe plotted validation-loss difference shows the transient and the baseline’s later cooldown.

The explanation uses the course’s river-valley picture of optimization. A high learning rate leaves the model with a larger weight norm; after the nominal rate is restored, that norm changes the effective step size, producing an implicit cooldown and a temporary benefit.

Eventually the baseline run reaches its intended cooldown and overtakes the corrected run. The plotted answer is therefore “ahead, then behind,” not a permanent gain from the mid-run correction.

The reverse experiment starts with a rate that is too low and restores it at 20%, 40% or 60% of training, or never changes it. In the displayed runs, the final loss ranks the 20% fix best, followed by 40%, no fix, and finally the 60% fix.

When to fix an initially low learning rate
DIAPOSITIVA 3 / 9When to fix an initially low learning rateThe displayed final losses compare corrections at different training points with leaving the rate unchanged.

A late intervention leaves too little time for the transient to dissipate before the run ends. Hashimoto treats the 3,000-step scale as a reason to make a good prediction, not as certainty about every run.

03

Weight averaging helps but does not replace cooldown

Exponential moving averages improve constant-rate runs in the displayed experiment. Hashimoto contrasts their intermediate benefit with the final effect of a learning-rate cooldown.

The third question compares exponential moving averages of weights, or EMA, under constant learning rates. An EMA tracks a smoothed sequence of weights, giving more emphasis to recent values. In the displayed constant-rate experiment, averaging improves the results but the lower rates still rank better.

Hashimoto’s reasoning is that these constant rates remain relatively high for the setup. EMA helps, but not enough in this example to reverse the ordering of the learning rates. He points to research comparing constant-rate averaging with decaying schedules.

During a run with a cooldown, the EMA can remain competitive for much of training. In the shown example it becomes worse than the raw weights only near the very end, when the learning rate has almost finished decaying.

EMA during a cooldown
DIAPOSITIVA 4 / 9EMA during a cooldownThe plot compares averaged and raw weights as the learning rate falls near the end of training.
04

The missing area under a learning-rate schedule matters

Two differently shaped rate dips can produce similar later overshoot when they remove similar total learning-rate area. In the example, a gradual rewarm loses more useful training steps.

Another question compares temporary dips in the learning-rate schedule. The two dips have different shapes and depths, but remove a similar area under the rate curve. Hashimoto says the immediate loss valleys differ, while the later overshoots have similar shapes in the plotted experiment.

His explanation is that the depth of the transient influences the immediate dip, while the amount of learning-rate area removed helps predict the subsequent penalty. He connects this to other work attempting to predict validation-loss changes from schedule interventions.

The following comparison asks whether, after a cooldown, it is better to return immediately to the earlier rate or increase it gradually. In this specific run the gradual rewarm is worse, because it removes more time at the higher rate from an otherwise well-tuned schedule.

Gradual versus immediate rewarming
DIAPOSITIVA 5 / 9Gradual versus immediate rewarmingIn this setup, gradually restoring the learning rate leaves a larger final loss penalty.

The lesson in these two examples is to track how much useful training is removed, not only the visible shape of the rate curve. Hashimoto notes that adaptation and generalization settings can have different dynamics, so the result should be read in the context of this training exercise.

05

Stability depends on learning rate, data and depth

The edge-of-stability experiments vary the learning rate and the full-batch dataset size. Hashimoto also discusses how network depth and training progress affect the observed curves.

The edge-of-stability question varies both the learning rate and the number of examples used in full-batch training. Hashimoto asks students to use their assignment plots to predict how the apparent stability boundary changes under the new settings.

Edge-of-stability behavior in the assignment
DIAPOSITIVA 6 / 9Edge-of-stability behavior in the assignmentThe plots show how learning rate and sample size influence sharpness trajectories.

In the displayed runs, sharpness initially overshoots the simple critical-stability reference and later falls. Dataset size affects how quickly it falls: in this account, a larger dataset delays overfitting and the associated departure from the edge.

For the quiz configuration, the higher learning rate pushes the initial overshoot up, while a larger dataset keeps the trajectory in a higher band for longer. Hashimoto identifies the range three to six for this particular question, rather than treating the textbook threshold as a universal prediction.

Deeper networks reach the edge of stability sooner in the displayed comparison. Hashimoto cautions that network depth is intertwined with training speed: plotting against training loss instead of update count can reveal how much of the behavior tracks progress in optimization.

06

Weight decay and normalization change measured sharpness

The same network can exhibit different curvature after rescaling its parameters. Decaying normalization gains changes the result, and equal learning-rate–decay products need not imply equal sharpness.

The next question concerns sharpness, a measure related here to the curvature of the loss landscape, and weight decay, which penalizes parameter magnitude. In the assignment, stronger weight decay corresponded to higher final measured sharpness.

Hashimoto explains that this measurement depends on parameterization. Scaling one part of a network down and another part up can change the measured curvature without being a simple statement that the represented function itself has fundamentally changed.

The quiz changes the setup by applying weight decay to normalization gains as well. In the assignment, those gains could compensate as other weights shrank; decaying both prevents that same rescaling. The resulting sharpness is lower relative to the default run.

Decaying normalization gains reduces measured sharpness
DIAPOSITIVA 7 / 9Decaying normalization gains reduces measured sharpnessThe slide compares final curvature across seeds under two decay masks.

The displayed ratios are roughly 0.7 of the default sharpness across the shown seeds. The point is to follow which parameters are actually subject to weight decay before predicting the effect on the Hessian, the matrix of second derivatives used to measure local curvature.

A second comparison keeps the product of learning rate and weight decay fixed while varying the two factors. Hashimoto says that product is useful in other optimization reasoning, but it does not by itself determine the sharpness observed in this experiment.

Equal learning-rate–decay products, different sharpness
DIAPOSITIVA 8 / 9Equal learning-rate–decay products, different sharpnessThe three runs hold the product fixed while the individual values and final curvature vary.

With the default decay mask restored, the runs with larger weight decay show larger measured sharpness even when that product is the same. The slide gives an example of substantially different curvature across the three settings.

07

Adam can amplify a small projected gradient

The final example distinguishes projecting Adam’s input gradients from projecting its updates. In the displayed run, normalization of small noisy components leads to a large validation-loss increase.

The final question revisits training in the top eigenspace of the Hessian: the directions with the largest local curvature. The assignment had compared stochastic gradient descent with Adam after projecting updates; the quiz instead projects gradients before giving them to Adam.

In the assignment’s setting, the top ten directions contained little of the gradient’s energy, so using only those components with ordinary stochastic gradient descent produced little progress. The quiz asks what changes when those small components enter Adam first.

Hashimoto says Adam’s second-moment normalization can amplify the small, noisy projected gradients. In the displayed run, this produces a large increase in validation loss, approaching seven, rather than a useful continuation of training.

Adam on projected gradients increases validation loss
DIAPOSITIVA 9 / 9Adam on projected gradients increases validation lossThe plotted experiment compares Adam using only the top-curvature gradient components with a full-gradient run.

A student adds that the selected directions are also the highest-curvature directions in the river-valley picture. Hashimoto agrees, then closes the review. The distinction throughout is between what the assignment measured and a prediction about a modified training run.

Más de este canal

9 diapositivas1:02:09EN
Stanford Online· 4 dic 2026Diyi Yang: When Should a Proactive AI Agent Interrupt?Diyi Yang · Stanford UniversityA helpful personal agent must infer needs, judge when to act and protect information about users and bystanders.Personal agentsHuman-AI CollaborationPrivacy & data governance+2
34:51EN
Stanford Online· 4 dic 2026Aakanksha Chowdhery: AI Agents Improve Only When Outcomes Are CheckedChristina, Aakanksha Chowdhery · Stanford OnlineThe Stanford instructor explains why verification, research judgment and measurable goals matter more than the choice of an agent framework.Ingeniería de agentesEvaluacionesAI agents+2
6 diapositivas1:22:31EN
Stanford Online· 3 dic 2026John Yang: How coding agents learned to work in a terminalJohn Yang · Stanford UniversityFrom execution tests to SWE-agent’s guarded editor, the Stanford researcher explains how evaluations and interfaces shaped coding agents.Agentes de programaciónSoftware engineeringIngeniería de agentes+2
7 diapositivas1:17:10EN
Stanford Online· 1 dic 2026AI Agent Safety Starts With What the Agent Can Actually DoDiyi Yang · Stanford UniversityDiyi Yang explains how agents fail, how untrusted content redirects them, and why safety controls must be built into the system.AI SafetyPrompt injectionIngeniería de agentes+2
3 diapositivas1:48:06EN
Stanford Online· 1 dic 2026Diffusion Language Models Can Revise Text Instead of Writing Left to RightAfshine Amidi, Shervine Amidi · Stanford UniversityThe Stanford lecture explains masked diffusion, its parallel decoding opportunity and the training and latency tradeoffs.Foundation ModelsModelos y entrenamientoDeep Learning+2
3 diapositivas1:22:20EN
Stanford Online· 30 nov 2026How SWE-bench Turned Real GitHub Issues Into an AI TestJohn Yang, Carlos Jimenez, Alexander Wettig · Stanford UniversityIts creators explain why the benchmark was easy to conceive, hard to run, and dependent on human judgment to keep scores meaningful.Agentes de programaciónEvaluacionesBenchmarks+2