Quasi-Newton Methods and BFGS
A family of optimization methods that get most of Newton's method's speed by building up an approximation to the curvature from past gradients, instead of computing the full second-derivative matrix directly.
Prerequisites: Newton's Method for Optimization, Gradient Descent
Newton's method converges fast because it uses curvature (the Hessian) to jump straight toward a minimum, but computing that curvature exactly is expensive — for a model with a thousand parameters, the Hessian is a million-entry matrix that must be built and inverted at every step. Most real optimization problems (calibrating a pricing model, fitting a machine-learning model) can't afford that. Quasi-Newton methods ask: can we get almost all of Newton's speed while only ever using the gradient, which is far cheaper to compute?
An analogy: learning the terrain by walking it
A cartographer surveying a valley could measure the exact curvature everywhere with precise instruments (expensive, like the true Hessian) — or she could simply walk the valley, noting how the slope changes from each step to the next, and gradually build up a good mental picture of the terrain's shape purely from that sequence of slope readings. She never measures curvature directly, but after enough steps her mental map becomes almost as good as an exact survey. Quasi-Newton methods do exactly this: they build an approximation to the curvature purely from the history of gradients observed along the way.
The method, one symbol at a time
Let be the gradient at step , and let be the current approximation to the Hessian (starting simple, often the identity matrix). The quasi-Newton step is
which looks exactly like Newton's method — the only difference is is a built-up estimate, not the true Hessian. After taking the step, the key move is the update rule: using the change in position and the change in gradient , the algorithm refines into so that it correctly predicts how much the gradient changed for that particular step. BFGS (named for Broyden, Fletcher, Goldfarb, and Shanno, who each derived it independently) is the most widely used update rule; in plain English, it nudges the curvature estimate just enough to be consistent with the most recent observed slope change, while disturbing the rest of the estimate as little as possible.
Worked example 1: building a 1-D curvature estimate
In one dimension the "Hessian" is just a number (the second derivative). Suppose at the gradient is , and we start with the naive curvature guess (since we have no information yet). The step is — clearly too far, since the true curvature is larger than 1. Suppose the true gradient at turns out to be . The observed change is and . The secant condition that any quasi-Newton update must satisfy is , giving — matching the true curvature of from the Newton's-method example exactly, after just one correction.
Worked example 2: calibrating a two-parameter model
A quant is calibrating a two-parameter volatility model to match five market option prices by minimizing squared pricing error. Computing the exact 2×2 Hessian at every iteration requires evaluating the pricing model many extra times to get second derivatives numerically. Using BFGS instead, the optimizer starts with as the identity matrix (i.e., assumes gradient descent behavior initially) and, after each of the first few steps, updates using only the gradient of the squared-error objective (which the pricer already computes cheaply). By iteration 5–6, the approximated curvature has converged close enough to the true Hessian that step sizes and directions behave almost identically to full Newton's method — but the calibration used only gradient evaluations throughout, roughly 5–10x fewer model evaluations than computing exact Hessians at each step would have needed.
Compare a fixed-step gradient path against a curvature-adapting path on the same bowl-shaped loss: notice how the adaptive path's steps get longer in flat directions and shorter in steep ones as it "learns" the shape, converging in far fewer iterations.
What this means in practice
BFGS and its low-memory variant L-BFGS are the default optimizers behind most model calibration and maximum-likelihood fitting in quant finance and machine learning — they're what runs under the hood when a library function just says "minimize." L-BFGS in particular never stores the full matrix at all, only a handful of recent pairs, making it usable even when there are millions of parameters.
Quasi-Newton methods like BFGS approximate the Hessian purely from the sequence of observed gradients, getting most of Newton's method's fast convergence while only ever needing gradient evaluations — far cheaper than computing exact second derivatives.
The curvature estimate is only trustworthy once it has been built up over several steps from consistent gradient information; started cold (as the identity matrix) or after a step that violates the secant condition's assumptions (for instance, a very noisy gradient in a stochastic setting), the estimate can become a poor, even actively misleading, model of the true curvature. This is why BFGS is standard for smooth, deterministic objectives like model calibration, but is not used directly for training neural networks on noisy mini-batches — the gradient noise corrupts the curvature estimate faster than it can be usefully built.
Related concepts
Practice in interviews
Further reading
- Nocedal & Wright, Numerical Optimization, ch. 6
- Fletcher, Practical Methods of Optimization, ch. 3