Momentum Methods

Imagine rolling a heavy ball down a narrow, curved valley toward its lowest point. The ball does not follow the steepest local direction at every instant. Instead, it accumulates velocity and coasts through shallow, oscillating regions. It also resists sudden direction changes. Plain Stochastic Gradient Descent behaves like a memoryless hiker. This hiker only ever asks "which way is downhill right now?" It then takes a step of fixed size. Long, narrow ravines arise constantly in deep learning loss landscapes. In these ravines, that hiker zig-zags across the ravine walls. It wastes most of its motion on directions that do not matter. It creeps slowly along the one direction that does. Momentum methods fix this by giving the optimizer inertia. Instead of updating parameters using only the current gradient, momentum does something different. It accumulates a running average of past gradients into a velocity vector. It then updates parameters using that velocity. This single change is barely more than one extra line of arithmetic per step. Yet it is one of the most consequential ideas in the history of optimization. That is because it directly attacks the slow convergence that plagues gradient descent on ill-conditioned problems. This article develops the two dominant forms of momentum used in practice. These are classical heavy-ball momentum (Polyak, 1964) and Nesterov accelerated gradient (Nesterov, 1983). Both are simple enough to implement in a handful of lines. Yet both come with real theoretical guarantees on convex quadratics. These guarantees explain exactly why they help. Both are also the literal foundation of the adaptive optimizers (Adam, RMSProp). Those optimizers are used to train essentially every modern neural network. By the end you will be able to derive the momentum update from first principles. You will be able to explain why Nesterov's "look-ahead" correction provably improves the convergence rate over heavy-ball on convex problems. You will be able to trace both methods step by step on a concrete ill-conditioned quadratic. You will also recognize the standard implementation traps. These include wrong momentum coefficient, exploding velocity, and dampening bugs. Such traps silently degrade training.

Key takeaways
  • Momentum augments gradient descent with a velocity vector that accumulates an exponentially weighted average of past gradients, damping oscillations and accelerating progress along consistent directions.
  • Heavy-ball momentum (Polyak) updates velocity with the gradient at the current point; Nesterov momentum evaluates the gradient at a look-ahead point, correcting overshoot before it happens.
  • On strongly convex quadratics, plain gradient descent converges at rate O(κ)O(\kappa) in iterations to reach fixed accuracy, while momentum methods achieve O(κ)O(\sqrt{\kappa}), where κ\kappa is the condition number — a quadratic improvement.
  • Nesterov's method is provably optimal among first-order methods for smooth convex optimization, matching the O(1/k2)O(1/k^2) lower bound for function-value convergence.
  • Momentum adds only O(d)O(d) extra memory (one velocity vector of the same size as the parameters) and O(d)O(d) extra compute per step — negligible overhead for a major convergence speedup.
  • Momentum is not free: too large a coefficient causes overshoot and divergence, and in the stochastic setting it also amplifies gradient noise if not paired with a properly decayed learning rate.
The core insight

Momentum turns gradient descent from a memoryless, direction-chasing walk into an accelerating roll that remembers past gradients, exponentially damping oscillation and shrinking the iteration count needed to converge from O(κ)O(\kappa) to O(κ)O(\sqrt{\kappa}) on ill-conditioned problems.

The idea

Standard gradient descent updates parameters θt\theta_t using only the instantaneous gradient:

θt+1=θt−η ∇f(θt).\theta_{t+1} = \theta_t - \eta \, \nabla f(\theta_t).

On a well-conditioned, roughly spherical loss surface this works fine. But most real loss surfaces — especially deep network losses and any quadratic with a poorly conditioned Hessian — look like long narrow valleys: curvature is very high in some directions (steep walls) and very low in others (the gentle valley floor). Gradient descent's step size is limited by the steep directions (a larger learning rate would diverge there), so progress along the shallow direction, where we actually want to travel far, is agonizingly slow. The gradient vector oscillates back and forth across the valley walls while barely creeping along the floor.

Heavy-ball momentum introduces an auxiliary velocity vector vtv_t, initialized to zero, and a momentum coefficient β∈[0,1)\beta \in [0, 1) (commonly 0.90.9):

