Plain SGD updates along the negative instantaneous gradient:
θt+1=θt−ηgt with
gt=∇θL(θt); on ill-conditioned (elliptical) contours with large condition number
κ=λmax/λmin, gradient directions flip frequently, producing zig-zag oscillation. Momentum adds a velocity term that exponentially averages past gradients:
vt=γvt−1+ηgt,
θt+1=θt−vt. Expanding the recursion as a geometric series
vt=η∑k=0tγkgt−k: older gradients receive weight
γk (default
γ=0.9; after 10 steps the contribution decays to
0.910≈0.35). Consistent gradient directions accumulate while high-frequency reversals cancel out, so momentum accelerates along the valley and damps oscillation. NAG (Nesterov accelerated gradient) extrapolates one step along the velocity before computing the gradient:
vt=γvt−1+η∇θL(θt−γvt−1),
θt+1=θt−vt; it is more sensitive to changes in curvature and improves the convex convergence rate from
O(1/t) (SGD) to
O(1/t2).