The idea behind Quasi-Newton methods is to approximate the Hessian matrix at each iteration by incorporating gradient information into the Newton method, thereby avoiding the need for direct computation of the Hessian.
We implement two classical quasi-Newton methods for unconstrained optimization:
- BFGS: Broyden–Fletcher–Goldfarb–Shanno method
- DFP: Davidon–Fletcher–Powell method
Both methods minimize a differentiable objective function
The exact Hessian matrix
is not explicitly computed during the optimization. Instead, BFGS and DFP construct an approximation of the inverse Hessian matrix. This approximation is updated using information obtained from successive iterates and gradients.
For a twice-differentiable function, Newton's method determines the search direction by solving
Equivalently,
Newton's method can converge very rapidly near a minimizer, but it has two important disadvantages:
- The Hessian must be computed.
- A linear system involving the Hessian must be solved at every iteration.
Quasi-Newton methods avoid direct Hessian computation. They maintain a matrix
The search direction is then calculated as
where
After choosing a step length
The corresponding displacement and gradient change are defined by
and
The vectors
The exact inverse Hessian satisfies approximately
Therefore, a new inverse Hessian approximation
Both BFGS and DFP construct matrix updates that satisfy this condition while changing the previous approximation as little as possible.
The curvature quantity
plays a central role. For a positive-definite Hessian approximation, it is desirable that
When this condition is not satisfied, the update may destroy the positive definiteness of
The BFGS update for the inverse Hessian approximation is
where
An equivalent expanded form is
The BFGS direction is
If
then the updated matrix
so
BFGS is widely used because it generally has good numerical stability and strong practical performance. It is especially effective for problems where the objective function has curved or narrow valleys, such as the Rosenbrock function.
BFGS usually provides a reliable compromise between:
- computational cost;
- numerical stability;
- convergence speed;
- preservation of positive definiteness.
The DFP update is
Using
as an intermediate vector, the second correction term can also be written as
The DFP search direction is also
The DFP update satisfies the secant condition
If
DFP was one of the earliest quasi-Newton methods. It has a similar mathematical structure to BFGS, but the correction terms are arranged differently.
In many practical optimization problems, BFGS is more robust than DFP. DFP may be more sensitive to:
- inaccurate line searches;
- round-off errors;
- poor curvature information;
- nearly singular update denominators.
Nevertheless, DFP is important because it provides a useful comparison with BFGS and illustrates the symmetry between Hessian and inverse-Hessian approximation methods.
The search direction alone does not determine the next iterate. A step length
The implementation considers two line-search strategies:
- Armijo backtracking;
- weak Wolfe line search.
The Armijo condition requires
where
Since
Therefore, the right-hand side is smaller than
A typical backtracking procedure starts with
and repeatedly reduces the step length according to
where
Armijo backtracking is simple and inexpensive, but it only examines the function value. It does not directly control the gradient behavior at the new point.
The weak Wolfe line search requires both sufficient decrease and a curvature condition.
- Sufficient decrease
- Curvature condition
where
The first condition prevents the step from being too large. The second condition prevents the step from being excessively small and ensures that the directional derivative has been reduced sufficiently.
Because
the curvature condition requires the new directional derivative to be less negative than the initial one.
The weak Wolfe conditions are particularly useful for quasi-Newton methods because they are more closely related to maintaining the curvature condition
A Wolfe line search generally consists of two stages:
- Bracketing phase: increase the trial step length until a suitable interval containing an acceptable step is found.
- Zoom phase: repeatedly reduce the interval and search for a step satisfying both Wolfe conditions.
The implementation uses a safeguarded bisection strategy during the zoom phase. This is simpler than interpolation-based methods, although it may require more function and gradient evaluations.
- Broyden, C. G., Fletcher, R., Goldfarb, D., and Shanno, D. F. Quasi-Newton methods for unconstrained optimization.
- Nocedal, J. and Wright, S. J. Numerical Optimization.
- Fletcher, R. Practical Methods of Optimization.
