Momentum and Nesterov Acceleration
Heavy ball, Nesterov's method, the estimate-sequence proof of the O(1/t^2) rate, and why acceleration is fragile.
The lower bound says that a first-order method can achieve on convex smooth problems and under strong convexity, while plain gradient descent achieves only and . Momentum closes both gaps.
Run it: Gradient descent, momentum and SGDTrajectories and suboptimality curves for GD, Nesterov acceleration, heavy ball and SGD on a quadratic.Heavy ball
Equivalently, with velocity : and .
Let with , . With
the heavy-ball iterates satisfy with
Compare gradient descent's .
Key idea
The mechanism is visible in the proof: gradient descent has one tunable parameter and must compromise between the and directions, giving a rate governed by . Momentum has two, and they can be chosen so that the characteristic roots are complex with modulus for every eigenvalue at once. The rate stops depending on which eigenvalue is worst, and the becomes . This is exactly the same trick as Chebyshev acceleration of linear solvers, and the optimal is the Chebyshev value.
Nesterov's method
With and :
The gradient is evaluated at the extrapolated point , not at — this is the difference from heavy ball, and it is what makes the convex (non-strongly-convex) analysis work.
Let be convex and -smooth with minimiser . Then Nesterov's method satisfies
If is additionally -strongly convex, the constant-momentum variant with and satisfies
Quoted from Nesterov's lectures. Together with the lower bound, this settles the complexity of smooth strongly convex first-order optimisation: gradient queries.
Acceleration is fragile
There exist -smooth, -strongly convex functions on (piecewise quadratic with three distinct curvatures) for which heavy ball with the quadratic-optimal parameters does not converge, but enters a limit cycle.
Quoted from Lessard, Recht and Packard, who construct the example and explain it through a robust control analysis. The point is structural: the proof of the heavy-ball rate above used diagonalisation, which requires to be exactly quadratic. For general strongly convex the curvature changes between iterations, and the two-parameter tuning that made all eigendirections contract at no longer applies.
What this does not say
Nesterov's method does have a proof for general convex and for general strongly convex , so it is not fragile in the same way. But neither method has a proof under the conditions that matter for deep learning: no convexity, stochastic gradients, and no global smoothness constant. The empirical fact that momentum helps in neural network training is real and robust; the accelerated rate is not established in that setting, and citing the theorem as an explanation of why momentum helps in deep learning is an over-claim. See the deep learning theory page.
Heuristic — a reasoning shortcut that predicts the right answer in the regimes discussed here. It is not a proof and can fail outside them.
None of these is a proof; each is a lens that makes the phenomenon less surprising.
- Chebyshev / polynomial. After steps, any first-order method on a quadratic produces for some degree- polynomial with . Minimising over such polynomials is a classical problem whose solution is the Chebyshev polynomial, with value for . Acceleration is the algorithmic realisation of the optimal polynomial; gradient descent corresponds to the suboptimal .
- Continuous time. As Nesterov's method has the ODE limit , a damped oscillator with vanishing friction. Su, Boyd and Candès showed this ODE has , and the discrete rate is its discretisation. The damping is the continuous-time image of the momentum.
- Momentum averages out oscillation. In the ill-conditioned directions gradient descent oscillates, and consecutive gradients partly cancel; the momentum buffer accumulates the consistent component and cancels the oscillating one. This is the picture the trajectory panel of the SGD experiment shows, and it is the least rigorous of the three — it explains heavy ball better than it explains Nesterov.
Problems
Heavy ball on a quadratic — the spectral analysisProof · Graduate · 3 hours The Nesterov potential functionProof · Graduate · 3 hours Acceleration as an optimal polynomialProof · Graduate · 1 hour Simulate and compare convergence ratesCoding · Intermediate · 1 hourReferences
- PaperYurii Nesterov (1983). A method of solving a convex programming problem with convergence rate O(1/k^2)
- BookYurii Nesterov (2018). Lectures on Convex Optimization
- PaperWeijie Su, Stephen Boyd and Emmanuel J. Candès (2016). A differential equation for modeling Nesterov's accelerated gradient method
- PaperLaurent Lessard, Benjamin Recht and Andrew Packard (2016). Analysis and design of optimization algorithms via integral quadratic constraintsContains the heavy-ball non-convergence example quoted here.
- PaperBoris T. Polyak (1964). Some methods of speeding up the convergence of iteration methods
These works are cited as sources to read, not reproduced. All exposition, examples and problems on this site are written independently; where an argument is standard, the citation points to a canonical treatment.
Results stated on this page
- TheoremHeavy ball on a quadraticproof includedOn a quadratic, optimally tuned heavy ball converges at rate 1 - 2/(sqrt kappa + 1), a square-root improvement over gradient descent.
- TheoremNesterov acceleration for convex smooth functionsproof includedAn O(1/t^2) rate, matching the first-order lower bound.
- TheoremNesterov acceleration under strong convexityA geometric rate with sqrt(kappa) in place of kappa.
- PropositionHeavy ball can fail to converge on a convex functionThere is a smooth strongly convex function on which a fixed-momentum heavy ball cycles.
- HeuristicInterpretations of accelerationThree readings of why momentum helps, none of which is a proof on its own.
Problems (5)
All problems- Acceleration as an optimal polynomialProofGraduate⏱ 1 hour
- Heavy ball on a quadratic — the spectral analysisProofGraduate⏱ 3 hours
- The Nesterov potential functionProofGraduate⏱ 3 hours
- Simulate and compare convergence ratesCodingIntermediate⏱ 1 hour
- The Ω(1/t²) lower bound for first-order methodsProofOlympiad / Extreme⏱ 1 day