Part II gave gradient descent a memory. What if it also kept a running estimate of how big its steps have been, and used that too?
Same ravine as Part II's momentum chapter, same starting point, three optimizers stepping at once. Take a few steps and watch orange zigzag through the steep direction while teal barely wobbles at all.
RMSProp — short for Root Mean Square Propagation — keeps a running average of each parameter's squared gradient, then divides the step by its square root — a direction with a big, steep gradient gets its step shrunk automatically:
- — the running average of the squared gradient.
- — the decay rate controlling how much history that running average keeps.
- — the current gradient.
- — the parameter being updated.
- — the learning rate.
- — a tiny constant that keeps the division from blowing up when is near zero.
- Adam combines RMSProp with momentum
Adam — short for Adaptive Moment Estimation — keeps a running average of the gradient itself (, momentum's idea) and of its square (, RMSProp's idea).
- Both averages get corrected for startup bias
Adam corrects both and for their startup bias before combining them the same way RMSProp does.
Watch the distance-to-target numbers rather than the picture. Early on, RMSProp's per-direction scaling lets it beeline almost straight there while momentum is still fighting its own oscillation off the steep axis.
At the very first step from on :
- Find the gradient
giving — larger in than .
- Compute RMSProp's first update
Before its running average has accumulated any history, the update reduces to on each axis — with , , that's a step of on both axes.
- See what that means
RMSProp actively cancels out the difference in steepness between directions, something plain gradient descent and momentum never do.
Keep stepping until all three optimizers land within 0.2 of the target.
Adam is the default optimizer for most modern networks precisely because it combines momentum's "keep going in a consistent direction" with RMSProp's "don't let one steep direction dominate the step size." Neither idea alone is enough on landscapes with wildly different curvature in different directions — which every real network has.