Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Try a big step, and shrink it if it doesn’t help
You know which direction is downhill, but not how far to walk. A simple rule works well: try a long stride. If you didn’t get noticeably lower, try half that stride, then half again, until it works. That’s backtracking.
There’s also a second rule against being too timid. If the ground is still sloping steeply downhill where you’d land, you could have gone further. Together these rules make the step size choose itself.
Line searches make optimizers robust without hand-tuning. They’re built into L-BFGS (used for calibration, SLAM initialization and scientific ML), into damped Newton and interior-point solvers for MPC, and into trajectory optimizers. A fixed step that works on one problem diverges on the next; a line search adapts.
- 1. Backtracking means…
- 2. The second (curvature) rule prevents steps that are…
- 3. With a line search, the step size is…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.The one-dimensional problem
Given and a descent direction (), define . Then . We want an that decreases enough, cheaply.
Armijo (sufficient decrease)
The step must achieve at least a fraction of the decrease predicted by the tangent line.
Backtracking: start from (1 for Newton and quasi-Newton). While Armijo fails, set with , often . Because , small enough steps always pass, so the loop terminates.
- 1. Armijo compares φ(α) with…
- 2. Backtracking always terminates because…
- 3. A typical value of c₁ is…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 45 minUndergraduate students and practising engineers.The Wolfe conditions
Armijo alone accepts arbitrarily tiny steps. The curvature condition rules them out:
The slope at the new point must have flattened. Strong Wolfe also bounds overshooting: . Typical values: for Newton and quasi-Newton, and for nonlinear conjugate gradient. For a smooth bounded below, steps satisfying both conditions always exist.
Why it matters: BFGS needs to keep its Hessian approximation positive definite (A6.3-5). The Wolfe curvature condition guarantees it.
Exact line search
On a quadratic along : . Successive gradients are then orthogonal, which causes the classic zig-zag. Even with exact steps, steepest descent’s rate in is . A line search fixes the step length, not the direction.
Smarter backtracking
Fit a parabola through , and the rejected , and jump to its minimum:
Cubic interpolation and zoom procedures (Moré and Thuente, 1994) find strong-Wolfe steps in a couple of evaluations.
- 1. The weak Wolfe curvature condition is…
- 2. Exact line search on a quadratic along −g gives α* =
- 3. BFGS needs Wolfe steps because they guarantee…
Level 3: Advanced
★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.Armijo steps exist and aren’t too small
If is -Lipschitz, then . This is below the Armijo line whenever . So backtracking stops at some (or at ). For that’s . The step is automatically of order without knowing . ∎
Zoutendijk’s theorem
Let . If is bounded below with an -Lipschitz gradient and the steps satisfy Wolfe, then
So if the directions stay away from orthogonal to the gradient (), we get . That’s global convergence to stationary points for steepest descent, damped Newton with positive definite Hessians, and BFGS on convex problems. ∎ (Nocedal and Wright, 2006, Thm 3.2.)
Newton + line search
Away from the solution, the Newton direction with backtracking behaves like a scaled gradient method and guarantees descent. Near the solution, passes Armijo (for ), and quadratic convergence takes over. Always try first for Newton-type methods.
Exercise 3.1: Backtracking guarantees what minimum step for GD with L = 100, ρ = 0.5, c₁ = 10⁻⁴?
, about .
- 1. For GD with backtracking, the accepted step is at least of order…
- 2. Zoutendijk's theorem needs directions with…
- 3. Near the solution, damped Newton accepts…
Level 4: Expert
★★★★★ Expert⏱ 35 minResearchers: original papers and open problems.Fitting a grasp-success model
Logistic regression on grasp features (one feature on a 3× larger scale) is smooth and strongly convex with regularization. Steepest descent with backtracking needs hundreds of iterations, because the line search fixes the step length but not the badly scaled direction. Newton with backtracking (try , halve if needed) converges in about 6 iterations and about a dozen evaluations. This is the IRLS algorithm behind every statistics package’s logistic fit.
Line searches in AI, robotics and aerospace
- L-BFGS with a strong-Wolfe line search (Moré–Thuente) is the default in SciPy, PyTorch’s
LBFGS, and many calibration and scientific-ML codes (Liu and Nocedal, 1989). - Interior-point and SQP solvers (IPOPT, SNOPT) use backtracking, filter or merit-function line searches to globalize Newton steps in trajectory optimization (Gill, Murray and Saunders, 2005).
- Deep learning: stochastic line searches (Armijo on mini-batches) can replace learning-rate tuning in some regimes (Vaswani et al., 2019).
- Trust regions are the alternative globalization: limit the step’s length instead of searching along it. They’re used in Ceres and many SLAM back ends.
References
- L. Armijo (1966). “Minimization of functions having Lipschitz continuous first partial derivatives.” Pacific Journal of Mathematics, 16(1).
- P. Wolfe (1969). “Convergence conditions for ascent methods.” SIAM Review, 11(2).
- G. Zoutendijk (1970). “Nonlinear programming, computational methods.” In Integer and Nonlinear Programming, North-Holland.
- J. Nocedal, S. Wright (2006). Numerical Optimization, 2nd ed. Springer. Ch. 3.
- J. Moré, D. Thuente (1994). “Line search algorithms with guaranteed sufficient decrease.” ACM Transactions on Mathematical Software, 20(3).
- D. Liu, J. Nocedal (1989). “On the limited memory BFGS method for large scale optimization.” Mathematical Programming, 45.
- P. Gill, W. Murray, M. Saunders (2005). “SNOPT: an SQP algorithm for large-scale constrained optimization.” SIAM Review, 47(1).
- S. Vaswani et al. (2019). “Painless stochastic gradient: interpolation, line-search, and convergence rates.” NeurIPS.
- A. Conn, N. Gould, P. Toint (2000). Trust-Region Methods. SIAM.
- S. Boyd, L. Vandenberghe (2004). Convex Optimization. Cambridge University Press. §9.2.