How does RMSProp fix AdaGrad's diminishing step size, and for f(w)=12w2 starting from w0=4 with s0=0, η=1 and ϵ=0, what are w1 and w2 under (a) AdaGrad (st=st−1+gt2) and (b) RMSProp (st=ρst−1+(1−ρ)gt2) with ρ=0.75?

Linear algebra and optimisation, Adaptive optimisers
Level L2 Elementary. Length Medium. Nature Mat Mathematical.

What's being asked

Whether you understand why AdaGrad stalls on long runs and can compute both adaptive updates by hand.

Key idea

AdaGrad accumulates the sum of all past squared gradients st=∑k=1tgk2, so st grows forever and the effective step η/st shrinks towards zero. RMSProp replaces the cumulative sum with an exponential moving average st=ρst−1+(1−ρ)gt2, forgetting old gradients.

Steps

  1. Write the common update rule: given gradient gt=∇f(wt−1)=wt−1, update the squared-gradient accumulator st and then step wt=wt−1−ηst+ϵgt, where η is the base learning rate and ϵ≥0 is a small stability constant.
  2. (a) AdaGrad step 1: g1=4, s1=0+42=16, so s1=4 and w1=4−14(4)=3.
  3. (a) AdaGrad step 2: g2=3, s2=16+32=25, so s2=5 and w2=3−15(3)=2.4. Notice the denominator grew from 4 to 5 even though the gradient got smaller.
  4. (b) RMSProp step 1 (decay rate ρ=0.75): g1=4, s1=0.75(0)+0.25(16)=4, so s1=2 and w1=4−12(4)=2.
  5. (b) RMSProp step 2: g2=2, s2=0.75(4)+0.25(4)=4, so s2=2 and w2=2−12(2)=1. Because old gradients decay, the effective learning rate stays active instead of stalling.

Common mistakes

How long your answer should be

Half a page; 4 minutes.

Last checked on 4 December 2026.

Read this

Previous in Linear algebra and optimisation: Minimise f(w)=12w2 starting from w0=4 with initial velocity v0=0, learning rate η=0.25 and momentum β=0.5. Compute w1 and w2 using (a) heavy-ball momentum (vt+1=βvt−η∇f(wt), wt+1=wt+vt+1) and (b) Nesterov accelerated gradient (vt+1=βvt−η∇f(wt+βvt), wt+1=wt+vt+1). How do the two updates differ?
Next in Linear algebra and optimisation: For what values of the constant c is f(x,y)=2x2+2cxy+8y2−12x−24y convex, for what values is it strictly convex, and what is its minimum when c=2?