3.2.4 · D5Training Deep Networks
Question bank — AdaGrad and RMSprop
A question bank of the misconceptions and boundary cases that AdaGrad and RMSprop invite. Each answer is real reasoning, not a bare yes/no — cover the answer, argue it yourself, then reveal. Parent: 3.2.4 AdaGrad and RMSprop.
Before you start, make sure these three symbols are clear in your head (the whole bank leans on them):
The step size you actually take in direction is — that "effective learning rate" is what almost every trap below is really about.
True or false — justify
AdaGrad and RMSprop change the raw gradient direction before stepping.
False — they leave the sign and identity of each alone; they only rescale each coordinate's magnitude independently. The move can point in a different direction than only because coordinates are scaled by different amounts.
RMSprop is just AdaGrad with a bigger .
False — the difference is the accumulator, not . AdaGrad sums squares forever; RMSprop replaces the sum with a decaying average so old gradients fade. is only a tiny anti-divide-by-zero guard in both.
With a constant gradient , AdaGrad's step size eventually reaches zero.
True — grows without bound, so . The optimizer starves itself of step size no matter how far from the minimum it still is.
With a constant gradient , RMSprop's step size eventually reaches zero.
False — saturates at (steady state ), so the step settles to forever. It runs at a healthy pace, which is exactly why it replaced AdaGrad.
Because appears only once in the update, every parameter shares one learning rate.
False — is a shared base, but the effective rate is per coordinate. Two parameters with different gradient histories get genuinely different step sizes.
Squaring the gradient in the accumulator is just to make it positive; absolute value would work the same.
False — squaring also weights large gradients more heavily and gives a variance-like, smoothly-differentiable measure. The later then restores gradient-sized units, so the pair then is deliberate, not interchangeable with .
Setting in RMSprop is a safe, "maximum memory" choice.
False — at the update becomes : it freezes the accumulator at its initial value (often 0), so new gradients never enter the average. Memory isn't maximized — it's disconnected from reality.
Setting makes RMSprop identical to plain Stochastic Gradient Descent.
False — at , , so the step becomes : a sign-based step of fixed magnitude, ignoring gradient size entirely. That's a signed-gradient method, not SGD.
RMSprop adapts to the sign of the gradient.
False — it adapts to the magnitude via squared gradients, which throw the sign away. The sign that finally reaches the parameter comes only from the raw multiplying the scale factor.
Spot the error
"AdaGrad divides by , so bigger history means smaller steps."
The scaling divides by , not . Dividing by directly would over-shrink (wrong units: is gradient-squared) and kill learning even faster; the square root keeps the step in gradient-sized units.
"RMSprop's is an average, so I should divide by the number of steps like a normal mean."
No — the EWMA already carries its own normalization through the and weights, which form a geometric series summing to 1. Dividing again by would double-normalize and shrink the estimate wrongly.
"To make AdaGrad train longer, just increase ."
A bigger delays the death but cannot prevent it: the step is , which still for any fixed . The growth of is the disease; scaling only shifts the timeline, so RMSprop's decaying memory is the real cure.
"For a parameter whose gradient is always exactly 0, AdaGrad and RMSprop will slowly drift it."
If for all , then the numerator is , so the whole update term is — the parameter never moves. The accumulator being tiny is irrelevant when the gradient it multiplies is zero.
"RMSprop removes the vanishing/exploding gradient problem."
It mitigates the effect by rescaling each coordinate to a comparable step size, but it does not fix the underlying Vanishing and Exploding Gradients in the backward pass — the gradients themselves can still be tiny or huge; RMSprop just normalizes how far you step given them.
"Adam is a totally different algorithm from RMSprop."
Adam Optimizer is essentially RMSprop plus Momentum plus bias correction — it reuses RMSprop's exact squared-gradient EWMA for the denominator, then adds a first-moment EWMA on top. It's a superset, not a rival.
Why questions
Why do we accumulate squared gradients instead of the gradients themselves?
Raw gradients can be positive or negative and would cancel in a running sum, telling you nothing about typical magnitude. Squaring makes every contribution positive so the accumulator measures how big gradients have been, which is what we want to divide by.
Why does RMSprop need a decay at all, instead of a plain running average?
A plain running average still weights ancient gradients as much as fresh ones and its update shrinks like , so it stiffens over time much like AdaGrad. The geometric decay keeps memory finite and constant-length, so recent curvature always dominates.
Why is a per-coordinate step size useful when Stochastic Gradient Descent with one works on many problems?
When directions have wildly different curvature — steep in some, flat in others — a single must be small enough not to blow up the steep ones, which then crawls on the flat ones. Per-coordinate scaling lets each direction move at its own safe speed simultaneously.
Why does dividing by tend to equalize step sizes across coordinates?
A coordinate with large gradients builds a large , so dividing shrinks its step; a coordinate with small gradients keeps small and its step large. The net effect pushes very different raw-gradient magnitudes toward comparable actual moves.
Why can't we just use a fixed learning-rate schedule instead of these adaptive methods?
A schedule changes the global rate over time but treats all parameters identically; it cannot notice that parameter A needs shrinking while parameter B needs boosting right now. Adaptivity is per-coordinate and data-driven, which a fixed schedule can't be — though the two are often combined.
Why does AdaGrad still shine on sparse problems (like NLP embeddings) despite its death flaw?
For a rarely-seen feature, stays tiny (few nonzero gradients), so its effective rate remains large exactly when the feature finally appears. The "remember forever" behaviour is a feature for sparse, mostly-convex settings and only a bug for long dense deep-net training.
Edge cases
At the very first step () with , what is AdaGrad's effective rate?
, so the step is — the first gradient sets its own scale, giving a step of size roughly regardless of how big is.
What happens on the first RMSprop step if is initialized to 0?
, which is much smaller than , so the denominator is under-estimated and the first few steps can be too large. This warm-up bias is exactly what Adam's bias correction fixes.
If two coordinates always have identical gradients, do AdaGrad/RMSprop ever treat them differently?
No — identical gradient histories produce identical accumulators and identical effective rates, so they step in lockstep. Adaptivity only distinguishes coordinates whose gradient magnitudes have differed at some point.
What if is set far too large (say )?
The denominator becomes dominated by , so the effective rate flattens toward and the per-coordinate adaptation is drowned out — you drift back toward ordinary SGD-like behaviour, losing the whole point.
For a gradient that suddenly spikes then returns to normal, how do the two accumulators react differently?
AdaGrad's absorbs the spike permanently into its sum, so that coordinate stays over-shrunk for the rest of training. RMSprop's EWMA lets the spike decay away in a few steps (roughly steps of memory), so it recovers a normal step size.
In the limit with bounded nonzero gradients, compare the two effective rates.
AdaGrad's because grows unboundedly, so learning halts. RMSprop's , a finite nonzero constant set by the recent mean-square gradient, so learning continues indefinitely.
Recall One-sentence summary of every trap here
Almost every misconception collapses once you remember: the accumulator is under a square root, it scales magnitude per coordinate (never sign or direction), and the only real difference between the two methods is grows-forever (AdaGrad, dies) versus decaying-average (RMSprop, survives).
Connections
- AdaGrad and RMSprop — the parent this bank stress-tests
- Stochastic Gradient Descent — the one-rate baseline several traps contrast against
- Exponentially Weighted Moving Averages — the decay math behind RMSprop's survival
- Momentum — first-moment averaging, distinct from these second-moment methods
- Adam Optimizer — RMSprop + momentum + bias correction (the warm-up trap)
- Learning Rate Schedules — global-rate alternative some traps compare to
- Vanishing and Exploding Gradients — what these mitigate but don't cure