In
numerical optimization
Mathematical optimization (alternatively spelled ''optimisation'') or mathematical programming is the selection of a best element, with regard to some criteria, from some set of available alternatives. It is generally divided into two subfiel ...
, the Broyden–Fletcher–Goldfarb–Shanno (BFGS) algorithm is an
iterative method
In computational mathematics, an iterative method is a Algorithm, mathematical procedure that uses an initial value to generate a sequence of improving approximate solutions for a class of problems, in which the ''i''-th approximation (called an " ...
for solving unconstrained
nonlinear optimization problems. Like the related
Davidon–Fletcher–Powell method, BFGS determines the
descent direction by
preconditioning
In mathematics, preconditioning is the application of a transformation, called the preconditioner, that conditions a given problem into a form that is more suitable for numerical solving methods. Preconditioning is typically related to reducing ...
the
gradient
In vector calculus, the gradient of a scalar-valued differentiable function f of several variables is the vector field (or vector-valued function) \nabla f whose value at a point p gives the direction and the rate of fastest increase. The g ...
with curvature information. It does so by gradually improving an approximation to the
Hessian matrix
In mathematics, the Hessian matrix, Hessian or (less commonly) Hesse matrix is a square matrix of second-order partial derivatives of a scalar-valued Function (mathematics), function, or scalar field. It describes the local curvature of a functio ...
of the
loss function
In mathematical optimization and decision theory, a loss function or cost function (sometimes also called an error function) is a function that maps an event or values of one or more variables onto a real number intuitively representing some "cost ...
, obtained only from gradient evaluations (or approximate gradient evaluations) via a generalized
secant method.
Since the updates of the BFGS curvature matrix do not require
matrix inversion
In linear algebra, an invertible matrix (''non-singular'', ''non-degenarate'' or ''regular'') is a square matrix that has an inverse. In other words, if some other matrix is multiplied by the invertible matrix, the result can be multiplied by an ...
, its
computational complexity
In computer science, the computational complexity or simply complexity of an algorithm is the amount of resources required to run it. Particular focus is given to computation time (generally measured by the number of needed elementary operations ...
is only
, compared to
in
Newton's method
In numerical analysis, the Newton–Raphson method, also known simply as Newton's method, named after Isaac Newton and Joseph Raphson, is a root-finding algorithm which produces successively better approximations to the roots (or zeroes) of a ...
. Also in common use is
L-BFGS, which is a limited-memory version of BFGS that is particularly suited to problems with very large numbers of variables (e.g., >1000). The BFGS-B variant handles simple box constraints. The BFGS matrix also admits a
compact representation, which makes it better suited for large constrained problems.
The algorithm is named after
Charles George Broyden,
Roger Fletcher,
Donald Goldfarb
Donald Goldfarb (born August 14, 1941 in New York City) is an American mathematician, best known for his works in mathematical optimization and numerical analysis.
Biography
Goldfarb studied Chemical Engineering at Cornell University, earning a B ...
and
David Shanno.
Rationale
The optimization problem is to minimize
, where
is a vector in
, and
is a differentiable scalar function. There are no constraints on the values that
can take.
The algorithm begins at an initial estimate
for the optimal value and proceeds iteratively to get a better estimate at each stage.
The
search direction p
''k'' at stage ''k'' is given by the solution of the analogue of the Newton equation:
:
where
is an approximation to the
Hessian matrix
In mathematics, the Hessian matrix, Hessian or (less commonly) Hesse matrix is a square matrix of second-order partial derivatives of a scalar-valued Function (mathematics), function, or scalar field. It describes the local curvature of a functio ...
at
, which is updated iteratively at each stage, and
is the gradient of the function evaluated at x
''k''. A
line search
In optimization, line search is a basic iterative approach to find a local minimum \mathbf^* of an objective function f:\mathbb R^n\to\mathbb R. It first finds a descent direction along which the objective function f will be reduced, and then co ...
in the direction p
''k'' is then used to find the next point x
''k''+1 by minimizing
over the scalar
The quasi-Newton condition imposed on the update of
is
:
Let
and
, then
satisfies
:
,
which is the secant equation.
The curvature condition
should be satisfied for
to be positive definite, which can be verified by pre-multiplying the secant equation with
. If the function is not
strongly convex, then the condition has to be enforced explicitly e.g. by finding a point x
''k''+1 satisfying the
Wolfe conditions, which entail the curvature condition, using line search.
Instead of requiring the full Hessian matrix at the point
to be computed as
, the approximate Hessian at stage ''k'' is updated by the addition of two matrices:
:
Both
and
are symmetric rank-one matrices, but their sum is a rank-two update matrix. BFGS and
DFP updating matrix both differ from its predecessor by a rank-two matrix. Another simpler rank-one method is known as
symmetric rank-one method, which does not guarantee the
positive definiteness In mathematics, positive definiteness is a property of any object to which a bilinear form or a sesquilinear form may be naturally associated, which is positive-definite. See, in particular:
* Positive-definite bilinear form
* Positive-definite f ...
. In order to maintain the symmetry and positive definiteness of
, the update form can be chosen as
. Imposing the secant condition,
. Choosing
and
, we can obtain:
:
:
Finally, we substitute
and
into
and get the update equation of
:
:
Algorithm
Consider the following unconstrained optimization problem
In optimization, line search is a basic iterative approach to find a local minimum \mathbf^* of an objective function f:\mathbb R^n\to\mathbb R. It first finds a descent direction along which the objective function f will be reduced, and then co ...
) to find an acceptable stepsize