Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Start gently, run, then slow down to park
Driving into a parking space, you don’t hold one speed. You pull away gently, cruise, and slow right down as you arrive. Training a model is similar. A schedule changes the step size over time:
- a short warmup so the first steps don’t throw the model off;
- a long phase at a high rate to make fast progress;
- a cool-down to a small rate so the model settles precisely instead of jittering around the answer.
The difference between a good and a bad schedule can be worth more than a bigger model. Every modern training recipe, from vision backbones to robot policies to large language models, specifies warmup length, peak rate and decay shape.
- 1. Lowering the step size near the end of training helps the model…
- 2. A short ramp-up at the start is called…
- 3. SGD with a constant large step ends up…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.Common schedules (t = step, T = total)
- Step decay: , e.g. ×0.1 every .
- Inverse time: , matching the theory of A6.3-2.
- Cosine annealing (Loshchilov and Hutter, 2017): .
- Linear warmup: for .
- Cyclical / triangular (Smith, 2017): bounce between a base and a peak.
- One-cycle: warm up to a high peak, then anneal to nearly zero in a single cycle.
- Warmup–stable–decay (WSD): warmup, a long constant phase, then a short final decay. A run can be extended or branched from any checkpoint (Hu et al., 2024).
- 1. Cosine annealing at t = T/2 gives…
- 2. WSD's decay happens…
- 3. Linear warmup over W steps starts at…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 40 minUndergraduate students and practising engineers.Why decay at the end?
From A6.3-1, constant-step SGD settles where the error variance is about . Large buys fast early progress, and small buys a low floor. A schedule gets both: the high phase moves far, and the decay squeezes the noise out. On a noisy quadratic, decaying from cuts the final expected loss about 25× compared with holding it constant.
Why warmup?
- Adam’s second-moment estimate is unreliable for the first ~ steps, so updates can be huge. Warmup (or RAdam’s rectification) tames them (Liu et al., 2020).
- Large batches with the linear-scaling rule need warmup to avoid early divergence (Goyal et al., 2017).
- Transformers with post-LayerNorm are unstable without warmup (Xiong et al., 2020). Early curvature is high, and warmup lets the network move to flatter regions first.
Choosing the peak: the LR range test
Increase the learning rate exponentially over a few hundred steps and plot the smoothed loss. Loss falls, bottoms out, then explodes. A peak LR near the bottom (or a few times below it) works well for one-cycle schedules (Smith, 2017). It costs one short run instead of a grid search.
- 1. Annealing helps mainly because SGD's noise floor scales with…
- 2. Warmup is especially important for…
- 3. The LR range test increases the learning rate…
Level 3: Advanced
★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.Average step of cosine annealing
. ∎ Cosine therefore spends half its “budget” of total movement compared with a constant schedule, front-loaded where progress is cheapest.
Annealing in the noise-ball model
With , a slowly decreasing keeps near its instantaneous equilibrium . Ending at drives the equilibrium to zero. Decaying too fast freezes the iterate before it has relaxed. The optimal rate balances the two, giving asymptotically (A6.3-2).
Why cyclical schedules can help non-convex training
Periodically raising injects noise that can escape sharp basins. With snapshot ensembles, it also yields diverse models (Huang et al., 2017). On a convex problem, cycles only cost time.
Exercise 3.1: Average learning rate of cosine annealing from 0.2 to 0
.
- 1. The average of a full cosine schedule from η_max to 0 is…
- 2. Decaying the learning rate too fast…
- 3. On a convex problem, cyclical restarts mostly…
Level 4: Expert
★★★★★ Expert⏱ 35 minResearchers: original papers and open problems.One run instead of a grid search
For a terrain-classification logistic model trained with mini-batch SGD, an LR range test over 600 steps (from to 10) finds the smoothed-loss minimum near 0.27. A one-cycle schedule peaking there, trained once for 1500 steps, matches or beats the best of a 5-point grid of constant learning rates, each trained for the same 1500 steps. That’s five times the compute saved, with no guesswork.
Schedules in AI, robotics and aerospace
- LLM pre-training: linear warmup with cosine decay was standard (Brown et al., 2020). WSD makes continual pre-training and compute-optimal sweeps cheaper (Hu et al., 2024).
- Vision backbones: step decay and cosine with warmup (He et al., 2016; Goyal et al., 2017).
- Robot RL: linear decay of the learning rate (and of the PPO clip range) to zero is common practice (Schulman et al., 2017).
- Fast prototyping: one-cycle “super-convergence” trains in a fraction of the usual epochs (Smith and Topin, 2019).
References
- I. Loshchilov, F. Hutter (2017). “SGDR: stochastic gradient descent with warm restarts.” ICLR.
- L. Smith (2017). “Cyclical learning rates for training neural networks.” WACV.
- L. Smith, N. Topin (2019). “Super-convergence: very fast training of neural networks using large learning rates.” SPIE.
- P. Goyal et al. (2017). “Accurate, large minibatch SGD: training ImageNet in 1 hour.” arXiv:1706.02677.
- L. Liu et al. (2020). “On the variance of the adaptive learning rate and beyond.” ICLR.
- R. Xiong et al. (2020). “On layer normalization in the transformer architecture.” ICML.
- S. Hu et al. (2024). “MiniCPM: unveiling the potential of small language models with scalable training strategies.” arXiv:2404.06395 (WSD).
- G. Huang et al. (2017). “Snapshot ensembles: train 1, get M for free.” ICLR.
- T. Brown et al. (2020). “Language models are few-shot learners.” NeurIPS.
- J. Schulman et al. (2017). “Proximal policy optimization algorithms.” arXiv:1707.06347.