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 . The problem is ill-conditioned when the condition number 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 per step. With the best step size and momentum, heavy-ball converges at the rate . Momentum cancels oscillation across steep directions and builds up speed along shallow ones.
Steps
- Write the update , . Here is the velocity, is the step size and is the momentum coefficient.
- Use a quadratic and diagonalise . Each eigendirection then evolves independently, so you can analyse one at a time.
- For plain GD, the error along eigenvalue shrinks by per step. Stability needs , so progress along is slow. The best choice, , balances the two extreme eigenvalues and gives the rate .
- State that with and , momentum converges at the rate , improving the dependence from to . This is an asymptotic rate: early iterates can overshoot before it kicks in.
- Give the intuition: oscillating gradient components cancel in , while consistent ones add up.
Common mistakes
- Giving “escaping local minima” as the main reason.
- Not mentioning conditioning at all.
- Confusing heavy-ball and Nesterov momentum. The difference is where the gradient is evaluated: Nesterov evaluates it at the look-ahead point.
- Claiming the heavy-ball rate holds for every smooth, strongly convex function. It is guaranteed for quadratics; on general strongly convex functions heavy ball with these settings can fail to converge, and Nesterov’s method is the one with a guaranteed rate.
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 on a convex set , every local minimum is a global minimum. Then show on 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 from , and why is Newton's method not used to train large neural networks?