TensorTau PathToAGI Training Deep Networks Level 07

Level 07 · Training Deep Networks · Chapter 094

RMSProp

Why should every parameter use the same effective step size when their gradients can have very different scales?

RMSProp tracks an exponential moving average of squared gradients:

st=ρst−1+(1−ρ)gt2.s_t=\rho s_{t-1}+(1-\rho)g_t^2.

Then

θt=θt−1−ηgtst+ϵ.\theta_t=\theta_{t-1}-\eta\frac{g_t}{\sqrt{s_t}+\epsilon}.

Operations are elementwise.

1. The intuition

If one parameter repeatedly receives large gradients, its sts_t grows and the denominator shrinks its effective step. A parameter with consistently smaller gradients gets less reduction.

large-gradient coordinate → larger denominator → smaller effective move
small-gradient coordinate → smaller denominator → relatively larger move

This can reduce zig-zagging on differently scaled directions.

2. Why square gradients?

Squaring removes sign and measures magnitude. The moving average remembers recent gradient scale without storing full history.

3. Epsilon

ϵ\epsilon prevents division by zero and improves numerical stability. It looks tiny but is part of the algorithm.

4. Relation to momentum

Momentum adapts direction through first-moment history. RMSProp adapts scale through second-moment-like history. Adam will combine both ideas.

What to Remember

RMSProp normalizes each coordinate’s gradient by a running estimate of its recent magnitude.

Next → Adam: what happens when we combine momentum-like direction memory with RMSProp-like scaling?

Six ways to work the chapter, climbing from explaining it in your own words to investigating it like a researcher. Reading is not enough — this is where the chapter lands.

  1. Explain: Why use squared gradients?
  2. Calculate: Perform one RMSProp update from supplied g,s,ρ,η.
  3. Predict: What happens to effective step size after repeated large gradients?
  4. Break: Remove epsilon in a zero-gradient coordinate.
  5. Build: Implement RMSProp from scratch.
  6. Investigate: Compare SGD and RMSProp on features with very different scales.