Why does momentum speed up gradient descent on ill-conditioned problems?

Linear algebra and optimisation, Gradient methods
Level L4 Advanced. Length Medium. Nature Th+Mat Both.

What's being asked

Whether you can reason about optimisation through the condition number, instead of only saying “it is like a ball rolling downhill”.

Key idea

Take a quadratic whose Hessian (matrix of second derivatives) has eigenvalues in [μ,L]. The problem is ill-conditioned when the condition number κ=L/μ is large, that is, when the valley is much steeper in some directions than others. With the best fixed step size, gradient descent shrinks the error by a factor κ−1κ+1≈1−2/κ per step. With the best step size and momentum, heavy-ball converges at the rate κ−1κ+1≈1−2/κ. Momentum cancels oscillation across steep directions and builds up speed along shallow ones.

Steps

  1. Write the update vt+1=βvt−η∇f(xt), xt+1=xt+vt+1. Here v is the velocity, η is the step size and β is the momentum coefficient.
  2. Use a quadratic f(x)=12x⊤Ax and diagonalise A. Each eigendirection then evolves independently, so you can analyse one at a time.
  3. For plain GD, the error along eigenvalue λi shrinks by ∣1−ηλi∣ per step. Stability needs η<2/L, so progress along μ is slow. The best choice, η=2/(L+μ), balances the two extreme eigenvalues and gives the rate κ−1κ+1.
  4. State that with η=4(L+μ)2 and β=(κ−1κ+1)2, momentum converges at the rate κ−1κ+1, improving the dependence from κ to κ. This is an asymptotic rate: early iterates can overshoot before it kicks in.
  5. Give the intuition: oscillating gradient components cancel in v, while consistent ones add up.

Common mistakes

How long your answer should be

3–4 minutes, ideally with a sketch of zig-zagging in a narrow valley.

Read this

Previous in Linear algebra and optimisation: Prove that for a convex function f on a convex set C, every local minimum is a global minimum. Then show on f(x)=max⁡(0,∣x∣−1) that the minimiser need not be unique, and what extra condition makes it unique?
Next in Linear algebra and optimisation: How does Newton's method compare with gradient descent? What does one Newton step do on f(x,y)=4x2+2y2+5 from (−1,2), and why is Newton's method not used to train large neural networks?