Using curvature
Gradient descent only knows the slope. Newton's method also uses the curvature: it replaces near the current point by the quadratic that has the same value, gradient and Hessian, and jumps straight to that quadratic's minimum. The step is . On an exactly quadratic function this lands on the minimum in a single step, whatever the condition number. Near the minimum of any smooth function, convergence is quadratic: the error is roughly squared at each step, so the number of correct digits about doubles.
Newton's method has a price. With parameters the Hessian has entries and solving with it costs about operations, which is fine for hundreds of parameters and impossible for millions. Far from the minimum, or where is not positive definite, the Newton step can even point uphill, so practical versions damp the step with a line search. Quasi-Newton methods keep most of the speed without the cost. BFGS builds an approximation of the inverse Hessian from the observed changes and , forcing the secant condition . It needs only gradients, costs per step and converges superlinearly. L-BFGS stores just the last pairs, typically 5 to 20, so memory is . It is the usual workhorse for smooth calibrations and maximum-likelihood fits, such as the default optimizers in SciPy.
- Newton: ; one step on a quadratic, quadratic convergence near the minimum.
- BFGS: learns an inverse-Hessian approximation from gradient differences, so no second derivatives are needed.
- L-BFGS: keeps only the last few pairs, so it scales to many parameters.
Lab · what's graded
- The first Newton step15 pts
- The second Newton step15 pts
- A Newton step in two variables15 pts
- Steps on a quadratic15 pts
- The secant condition15 pts
- Methods and ideas10 pts
- Why exact Newton is avoided for huge problems15 pts