vt+1=βvt+∇f(θt),θt+1=θt−η vt+1.v_{t+1} = \beta v_t + \nabla f(\theta_t), \qquad \theta_{t+1} = \theta_t - \eta \, v_{t+1}.

The velocity is an exponentially weighted moving average of all past gradients. Along directions where consecutive gradients agree in sign (the valley floor), these contributions add constructively and the effective step size grows. Along directions where gradients keep flipping sign (the valley walls), the contributions cancel and oscillation is damped. This is exactly the physical intuition of a ball with mass and friction: β\beta controls how much "memory" (inertia) the ball retains, and 1−β1-\beta acts like friction that keeps the velocity bounded.

Nesterov accelerated gradient (NAG) modifies where the gradient is evaluated. Instead of computing ∇f(θt)\nabla f(\theta_t) at the current point, it first takes a provisional step using the existing velocity ("look ahead"), evaluates the gradient there, and only then updates:

vt+1=βvt+∇f(θt−ηβvt),θt+1=θt−η vt+1.v_{t+1} = \beta v_t + \nabla f(\theta_t - \eta \beta v_t), \qquad \theta_{t+1} = \theta_t - \eta \, v_{t+1}.

This look-ahead gradient acts as a built-in correction: if momentum is about to carry the parameters too far, the gradient at the look-ahead point already "sees" the overshoot and pushes back before it happens, rather than after. This seemingly small reordering is precisely what elevates NAG's convergence rate from merely fast to provably optimal for smooth convex problems, as shown below.

How it works

Both methods share the same two-state update loop — maintain (θt,vt)(\theta_t, v_t) and update both each iteration — differing only in where the gradient is evaluated. The pseudocode below implements both, parameterized by a flag, and is written so that it works identically for full-batch gradient descent or for Stochastic Gradient Descent simply by substituting the stochastic gradient estimator. ```text function MOMENTUM_GD(f, grad_f, theta0, eta, beta, num_steps, nesterov=False): theta = theta0 v = zeros_like(theta0) # velocity, same shape as parameters for t in 1 .. num_steps: if nesterov: lookahead = theta - eta beta v # peek ahead using current velocity g = grad_f(lookahead) # gradient AT the look-ahead point else: g = grad_f(theta) # heavy-ball: gradient at current point v = beta v + g # accumulate velocity theta = theta - eta v # move parameters return theta ``` Two equivalent reformulations are worth knowing because they appear in real libraries.

Two-step (momentum-in-update) form, common in PyTorch's SGD-with-momentum implementation: ```text v_{t+1} = beta v_t + grad_f(theta_t) theta_{t+1} = theta_t - eta v_{t+1} ``` This is exactly heavy-ball as written above.

Nesterov via momentum-corrected gradient, an algebraically equivalent form that avoids ever materializing a separate "look-ahead" parameter copy (useful when parameters are sharded across devices): ```text g_t = grad_f(theta_t) v_{t+1} = beta v_t + g_t theta_{t+1} = theta_t - eta (beta * v_{t+1} + g_t) ``` This produces the same trajectory as the look-ahead form up to re-indexing, and is the version actually implemented in most deep learning frameworks because it needs only the current-point gradient.

Step-by-step mechanics of a single heavy-ball update: 1. Compute the gradient ∇f(θt)\nabla f(\theta_t) at the current parameters (one forward+backward pass). 2. Update the velocity: decay the old velocity by β\beta, add the new gradient. 3. Update the parameters by stepping in the direction of −vt+1-v_{t+1}, scaled by the learning rate η\eta. 4. Repeat until a convergence criterion (gradient norm below a threshold, or a fixed iteration budget) is met. The only structural difference for Nesterov is that step 1 is evaluated not at θt\theta_t but at the point θt−ηβvt\theta_t - \eta\beta v_t — the location the ball would reach if it coasted on pure momentum with no new gradient information.

