Nonlinear conjugate gradient method explained

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

\displaystylef(x)

\displaystylef(x)=\|Ax-b\|2,

the minimum of

f

is obtained when the gradient is 0:

\nablaxf=2AT(Ax-b)=0

. Whereas linear conjugate gradient seeks a solution to the linear equation

\displaystyleATAx=ATb

, the nonlinear conjugate gradient method is generally used to find the local minimum of a nonlinear function using its gradient

\nablaxf

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

\displaystylef(x)

of

N

variables to minimize, its gradient

\nablaxf

indicates the direction of maximum increase.One simply starts in the opposite (steepest descent) direction:

\Deltax0=-\nablaxf(x0)

with an adjustable step length

\displaystyle\alpha

and performs a line search in this direction until it reaches the minimum of

\displaystylef

:

\displaystyle\alpha0:=\argmin\alphaf(x0+\alpha\Deltax0)

,

\displaystylex1=x0+\alpha0\Deltax0

After this first iteration in the steepest direction

\displaystyle\Deltax0

, the following steps constitute one iteration of moving along a subsequent conjugate direction

\displaystylesn

, where

\displaystyles0=\Deltax0

:
  1. Calculate the steepest direction:

\Deltaxn=-\nablaxf(xn)

,
  1. Compute

\displaystyle\betan

according to one of the formulas below,
  1. Update the conjugate direction:

\displaystylesn=\Deltaxn+\betansn-1

  1. Perform a line search: optimize

\displaystyle\alphan=\argmin\alphaf(xn+\alphasn)

,
  1. Update the position:

\displaystylexn+1=xn+\alphansn

, 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

\displaystyle\alpha

and

\displaystyle\beta

are the same as in thelinear 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

\displaystyle\betan

are named after their developers:
FR
\beta
n

=

\Delta
T
x
n
\Deltaxn
\Delta
T
x
n-1
\Deltaxn-1

.

PR
\beta
n

=

\Delta
T
x
n
(\Deltaxn-\Deltaxn-1)
\Delta
T
x
n-1
\Deltaxn-1

.

HS
\beta
n

=

\Delta
T
x
n
(\Deltaxn-\Deltaxn-1)
T
-s(\Deltaxn-\Deltaxn-1)
n-1

.

DY
\beta
n

=

\Delta
T
x
n
\Deltaxn
T
-s(\Deltaxn-\Deltaxn-1)
n-1

.

.

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

\displaystyle\beta=max\{0,\betaPR\}

, 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):=

-\gammaa\nablaxf(x)-\gammab

x
for the double integrator system,

\ddotx=u

The quantities

\gammaa>0

and

\gammab>0

are variable feedback gains.

See also

Notes and References

  1. R. . Fletcher . C. M. . Reeves . Function minimization by conjugate gradients . The Computer Journal. 7 . 1964 . 2 . 149–154 . 10.1093/comjnl/7.2.149 . free .
  2. E. . Polak . G. . Ribière . Note sur la convergence de méthodes de directions conjuguées . Revue Française d'Automatique, Informatique, Recherche Opérationnelle . 3 . 1 . 1969 . 35–43 .
  3. M. R. . Hestenes . E. . Stiefel . Methods of Conjugate Gradients for Solving Linear Systems . Journal of Research of the National Bureau of Standards. 49 . 1952 . 6 . 409–436 . 10.6028/jres.049.044 . free .
  4. Y.-H. . Dai . Y. . Yuan . A nonlinear conjugate gradient method with a strong global convergence property . SIAM Journal on Optimization. 10 . 1999 . 1 . 177–182 . 10.1137/S1052623497318992 .
  5. Web site: J. R. . Shewchuk . An Introduction to the Conjugate Gradient Method Without the Agonizing Pain . August 1994 .
  6. I. Michael Ross . Ross . I. M. . An Optimal Control Theory for Accelerated Optimization . 1902.09004 . 2019 . math.OC .