Learning Rate Schedulers
How to change the learning rate during training: step decay, cosine, warmup, and more.
Cosine Annealing (SGDR)Cosine annealing is a learning rate scheduler that lowers the learning rate smoothly from a maximum to a minimum along a cosine curve. SGDR repeats this in cycles and resets the learning rate to the maximum at the start of each cycle (a warm restart).
Cyclical Learning RatesCyclical Learning Rates is a learning rate scheduler that raises and lowers the learning rate periodically in a triangular pattern between a chosen lower and upper bound. It reduces the need for fine-tuning the learning rate and can reach the same accuracy in fewer iterations.
One-cycleOne Cycle is a learning rate scheduler that raises the learning rate once and then lowers it over the whole of training, ending with a sharp final decrease. By moving momentum in the opposite direction and using large learning rates, it can reach equal or better accuracy in a fraction of the usual number of steps.
Polynomial Decay (poly)Polynomial decay (poly) is a learning rate scheduler that multiplies the learning rate by $(1 - t/T)^{p}$, lowering it smoothly in polynomial form so that it reaches 0 at the end of training. In semantic segmentation models such as DeepLab and ParseNet, it has been reported to give higher accuracy than step decay.
Step DecayStep decay is a learning rate scheduler that lowers the learning rate in steps by a fixed factor (usually 1/10) each time a chosen epoch is reached. The first part of training moves quickly with a large learning rate, and the later part fine-tunes with a small one.
WarmupWarmup raises the learning rate gradually from a small value only at the start of training, then switches to the main schedule once the target value is reached. It prevents early training from breaking down when large mini-batches or large learning rates are used.
WSD (Warmup-Stable-Decay)WSD (Warmup-Stable-Decay) is a learning rate scheduler that, after warmup, holds the learning rate constant at its maximum and lowers it only in the last 10% or so of training. The total number of steps need not be fixed in advance, and training can be extended from partway through the constant phase, so it is used for pretraining large language models.
