LR scheduling changes the learning rate ηt over training according to a plan. Four mainstream strategies: ① Warmup (linear): ηt=ηmax⋅Twarmt for t=1…Twarm, ramping linearly from near zero to the peak ηmax; ② linear decay: ηt=ηmax(1−Tt); ③ step decay: ηt=η0γ⌊t/s⌋, multiplying by γ (e.g. ×0.1) every s steps; ④ cosine annealing: ηt=ηmin+21(ηmax−ηmin)(1+cos(Ttπ)) — at t=0, η0=ηmax; at t=T, ηT=ηmin, a smooth drop with no cliff. Large-model training standardizes on “warmup + cosine”: 1%–5% of steps ramp linearly to the peak, then cosine decays smoothly to a tiny final value. Why warmup: early in training Adam's vt has seen only a few gradients, so v^t is tiny and η/v^t can be enormous — one step can blow the parameters away (worse with large batches and noisy gradients); a small LR lets the moment estimates and BN/LN statistics stabilize first.
💡Use Cases
a standard component of every SOTA large-model and CNN training pipeline; interview favorites: why warmup is necessary, cosine vs step decay, and the LR–batch-size scaling rule.
⚡Key Problems Solved
a fixed LR faces a dilemma — large LR converges fast early but oscillates or diverges near the optimum, small LR is too slow early; scheduling hard-codes “large steps to explore, small steps to refine”. Cosine annealing approaches a tiny LR smoothly, avoiding the loss spikes of step-decay cliffs, and often lands in flatter minima with better generalization. Linear scaling rule (Goyal 2017): doubling the batch size roughly doubles the LR (larger batches have less gradient noise, allowing larger effective steps), but only works with warmup, otherwise early steps diverge.
🎯5 High-Frequency Exam Points
1
Write the linear warmup ηt=ηmax⋅Twarmt and cosine annealing ηt=ηmin+21(ηmax−ηmin)(1+cos(Ttπ)); what is ηt at t=0 and t=T?
2
Why is warmup needed at the start? Derive why η/v^t can be huge early in Adam (only a few gradients have accumulated into v^t) and why large batches make it riskier.
3
Cosine annealing vs step decay: why is a smooth decline better (avoiding loss spikes from cliffs)? What does a tiny final LR do (converging to flat minima, better generalization)?
4
Linear scaling rule (Goyal): why does doubling the batch size roughly double the LR? How does gradient noise scale with batch size? Why must warmup accompany it?
5
Typical large-model config: warmup fraction (1%–5%), peak LR, cosine endpoint; how do the schedule and the optimizer (Adam's β2, ϵ) interact?