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

5. Trust-Region Methods

Trust-region methods minimize a quadratic model in a spherical neighborhood of the current point and adjust the radius using the ratio of actual to predicted decrease. nlopt4r provides a dense spectral method (trust_region::minimize) and a matrix-free Steihaug truncated-CG method (local::trust_region_cg).

5.1 Quadratic model and subproblem

At \(x_k\) the quadratic model is

$$ q_k(d)=g_k^\top d+\tfrac12 d^\top H_k d, $$

and the subproblem reads

$$ \min_{d}\ q_k(d)\quad \text{s.t.}\quad \|d\|_2\le \Delta_k. $$

A global minimizer \(d^\ast\) satisfies

$$ (H_k+\lambda I)d^\ast=-g_k,\qquad H_k+\lambda I\succeq 0,\qquad \lambda\ge 0,\qquad \lambda(\|d^\ast\|-\Delta_k)=0. $$

When \(H_k\) is indefinite and \(g_k\) is orthogonal to the minimal-eigenvalue subspace, the solution lies on the boundary: the hard case. The dense implementation covers this case with a symmetric eigendecomposition and a multiplier search.

Figure 5-1 Subproblem with \(g=(3,2.4)\), \(H=\operatorname{diag}(1,4)\), \(\Delta=1.5\): the unconstrained minimizer of \(q\) (hollow dot) lies outside the circle, the solution \(d^*\) lies on the boundary with multiplier \(\lambda\approx1.106\), the thin lines are \(q\) contours, and the dashed line is the boundary tangent. Sections 6.1 and 6.3 of the textbook discuss interior solutions, boundary solutions and the multiplier of the same subproblem.

5.2 Dense spectral solver

trust_region::subproblem(g, H, radius) solves the subproblem directly:

  • symmetric eigendecomposition \(H=Q\Lambda Q^\top\);
  • construction of a displacement and multiplier in eigencoordinates that satisfy the optimality conditions;
  • a search over \(\lambda\ge 0\) covering positive-definite, semidefinite and indefinite matrices;
  • return TrustRegionStep { step, value, multiplier }, with value the model change \(q(d)\) and multiplier the \(\lambda\).

The function is independent of the objective and budget system, with \(O(n^2)\) storage and \(O(n^3)\) eigenanalysis.

5.3 Dense outer iteration

The outer rules of trust_region::minimize:

  1. compute \(g_k\) and test the gradient tolerance;
  2. solve the subproblem for a step \(d_k\) and predicted decrease \(q_k(d_k)\);
  3. compute the ratio
$$ \rho_k=\frac{f(x_k)-f(x_k+d_k)}{-q_k(d_k)}; $$
  1. accept when \(\rho_k>\tau_a\), default \(\tau_a=0.15\);
  2. update the radius: for \(\rho_k\le\tau_a\), \(\Delta\leftarrow\Delta/2\); for \(\rho_k\ge0.75\) with \(|d_k|\ge0.99\Delta\), \(\Delta\leftarrow\min(2\Delta,\Delta_{\max})\);
  3. a rejected trial leaves the current iterate in place.

Defaults: initial radius 1, maximum radius 2, acceptance threshold 0.15.

5.4 Steihaug truncated conjugate gradients

local::steihaug approximately minimizes \(q(p)\) subject to \(|p|\le\Delta\):

  • stop when the residual norm drops to a configured fraction of its initial value (ResidualTolerance);
  • on a positive-curvature direction reaching the boundary, truncate at the positive root of \(|p+\tau d|=\Delta\) (Boundary);
  • on nonpositive curvature, compare the two boundary endpoints and keep the lower model value (NegativeCurvature);
  • at the inner iteration cap, return the current approximate step (MaxIterations).

SteihaugStep reports the step, model change, inner iterations, Hessian products and termination type. Defaults: inner tolerance 0.1, inner iteration cap 100, with the effective cap \(\min(100,n)\).

5.5 Matrix-free outer iteration

The outer rules of local::trust_region_cg match the dense version with these radius parameters:

  • acceptance threshold \(\tau_a=0.1\);
  • for \(\rho_k<0.25\), \(\Delta\leftarrow\Delta/4\);
  • for \(\rho_k>0.75\) with a step ending at the boundary or on a negative-curvature direction, \(\Delta\leftarrow\min(2\Delta,\Delta_{\max})\), default \(\Delta_{\max}=100\).

The method reads gradients and Hessian-vector products with \(O(n)\) workspace. A zero-gradient start terminates at first-order stationarity; the dense spectral method identifies hidden negative curvature.

5.6 Budget and counts

Each outer iteration requests one combined value/gradient evaluation; rejected trials consume objective budget. EvaluationCounts::subproblem records subproblem solves, and hessian records Hessian-vector products in the matrix-free version. Hessian products and subproblem iterations form separate count categories.

Software interface

  • trust_region::{minimize, subproblem, TrustRegionOptions}: see chapter 16.
  • local::{trust_region_cg, steihaug, SteihaugOptions, TrustRegionCgOptions} and the HessianVector trait: see chapter 16.
  • Option defaults: see chapter 20.
  • API reference (docs.rs): trust_region.

References

  • 马昌凤, 最优化方法及其 Matlab 程序设计 (in Chinese), 2010, chapter 6.
  • J. Nocedal, S. J. Wright, Numerical Optimization, 2nd ed., 2006, Chapter 4.
  • T. Steihaug, “The conjugate gradient method and trust regions in large scale optimization,” SIAM J. Numer. Anal. 20 (1983), 626–637.