Trust region method

On this page 7

A trust region method is an iterative algorithm in mathematical optimization that, at each step, builds a local model of the objective function and minimizes that model only inside a bounded neighborhood, the trust region, where the model is believed to be accurate. Optimization in artificial intelligence uses the idea in nonlinear least squares, second-order training of neural networks and policy optimization in reinforcement learning.

The defining feature is the order of decisions. A line search method first chooses a direction and then a step length, while a trust region method first fixes the maximum step size and then chooses direction and length together. After each trial step, the algorithm compares the predicted reduction with the actual reduction and enlarges or shrinks the region accordingly.

How a trust region iteration works

Each iteration solves a small trust region subproblem and then decides whether to accept the result. At the current point x, the method forms a quadratic model m(p) = f(x) + gᵀp + ½ pᵀBp, where g is the gradient and B is either the exact Hessian matrix or an approximation of it. The step p is chosen to minimize m(p) subject to ‖p‖ ≤ Δ, where Δ is the trust region radius.

The quality of the step is measured by the ratio ρ, defined as actual reduction divided by predicted reduction. A ratio close to 1 means the model described the function well, so the step is accepted and the radius may grow. A small or negative ratio means the model was misleading, so the step is rejected and the radius shrinks. This feedback loop makes the method self-correcting without any separate step-length search.

The table below lists the standard acceptance rules; the thresholds are common defaults, and implementations tune them within similar ranges.

Ratio ρInterpretationStep decisionRadius update
Below 0.25Model is poorReject or accept cautiouslyShrink Δ, often by a factor of 4
0.25 to 0.75Model is adequateAcceptKeep Δ unchanged
Above 0.75 at the boundaryModel is very goodAcceptExpand Δ, often doubled up to a cap
NegativeObjective increasedRejectShrink Δ sharply
Typical radius update rules based on the ratio ρ

Solving the trust region subproblem

The subproblem rarely needs an exact solution; global convergence only requires a step that achieves a fraction of the Cauchy point decrease, the best step along the negative gradient inside the region. Practical solvers therefore trade accuracy for speed, and the choice depends on the problem dimension and on whether B is available explicitly.

SolverHow it worksBest suited forMain cost
Cauchy pointSteepest descent step clipped to the regionTheoretical baselineSlow, gradient-like progress
Dogleg methodPath from Cauchy point toward the Newton stepSmall problems with positive definite BOne linear solve per iteration
Steihaug conjugate gradientTruncated CG that stops at the boundary or on negative curvatureLarge problems with Hessian-vector productsSeveral matrix-vector products
Moré-SorensenNearly exact solution via a shifted linear systemMedium problems needing accuracyRepeated Cholesky factorizations
Common subproblem solvers and where they fit

The Steihaug-Toint truncated conjugate gradient approach is the workhorse for high-dimensional machine learning because it needs only Hessian-vector products, which automatic differentiation computes at roughly the cost of two gradient evaluations, and it naturally exploits negative curvature directions.

Trust region and line search are the two globalization strategies for Newton-type methods: both turn a locally fast method into one that converges from distant starting points. Their behavior differs most on non-convex problems, where the Hessian can be indefinite near a saddle point.

MethodStep controlHandling of indefinite HessianTypical use
Trust regionRadius bounds the step firstUses negative curvature safelyNonlinear least squares, robust second-order solvers
Line search NewtonDirection first, then step lengthNeeds Hessian modificationSmooth convex problems
Quasi-Newton (BFGS, L-BFGS)Usually line searchKeeps B positive definiteMedium and large smooth problems
Levenberg-MarquardtDamping parameter acts as implicit radiusDamping regularizes BCurve fitting, bundle adjustment
Gradient descentLearning rate or line searchIgnores curvatureLarge-scale stochastic training
How trust region methods compare with neighboring approaches

The Levenberg-Marquardt algorithm is best understood as a trust region method for least squares: its damping parameter λ corresponds to the Lagrange multiplier of the radius constraint. Similarly, TRPO (Trust Region Policy Optimization) in reinforcement learning replaces the Euclidean ball with a bound on the KL divergence between old and new policies, carrying the same idea into probability space.

Convergence properties and practical configuration

Under standard smoothness assumptions, trust region methods are globally convergent to stationary points, and when exact or accurate second-order information is used they converge to points satisfying second-order necessary conditions, which means they tend to escape saddle points. Near a nondegenerate minimum, the region becomes inactive and the method inherits the quadratic convergence of Newton’s method or the superlinear convergence of quasi-Newton updates.

  • Initial radius: a value comparable to the expected step length, such as 1 for scaled variables, avoids many early rejections.
  • Variable scaling: an elliptical region defined by a scaling matrix prevents poorly scaled variables from dominating the norm.
  • Stopping tests: combine a gradient norm tolerance with a minimum radius so that the loop ends when Δ collapses.
  • Bounds and constraints: reflective and interior variants such as trust region reflective handle simple bounds directly.

Widely used libraries expose these choices directly, for example SciPy offers trust-ncg, trust-krylov, trust-exact and trust-constr, and its least squares routine defaults to a trust region reflective solver.

Limitations and common mistakes

Trust region methods are robust, but they carry higher cost per iteration than first-order methods, and their guarantees assume exact or low-noise function values. With mini-batch gradients the ratio ρ becomes noisy, which is why stochastic variants need larger samples or adaptive sampling rules.

SymptomLikely causeFix
Radius shrinks to zeroWrong gradient or noisy objectiveVerify derivatives, reduce noise
Many rejected stepsInitial radius too largeStart with a smaller Δ
Very slow progressPoor variable scalingRescale variables or use an elliptical region
High time per iterationExact subproblem solve on a large problemSwitch to truncated conjugate gradient
Symptoms, causes and fixes in trust region solvers

The short version

A trust region method searches for the lowest point of a function step by step. At each point, it builds a simple local map of the landscape. It trusts that map only within a fixed distance. It then moves to the best spot on the map inside that distance.

After the move, it checks whether the real landscape matched the map. If it did, the next trusted area grows. If it did not, the area shrinks. Think of a hiker in fog who walks only as far as the visible ground allows. The key idea is simple: limit each step to where the model is reliable.

Where it makes a difference

A computer vision team calibrates a multi-camera rig for a robotics platform. The task is a nonlinear least squares problem with about 30,000 residuals from detected calibration points and a few hundred parameters for lens distortion and camera poses. A plain Gauss-Newton solver diverges on the first run because initial pose estimates are rough and the model is strongly nonlinear.

The engineers switch to a Levenberg-Marquardt trust region solver with variable scaling. Early iterations show ratios below 0.25, so the radius shrinks and steps stay conservative. Once poses are close, the ratio approaches 1, the region expands and convergence becomes nearly quadratic. The solver converges in about 25 iterations with a reprojection error under 0.3 pixels, and the same configuration runs reliably on every new rig.