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?

Linear algebra and optimisation, Gradient methods
Level L2 Elementary. Length Medium. Nature Mat Mathematical.

What's being asked

Whether you can execute both momentum rules by hand and pinpoint where Nesterov evaluates the gradient.

Key idea

Both methods take the same first step when v0=0. On later steps, heavy-ball evaluates the gradient at the current point wt, whereas Nesterov first applies the momentum coast βvt and evaluates the gradient at the look-ahead point wt+βvt, acting as a brake when approaching a minimum.

Steps

  1. Note the gradient is ∇f(w)=w.
  2. Heavy-ball step 1: v1=0.5(0)−0.25(4)=−1, so w1=4+(−1)=3.
  3. Heavy-ball step 2: evaluate the gradient at w1=3, giving v2=0.5(−1)−0.25(3)=−0.5−0.75=−1.25, so w2=3−1.25=1.75.
  4. Nesterov step 1: look-ahead point is w0+βv0=4+0=4, so v1=−1 and w1=3 (identical to heavy-ball).
  5. Nesterov step 2: first compute the look-ahead point w1+βv1=3+0.5(−1)=2.5. Evaluate the gradient there (2.5), giving v2=0.5(−1)−0.25(2.5)=−0.5−0.625=−1.125, so w2=3−1.125=1.875.
  6. Compare: because the gradient at the look-ahead point 2.5 is smaller than at 3, Nesterov automatically trims the velocity (−1.125 vs −1.25), reducing overshoot in steep valleys.

Common mistakes

How long your answer should be

Half a page; 3–4 minutes.

Last checked on 4 December 2026.

Read this

Previous in Linear algebra and optimisation: Starting from w0=3, perform two steps of gradient descent on f(w)=2(w−1)2+5 with learning rate η=0.4. Does the iterate overshoot the minimum, and do the iterates still converge?
Next in Linear algebra and optimisation: 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?