Figure
Heavy-ball trajectory vs. plain gradient descent on an elongated valley
Elliptical loss contours: GD zig-zags, momentum accelerates minimum θ* start (both) plain GD: oscillates across walls momentum: smooth, damped path plain gradient descent heavy-ball / Nesterov momentum

Complexity & correctness

Per-step cost. Both heavy-ball and Nesterov require exactly one gradient evaluation per step (the same as plain gradient descent), plus O(d)O(d) extra arithmetic to update and apply the velocity vector, where dd is the number of parameters. Memory overhead is one extra length-dd vector to store vtv_t. Since gradient computation (a forward and backward pass through a model) already costs O(d)O(d) or more, momentum's overhead is asymptotically free — it does not change the per-step complexity class of the base algorithm at all. The entire benefit comes from needing fewer steps, not cheaper steps.

Convergence rate on strongly convex quadratics. Consider the model problem

f(θ)=12θ⊤Aθ,A≻0,f(\theta) = \tfrac{1}{2}\theta^\top A \theta, \qquad A \succ 0,

with eigenvalues of AA ranging over [μ,L][\mu, L] (μ\mu = strong convexity constant, LL = smoothness constant), and condition number κ=L/μ\kappa = L/\mu. Analyzing gradient descent's update per eigen-direction with eigenvalue λ\lambda gives a scalar recursion θt+1=(1−ηλ)θt\theta_{t+1} = (1 - \eta\lambda)\theta_t, so convergence requires ∣1−ηλ∣<1|1 - \eta\lambda| < 1 for every λ∈[μ,L]\lambda \in [\mu, L] simultaneously. The best achievable worst-case contraction factor, optimized over η\eta, is

ρGD=κ−1κ+1=1−2κ+1,\rho_{\text{GD}} = \frac{\kappa - 1}{\kappa + 1} = 1 - \frac{2}{\kappa+1},

meaning the number of iterations to reach accuracy ε\varepsilon scales as O(κlog⁡(1/ε))O(\kappa \log(1/\varepsilon)). Heavy-ball momentum turns the same per-direction recursion into a second-order linear recurrence:

θt+1=(1+β)θt−βθt−1−ηλθt.\theta_{t+1} = (1 + \beta)\theta_t - \beta\theta_{t-1} - \eta\lambda\theta_t.

Its characteristic polynomial is r2−(1+β−ηλ)r+β=0r^2 - (1+\beta-\eta\lambda) r + \beta = 0. Choosing the classical Polyak parameters

η=4(L+μ)2,β=(L−μL+μ)2\eta = \frac{4}{(\sqrt{L}+\sqrt{\mu})^2}, \qquad \beta = \left(\frac{\sqrt{L}-\sqrt{\mu}}{\sqrt{L}+\sqrt{\mu}}\right)^{2}

makes both roots of the characteristic polynomial complex with modulus

ρHB=β=L−μL+μ=κ−1κ+1=1−2κ+1.\rho_{\text{HB}} = \sqrt{\beta} = \frac{\sqrt{L}-\sqrt{\mu}}{\sqrt{L}+\sqrt{\mu}} = \frac{\sqrt{\kappa}-1}{\sqrt{\kappa}+1} = 1 - \frac{2}{\sqrt{\kappa}+1}.

Compare the two contraction rates: gradient descent needs O(κ)O(\kappa) iterations while heavy-ball needs O(κ)O(\sqrt{\kappa}) iterations to reach the same accuracy — the condition number enters as a square root instead of linearly. For a valley with κ=10,000\kappa = 10{,}000 (entirely plausible in deep learning), this is the difference between roughly 10,00010{,}000 and 100100 iterations — a two-order-of-magnitude speedup, purely from remembering one extra vector. This local, per-quadratic-direction analysis is honest about heavy-ball's caveat: the clean O(κ)O(\sqrt{\kappa}) rate is proven rigorously only for exact quadratics (or more generally, functions well approximated by them near a strongly convex minimum). For general smooth convex (not necessarily strongly convex) functions, heavy-ball's global worst-case guarantee is not better than plain gradient descent, and there exist convex functions on which heavy-ball with fixed parameters fails to converge at all. This is precisely the gap Nesterov's method closes.

