Schedules Without a Horizon
Warmup–stable–decay, schedule-free optimization and why cooldowns work.
A cosine schedule has to be told when training will end. Stop early and the model never cools down; carry on past the end and the rate is too small to make progress; compare two run lengths and you need two runs from scratch. This lesson covers the two ways out, holding the rate constant and branching off a short cooldown whenever a model is needed, or averaging iterates instead of decaying at all, and the convex theory that, surprisingly, predicts the shape of real loss curves under cosine and warmup–stable–decay schedules.
What you’ll learn
- Explain why a horizon-dependent schedule complicates stopping, extending and comparing runs, and why the last iterate of SGD cannot be good at every step without a known horizon.
- Describe warmup–stable–decay training and its evidence: the length and shape of the cooldown, its match with cosine and the savings for scaling-law studies.
- Estimate how much noise a cooldown of length leaves, and use the convex last-iterate bound for a general schedule: a constant rate pays a factor that a cooldown removes, and linear decay attains .
- Derive that averaging SGD's iterates implements a linear decay ending at the current step, state schedule-free SGD and its guarantee, and weigh its practical record.
Training without an end date
Learning-Rate Schedules & Warmup listed the symptoms of tying a schedule to its horizon : a run stopped early never cools down, a finished run cannot usefully be continued, and every training length to be compared costs a run from scratch. Behind them sits a theorem from the same lesson: for least squares, whatever the step sizes, the last iterate of SGD is far from optimal infinitely often unless is fixed in advance (Ge, Kakade, Kidambi & Netrapalli, 2019). An anytime method must therefore change what it returns, not only its step sizes. Three ideas have been tried.
| Approach | Fixed in advance | Cost of a model at a new step | Record |
|---|---|---|---|
| Warm restarts (SGDR) | the cycle lengths, e.g. doubling each time | none, but only at the end of a cycle | designed for anytime performance (Loshchilov & Hutter, 2017); each restart temporarily worsens the loss |
| Constant rate with branched cooldowns (WSD) | the peak rate | a cooldown of 10–20% of the steps taken so far | matches cosine on language models (Hu et al., 2024; Hägele et al., 2024) |
| Averaging the iterates (schedule-free methods, tail averages) | the averaging rule | none: the average is always current | Schedule-Free AdamW won the self-tuning ruleset of the 2024 AlgoPerf competition; plain averages trail a cooldown |
Warmup–stable–decay
Zhai, Kolesnikov, Houlsby & Beyer (2022) wanted to train each vision transformer for several durations, to map the trade-off between model size and training time. With linear decay each duration needed its own run, so they tried "infinite" schedules (a constant rate, a reciprocal square root, or a trapezoid of warmup, constant phase and decay), each finished by a linear cooldown toward zero. Linear decay was still slightly better when the duration was known in advance, but all three came reasonably close and allowed indefinite training, with many durations evaluated from one run. Hu et al. (2024) named the trapezoid warmup–stable–decay (WSD) while training the MiniCPM language models: the loss fell sharply as soon as the decay began, a decay over 10% of the tokens was enough while 2.5% fell short, and training could resume at the high rate from the checkpoint taken before a decay.
Hägele, Bakouch, Kosson, Ben Allal, Von Werra & Jaggi (2024) then compared WSD with cosine systematically, on language models of up to 8 billion parameters:
- With each peak tuned, a constant rate followed by a linear cooldown over the last 20% of the steps matched cosine's final loss at every training length tested, and the best constant rate was about half the best cosine peak.
- A cooldown shaped like beat a linear one, increasingly so for longer runs. The gain from a longer cooldown leveled off near 20% of the steps, and long runs needed even less: 10,000 cooldown steps at the end of a 200,000-step run nearly matched cosine.
- The loss falls smoothly along the straight line from the checkpoint before a cooldown to the one after it; in their words, "the cooldown phase is a smooth transition to a basin in the loss landscape."
- Averaging the weights along the constant-rate branch improved the loss without any decay, but did not reach a cooldown.
You want models trained on , , and tokens. Separate cosine runs cost tokens of training. With one WSD run and a cooldown over the last 20% of each budget, forked from the stable branch, how many does the whole study cost?
Show the answer
9.4
The stable branch must reach the last fork at , and the four cooldowns add : in all, about 37% less than , and each further budget costs only its own cooldown. For the Chinchilla study, with four token counts per model size and 10% cooldowns, Hägele et al. (2024) estimated about FLOPs instead of .
Why a short cooldown is enough
Three accounts of the sudden drop have been proposed, and they are compatible. The first needs nothing but the noise floor, and it says exactly how much noise a cooldown removes.
Continue the one-direction model of Learning-Rate Schedules & Warmup, with curvature and gradient noise of variance , in continuous time. A linear cooldown of steps from the rate has rate when steps remain. Counting time backward in , the variance obeys a linear equation:
Multiply by the integrating factor and integrate from the start of the cooldown, , to its end, . The starting variance survives only with weight , negligible once the cooldown is longer than the relaxation time , and the Gaussian integral finishes the job:
The excess loss , compared with the floor of the constant rate, is smaller by a factor of order , the square root of the cooldown length measured in relaxation times:
The discrete recursion agrees: for and the formula and exact iteration both give an excess loss of (computed for this lesson), about 5% of the floor, and each doubling of multiplies the leftover by to , against the predicted . Three consequences match the experiments. Stiff directions relax within a few steps, so even a short cooldown cleans them, and when the gradient noise is aligned with the curvature, as in the widget's model, they carry most of the noise floor: the loss falls as soon as the decay starts. Beyond that, returns diminish like , consistent with the plateau Hägele et al. found near 20% of the run. And directions whose relaxation time exceeds the cooldown keep their noise, but also the progress they made at the high rate, because a cooldown spends little area.
A landscape picture. Wen, Li, Wang, Hall, Liang & Ma (2025) conjecture that language-model losses have a river valley shape: steep "mountain" directions across a valley whose floor, the river, descends slowly. At a high rate the iterate oscillates up the valley walls, so the loss looks high, while it travels quickly along the river; the decay damps the oscillation and reveals the progress already made. In their analysis the stable phase drives progress along the river and the decay handles the mountain directions, so both are needed, and such a landscape already emerges when pretraining on a simple bigram dataset. It is the same division of labor as in the noise-floor account, with stiff directions as the walls and flat ones as the river. They also proposed WSD-S, which resumes the main branch from each decayed checkpoint rather than from before the decay, and found it better than WSD and cyclic cosine at producing models for several compute budgets in one run, at 0.1 to 1.2 billion parameters.
What convex theory predicts
The third account is the most surprising. Schaipp, Hägele, Taylor, Şimşekli & Bach (2025) showed that a bound from non-smooth convex optimization, with no noise floor and no valley in sight, reproduces the loss curves of language-model training under cosine and WSD, sudden drop included. The bound must concern the last iterate: bounds on the best or the average iterate show no drop.
| Schedule | Bound at | Tuned base rate |
|---|---|---|
| constant | ||
| WSD, 10% linear cooldown | ||
| WSD, 20% linear cooldown | , from just before the cooldown | |
| WSD, 20% cooldown | ||
| cosine to zero | ||
| linear decay |
For a constant rate the bound carries the factor . About how large is that factor for a run of steps? (Use .)
Show the answer
3.92
, so the factor is . The tuned WSD bound with a 20% cooldown stays near at every horizon from to (computed for this lesson), so its advantage grows from a factor to : only logarithmic, but growing with the length of the run, and earned during the cooldown.
Schaipp et al. then used the bound in reverse for 124-million- and 210-million-parameter Llama-style models: it told them how to extend a finished WSD run with the right learning rate, and how to transfer a tuned rate from one schedule to another, and both choices improved the loss. The limits are plain. The theory is for SGD on convex functions, while the runs used AdamW on nonconvex networks, and why the agreement holds is not understood.
Averaging instead of decaying
Run SGD with a constant step, , so that , and average the first iterates:
The gradient of step enters of the averaged points. The average is therefore where SGD with a linear decay ending at the current step would land, if it received the same gradients, and this holds for every at once: an anytime linear decay. Defazio et al. (2023) read the identity the other way round, as the reason linear decay is worst-case optimal: it emulates averaging.
The catch is "the same gradients": they were computed at the fast-moving iterates , not along the decayed path. Plain Polyak–Ruppert averaging is optimal in convex theory, yet in deep learning it gives much worse results than the last iterate of a well-scheduled run (Defazio et al., 2024). Schedule-free methods change where the gradients are evaluated.
SCHEDULE-FREE ADAMW(x₁, γ, λ, T_w, β₁ = 0.9, β₂, ε) // Defazio et al. (2024)
z ← x₁; x ← x₁; v ← 0; S ← 0
for t = 1, 2, …
y ← (1 − β₁)·z + β₁·x // gradients are taken here
g ← ∇ℒ_B(y)
v ← β₂·v + (1 − β₂)·g ⊙ g
γ_t ← γ·√(1 − β₂ᵗ)·min(1, t/T_w) // warmup and bias correction
z ← z − γ_t·g/(√v + ε) − γ_t·λ·y // AdamW-like base step
S ← S + γ_t²
x ← (1 − γ_t²/S)·x + (γ_t²/S)·z // weighted running average
return x // evaluate the averageThere is no first-moment buffer: momentum comes from evaluating gradients at , between the base sequence and its average , so memory matches AdamW's. Weighting the average by discounts the warmup steps; afterwards it is a uniform average. The model is evaluated at , so batch-norm statistics, collected at , must be recomputed on a few batches first. The authors' implementation stores and one of or , switching between them for training and evaluation.
In practice. A near works best: in a sweep for ResNet-50 on ImageNet, reached 77.78% top-1, against 76.60% at and 75.37% at . In the authors' evaluation on 28 problems, from logistic regression to large networks, schedule-free methods matched or beat tuned cosine schedules, and Schedule-Free AdamW won the self-tuning ruleset of the 2024 AlgoPerf competition, where no per-workload tuning is allowed (Kasimbeg et al., 2025; Benchmarking Deep Learning Fairly). The authors list the caveats: warmup is still needed, and the best learning rate and weight decay differ from those of a scheduled run, so both must be swept again. In an independent test on a 210-million-parameter language model, Hägele et al. (2024) found the method sensitive to its momentum parameters, poor with but remarkably good with , and matched or beaten by a WSD cooldown, with neither method tuned further.
Key takeaways
- Without a known horizon the last iterate of SGD cannot be good at every step, so anytime training changes what it returns: a cooldown branched from a constant-rate run, or an average of the iterates.
- Warmup–stable–decay matches cosine when the cooldown covers about 10–20% of the steps, less in long runs; a cooldown beats a linear one, the best constant rate is about half the best cosine peak, and scaling studies need far less compute (about instead of FLOPs for the Chinchilla suite, by Hägele et al.'s estimate).
- A cooldown works because noise relaxes fastest in stiff directions while the progress made at the high rate is kept; the noise it leaves falls only like in its length . The convex last-iterate bound reproduces the sudden drop: a constant rate pays , which a cooldown removes, and linear decay attains .
- The uniform average of SGD's iterates is an implicit linear decay ending at the current step. Schedule-free SGD evaluates gradients at and attains for every ; Schedule-Free AdamW won AlgoPerf's self-tuning ruleset but still needs warmup, its own tuning and recomputed batch-norm statistics.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
In the convex last-iterate bound, what does a cooldown over a fixed fraction of the run change compared with a constant rate, both with tuned base rates?
- It removes the factor , leaving the rate up to a constant
- It improves the rate from to
- Nothing: the two bounds are identical
- It removes the dependence on the initial distance
Show the answer
A. It removes the factor , leaving the rate up to a constant
For a constant rate the tuned bound is ; for warmup–stable–decay with a cooldown proportional to the logarithm disappears. The rate stays , optimal for convex Lipschitz problems, and the improvement is earned during the cooldown, the sudden drop.
Constant-step SGD produces iterates . Writing their uniform average in terms of the gradients, with what weight does the gradient of step enter?
- , as in the last iterate
- , as in an exponential moving average
- , as in a linear decay that ends at step
- for every
Show the answer
C. , as in a linear decay that ends at step
, so appears in of the averaged points and the average is : the iterate of a linear decay to zero at the current step, whatever is. That is why averaging can replace a schedule, and why it is anytime.
Schedule-free SGD evaluates gradients at , where is the SGD sequence and its running average. What do and give?
- : SGD with no averaging at all; : heavy-ball momentum
- : Polyak–Ruppert averaging, with gradients at the SGD iterates; : primal averaging, with gradients at the average
- : an exponential moving average; : a uniform average
- The same algorithm, since is returned in both cases
Show the answer
B. : Polyak–Ruppert averaging, with gradients at the SGD iterates; : primal averaging, with gradients at the average
With the gradients are taken at , plain SGD, and the returned is its Polyak–Ruppert average. With they are taken at the average itself, primal averaging, which is stable but slow. In between, a near worked best in practice, and the guarantee holds for every .
You switch a language-model recipe from cosine to warmup–stable–decay with a 20% cooldown. How should the peak rate change?
- Keep it: only the shape changed
- Double it, since WSD decays for a shorter time
- Raise it tenfold, since the cooldown is short
- Roughly halve it
Show the answer
D. Roughly halve it
WSD holds the peak for most of the run, so the same peak delivers much more area and much more noise. Hägele et al. (2024) found the best constant rate at about half the best cosine peak, and the convex last-iterate bound agrees: its tuned base rate for cosine is about twice that for WSD.
Further reading
- A. Hägele, E. Bakouch, A. Kosson, L. Ben Allal, L. Von Werra & M. Jaggi, "Scaling laws and compute-optimal training beyond fixed training durations," NeurIPS (2024).
- S. Hu, Y. Tu, X. Han et al., "MiniCPM: Unveiling the potential of small language models with scalable training strategies," arXiv:2404.06395 (2024).
- A. Defazio, X. A. Yang, H. Mehta, K. Mishchenko, A. Khaled & A. Cutkosky, "The road less scheduled," NeurIPS (2024).
- A. Defazio, A. Cutkosky, H. Mehta & K. Mishchenko, "Optimal linear decay learning rate schedules and further refinements," arXiv:2310.07831 (2023).
- F. Schaipp, A. Hägele, A. Taylor, U. Şimşekli & F. Bach, "The surprising agreement between convex optimization theory and learning-rate scheduling for large model training," ICML (2025).