Nonlinear conjugate gradient method

From testwiki
Jump to navigation Jump to search

In numerical optimization, the nonlinear conjugate gradient method generalizes the conjugate gradient method to nonlinear optimization. For a quadratic function f(x)

f(x)=Axb2,

the minimum of f is obtained when the gradient is 0:

xf=2AT(Axb)=0.

Whereas linear conjugate gradient seeks a solution to the linear equation ATAx=ATb, the nonlinear conjugate gradient method is generally used to find the local minimum of a nonlinear function using its gradient xf alone. It works when the function is approximately quadratic near the minimum, which is the case when the function is twice differentiable at the minimum and the second derivative is non-singular there.

Given a function f(x) of N variables to minimize, its gradient xf indicates the direction of maximum increase. One simply starts in the opposite (steepest descent) direction:

Δx0=xf(x0)

with an adjustable step length α and performs a line search in this direction until it reaches the minimum of f:

α0:=argminαf(x0+αΔx0),
x1=x0+α0Δx0

After this first iteration in the steepest direction Δx0, the following steps constitute one iteration of moving along a subsequent conjugate direction sn, where s0=Δx0:

  1. Calculate the steepest direction: Δxn=xf(xn),
  2. Compute βn according to one of the formulas below,
  3. Update the conjugate direction: sn=Δxn+βnsn1
  4. Perform a line search: optimize αn=argminαf(xn+αsn),
  5. Update the position: xn+1=xn+αnsn,

With a pure quadratic function the minimum is reached within N iterations (excepting roundoff error), but a non-quadratic function will make slower progress. Subsequent search directions lose conjugacy requiring the search direction to be reset to the steepest descent direction at least every N iterations, or sooner if progress stops. However, resetting every iteration turns the method into steepest descent. The algorithm stops when it finds the minimum, determined when no progress is made after a direction reset (i.e. in the steepest descent direction), or when some tolerance criterion is reached.

Within a linear approximation, the parameters α and β are the same as in the linear conjugate gradient method but have been obtained with line searches. The conjugate gradient method can follow narrow (ill-conditioned) valleys, where the steepest descent method slows down and follows a criss-cross pattern.

Four of the best known formulas for βn are named after their developers:

  • Fletcher–Reeves:[1]
βnFR=ΔxnTΔxnΔxn1TΔxn1.
  • Polak–Ribière:[2]
βnPR=ΔxnT(ΔxnΔxn1)Δxn1TΔxn1.
  • Hestenes–Stiefel:[3]
βnHS=ΔxnT(ΔxnΔxn1)sn1T(ΔxnΔxn1).
βnDY=ΔxnTΔxnsn1T(ΔxnΔxn1)..

These formulas are equivalent for a quadratic function, but for nonlinear optimization the preferred formula is a matter of heuristics or taste. A popular choice is β=max{0,βPR}, which provides a direction reset automatically.[5]

Algorithms based on Newton's method potentially converge much faster. There, both step direction and length are computed from the gradient as the solution of a linear system of equations, with the coefficient matrix being the exact Hessian matrix (for Newton's method proper) or an estimate thereof (in the quasi-Newton methods, where the observed change in the gradient during the iterations is used to update the Hessian estimate). For high-dimensional problems, the exact computation of the Hessian is usually prohibitively expensive, and even its storage can be problematic, requiring O(N2) memory (but see the limited-memory L-BFGS quasi-Newton method).

The conjugate gradient method can also be derived using optimal control theory.[6] In this accelerated optimization theory, the conjugate gradient method falls out as a nonlinear optimal feedback controller,

u=k(x,x˙):=γaxf(x)γbx˙

for the double integrator system,

x¨=u

The quantities γa>0 and γb>0 are variable feedback gains.[6]

See also

References

Template:Reflist

Template:Optimization algorithms