Nesterov's global guarantee. For smooth convex functions (not necessarily strongly convex, Lipschitz gradient constant LL), Nesterov's accelerated gradient method with the time-varying momentum schedule βt=t−1t+2\beta_t = \frac{t-1}{t+2} and η=1/L\eta = 1/L achieves

f(θt)−f(θ∗)≤2L∥θ0−θ∗∥2(t+1)2=O ⁣(1t2),f(\theta_t) - f(\theta^*) \le \frac{2L\lVert\theta_0 - \theta^*\rVert^2}{(t+1)^2} = O\!\left(\frac{1}{t^2}\right),

compared to plain gradient descent's O(1/t)O(1/t) rate on the same class of functions. This O(1/t2)O(1/t^2) rate is not merely fast — Nemirovski and Yudin's classical lower bound shows no first-order method (using only gradient evaluations) can do better than Ω(1/t2)\Omega(1/t^2) on this function class in the worst case. Nesterov's method is therefore optimal: it is impossible to improve its asymptotic rate for general smooth convex functions using only gradient information. In the strongly convex quadratic case, the momentum-coefficient analog of the Polyak choice again yields the O(κ)O(\sqrt{\kappa}) per-iteration contraction rate, matching heavy-ball's local rate but with a rigorously provable global guarantee that heavy-ball lacks.

Why the look-ahead matters, intuitively. Heavy-ball's velocity can drive the iterate past the minimum along the low-curvature direction before the gradient (measured at the pre-overshoot point) has a chance to react — creating a lag between accumulation of momentum and correction. Nesterov's method evaluates the gradient after the momentum step is provisionally taken, so the correction term already accounts for where the point is about to end up, producing tighter control over the trajectory and enabling a stronger convergence proof (typically via a carefully constructed "estimate sequence" or Lyapunov function that decreases monotonically — a proof technique this article will not reproduce in full, but whose conclusion, the O(1/t2)O(1/t^2) rate above, is the one to remember).

Tradeoffs. Momentum is not universally superior. In the stochastic setting (mini-batch gradients), momentum also accumulates gradient noise, not just signal; without an accompanying decayed or well-tuned learning rate, large β\beta can amplify variance rather than damp it, and pathological cases (e.g. very large β\beta combined with too-large η\eta) can cause divergence that plain SGD would have avoided. Momentum also introduces one more hyperparameter to tune, and the elegant O(κ)O(\sqrt{\kappa}) theory is proved for deterministic, convex, quadratic-like problems — real neural loss landscapes are nonconvex, so the guarantee is best read as strong intuition and an excellent practical heuristic rather than a literal proof for deep learning.

Worked example

Take the 2-D quadratic

f(θ)=12(100θ12+θ22),∇f(θ)=(100θ1, θ2),f(\theta) = \tfrac{1}{2}(100\theta_1^2 + \theta_2^2), \qquad \nabla f(\theta) = (100\theta_1,\ \theta_2),

an intentionally ill-conditioned "ravine": steep along θ1\theta_1 (L=100L=100), shallow along θ2\theta_2 (μ=1\mu=1), so κ=100\kappa = 100. Start at θ0=(1,1)\theta_0 = (1, 1); the minimum is θ∗=(0,0)\theta^* = (0,0).

Plain gradient descent needs η<2/L=0.02\eta < 2/L = 0.02 for stability along θ1\theta_1; take η=0.018\eta = 0.018.

ttθ1\theta_1θ2\theta_2f(θt)f(\theta_t)
01.0001.00050.50
1−0.8000.98232.48
20.6400.96420.94
3−0.5120.94713.53
40.4100.9298.77

Notice θ1\theta_1 flips sign every step (it overshoots the minimum along the steep direction repeatedly — the oscillation across the ravine wall) while θ2\theta_2, the direction we actually need to traverse, barely moves (0.982→0.9290.982 \to 0.929 after four steps). This is exactly the zig-zag failure mode motivating momentum: reaching f<10−3f < 10^{-3} here takes on the order of hundreds of iterations because progress is bottlenecked by the slow θ2\theta_2 direction.

