RMSprop (root mean square propagation) is an adaptive learning rate optimizer that scales each parameter’s update by the inverse of a running root mean square of its recent gradients. In the Training of neural networks within Artificial intelligence, it gives parameters with large, noisy gradients smaller steps and parameters with small, consistent gradients larger steps.
Geoffrey Hinton proposed RMSprop in a 2012 lecture course rather than in a formal paper. It was designed to fix the vanishing step size of Adagrad, and it became a direct ancestor of the Adam optimizer, which combines RMSprop scaling with momentum.
How RMSprop computes each update
RMSprop keeps one extra number per parameter: an exponential moving average of squared gradients, often written v. At each step it updates this average, takes its square root and divides the raw gradient by it before applying the global learning rate.
- Compute the gradient
gof the loss for the current mini-batch. - Update the average:
v = rho * v + (1 - rho) * g^2. - Update the parameter:
w = w - lr * g / (sqrt(v) + eps).
The effect is a per-parameter normalization. The update magnitude is roughly lr times the ratio of the current gradient to its recent typical size, so the effective step stays close to the learning rate regardless of the absolute gradient scale. This makes training less sensitive to poorly scaled features and layers.
Because the average decays exponentially, old gradients are gradually forgotten. With rho = 0.9, the average effectively spans about the last 10 steps, and with rho = 0.99 about the last 100 steps.
Key hyperparameters and typical values
RMSprop has four main hyperparameters, and their defaults differ slightly between frameworks. The learning rate matters most; the decay rate and epsilon mostly affect stability. The table lists common settings.
| Hyperparameter | Common range | What it controls |
|---|---|---|
| Learning rate | 1e-4 to 1e-2, often 1e-3 | Overall step size |
| Decay rate (rho) | 0.9 to 0.99 | Memory length of the squared-gradient average |
| Epsilon | 1e-8 to 1e-6, larger in some setups | Prevents division by zero, damps tiny denominators |
| Momentum | 0 to 0.9 | Optional velocity term on top of scaling |
A practical detail is the epsilon placement. Some implementations add epsilon inside the square root and others outside it, which changes behavior when gradients are tiny. When porting a model between frameworks, matching these details prevents unexpected differences in convergence.
A centered variant also tracks the mean gradient and divides by an estimate of the variance instead of the raw second moment. It can be more stable, at the cost of one extra buffer per parameter.
RMSprop compared with related optimizers
RMSprop sits between plain stochastic gradient descent and Adam in the family tree of optimizers. It shares the per-parameter scaling idea with Adagrad but replaces the ever-growing sum with a decaying average. The table compares the closest neighbors.
| Optimizer | Per-parameter scaling | Momentum | Main weakness |
|---|---|---|---|
| SGD | No | Optional | Needs careful learning rate tuning |
| Adagrad | Sum of all past squared gradients | No | Step size shrinks toward zero |
| RMSprop | Decaying average of squared gradients | Optional | No bias correction early in training |
| Adam | Decaying average with bias correction | Built in | Can generalize worse than SGD on some tasks |
| AdamW | Same as Adam | Built in | Extra hyperparameter for decoupled weight decay |
The main technical difference from Adam is bias correction. Because v starts at zero, RMSprop underestimates the gradient scale during the first steps, which can produce overly large early updates. Learning rate warmup is a common remedy.
When to choose RMSprop
RMSprop works best on problems with non-stationary objectives, where the gradient distribution changes over time. That is why it became popular in recurrent neural networks and deep reinforcement learning, including early deep Q-network agents for Atari games.
| Situation | Recommended choice | Reason |
|---|---|---|
| Deep reinforcement learning | RMSprop or Adam | Targets shift constantly during training |
| Recurrent networks | RMSprop with gradient clipping | Handles uneven gradient scales across time steps |
| Large transformer pretraining | AdamW | Bias correction and decoupled weight decay |
| Image classification with long schedules | SGD with momentum or AdamW | Often better final generalization |
| Memory-constrained fine-tuning | RMSprop or Adafactor | One state buffer instead of two |
A real advantage over Adam is memory. RMSprop without momentum stores one buffer per parameter, while Adam stores two, which saves a meaningful amount of accelerator memory in very large models.
Common pitfalls and misconceptions
- Using the SGD learning rate: values like 0.1 that suit SGD usually make RMSprop diverge.
- Ignoring epsilon: an epsilon that is too small can amplify noise when gradients are near zero.
- Assuming no tuning is needed: adaptive scaling reduces sensitivity but does not remove the need to tune the learning rate.
- Confusing it with momentum: RMSprop scales steps; momentum smooths their direction, and the two can be combined.
- Skipping a schedule: a learning rate schedule still improves final loss in most runs.
A frequent misconception is that RMSprop is obsolete because of Adam. In practice it remains a reasonable default in reinforcement learning libraries, and its simpler state makes it easy to reason about when debugging unstable training.
When a run with RMSprop becomes unstable, the usual diagnostic order is to lower the learning rate first, then raise epsilon, then add warmup or clipping. Logging the distribution of the squared-gradient buffer per layer often reveals which layer is responsible, because a layer whose average collapses toward zero receives disproportionately large updates. Changing the decay rate is rarely the first fix, since values between 0.9 and 0.99 behave similarly on most problems.
Understanding it simply
Training a model means making many small corrections to many numbers. Some numbers get wild, jumpy signals. Others get calm, steady ones. RMSprop adjusts each correction to the signal it receives.
It remembers how strong the recent signals were for each number. If they were strong, it takes smaller steps. If they were weak, it takes bigger steps. The result is steadier, more balanced learning. It works like a driver who slows down on bumpy roads and speeds up on smooth ones.
Applied in practice
A research team trains a reinforcement learning agent to control a simulated warehouse robot. The reward signal is sparse, and the value targets change as the agent improves. With plain SGD, training oscillates and the loss spikes every few thousand steps.
The team switches to RMSprop with a learning rate of 2.5e-4, rho of 0.95 and epsilon of 0.01, a configuration similar to classic deep Q-network setups. They also clip gradients at a norm of 10. The loss curve becomes much smoother, and the agent reaches a stable success rate in about half the training steps. Because RMSprop keeps only one buffer per parameter, the run also fits on a smaller GPU than the Adam baseline.