# Quasi-Newton method

(Redirected from Quasi-newton methods)

Quasi-Newton methods are methods used to either find zeroes or local maxima and minima of functions, as an alternative to Newton's method. They can be used if the Jacobian or Hessian is unavailable or is too expensive to compute at every iteration. The "full" Newton's method requires the Jacobian in order to search for zeros, or the Hessian for finding extrema.

## Search for zeros: root finding

Newton's method to find zeroes of a function ${\displaystyle g}$ of multiple variables is given by: ${\displaystyle x_{n+1}=x_{n}-[J_{g}(x_{n})]^{-1}g(x_{n})\,\!}$ where ${\displaystyle [J_{g}(x_{n})]^{-1}}$ is the left inverse of the Jacobian matrix ${\displaystyle J_{g}(x_{n})}$ of ${\displaystyle g}$ evaluated for ${\displaystyle x_{n}}$.

Strictly speaking, any method that replaces the exact Jacobian ${\displaystyle J_{g}(x_{n})}$ with an approximation is a quasi-Newton method. The chord method (where ${\displaystyle J_{g}(x_{n})}$ is replaced by ${\displaystyle J_{g}(x_{o})}$ for all iterations) for instance is a simple example. The methods given below for optimization refer to an important subclass of quasi-Newton methods, secant methods.[1]

Using methods developed to find extrema in order to find zeroes is not always a good idea as the majority of the methods used to find extrema require that the matrix that is used is symmetrical. While this holds in the context of the search for extrema, it rarely holds when searching for zeroes. Broyden's "good" and "bad" methods are two methods commonly used to find extrema that can also be applied to find zeroes. Other methods that can be used are the Column Updating Method, the Inverse Column Updating Method, the Quasi-Newton Least Squares Method and the Quasi-Newton Inverse Least Squares Method.

More recently quasi-Newton methods have been applied to find the solution of multiple coupled systems of equations (e.g. fluid-structure interaction problems or interaction problems in physics). They allow the solution to be found by solving each constituent system separately (which is simpler than the global system) in a cyclic, iterative fashion until the solution of the global system is found.[1][2]

## Search for extrema: optimization

Noting that the search for a minimum or maximum of a single-valued function is nothing else than the search for the zeroes of the gradient of that function, quasi-Newton methods can be readily applied to find extrema of a function. In other words, if ${\displaystyle g}$ is the gradient of ${\displaystyle f}$ then searching for the zeroes of the multi-valued function ${\displaystyle g}$ corresponds to the search for the extrema of the single-valued function ${\displaystyle f}$; the Jacobian of ${\displaystyle g}$ now becomes the Hessian of ${\displaystyle f}$. The main difference is that the Hessian matrix is a symmetric matrix, unlike the Jacobian when searching for zeroes. Most quasi-Newton methods used in optimization exploit this property.

In optimization, quasi-Newton methods (a special case of variable metric methods) are algorithms for finding local maxima and minima of functions. Quasi-Newton methods are based on Newton's method to find the stationary point of a function, where the gradient is 0. Newton's method assumes that the function can be locally approximated as a quadratic in the region around the optimum, and uses the first and second derivatives to find the stationary point. In higher dimensions, Newton's method uses the gradient and the Hessian matrix of second derivatives of the function to be minimized.

In quasi-Newton methods the Hessian matrix does not need to be computed. The Hessian is updated by analyzing successive gradient vectors instead. Quasi-Newton methods are a generalization of the secant method to find the root of the first derivative for multidimensional problems. In multiple dimensions the secant equation is under-determined, and quasi-Newton methods differ in how they constrain the solution, typically by adding a simple low-rank update to the current estimate of the Hessian.

The first quasi-Newton algorithm was proposed by William C. Davidon, a physicist working at Argonne National Laboratory. He developed the first quasi-Newton algorithm in 1959: the DFP updating formula, which was later popularized by Fletcher and Powell in 1963, but is rarely used today. The most common quasi-Newton algorithms are currently the SR1 formula (for symmetric rank one), the BHHH method, the widespread BFGS method (suggested independently by Broyden, Fletcher, Goldfarb, and Shanno, in 1970), and its low-memory extension, L-BFGS. The Broyden's class is a linear combination of the DFP and BFGS methods.

