Learning Rate Schedules
A learning rate schedule changes the step size over the course of training on purpose — usually large steps early to cover ground fast, shrinking steps later to settle precisely into a minimum, the way a driver slows down as they approach a parking spot.
Prerequisites: Gradient Descent
A single, fixed learning rate faces a genuine dilemma: large enough to make fast progress early in training, but small enough not to bounce wildly around the minimum once training gets close to it, are usually two different numbers. A learning rate that's perfect for the first hundred steps is often too large for the last hundred, and one that's safe for the last hundred would have crawled agonisingly slowly through the first. A schedule resolves the dilemma by not picking one number at all — it changes the rate as training proceeds.
The analogy: driving toward a parking spot
Driving across a large empty parking lot toward a spot far away, you'd naturally go fast — there's plenty of room and no need for caution. As you get close to the actual spot, you slow down, because now precision matters more than speed and a fast approach risks overshooting or clipping something. Nobody drives the entire trip, start to finish, at one single fixed speed chosen as some compromise between "fast enough to get there" and "slow enough to park precisely." A learning rate schedule is this same instinct applied to training: cover distance fast early, then ease off as you approach something you don't want to overshoot.
The maths: a few common shapes
Step decay multiplies the rate by a fixed factor every so many steps:
Here is the starting rate, the decay factor, the number of steps between drops, and rounds down. In words: every steps, multiply the current rate by — the rate drops in discrete jumps, like halving every 10 epochs.
Cosine annealing decays smoothly, following one quarter of a cosine wave down from to near zero over total steps:
In words: the rate starts at , barely changes at first, then falls steeply through the middle of training, then flattens out again as it approaches zero near the end — a smooth version of the same "fast then careful" idea, without step decay's abrupt jumps.
Warmup does the opposite at the very start: ramp the rate up linearly from zero over the first few hundred steps, before any decay schedule takes over, because a large rate applied to randomly initialised weights before the network has found any sensible direction can cause an early, destabilising blowup.
Worked example 1: step decay, three drops
, , drop every steps. At step : , so . At step : , so . At step : , so . Each threshold crossed halves the rate again — by step 3200 the effective rate is an eighth of where it started, even though nothing about the loss triggered the drop, only the step count.
Worked example 2: cosine annealing at three points
, total steps. At : — full rate. At (halfway): — exactly half. At (the end): — the rate has smoothly reached zero right as training ends, so the very last steps are essentially fine-tuning with an infinitesimal nudge, which is exactly the "precise parking" behaviour the schedule was designed for.
Picture the cosine schedule's shape — high and flat at the start, a steep fall through the middle, flat near zero at the end — a curve of that general falling character to the one you can explore here, just built from cosine instead of a power law.
The explorer above shows an estimate needing large early corrections and only small late ones to settle — that's the same logic a decaying schedule imposes deliberately: big steps while far from the answer, tiny ones while refining it.
A learning rate schedule trades a single compromise rate for two different regimes on purpose: large steps to make fast early progress, shrinking steps to settle precisely — and the shape of the decay (step, cosine, or otherwise) controls how gradual that trade-off is.
What this means in practice
Cosine annealing and warmup are close to standard in modern deep learning training recipes, especially for large models where a bad early learning-rate spike can waste enormous compute before it's caught. Adaptive optimisers like Adam already adjust per-parameter rates, but they don't remove the value of also scheduling the global rate over time — the two operate on different axes and are commonly combined.
The classic mistake is assuming an adaptive optimiser makes a schedule unnecessary. It doesn't: Adam's adaptivity handles the mismatch in scale between parameters at a given moment, but a schedule handles the separate need to shrink the overall step size as training approaches a minimum — the two problems don't cancel each other out, and most well-tuned modern training runs use both together.
Related concepts
Practice in interviews
Further reading
- Goodfellow, Bengio & Courville, Deep Learning, ch. 8.5
- Smith, Cyclical Learning Rates for Training Neural Networks (2015)