Context. The schedule and the batch size are both governed by gradient noise that does not vanish at the optimum. Under warmup-stable-decay (WSD, or trapezoid), which holds the rate and then decays it to zero over roughly the last fifth of the run (the cooldown), the loss plateaus and then drops sharply at the cooldown, which had been explained by nonconvex geometry. Schaipp et al. show that a convex last-iterate bound for SGD has that shape; McCandlish et al. derive from one noisy step the gradient noise scale, which predicts the largest useful batch. At a constant step the last iterate fluctuates around the optimum by an amount proportional to the step, and annealing the step at the end makes it behave like an average, which produces the sharp drop. A minibatch gradient carries signal and noise . Below their ratio a bigger batch gives proportionally more progress per step, so it parallelizes at no cost in examples; above it extra examples are wasted. As shrinks the useful batch grows.
The convex last-iterate bound has the shape of a WSD loss curve. For SGD on a convex , with base rate , schedule shape , and , the bound of Defazio et al. reads The first term is the classical bound for the averaged iterate; the sum is the extra error from reporting the last one. The right side is , so ; truncated at step , it is the curve compared with loss curves. With constant , a constant schedule gives ( harmonic), while WSD with cooldown fraction gives at most with bounded, so there is no term. At (my computation, ), times the bound is 3.62 for constant, 2.16 for WSD with 20% cooldown, 2.06 for cosine and 2.00 for linear decay.
An online-gradient inequality holds against any reference point fixed by . Expand , use convexity in the cross term, take conditional expectations and sum from to (with absorbed into ): This is Zinkevich's online-gradient inequality. The reference point may be random, as long as it is determined by : the step- gradient is unbiased given the past, so conditioning still turns the cross term into . With and it is the averaged-iterate bound, the first term of Step 1.
The last iterate is the average plus one correction per suffix (the steps from to ), each taking the suffix's first iterate as reference point. For any sequence and positive weights , a telescoping identity (Defazio et al.) gives exactly Take and . The first piece is Step 2 at . Each correction is Step 2 with , where the distance term vanishes and only the suffix's noise is left, divided by its total step. This completes the proof.
The sharp drop at the cooldown comes from the last-iterate term. With a constant step the -th correction is : short suffixes take full steps and do no averaging, and the corrections sum to . Under WSD a suffix starting inside the cooldown has steps shrinking to zero and a correction of about , a constant over all of them, and the stable-phase suffixes add at most a constant plus about , a logarithm of alone. At fixed , during the stable phase the distance term falls like while the last-iterate term grows like , so the bound flattens; once the step shrinks, the last-iterate term falls quickly. In my decomposition of the exact bound (, 20% cooldown), over the cooldown the last-iterate term falls from 0.081 to 0.042 while the other terms barely move. The drop needs gradients that do not vanish (with or it disappears), and the worst-case lower bound has the same shape, so the drop is not an artifact of the bounding.
Transferring a learning rate across schedules and horizons. With constant , is times a function of the schedule shape alone, so the unknown and cancel in ratios, and only the ratios transfer. The bound reproduces the scaling of the best rate and the factor of about 2 between cosine and WSD ( against ) found in LLM sweeps. Retuned per cooldown fraction, longer cooldowns are better all the way to linear decay, since grows with the fraction and compensates for the smaller steps; at fixed the best fraction is interior. From 20% cooldown to linear decay it predicts (my check: ), which a 124M grid confirms. To extend a WSD run, keep the stable phase and lower the rate at the old cooldown start by for twice the horizon or 0.375 for four times, about 0.01 better than continuing at the same rate.
A second-order expansion of one noisy step gives the noise scale. Expand the loss after to second order and average over the batch, using ( has mean and covariance ): The estimate is unbiased, so the noise enters only through the curvature-weighted variance in the quadratic term, which lowers the safe step and with it the gain. Minimizing over gives and , with and the noiseless values and . Below the gain is linear in , so small steps match one times larger; above it the gain saturates, and linear learning-rate scaling breaks down. With this becomes the simple noise scale , the batch at which the gradient's noise equals its signal.
Steps trade against examples on a hyperbola. A batch needs steps and examples per unit of progress, so reaching a fixed loss in steps and examples obeys and training at costs twice the minimum of each. If the noise scale varies along the run, the best schedule keeps at a constant , the number of examples one step is worth, so , and the square root is why adaptive batches gain little unless the noise scale varies a lot (about 4% predicted on SVHN). Across eight tasks, tracks the measured within a factor of about 20 while both span six orders of magnitude and grow during a run. It scales like (a run with a larger step per batch size fluctuates higher up the walls of the loss valley, where is larger), so it must be read off a well-tuned run, and for Adam the tuned rate rises like , , then flattens. For Adam-trained OLMo, Merrill et al. (2025) find it underestimates the directly measured critical batch by orders of magnitude, though the shape (small, rising, then flat) survives.
# b_small: one GPU's batch; b_big: the global batch (after all-reduce)
sq_small = (g_local ** 2).sum() # in practice averaged over GPUs
sq_big = (g_global ** 2).sum()
G2 = (b_big * sq_big - b_small * sq_small) / (b_big - b_small) # estimates |G|^2
S = (sq_small - sq_big) / (1 / b_small - 1 / b_big) # estimates tr(Sigma)
ema_G2 = 0.99 * ema_G2 + 0.01 * G2
ema_S = 0.99 * ema_S + 0.01 * S
b_simple = ema_S / ema_G2
The ratio of unbiased estimates is biased and comes from a near-cancellation, which is why both are smoothed before dividing.The speedrun's batch and schedule records. On fixed hardware, time is roughly a cost per token plus a cost per step; with the per-step cost in tokens, Step 7 makes time proportional to , minimized at , the paper's square-root rule with set by the hardware (my reading, not from any record). Three kinds of record fit it: smaller batches (record 21, 64K to 48K tokens per GPU, about 3.5 s; again at record 39), which help whenever the old batch sat above ; a batch ramp as the noise scale grows (record 46, 65 steps and about 1.8 s, though that record also moved to a newer PyTorch nightly, so part may be the upgrade); and Adam stepping every other step for the embeddings and head (record 39), a larger batch for rows with their own noise scale. On the schedule side, record 2 adopted the trapezoid along with other changes (45 to 31.4 minutes, not separable), and later records lengthened the cooldown (0.45 of the run at record 26, 0.80 at record 92), as the bound predicts once the rate is retuned. The speedrun decays to a floor of 0.1 to 0.2 of peak (with a weight EMA over the last ~300 steps in ANVIL2), where the bound favors zero; averaging the tail is another way to cancel the last-iterate penalty, a reading the paper does not test.
Consequences. Neither theory covers the speedrun's optimizers (both are for SGD), the noise-scale derivation is local, greedy and quadratic, and only ratios and shapes transfer.
Terms
- WSD / trapezoid
- warmup, constant rate, then decay to zero over the final fraction of steps
- last-iterate bound
- averaged-iterate bound plus one noise-only correction per suffix of the run
- shape of the bound; , times a function of the schedule shape
- constant vs WSD
- factor against : the cooldown removes the
- schedule-only ratio, about from 20% cooldown to linear decay
- continuation factor
- lower the rate by 0.525 (2x horizon) or 0.375 (4x) to reuse the stable phase
- ,
- ; with , , cheap to measure
- on the hyperbola; twice the minimum steps and examples
- adaptive batch when one step is worth examples; with a per-step cost in tokens, the fastest batch
- two-batch estimator
- at the per-GPU and global batch gives unbiased and
Quiz
- If the gradient-norm bounds shrink as , what happens to WSD's sudden drop in the bound?The last-iterate penalty is proportional to the step times the squared gradient norm. If the iterate stops jittering by itself, so annealing the step has little left to remove.
- A WSD run tuned for steps is extended to by continuing at the same base rate. What does the bound say goes wrong?The bound-optimal base rate shrinks like , so the rate tuned for is too high for . Keeping the stable phase and lowering the rate by from the old cooldown start reuses the work done and ends about 0.01 better in loss than continuing at the same rate.
- Doubling a batch that is already far above barely improves the best loss decrease per step. Why?The best one-step gain is : noise enters only through the curvature-weighted variance in the quadratic term, which lowers the safe step. Far above the denominator is already near 1, so doubling adds little and the extra examples are wasted; below it the gain is linear in .
- A run measures with a learning rate four times smaller than optimal. What does the note's scaling of predict?scales like : a run with a larger step per batch size fluctuates higher up the walls of the loss valley, where is larger, and one with a smaller step sits lower, where is small. A four times smaller rate inflates about four times, which is why it must be read off a well-tuned run.
Sources
- Fabian Schaipp, Alexander Hägele, Adrien Taylor, Umut Simsekli, and Francis Bach. The Surprising Agreement Between Convex Optimization Theory and Learning-Rate Scheduling for Large Model Training. ICML, 2025.
- Sam McCandlish, Jared Kaplan, Dario Amodei, and OpenAI Dota Team. An Empirical Model of Large-Batch Training. arXiv preprint, 2018.
- Aaron Defazio, Ashok Cutkosky, Harsh Mehta, and Konstantin Mishchenko. Optimal Linear Decay Learning Rate Schedules and Further Refinements. arXiv preprint, 2023.
- William Merrill, Shane Arora, Dirk Groeneveld, and Hannaneh Hajishirzi. Critical Batch Size Revisited: A Simple Empirical Approach to Large-Batch Language Model Training. NeurIPS, 2025.
- Keller Jordan et al. modded-nanogpt. GitHub repository, 2024.