The SR1 formula does not guarantee the update matrix to maintain positive-definiteness and can be used for indefinite problems. The Broyden's method does not require the update matrix to be symmetric and it is used to find the root of a general system of equations (rather than the gradient) by updating the Jacobian (rather than the Hessian).

One of the chief advantages of quasi-Newton methods over Newton's method is that the Hessian matrix (or, in the case of quasi-Newton methods, its approximation) ${\displaystyle B}$ does not need to be inverted. Newton's method, and its derivatives such as interior point methods, require the Hessian to be inverted, which is typically implemented by solving a system of linear equations and is often quite costly. In contrast, quasi-Newton methods usually generate an estimate of ${\displaystyle B^{-1}}$ directly.

As in Newton's method, one uses a second order approximation to find the minimum of a function ${\displaystyle f(x)}$. The Taylor series of ${\displaystyle f(x)}$ around an iterate is:

${\displaystyle f(x_{k}+\Delta x)\approx f(x_{k})+\nabla f(x_{k})^{T}\Delta x+{\frac {1}{2}}\Delta x^{T}{B}\,\Delta x,}$

where (${\displaystyle \nabla f}$) is the gradient and ${\displaystyle B}$ an approximation to the Hessian matrix. The gradient of this approximation (with respect to ${\displaystyle \Delta x}$) is

${\displaystyle \nabla f(x_{k}+\Delta x)\approx \nabla f(x_{k})+B\,\Delta x}$

and setting this gradient to zero (which is the objective of optimisation) provides the Newton step:

${\displaystyle \Delta x=-B^{-1}\nabla f(x_{k}),\,}$

The Hessian approximation ${\displaystyle B}$ is chosen to satisfy

${\displaystyle \nabla f(x_{k}+\Delta x)=\nabla f(x_{k})+B\,\Delta x,}$

which is called the secant equation (the Taylor series of the gradient itself). In more than one dimension ${\displaystyle B}$ is underdetermined. In one dimension, solving for ${\displaystyle B}$ and applying the Newton's step with the updated value is equivalent to the secant method. The various quasi-Newton methods differ in their choice of the solution to the secant equation (in one dimension, all the variants are equivalent). Most methods (but with exceptions, such as Broyden's method) seek a symmetric solution (${\displaystyle B^{T}=B}$); furthermore, the variants listed below can be motivated by finding an update ${\displaystyle B_{k+1}}$ that is as close as possible to ${\displaystyle B_{k}}$ in some norm; that is, ${\displaystyle B_{k+1}={\textrm {argmin}}_{B}\|B-B_{k}\|_{V}}$ where ${\displaystyle V}$ is some positive definite matrix that defines the norm. An approximate initial value of ${\displaystyle B_{0}=I*x}$ is often sufficient to achieve rapid convergence. Note that ${\displaystyle B_{0}}$ should be positive definite. The unknown ${\displaystyle x_{k}}$ is updated applying the Newton's step calculated using the current approximate Hessian matrix ${\displaystyle B_{k}}$

• ${\displaystyle \Delta x_{k}=-\alpha _{k}B_{k}^{-1}\nabla f(x_{k})}$, with ${\displaystyle \alpha }$ chosen to satisfy the Wolfe conditions;
• ${\displaystyle x_{k+1}=x_{k}+\Delta x_{k}}$;
• The gradient computed at the new point ${\displaystyle \nabla f(x_{k+1})}$, and
${\displaystyle y_{k}=\nabla f(x_{k+1})-\nabla f(x_{k}),}$

is used to update the approximate Hessian ${\displaystyle \displaystyle B_{k+1}}$, or directly its inverse ${\displaystyle \displaystyle H_{k+1}=B_{k+1}^{-1}}$ using the Sherman-Morrison formula.

• A key property of the BFGS and DFP updates is that if ${\displaystyle B_{k}}$ is positive definite and ${\displaystyle \alpha _{k}}$ is chosen to satisfy the Wolfe conditions then ${\displaystyle \displaystyle B_{k+1}}$ is also positive definite.

The most popular update formulas are:

