RAdam (Rectified Adam) is an optimizer that fixes the problem that Adam's adaptive learning rate (per-parameter step size adjustment) varies too much early in training, by estimating that variation (variance) and correcting for it. Liu et al. published it in 2019 (ICLR 2020).
When using Adam or RMSprop, warmup, which keeps the learning rate small for only the first few thousand steps, is commonly used. The paper showed that when training a Transformer on GermanβEnglish translation (IWSLT'14), simply removing warmup worsens the training loss from about 3 to about 10. However, why warmup works and how long it should be had been decided by trial and error.
The paper explained the cause as follows.
- Early in training, there are few samples for estimating the mean of squared gradients: Adam sets the step size by dividing by the square root of the moving average of squared gradients . At first, is estimated from very few gradients, so the estimate fluctuates greatly.
- As a result, the variance of the adaptive learning rate becomes very large: for example, at the step size is proportional to and becomes extremely large if the gradient happens to be close to 0. The paper showed that, assuming the gradients follow a zero-mean normal distribution, the variance at this point is infinite.
- Warmup works by reducing this variance: a smaller learning rate also makes the variance of the step size smaller.
RAdam estimates this variance analytically and multiplies by a coefficient that corrects it so the variance always stays the same. In the very first steps, when the variance cannot be estimated, it does not use the adaptive learning rate at all. As a result, it automatically achieves an effect similar to warmup without the extra hyperparameter of warmup length. It is like not changing course drastically based on the opinions of just a few people: acting cautiously while few have been heard, and more boldly as their number grows.

