Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

4. Newton and Quasi-Newton Methods

Newton methods use a second-order model to choose the search direction; quasi-Newton methods build curvature information from gradient differences. The dense implementations live in the Method enum of minimize, with \(O(n^2)\) resident storage and \(O(n^3)\) factorizations or inversions.

4.1 Newton equations and damping

At \(x_k\), the Newton direction solves the linear system

$$ H_k d_k=-g_k. $$

Method::DampedNewton solves this system and then runs Armijo backtracking. The callback supplies the Hessian with shape \(n\times n\); the entry point checks symmetry.

Method::ModifiedNewton handles indefinite or singular Hessians by shifting:

$$ H_k+\sigma I,\qquad \sigma\leftarrow 2\sigma, $$

starting from \(\sigma=|g_k|\) and doubling until a Cholesky factorization succeeds, then solving

$$ (H_k+\sigma I)d_k=-g_k. $$

The shift scales with the gradient norm, so regularization weakens as the iterate approaches a stationary point.

4.2 Secant condition and inverse-Hessian updates

Write \(s_k=x_{k+1}-x_k\) and \(y_k=g_{k+1}-g_k\). The inverse-Hessian approximation \(B_k\approx H_k^{-1}\) satisfies the secant condition

$$ B_{k+1}y_k=s_k. $$

nlopt4r implements four dense updates:

BFGS (\(\phi=1\)):

$$ B_{k+1}=\bigl(I-\rho_k s_k y_k^\top\bigr)B_k\bigl(I-\rho_k y_k s_k^\top\bigr)+\rho_k s_k s_k^\top,\qquad \rho_k=\frac{1}{s_k^\top y_k}. $$

DFP (\(\phi=0\)):

$$ B_{k+1}=B_k+\frac{s_k s_k^\top}{s_k^\top y_k}-\frac{B_k y_k y_k^\top B_k}{y_k^\top B_k y_k}. $$

SR1:

$$ B_{k+1}=B_k+\frac{(s_k-B_k y_k)(s_k-B_k y_k)^\top}{(s_k-B_k y_k)^\top y_k}. $$

Broyden convex family (\(0\le\phi\le 1\)), interpolating between DFP and inverse BFGS:

$$ B_{k+1}=B_k+\frac{s s^\top}{s^\top y}-\frac{Byy^\top B}{y^\top By}+\phi\,(y^\top By)\,v v^\top,\qquad v=\frac{s}{s^\top y}-\frac{By}{y^\top By}. $$

Method::Broyden { phi } gives DFP at \(0\) and inverse BFGS at \(1\).

4.3 Safeguards

The four updates share these rules:

  • the initial inverse Hessian is the identity;
  • BFGS/DFP/Broyden updates require \(s^\top y>10^{-12}|s||y|\) and \(y^\top B y>0\); a passing pair is applied and symmetrized as \(B\leftarrow (B+B^\top)/2\);
  • the SR1 update requires \(|(s-By)^\top y|>10^{-8}|s-By||y|\);
  • each iteration checks descent: if \(g^\top d\ge -10^{-12}|g||d|\), the direction becomes \(-g\) and the inverse Hessian resets to the identity.

A failing curvature or definiteness test skips the update and keeps the current inverse model. This is independent of the descent safeguard: when the computed direction fails its descent test, the direction becomes \(-g\) and the inverse model resets to the identity.

4.4 Cost and problem size

MethodWork per stepStorageDerivatives
DampedNewton1 Hessian + \(O(n^3)\) solve + line search\(O(n^2)\)Gradient and Hessian
ModifiedNewtonCholesky attempts + linear solves\(O(n^2)\)Gradient and Hessian
Bfgs / Dfp / Sr1 / Broydenrank-one/two update \(O(n^2)\) + line search\(O(n^2)\)Gradient

Chapter 6 covers limited-memory and matrix-free alternatives for large problems.

Software interface

References

  • 马昌凤, 最优化方法及其 Matlab 程序设计 (in Chinese), 2010, chapters 3 and 5.
  • C. G. Broyden, “The convergence of a class of double-rank minimization algorithms,” J. Inst. Math. Appl. 6 (1970), 76–90.
  • J. Nocedal, S. J. Wright, Numerical Optimization, 2nd ed., 2006, Chapter 6.