Method ${\displaystyle \displaystyle B_{k+1}=}$ ${\displaystyle H_{k+1}=B_{k+1}^{-1}=}$
DFP ${\displaystyle \left(I-{\frac {y_{k}\,\Delta x_{k}^{T}}{y_{k}^{T}\,\Delta x_{k}}}\right)B_{k}\left(I-{\frac {\Delta x_{k}y_{k}^{T}}{y_{k}^{T}\,\Delta x_{k}}}\right)+{\frac {y_{k}y_{k}^{T}}{y_{k}^{T}\,\Delta x_{k}}}}$ ${\displaystyle H_{k}+{\frac {\Delta x_{k}\Delta x_{k}^{T}}{\Delta x_{k}^{T}\,y_{k}}}-{\frac {H_{k}y_{k}y_{k}^{T}H_{k}}{y_{k}^{T}H_{k}y_{k}}}}$
BFGS ${\displaystyle B_{k}+{\frac {y_{k}y_{k}^{T}}{y_{k}^{T}\Delta x_{k}}}-{\frac {B_{k}\Delta x_{k}(B_{k}\Delta x_{k})^{T}}{\Delta x_{k}^{T}B_{k}\,\Delta x_{k}}}}$ ${\displaystyle \left(I-{\frac {\Delta x_{k}y_{k}^{T}}{y_{k}^{T}\Delta x_{k}}}\right)H_{k}\left(I-{\frac {y_{k}\Delta x_{k}^{T}}{y_{k}^{T}\Delta x_{k}}}\right)+{\frac {\Delta x_{k}\Delta x_{k}^{T}}{y_{k}^{T}\,\Delta x_{k}}}}$
Broyden ${\displaystyle B_{k}+{\frac {y_{k}-B_{k}\Delta x_{k}}{\Delta x_{k}^{T}\,\Delta x_{k}}}\,\Delta x_{k}^{T}}$ ${\displaystyle H_{k}+{\frac {(\Delta x_{k}-H_{k}y_{k})\Delta x_{k}^{T}H_{k}}{\Delta x_{k}^{T}H_{k}\,y_{k}}}}$
Broyden family ${\displaystyle (1-\varphi _{k})B_{k+1}^{BFGS}+\varphi _{k}B_{k+1}^{DFP},\qquad \varphi \in [0,1]}$
SR1 ${\displaystyle B_{k}+{\frac {(y_{k}-B_{k}\,\Delta x_{k})(y_{k}-B_{k}\,\Delta x_{k})^{T}}{(y_{k}-B_{k}\,\Delta x_{k})^{T}\,\Delta x_{k}}}}$ ${\displaystyle H_{k}+{\frac {(\Delta x_{k}-H_{k}y_{k})(\Delta x_{k}-H_{k}y_{k})^{T}}{(\Delta x_{k}-H_{k}y_{k})^{T}y_{k}}}}$

Other methods are Pearson's method, McCormick's Method, the Powell symmetric Broyden (PSB) method and Greenstadt's method.[1]

## Relationship to matrix inversion

When ${\displaystyle f}$ is a convex quadratic function with positive definite Hessian ${\displaystyle B}$, one would expect the matrices ${\displaystyle H_{k}}$ generated by a Quasi-Newton method to converge to the inverse Hessian ${\displaystyle H=B^{-1}}$. This is indeed the case for the class of Quasi-Newton methods based on least-change updates.[3]

## Implementations

Owing to their success, there are implementations of quasi-Newton methods in almost all programming languages. The NAG Library contains several routines[4] for minimizing or maximizing a function[5] which use quasi-Newton algorithms.

Scipy.optimize has fmin_bfgs. In the SciPy extension to Python, the scipy.optimize.minimize function includes, among other methods, a BFGS implementation.

GNU Octave uses a form of BFGS in its 'fsolve' function, with trust region extensions.

In MATLAB's Optimization Toolbox, the fminunc function uses (among other methods) the BFGS Quasi-Newton method. Many of the constrained methods of the Optimization toolbox use BFGS and the variant L-BFGS. Many user-contributed quasi-Newton routines are available on MATLAB's file exchange.

Mathematica includes quasi-Newton solvers.

R's optim general-purpose optimizer routine uses the BFGS method by using method="BFGS"[1].