Heavy-ball momentum, using Polyak's optimal parameters for this quadratic:

η=4(100+1)2=4121≈0.0331,β=(100−1100+1)2=(911)2≈0.669.\eta = \frac{4}{(\sqrt{100}+\sqrt{1})^2} = \frac{4}{121} \approx 0.0331, \qquad \beta = \left(\frac{\sqrt{100}-1}{\sqrt{100}+1}\right)^2 = \left(\frac{9}{11}\right)^2 \approx 0.669.
ttθ1\theta_1θ2\theta_2f(θt)f(\theta_t)
01.0001.00050.50
1−2.310.967267.1*
21.830.902168.0*
3−1.020.80852.6
40.310.6974.90

(rows marked show the characteristic transient overshoot of underdamped heavy-ball — complex characteristic roots mean the steep-direction error briefly grows in magnitude while oscillating in sign, before decaying geometrically at rate ρHB=(κ−1)/(κ+1)≈0.818\rho_{HB} = (\sqrt{\kappa}-1)/(\sqrt{\kappa}+1) \approx 0.818 per step; contrast with GD's ρGD=(κ−1)/(κ+1)≈0.980\rho_{GD} = (\kappa-1)/(\kappa+1) \approx 0.980 per step.)* Even though the early iterations look worse, the asymptotic contraction factor per step is 0.8180.818 (momentum) versus 0.9800.980 (plain GD). Solving ρt=10−3\rho^t = 10^{-3} for each: plain GD needs t≈log⁡(10−3)/log⁡(0.980)≈342t \approx \log(10^{-3})/\log(0.980) \approx 342 iterations; heavy-ball needs t≈log⁡(10−3)/log⁡(0.818)≈35t \approx \log(10^{-3})/\log(0.818) \approx 35 iterations — roughly a 10× reduction, consistent with the κ=10\sqrt{\kappa} = 10 factor predicted by the theory (κ=100⇒κ=10\kappa = 100 \Rightarrow \sqrt\kappa = 10).

Nesterov, with the same η,β\eta,\beta, differs only in evaluating the gradient at the look-ahead point θt−ηβvt\theta_t - \eta\beta v_t each step; on this exact quadratic (where the Hessian is constant) the trajectories are extremely close to heavy-ball's, and the same O(κ)O(\sqrt\kappa) asymptotic rate applies — the practical distinction between the two methods shows up mainly on non-quadratic or stochastic objectives, where Nesterov's look-ahead correction more reliably prevents runaway oscillation.

Common pitfalls & traps

PitfallWhat goes wrongFix
Momentum coefficient too large (β→1\beta \to 1)Velocity barely decays; parameters overshoot and oscillate with growing amplitude, sometimes diverging outrightKeep β∈[0.8,0.99]\beta \in [0.8, 0.99]; tune jointly with η\eta, since the stable region shrinks as β\beta grows
Forgetting to also shrink η\eta when adding momentumThe learning rate that worked for plain SGD is now too large, since the effective step is roughly η/(1−β)\eta/(1-\beta) at steady stateTreat η⋅11−β\eta \cdot \frac{1}{1-\beta} as the "effective learning rate" and re-tune accordingly
Confusing heavy-ball with Nesterov's update orderImplementing "Nesterov" but evaluating the gradient at θt\theta_t instead of the look-ahead point silently reduces to heavy-ball, losing the provable accelerationCarefully evaluate the gradient at θt−ηβvt\theta_t - \eta\beta v_t, or use the algebraically equivalent momentum-corrected form
Not zero-initializing (or not warming up) velocityNonzero initial velocity injects a spurious "kick" in early iterations, especially harmful with large η\etaInitialize v0=0v_0 = 0; some practitioners also bias-correct early steps, analogous to Adam
Applying full momentum immediately in the stochastic settingNoisy gradients early in training get amplified into velocity, causing instability before the loss landscape is well exploredUse a momentum warm-up schedule (small β\beta growing to its final value over the first iterations)
Ignoring that heavy-ball's O(κ)O(\sqrt\kappa) guarantee is local/quadraticAssuming the same clean rate holds for arbitrary nonconvex deep-learning lossesTreat the rate as strong intuition for local behavior near a well-conditioned basin, not a global proof for nonconvex training

Pioneers & history

Momentum's mathematical roots trace to control theory and mechanics — literally modeling optimization as a physical system with mass and friction — before being formalized for numerical optimization in the 1960s and then proven optimal for a broad function class in the 1980s.

Origins · 1 minBoris Polyak and how this was discovered
BP
Boris Polyak
1935–present · Soviet/Russian applied mathematician, pioneer of numerical optimization theory

Polyak introduced the heavy-ball method in 1964 as a way to accelerate gradient descent by analogy with a physical ball rolling down a surface under gravity and friction. His analysis of the local convergence rate on quadratics — showing the O(κ)O(\sqrt{\kappa}) improvement over plain gradient descent — remains the standard textbook derivation taught today, and his broader body of work on subgradient methods and stochastic approximation underlies much of modern optimization theory.

YN
Yurii Nesterov
1956–present · Belarusian/Russian mathematician, foundational figure in convex optimization theory

Nesterov published his accelerated gradient method in 1983, proving that a specific reordering of the gradient step — evaluating the gradient at a look-ahead point rather than the current iterate — achieves the O(1/t2)O(1/t^2) convergence rate for smooth convex functions, matching the information-theoretic lower bound for first-order methods. This result reshaped the field's understanding of what gradient-only methods can achieve and remains one of the most cited results in continuous optimization.

History
- 1964 — Boris Polyak introduces the heavy-ball method, proving local O(κ)O(\sqrt{\kappa}) acceleration on strongly convex quadratics.
- 1983 — Yurii Nesterov introduces accelerated gradient descent, proving the globally optimal O(1/t2)O(1/t^2) rate for smooth convex functions.
- 1983–1990s — Nemirovski and Yudin's information-theoretic lower bounds establish that no first-order method beats O(1/t2)O(1/t^2) in the worst case, cementing Nesterov's method as rate-optimal.
- 2012–2013 — Sutskever, Martens, Dahl, and Hinton popularize momentum (heavy-ball and Nesterov variants) for training deep neural networks with SGD, showing large empirical gains on hard nonconvex objectives.
- 2014–present — Momentum becomes a built-in component of nearly every modern optimizer (Adam, RMSProp with momentum, LAMB), embedded as a default in all major deep learning frameworks.

Where this matters

Momentum is not a niche technique — it is a load-bearing component of essentially every large-scale learning system in production today. Training image classifiers, language models, and recommendation systems almost universally uses SGD with heavy-ball or Nesterov momentum, or an adaptive optimizer (Adam, AdamW) whose update rule is built directly on top of an exponentially weighted momentum term for the first moment of the gradient. Deep learning frameworks such as PyTorch and TensorFlow expose momentum as a first-class, default-on hyperparameter in their SGD optimizer classes precisely because of the reliability gains documented above. Beyond deep learning, momentum-style acceleration appears throughout numerical computing: accelerated proximal gradient methods (FISTA) used in sparse recovery and compressed sensing are a direct application of Nesterov's technique to nonsmooth composite objectives; large-scale convex solvers in operations research and control use accelerated first-order methods when second-order (Newton-type) methods are too expensive per iteration due to high dimensionality. Any setting with a smooth, expensive-to-differentiate objective and a poorly conditioned landscape — physics simulations, large-scale logistic regression, matrix factorization for recommender systems — is a candidate for momentum acceleration. Understanding momentum is also the essential stepping stone to understanding adaptive methods and the broader landscape of modern optimizer design, since nearly every widely used optimizer is, at its core, "momentum plus some coordinate-wise rescaling."

Ask the tutor: How does momentum interact with adaptive per-coordinate learning rates in optimizers like Adam?

Is momentum the same thing as Adam or RMSProp?

No. Momentum (heavy-ball or Nesterov) accumulates a running average of the raw gradient into a velocity vector and uses it directly to update parameters with a single scalar learning rate applied uniformly across all coordinates. Adam and RMSProp additionally maintain a second-moment estimate (a running average of squared gradients) and use it to rescale the learning rate independently for each parameter coordinate. In fact, Adam's update literally contains a momentum-style exponential moving average of the gradient (its first moment) combined with this per-coordinate rescaling — momentum is a structural ingredient inside Adam, not a competing alternative to it.

Why does momentum help more on ill-conditioned problems specifically?

Ill-conditioning means the loss surface curves much more sharply in some directions than others (high condition number κ=L/μ\kappa = L/\mu). Plain gradient descent's step size is capped by the steepest direction to avoid divergence, which makes progress along shallow directions unbearably slow — this is the zig-zag problem. Momentum's velocity vector accumulates gradient components that are consistent across steps (the shallow, "correct" direction) while canceling out components that flip sign every step (the steep, oscillating direction). The result is that momentum's convergence rate depends on κ\sqrt{\kappa} rather than κ\kappa, a benefit that grows dramatically as conditioning worsens.

Does Nesterov momentum always outperform heavy-ball momentum in practice?

Not universally, but Nesterov has a strictly stronger theoretical guarantee: it is provably rate-optimal on general smooth convex functions, whereas heavy-ball's clean acceleration proof only applies locally to quadratics (or functions well-approximated by a quadratic near the optimum). In empirical deep learning practice, the two often perform similarly, and the choice is frequently secondary to tuning the learning rate and momentum coefficient well. Nesterov tends to be more robust against overshoot on non-quadratic or noisy objectives because its look-ahead gradient reacts to overshoot slightly earlier than heavy-ball's current-point gradient does.

How should I choose the momentum coefficient β in practice?

Common defaults are β=0.9\beta = 0.9 for standard SGD-with-momentum, sometimes β=0.99\beta = 0.99 for very smooth, well-behaved objectives, or a schedule that increases β\beta from a small value early in training toward its final value. Because the effective learning rate scales roughly as η/(1−β)\eta / (1-\beta), changing β\beta generally requires re-tuning η\eta as well; grid search or a learning-rate range test performed jointly over both hyperparameters is standard practice. There is no single universally correct value — it depends on the conditioning of the specific problem and the noise level of the gradient estimates.

Does momentum work with stochastic (mini-batch) gradients, or only full-batch gradient descent?

Momentum is used almost exclusively with stochastic gradients in modern machine learning — full-batch gradient descent is rarely practical at scale. The core mechanism is unchanged: the velocity accumulates an exponential moving average of the stochastic gradient estimates. The caveat is that momentum averages noise as well as signal, so with very noisy mini-batch gradients and a high β\beta, the velocity can end up dominated by accumulated noise rather than true descent direction; in practice this is manageable with a properly tuned learning rate and often mitigated by larger batch sizes or gradient clipping.

What is the "critical damping" intuition behind Polyak's optimal parameter choice?

Polyak's optimal η\eta and β\beta are chosen so that the characteristic roots of the heavy-ball recurrence are complex with equal modulus for every eigenvalue in [μ,L][\mu, L] simultaneously — this is analogous to tuning a damped physical oscillator to sit right at the edge between underdamped (oscillating) and overdamped (slow, no oscillation) behavior, extracting the fastest possible decay rate that still avoids instability. Push β\beta higher and the system oscillates with slower-decaying amplitude; push it lower and the method degenerates toward the slower behavior of plain gradient descent.

Can momentum ever make convergence worse than plain gradient descent?

Yes, in two situations: first, if β\beta and η\eta are chosen without accounting for their coupled effect on stability, the resulting method can oscillate or diverge where plain gradient descent, with the same nominal η\eta, would have converged, since momentum's effective step size is amplified. Second, on genuinely nonconvex, non-quadratic landscapes with sharp, narrow curvature changes, an overly large momentum term can carry the iterate straight through a good local minimum before the gradient signal has a chance to decelerate it, an effect not captured by the idealized quadratic analysis.

Before this