Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.AdaGrad that forgets
AdaGrad’s per-parameter learning rates only ever shrink, because it adds up every squared gradient it has seen. RMSProp keeps a moving average instead, so old gradients fade away. Each parameter’s step is the learning rate times its gradient divided by the typical recent gradient size. Steps stay roughly the size of the learning rate, large or small gradients alike, and the method keeps adapting as training moves into new regions.
RMSProp trained DeepMind’s Atari DQN agents and many recurrent networks, and it is the default in some reinforcement-learning codebases. Its normalised steps make training robust to wildly different gradient scales across layers, as in policies and value functions for control. Its behaviour explains half of Adam.
- 1. RMSProp replaces AdaGrad's sum with…
- 2. RMSProp's steps are roughly…
- 3. RMSProp was first presented in…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.By hand
- Update: v ← β₂v + (1 − β₂)g², then w ← w − ηg/(√v + ε). The standard β₂ is 0.9 (Hinton) or 0.99 (PyTorch default α = 0.99).
- Example with v = 1, g = 2, η = 0.1, β₂ = 0.5: v = 2.5, step 0.2/√2.5 ≈ 0.126.
- Constant gradient: v → g², so the step tends to η·sign(g), the learning rate per coordinate, independent of the gradient’s size.
- First step: starting from v = 0, the first v is (1 − β₂)g², so the first step is η/√(1 − β₂), ten times η for β₂ = 0.99. Adam’s bias correction (E3-7) fixes this; plain RMSProp does not.
- Centred RMSProp: also track m = E[g] and divide by √(v − m²), the gradient’s standard deviation, rather than its RMS.
- 1. RMSProp's limiting step under a constant gradient is…
- 2. Its first step with β₂ = 0.99 is about…
- 3. Centred RMSProp divides by…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.RMSProp in code
Exercise 1.
- With v = 0 and g = 3, η = 0.01, β₂ = 0.99, the first step is 0.1: ten times the learning rate.
- After many identical gradients, the step settles at exactly η·sign(g).
- For gradients with mean 0.2 and standard deviation 1, the centred version’s denominator estimates the standard deviation (about 1.0).
Practice.
- Typical η is 10⁻³ to 10⁻⁴. ε (10⁻⁸ in PyTorch, sometimes 10⁻⁶ or larger) also caps the step when gradients are tiny.
- With momentum (PyTorch’s momentum argument), RMSProp is close to Adam without bias correction.
- The inflated first steps can destabilise the start of training. A short learning-rate warm-up (E3-20) is a common remedy.
- TensorFlow’s and PyTorch’s RMSProp place ε differently (inside or outside the square root), which matters when gradients are tiny.
torch.optim.RMSprop(params, lr=1e-3, alpha=0.99, eps=1e-8, momentum=0.0, centered=False)- 1. PyTorch calls RMSProp's decay rate…
- 2. A common remedy for inflated first steps is…
- 3. RMSProp with momentum is close to…
Level 3: Advanced
★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.Theory
Sign-like updates. Since RMSProp divides the gradient by its recent RMS, the step’s size is roughly constant and its direction is close to the gradient’s sign per coordinate. With β₂ → 0 it becomes signSGD (E3-16’s Lion is a modern sign method). This makes it robust to gradient scale, but it also means the step does not shrink near the optimum unless the gradient’s sign starts fluctuating: the noise in the sign sets the noise floor.
Memory length. The average spans about 1/(1 − β₂) steps.
- A short memory (0.9) adapts quickly to changes in gradient scale but gives a noisy denominator.
- A long memory (0.999) is smooth but slow to adapt.
- AdaGrad is the infinite-memory limit, with a 1/√t decay built in.
On convex problems with persistent noise, AdaGrad’s decay is a feature: it averages away noise, as exercise 2 shows.
Convergence. RMSProp has no general convergence guarantee. Reddi, Kale and Kumar (2018) showed that exponential moving averages of squared gradients can fail to converge even on simple convex problems, which motivated AMSGrad (E3-9). In practice, with small learning rates and schedules, it works well on many non-convex problems.
- 1. RMSProp with β₂ → 0 becomes…
- 2. AdaGrad corresponds to RMSProp with…
- 3. Non-convergence of moving-average methods was shown by…
Level 4: Expert
★★★★★ Expert⏱ 25 minResearchers: original papers and open problems.Does RMSProp really beat AdaGrad under drift?
History.
- G. Hinton, with N. Srivastava and K. Swersky (2012), proposed RMSProp in the Coursera course Neural Networks for Machine Learning.
- A. Graves (2013) used a centred variant for handwriting generation.
- V. Mnih et al. (2015) trained DQN with RMSProp.
- S. Reddi, S. Kale and S. Kumar (2018) showed non-convergence examples for moving-average methods.
Exercise 2. Online linear regression (10 weights), one example per step. After 20 000 steps the true weights jump to new values. Each method’s learning rate is tuned on a grid to give the lowest error averaged over the whole stream, and all chosen rates lie inside their grids. The table reports the steady-state error (mean squared distance to the true weights over the 2000 steps before the jump), the steps needed after the jump to return below twice that level, and the error averaged over the whole stream.
| method | best η | steady-state error | steps to recover | mean error |
|---|---|---|---|---|
| SGD | 0.03 | 0.0182 | 128 | 0.0365 |
| AdaGrad | 1.0 | 0.0119 | 214 | 0.0469 |
| RMSProp, β₂ = 0.99 | 0.03 | 0.0608 | 200 | 0.0991 |
| RMSProp, β₂ = 0.999 | 0.01 | 0.0184 | 386 | 0.0634 |
A second seed gave the same ordering (mean errors 0.045, 0.059, 0.100, 0.067).
- AdaGrad did not stall. With its rate tuned, it recovered in about 200 steps and had the lowest steady-state error: its 1/√t decay averages the noise away, which is what a stationary noisy regression needs.
- RMSProp was the noisiest method. Its normalised, sign-like steps do not shrink near the optimum, so with a short memory (0.99) its steady-state error was five times AdaGrad’s. A longer memory (0.999) cut the noise but slowed recovery to 386 steps.
- SGD recovered fastest and had the lowest overall error on this well-scaled problem.
- The textbook advantage did not appear here. RMSProp’s benefits show up with badly scaled or changing gradient magnitudes and non-convex training (RNNs, reinforcement learning), not in a well-scaled linear regression with a single jump.
RMSProp in AI, robotics and aerospace
- Reinforcement learning for control and robotics (DQN, A3C variants) has long used RMSProp.
- Recurrent models of sensor sequences benefit from its robustness to gradient-scale differences across time and layers.
- Online adaptation: where data drift is expected, compare optimisers on tracking error after realistic changes rather than assuming any one adapts best.
References
- T. Tieleman, G. Hinton (2012). “Lecture 6.5 — RMSProp: divide the gradient by a running average of its recent magnitude.” COURSERA: Neural Networks for Machine Learning.
- A. Graves (2013). “Generating sequences with recurrent neural networks.” arXiv:1308.0850.
- V. Mnih et al. (2015). “Human-level control through deep reinforcement learning.” Nature 518.
- S. J. Reddi, S. Kale, S. Kumar (2018). “On the convergence of Adam and beyond.” Proc. ICLR.