Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Descent and Globalization

import matplotlib.pyplot as plt
import numpy as np

Define Test Function and Derivatives

Let’s get started by defining a test function we will use throughout the notebook.

Consider a scalar function f(x):R→Rf(x): \mathbb{R} \rightarrow \mathbb{R} to allow for easier visualization. Let

f(x)=0.5(x−1)4+(x+1)3−10x2+5xf(x) = 0.5 (x-1)^4 + (x+1)^3 - 10 x^2 + 5 x
f′(x)=6−8x−3x2+2x3f'(x) = 6 - 8 x - 3 x^2 + 2 x^3
f′′(x)=−8−6x+6x2f''(x) = -8 - 6 x + 6 x^2
## Define f(x)
f = lambda x: 0.5 * (x - 1) ** 4 + (x + 1) ** 3 - 10 * x**2 + 5 * x

## Define f'(x)
df = lambda x: 6 - 8 * x - 3 * x**2 + 2 * x**3

## Define f''(x)
ddf = lambda x: -8 - 6 * x + 6 * x**2
plt.figure()
xplt = np.arange(-3, 4, 0.1)

fplt = f(xplt)
dfplt = df(xplt)
ddfplt = ddf(xplt)

# House cycle in order (figures/dowling.mplstyle): black solid, blue dashed,
# orange dash-dot. These were matplotlib's "b"/"r"/"g", which are outside the
# Okabe-Ito palette the rest of the notebook now uses.
plt.plot(xplt, fplt, label="f(x)", color="black", linestyle="-")
plt.plot(xplt, dfplt, label="f'(x)", color="#0072B2", linestyle="--")
plt.plot(xplt, ddfplt, label="f''(x)", color="#E69F00", linestyle="-.")
plt.xlabel("x")
plt.legend()
plt.grid()
plt.show()
<Figure size 640x480 with 1 Axes>

Geometric Insights into Newton Steps

Motivation

We can interpret Newton-type methods for unconstrained optimization as root finding of ∇f(x)=0\nabla f(\mathbf{x}) = \mathbf{0}.

At iteration kk, we assemble an approximation to f(x)f(\mathbf{x}) using a Taylor series expansion:

f(xk+pk)≈f(xk)+∇f(xk)Tpk+12(pk)T(Bk)pkf(\mathbf{x}^k + \mathbf{p}^k) \approx f(\mathbf{x}^k) + \nabla f(\mathbf{x}^k)^T \mathbf{p}^k + \frac{1}{2} (\mathbf{p}^k)^T (\mathbf{B}^k) \mathbf{p}^k

Set the gradient of this quadratic model to zero, ∇f(xk)+Bkpk=0\nabla f(\mathbf{x}^k)+\mathbf{B}^k\mathbf{p}^k=\mathbf{0}. For nonsingular Bk\mathbf{B}^k, the resulting linear solve gives:

pk=−(Bk)−1∇f(xk)\mathbf{p}^k = -(\mathbf{B}^k)^{-1} \nabla f(\mathbf{x}^k)

The choice of Bk\mathbf{B}^k determines the algorithm classification:

  • Pure Newton Method, Bk=∇2f(xk)\mathbf{B}^k = \nabla^2 f(\mathbf{x}^k)

  • Steepest Descent, Bk=1αI\mathbf{B}^k = \frac{1}{\alpha} \mathbf{I}, where scalar α\alpha is sometimes known as the dampening factor

  • Levenberg-Marquardt, Bk=∇2f(xk)+δI\mathbf{B}^k = \nabla^2 f(\mathbf{x}^k) + \delta \mathbf{I}, where scalar δ\delta is chosen to ensure Bk\mathbf{B}^k is positive definite.

  • Broyden Methods, Bk\mathbf{B}^{k} is approximated using history of gradient evaluations, i.e., ∇f(x0),...∇f(xk)\nabla f(\mathbf{x}^0), ... \nabla f(\mathbf{x}^k). We will study the SR1 and BFGS formulas in this family of methods.

This section explores how choosing Bk\mathbf{B}^k impacts the shape of the approximation and calculated step.

Compute and Plot Steps

Define a function that:

  • Computes the i. Newton, ii. Levenberg-Marquardt and iii. Steepest Descent Step for a given starting point x0x_0

  • Plots the step in terms of f(x)f(x) and f′(x)f'(x)

def calc_step(x0, epsLM):

    # Evaluate f(x0), f'(x0) and f''(x0)
    f0 = f(x0)
    df0 = df(x0)
    ddf0 = ddf(x0)
    print("x0 = ", x0)
    print("f(x0) =", f0)
    print("f'(x0) =", df0)
    print("f''(x0) =", ddf0)

    ### Calculate steps

    # Newton Step
    xN = x0 - df0 / ddf0

    print("\n### Newton Step ###")
    print("xN = ", xN)
    print("pN = xN - x0 = ", xN - x0)
    f_xN = f(xN)
    print("f(xN) = ", f_xN)
    print("f(xN) - f(x0) = ", f_xN - f0)

    # Levenberg-Marquardt Step
    # Recall the eigenvalue of a 1x1 matrix is just that value
    dffLM = np.amax([ddf0, epsLM])
    xLM = x0 - df0 / dffLM

    print("\n### Levenberg-Marquardt Step ###")
    print("xLM = ", xLM)
    print("pLM = xLM - x0 = ", xLM - x0)
    f_xLM = f(xLM)
    print("f(xLM) = ", f_xLM)
    print("f(xLM) - f(x0) = ", f_xLM - f0)

    # Steepest Descent Step
    xSD = x0 - df0 / 1

    print("\n### Steepest Descent Step ###")
    print("xSD = ", xSD)
    print("pSD = xSD - x0 = ", xSD - x0)
    f_xSD = f(xSD)
    print("f(xSD) = ", f_xSD)
    print("f(xSD) - f(x0) = ", f_xSD - f0)

    ### Plot Surrogates on x vs f(x)

    ### Plot f(x)
    # Okabe-Ito colors paired with distinct linestyles and markers, in the
    # order used by figures/dowling.mplstyle: black solid, blue dashed, orange
    # dash-dot, bluish green dotted. All three surrogates used to be dashed and
    # were told apart by color alone, which does not survive a photocopy.
    plt.figure()
    plt.scatter(x0, f0, label="$x_0$", color="black", zorder=5)
    plt.plot(xplt, fplt, label="f(x)", color="black", linestyle="-")

    ### Plot approximation for Newton's method
    fN = lambda x: f0 + df0 * (x - x0) + 0.5 * ddf0 * (x - x0) ** 2
    plt.plot(xplt, fN(xplt), label="Newton", linestyle="--", color="#0072B2")
    plt.scatter(xN, f(xN), color="#0072B2", marker="x")

    ### Plot approximation for LM
    fLM = lambda x: f0 + df0 * (x - x0) + 0.5 * dffLM * (x - x0) ** 2
    plt.plot(xplt, fLM(xplt), label="LM", linestyle="-.", color="#E69F00")
    plt.scatter(xLM, f(xLM), color="#E69F00", marker="s")

    ### Plot approximation for SD
    fSD = lambda x: f0 + df0 * (x - x0) + 0.5 * (x - x0) ** 2
    plt.plot(xplt, fSD(xplt), label="Steepest", linestyle=":", color="#009E73")
    plt.scatter(xSD, f(xSD), color="#009E73", marker="^")

    # plt.plot([x0, xLM],[f0, f(xLM)],label="LM",color="green",marker="o")
    # plt.plot([x0,xSD],[f0,f(xSD)],label="Steepest",color="blue",marker="s")

    plt.xlim((-3.5, 4.5))
    plt.ylim((-12.5, 22.5))
    plt.xlabel("$x$")
    plt.ylabel("$f(x)$")
    plt.legend()
    plt.title("Function and Surrogates")
    plt.grid()
    plt.show()

    ### Plot Surrogates on x vs f'(x)
    plt.figure()
    plt.scatter(x0, df0, label="$x_0$", color="black", zorder=5)
    plt.plot(xplt, dfplt, label="f'(x)", color="black", linestyle="-")

    ### Plot approximation for Newton's method
    dfN = lambda x: df0 + ddf0 * (x - x0)
    plt.plot(xplt, dfN(xplt), label="Newton", linestyle="--", color="#0072B2")
    plt.scatter(xN, df(xN), color="#0072B2", marker="x")

    ### Plot approximation for LM
    dfLM = lambda x: df0 + dffLM * (x - x0)
    plt.plot(xplt, dfLM(xplt), label="LM", linestyle="-.", color="#E69F00")
    plt.scatter(xLM, df(xLM), color="#E69F00", marker="s")

    ### Plot approximation for SD
    dfSD = lambda x: df0 + (x - x0)
    plt.plot(xplt, dfSD(xplt), label="Steepest", linestyle=":", color="#009E73")
    plt.scatter(xSD, df(xSD), color="#009E73", marker="^")

    plt.xlim((-3.5, 4.5))
    plt.ylim((-50, 50))
    plt.xlabel("$x$")
    plt.ylabel("$f'(x)$")
    plt.legend()
    plt.title("First Derivative and Surrogates")
    plt.grid()
    plt.show()

Consider x0=−3x_0 = -3

calc_step(-3, 1e-2)
x0 =  -3
f(x0) = 15.0
f'(x0) = -51
f''(x0) = 64

### Newton Step ###
xN =  -2.203125
pN = xN - x0 =  0.796875
f(xN) =  -8.660857647657394
f(xN) - f(x0) =  -23.660857647657394

### Levenberg-Marquardt Step ###
xLM =  -2.203125
pLM = xLM - x0 =  0.796875
f(xLM) =  -8.660857647657394
f(xLM) - f(x0) =  -23.660857647657394

### Steepest Descent Step ###
xSD =  48.0
pSD = xSD - x0 =  51.0
f(xSD) =  2534689.5
f(xSD) - f(x0) =  2534674.5
<Figure size 640x480 with 1 Axes>
<Figure size 640x480 with 1 Axes>

Discussion

  • In this case, do we expect the Newton and LM steps to be the same? Explain.

  • Why does f(x)f(x) increase with a steepest descent (Bk=IB^k = I) step? I thought the main idea was that because BkB^k is positive definite the step is in a descent direction!

Consider x0=0x_0 = 0

calc_step(0, 1e-2)
x0 =  0
f(x0) = 1.5
f'(x0) = 6
f''(x0) = -8

### Newton Step ###
xN =  0.75
pN = xN - x0 =  0.75
f(xN) =  3.486328125
f(xN) - f(x0) =  1.986328125

### Levenberg-Marquardt Step ###
xLM =  -600.0
pLM = xLM - x0 =  -600.0
f(xLM) =  65014556401.5
f(xLM) - f(x0) =  65014556400.0

### Steepest Descent Step ###
xSD =  -6.0
pSD = xSD - x0 =  -6.0
f(xSD) =  685.5
f(xSD) - f(x0) =  684.0
<Figure size 640x480 with 1 Axes>
<Figure size 640x480 with 1 Axes>

Discussion

  • Why does f(x)f(x) increase for all of the steps?

  • Explain Newton-type method in the context of root finding for ∇f(x)=0\nabla f(x) = 0 using the second plot.

Descent Properties

For pk=−(Bk)−1∇f(xk)\mathbf{p}^k=-(\mathbf{B}^k)^{-1}\nabla f(\mathbf{x}^k), positive definiteness of Bk\mathbf{B}^k gives

∇f(xk)Tpk=−∇f(xk)T(Bk)−1∇f(xk)<0.\nabla f(\mathbf{x}^k)^T \mathbf{p}^k=-\nabla f(\mathbf{x}^k)^T(\mathbf{B}^k)^{-1}\nabla f(\mathbf{x}^k)<0.

Thus pk\mathbf{p}^k is a descent direction whenever ∇f(xk)≠0\nabla f(\mathbf{x}^k)\ne\mathbf{0}. A line search still chooses a step length that produces sufficient decrease. (Biegler, Eqs. 3.2--3.5, p. 41.)

Excerpts from Section 3.4 in Biegler (2010).

Sufficient decrease and curvature conditions

Let f∈C1(D)f\in C^1(D) on an open DD, with x∈D\mathbf{x}\in D. At a fixed direction, define ϕ(α)=f(x+αp)\phi(\alpha)=f(\mathbf{x}+\alpha\mathbf{p}) and d=ϕ′(0)=∇f(x)Tp<0d=\phi'(0)=\nabla f(\mathbf{x})^T\mathbf{p}<0. For fixed 0<η<10<\eta<1, the Armijo condition for a feasible positive length α\alpha is

ϕ(α)≤ϕ(0)+ηαd.\phi(\alpha)\le\phi(0)+\eta\alpha d.

Here feasible means that the trial point lies in the objective domain. The condition requires a fraction of the initial linear-model decrease. Since ϕ(α)−ϕ(0)=αd+o(α)\phi(\alpha)-\phi(0)=\alpha d+o(\alpha), sufficiently short positive steps pass. It also permits unnecessarily small steps if the selection rule has no lower-size control.

Use 0<η<1/20<\eta<1/2 for the Goldstein--Armijo conditions, which add the lower value bound:

ϕ(0)+(1−η)αd≤ϕ(α)≤ϕ(0)+ηαd.\phi(0)+(1-\eta)\alpha d\le\phi(\alpha)\le\phi(0)+\eta\alpha d.

Near zero the actual curve initially drops faster than the lower line, so that line excludes very short steps. For the profile ϕ(α)−ϕ(0)=−α+α2/2\phi(\alpha)-\phi(0)=-\alpha+\alpha^2/2, η=1/4\eta=1/4, the positive accepted interval is [1/2,3/2][1/2,3/2].

Quadratic profile between the Armijo upper and Goldstein lower lines.

Alternatively, choose η<ζ<1\eta<\zeta<1. Wolfe combines Armijo with ϕ′(α)≥ζd\phi'(\alpha)\ge\zeta d; strong Wolfe combines it with ∣ϕ′(α)∣≤ζ∣d∣|\phi'(\alpha)|\le\zeta|d|. These require a directional derivative at a trial point. Goldstein uses function values. On a nonconvex ray the accepted set need not be one connected interval; the brackets in a particular figure describe that example.

Sources: Biegler (2010), Eqs. (3.31)--(3.34), pp. 47--48, with the ordering correction in the errata; Nocedal and Wright (2006), Eqs. (3.4), (3.6)--(3.7), (3.11), pp. 33--36. The general Armijo range is 0<η<10<\eta<1; the strict η<1/2\eta<1/2 choice also supplies the margin used in the unit-step result below.

A descent-ray Taylor expansion compared with sufficient decrease and the initial linear model.

Global convergence: gradient norms and the descent angle

Use Euclidean vector norms and their induced matrix norm. Consider a nonterminated sequence of descent steps, with ff bounded below and continuously differentiable, and its gradient uniformly Lipschitz on an open set containing the initial sublevel set. Lipschitz continuity means that some L>0L>0 satisfies ∥∇f(u)−∇f(v)∥≤L∥u−v∥\|\nabla f(\mathbf{u})-\nabla f(\mathbf{v})\|\le L\|\mathbf{u}-\mathbf{v}\| for every pair u,v\mathbf{u},\mathbf{v} in that open set. The acceptance parameters are fixed across the sequence. Write

dk=(gk)Tpk<0,cos⁡ϑk=−dk∥gk∥∥pk∥.d_k=(\mathbf{g}^k)^T\mathbf{p}^k<0,\qquad \cos\vartheta_k=\frac{-d_k}{\|\mathbf{g}^k\|\|\mathbf{p}^k\|}.

For Goldstein--Armijo steps, the Zoutendijk sum is finite:

∑k=0∞cos⁡2ϑk∥gk∥2<∞.\sum_{k=0}^{\infty}\cos^2\vartheta_k\|\mathbf{g}^k\|^2<\infty.

Here is the value-based proof. Fix an iteration and let β\beta be the first positive crossing of the Goldstein lower line before the accepted α\alpha. Such a crossing exists because the curve starts below that line and the accepted value lies at or above it. On [0,β][0,\beta], the curve lies below that line and therefore within the initial sublevel set. The gradient Lipschitz bound gives

ϕ(β)−ϕ(0)≤βd+L2β2∥p∥2.\phi(\beta)-\phi(0)\le\beta d+\frac{L}{2}\beta^2\|\mathbf{p}\|^2.

At the crossing the left side is (1−η)βd(1-\eta)\beta d, so

α≥β≥2η(−d)L∥p∥2.\alpha\ge\beta\ge\frac{2\eta(-d)}{L\|\mathbf{p}\|^2}.

Armijo now supplies

f(xk)−f(xk+1)≥ηαk(−dk)≥2η2Lcos⁡2ϑk∥gk∥2.f(\mathbf{x}^k)-f(\mathbf{x}^{k+1}) \ge\eta\alpha_k(-d_k) \ge\frac{2\eta^2}{L}\cos^2\vartheta_k\|\mathbf{g}^k\|^2.

Summing telescopes the actual decreases, and ff has a lower bound. The resulting sum is finite. Biegler’s mean-value proof uses a looser constant; the conclusion is the same. A Wolfe proof instead compares the directional derivatives at the two endpoints, yielding the analogous Zoutendijk result.

A poorly conditioned model can turn a descent step nearly perpendicular to the negative gradient.

For p=−B−1g\mathbf{p}=-\mathbf{B}^{-1}\mathbf{g}, with symmetric B≻0\mathbf{B}\succ0,

cos⁡ϑ=gTB−1g∥g∥∥B−1g∥≥1κ(B).\cos\vartheta =\frac{\mathbf{g}^T\mathbf{B}^{-1}\mathbf{g}} {\|\mathbf{g}\|\|\mathbf{B}^{-1}\mathbf{g}\|} \ge\frac{1}{\kappa(\mathbf{B})}.

A uniform condition-number bound therefore forces ∥gk∥→0\|\mathbf{g}^k\|\to0. Every accumulation point is stationary by gradient continuity. This does not by itself prove convergence of the whole iterate sequence, second-order conditions, or global optimality.

Sources: Biegler (2010), Theorem 3.3 and Eqs. (3.35)--(3.42), pp. 48--49; Nocedal and Wright (2006), Theorem 3.2, p. 38, for Wolfe steps. The eigenvalue/norm estimates have their existing home in Quasi-Newton Methods; they are applied here to the search angle.

Armijo backtracking and the actual visualization code

The standard reference procedure starts with a descent direction, tries α=1\alpha=1, and, while Armijo fails, replaces α\alpha by ρlsα\rho_{\mathrm{ls}}\alpha, with fixed 0<ρls<10<\rho_{\mathrm{ls}}<1. It accepts the first trial that passes Armijo. The local argument above ensures finite termination along a descent ray. The previous rejected trial prevents uncontrolled overshrinking by the selection rule. If contractions vary, safeguard them between fixed positive lower and upper bounds below one.

This is not a rule to keep shrinking until both Goldstein bounds pass. For ϕ(α)−ϕ(0)=−α+10α2\phi(\alpha)-\phi(0)=-\alpha+10\alpha^2, η=0.1\eta=0.1, Goldstein--Armijo accepts [0.01,0.09][0.01,0.09]. Halving from one first passes Armijo at 1/161/16. A contraction by 10-3 jumps to 0.001, below the Goldstein interval; every further contraction remains below it. To require Goldstein or Wolfe, use a suitable bracketing/selection method that can increase a trial when the lower-size test fails.

The function plot_alpha below is a graphical experiment: it evaluates a finite, linearly spaced grid, scans it downward, exempts its initial full trial from the Goldstein check, and reports a lower-bound failure on later trials. It is not the geometric backtracking algorithm just stated or a general Wolfe solver. Its deliberate ascent-direction and restricted-grid failures remain part of the exercise.

A condition-number bound alone is sufficient in the Goldstein theorem above, but is not sufficient for a unit-step-capped Armijo method: directions can shrink summably even with condition number one. A conventional global Armijo result also controls the scale of the direction, for example by uniform positive lower and upper eigenvalue bounds on Bk\mathbf{B}^k.

Sources: Nocedal and Wright (2006), Algorithm 3.1 and discussion, p. 37; Dennis and Schnabel (1996), Algorithm 6.3.5, p. 126; Biegler (2010), Algorithm 3.2 and the additional Goldstein discussion, p. 50. Safeguarded quadratic/cubic interpolation is detailed below.

Recovery of the fast local rate

Suppose f∈C2(D)f\in C^2(D) on an open neighborhood DD of the limit, and a nonterminated descent sequence with nonzero directions converges to x∗\mathbf{x}^*, ∇f(x∗)=0\nabla f(\mathbf{x}^*)=\mathbf{0}, and ∇2f(x∗)≻0\nabla^2 f(\mathbf{x}^*)\succ0. Use fixed Wolfe parameters 0<η<1/20<\eta<1/2 and η<ζ<1\eta<\zeta<1. Let the directions satisfy

∥gk+Gkpk∥∥pk∥→0,Gk=∇2f(xk).\frac{\|\mathbf{g}^k+\mathbf{G}^k\mathbf{p}^k\|}{\|\mathbf{p}^k\|}\to0,\qquad \mathbf{G}^k=\nabla^2 f(\mathbf{x}^k).

For Newton-type solves this is the Dennis--Moré directional condition. Nondegeneracy and the residual condition imply pk→0\mathbf{p}^k\to0. They also give dk=(gk)Tpk≤−c∥pk∥2d_k=(\mathbf{g}^k)^T\mathbf{p}^k\le-c\|\mathbf{p}^k\|^2 eventually, for some c>0c>0.

Taylor expansion and the small residual give

f(xk+pk)−f(xk)=12dk+o(∥pk∥2),∇f(xk+pk)Tpk=o(∥pk∥2).f(\mathbf{x}^k+\mathbf{p}^k)-f(\mathbf{x}^k) =\frac12d_k+o(\|\mathbf{p}^k\|^2),\qquad \nabla f(\mathbf{x}^k+\mathbf{p}^k)^T\mathbf{p}^k=o(\|\mathbf{p}^k\|^2).

Thus Armijo has negative slack (1/2−η)dk+o(∥pk∥2)(1/2-\eta)d_k+o(\|\mathbf{p}^k\|^2) when 0<η<1/20<\eta<1/2; the curvature condition also passes for fixed η<ζ<1\eta<\zeta<1. Unit steps are eventually admissible. The search must try and accept them to obtain the superlinear rate. Admissibility alone does not force that selection.

The unit quadratic step lies below an Armijo line with eta=1/4 but above the line with eta=3/5.

The endpoint η=1/2\eta=1/2 has no Taylor-error margin. For f(x)=x2+x3f(x)=x^2+x^3, x<0x<0 near zero, exact Newton gives p=−(2x+3x2)/(2+6x)p=-(2x+3x^2)/(2+6x). Its unit step fails endpoint Armijo, but its half step satisfies Wolfe with ζ=0.9\zeta=0.9 for sufficiently small negative xx. The half-step recurrence is

x+=x(2+9x)4+12x,∣x+∣∣x∣→12.x^+=\frac{x(2+9x)}{4+12x},\qquad \frac{|x^+|}{|x|}\to\frac12.

It stays negative near zero and converges only linearly despite zero Newton directional residual. We therefore use the conservative strict parameter bound in the handout/reference. The whole-iterate versus directional-error equivalence has its existing full proof in Quasi-Newton Methods; the local Newton error proof is in Newton Methods.

Sources: Nocedal and Wright (2006), Theorems 3.6--3.7, pp. 46--47; Biegler (2010), Theorem 3.4, p. 50, with nondegeneracy explicit. The endpoint example is an independently derived illustration.

Visualization Code

The line search conditions, as one picture

Armijo and Goldstein conditions for steepest descent from x^k=-3: the accepted step lengths are the interval [\alpha_g, \alpha_a] where the function value stays below the Armijo line and above the Goldstein line.

This is Biegler Figure 3.2 for our test function. It is rendered from figures/plots/line-search-conditions.py and is the same image printed in the course pack, so what you annotate in lecture and what you see here cannot drift apart.

The cells below are the live version: plot_alpha redraws this for any xkx^k, any algorithm and any αmax⁡\alpha_{\max}, so you can explore cases the static figure does not cover -- including one where the line search fails.

Goal: Visualize Armijo and Goldstein conditions for an example.

def plot_alpha(xk, eta_ls=0.25, algorithm="newton", alpha_max=1.0):
    """
    Calculate step and visualize line search conditions

    Arguments:
        xk : initial point (required)
        eta_ls : eta in Goldstein-Armijo conditions
        algorithm : either "newton" or "steepest-descent"
        alpha_max : plots alpha between 0 and alpha_max

    Returns:
        Nothing

    Creates:
        Plot showing function value and line search conditions as a function of alpha
    """

    fxk = f(xk)
    dfxk = df(xk)

    if algorithm == "newton":
        pk = -dfxk / ddf(xk)
    elif algorithm == "steepest-descent":
        pk = -dfxk
    else:
        raise ValueError(
            "algorithm argument must be either 'newton' or 'steepest-descent'"
        )

    print("Considering xk =", xk, "and f(xk) = ", fxk)
    print("Step with", algorithm, "algorithm:")
    print("pk = ", pk)
    print("With full step, xk+1 =", pk + xk, "and f(xk+1) =", f(xk + pk))

    n = 100
    alpha = np.linspace(0, alpha_max, n)
    fval = np.zeros(n)

    for i in range(0, n):
        fval[i] = f(xk + alpha[i] * pk)

    fs = 18
    plt.figure()

    # Evaluate f(x^{k+1}) for different alpha values.
    # Color and linestyle match figures/plots/line-search-conditions.py, the
    # static version of this figure in the course pack: house cycle in order,
    # black solid, blue dashed, orange dash-dot. The linestyles are what make
    # the three series separable in greyscale.
    plt.plot(alpha, fval, color="black", linestyle="-", label=r"$f(x^{k+1})$")

    # Armijo condition
    arm = np.zeros(n)
    for i in range(0, n):
        arm[i] = fxk + eta_ls * alpha[i] * dfxk * pk

    plt.plot(alpha, arm, color="#0072B2", linestyle="--", label="Armijo")

    # Goldstein condition
    gold = np.zeros(n)
    for i in range(0, n):
        gold[i] = fxk + (1 - eta_ls) * alpha[i] * dfxk * pk

    plt.plot(alpha, gold, color="#E69F00", linestyle="-.", label="Goldstein")

    # Apply backtracking linestep (starting with alpha = alpha_max)
    i = n - 1
    flag = True
    failed = False
    while flag:

        if i < n - 1 and fval[i] < gold[i]:
            flag = False
            print(
                "Line search failed. Goldstein conditions violated. Consider increasing alpha_max."
            )
            failed = True

        # Armijo condition
        if fval[i] < arm[i]:
            flag = False
        else:
            i = i - 1

        if i < 0:
            print("Line search failed. Try decreasing alpha_max.")
            failed = True
            # Stop here. Without this, the loop keeps going with a negative
            # index, which wraps around to the end of the array and reports a
            # second, contradictory diagnosis.
            flag = False

    if not failed:
        print(
            "alphak =",
            alpha[i],
            "with backtracking line search starting at alpha =",
            alpha_max,
        )
        print("f(xk + alphak*pk) =", fval[i])

        plt.scatter(
            alpha[i],
            fval[i],
            marker="x",
            color="black",
            label=r"$\alpha^{k}$ for line search",
        )

    # Labels
    plt.xlabel(r"$\alpha^k$", fontsize=fs)
    plt.ylabel(r"$f(x^k + \alpha^k p^k)$", fontsize=fs)
    plt.grid()
    plt.legend()
    plt.show()

Newton Step, xk=−3x^k = -3

plot_alpha(-3, eta_ls=0.25, algorithm="newton", alpha_max=1.5)
Considering xk = -3 and f(xk) =  15.0
Step with newton algorithm:
pk =  0.796875
With full step, xk+1 = -2.203125 and f(xk+1) = -8.660857647657394
alphak = 1.5 with backtracking line search starting at alpha = 1.5
f(xk + alphak*pk) = -11.1743426900357
<Figure size 640x480 with 1 Axes>

Discussion

  • Why did the backtracking line search stop at αk=\alpha^k = alpha_max?

  • Is it possible to find a larger improvement in f(x)f(x) with αk>1\alpha^k > 1?

Steepest Descent Step, xk=−3x^k = -3

plot_alpha(-3, eta_ls=0.25, algorithm="steepest-descent", alpha_max=1e-1)
Considering xk = -3 and f(xk) =  15.0
Step with steepest-descent algorithm:
pk =  51
With full step, xk+1 = 48 and f(xk+1) = 2534689.5
alphak = 0.03535353535353535 with backtracking line search starting at alpha = 0.1
f(xk + alphak*pk) = -8.67145500733185
<Figure size 640x480 with 1 Axes>

Discussion

  • Why did the line search stop where the Armijo conditions are satisfied?

  • Why not further decrease αk\alpha^k to achieve a greater improvement in the objective?

Newton Step, xk=0x^k = 0

plot_alpha(0, eta_ls=0.25, algorithm="newton", alpha_max=1.0)
Considering xk = 0 and f(xk) =  1.5
Step with newton algorithm:
pk =  0.75
With full step, xk+1 = 0.75 and f(xk+1) = 3.486328125
Line search failed. Goldstein conditions violated. Consider increasing alpha_max.
<Figure size 640x480 with 1 Axes>

Discussion

  • Why does the line search fail?

  • How could we modify Newton’s method to improve robustness?

Steepest Descent Step, xk=0x^k = 0

plot_alpha(0, eta_ls=0.25, algorithm="steepest-descent", alpha_max=5e-1)
Considering xk = 0 and f(xk) =  1.5
Step with steepest-descent algorithm:
pk =  -6
With full step, xk+1 = -6 and f(xk+1) = 685.5
alphak = 0.4191919191919192 with backtracking line search starting at alpha = 0.5
f(xk + alphak*pk) = -2.9749848430038526
<Figure size 640x480 with 1 Axes>

Discussion

  • How does the region where the Armijo and Goldstein conditions are satisfied change for different values of eta_ls?

Trust Regions

Excerpts from Section 3.5 in Biegler (2010).

Main Idea and General Algorithm

At iteration kk, with Δk>0\Delta^k>0, the closed ball is B‾(0,Δk)={p∈Rn:∥p∥≤Δk}\overline B(0,\Delta^k)=\{\mathbf{p}\in\mathbb R^n:\|\mathbf p\|\le\Delta^k\}. A line search instead restricts its nonzero fixed direction to {αp:α>0}\{\alpha\mathbf p:\alpha>0\}. With symmetric Bk\mathbf{B}^k, use the Euclidean-ball subproblem

min⁡p mk(p)=(gk)Tp+12pTBkp,∥p∥≤Δk,Δk>0.\min_{\mathbf{p}}\ m^k(\mathbf{p})=(\mathbf{g}^k)^T\mathbf{p} +\frac12\mathbf{p}^T\mathbf{B}^k\mathbf{p}, \qquad \|\mathbf{p}\|\le\Delta^k,\quad \Delta^k>0.

The constant f(xk)f(\mathbf{x}^k) is omitted because it changes neither the minimizer nor the predicted reduction. Weierstrass states that a continuous function on a nonempty compact set attains its minimum and maximum; its existing existence discussion is in Unconstrained Optimality Conditions. A continuous quadratic therefore attains a minimum on this compact ball even when Bk\mathbf{B}^k is indefinite.

A line search selects a point on one ray; a trust-region method selects within a ball.

The radius is updated by comparing actual objective reduction with predicted model reduction. Source: Biegler (2010), Eq. (3.49), p. 53; Nocedal and Wright (2006), pp. 68--70.

Choose 0<κ1<κ2<10<\kappa_1<\kappa_2<1, 0<γ<min⁡{1/4,κ1}0<\gamma<\min\{1/4,\kappa_1\}, and 0<Δ0≤Δˉ0<\Delta^0\le\bar\Delta. Evaluate the current gradient before testing it; a small gradient reports a stationary candidate. For a nonterminated iteration:

  1. Compute a feasible, sufficiently model-reducing step pk\mathbf{p}^k. Report stagnation together with the gradient norm if its movement is too small.

  2. Compute pred⁡=mk(0)−mk(pk)>0\operatorname{pred}=m^k(0)-m^k(\mathbf{p}^k)>0. A nonpositive prediction signals a failed subproblem step; do not form a meaningless ratio.

  3. Evaluate ared⁡=f(xk)−f(xk+pk)\operatorname{ared}=f(\mathbf{x}^k)-f(\mathbf{x}^k+\mathbf{p}^k) and ρk=ared⁡/pred⁡\rho^k=\operatorname{ared}/\operatorname{pred}.

  4. If ρk<κ1\rho^k<\kappa_1, set Δk+1=κ1∥pk∥\Delta^{k+1}=\kappa_1\|\mathbf{p}^k\|. If ρk>κ2\rho^k>\kappa_2 and the step reaches the boundary, set Δk+1=min⁡(2Δk,Δˉ)\Delta^{k+1}=\min(2\Delta^k,\bar\Delta). Otherwise retain the radius.

  5. Accept the trial iterate only if ρk>γ\rho^k>\gamma; otherwise retain the old iterate and recompute a step with the new radius.

Acceptance and radius change have different thresholds. With prediction 10, actual decrease 1.5, γ=0.1\gamma=0.1, κ1=0.25\kappa_1=0.25, and step norm 2, the ratio is 0.15: accept the step but shrink the next radius to 0.5. A good interior step need not enlarge the radius because the current bound did not restrict it.

Source: Biegler (2010), Algorithm 3.3, p. 53, adapted to test evaluated quantities and report failed diagnostics. Nocedal and Wright’s Algorithm 4.1, p. 69, uses the closely related shrink rule Δk+1=Δk/4\Delta^{k+1}=\Delta^k/4, rather than Biegler’s step-norm rule; do not silently mix the two.

Why order the thresholds? Every rejected trial has ρ≤γ<κ1\rho\le\gamma<\kappa_1, so it triggers a radius decrease. The strict inequality also handles ρ=γ\rho=\gamma. Biegler’s usual choice κ1=1/4\kappa_1=1/4 with 0<γ<1/40<\gamma<1/4 has this property. His more general parameter list in Algorithm 3.3 does not explicitly state the ordering; the following independently derived example shows why that broader list needs qualification for this update rule.

Consider f(x)=19x2/20f(x)=19x^2/20, starting at x=1x=1, with exact gradient g=19/10g=19/10, model curvature B=1B=1, and radius Δ=2\Delta=2. The exact model minimizer is the interior step p=−19/10p=-19/10, giving

pred⁡=361200,ared⁡=3612000,ρ=110.\operatorname{pred}=\frac{361}{200},\qquad \operatorname{ared}=\frac{361}{2000},\qquad \rho=\frac1{10}.

Choose γ=1/5\gamma=1/5, κ1=1/20\kappa_1=1/20, and κ2=3/4\kappa_2=3/4. The trial is rejected because ρ<γ\rho<\gamma, but the radius is retained because ρ≥κ1\rho\ge\kappa_1 and the expansion condition fails. Reusing the same model repeats the identical rejected step indefinitely, with gradient 19/1019/10. The objective is smooth and bounded below, the model matrices are bounded, and the exact step gives sufficient model reduction. Thus those assumptions alone do not establish stationarity when the thresholds allow rejected steps to keep the radius. This example motivates the strict ordering used above; it does not alter the numerical activity’s default parameters.

Trust Region Variations

Levenberg--Marquardt arcs and the Powell dogleg path for several trust region radii.

The Levenberg--Marquardt path varies a multiplier continuously; dogleg uses straight segments connecting the origin, Cauchy step, and Newton step.

pC\mathbf{p}^C: Cauchy step

pN\mathbf{p}^N: Newton step

Levenberg-Marquardt

Let B=BT∈Rn×n\mathbf B=\mathbf B^T\in\mathbb R^{n\times n}, g∈Rn\mathbf g\in\mathbb R^n, and Δ>0\Delta>0. A feasible vector p∗\mathbf{p}^* is a global minimum of the quadratic model over the ball if and only if some δ≥0\delta\ge0 satisfies

(B+δI)p∗=−g,δ(Δ−∥p∗∥)=0,B+δI⪰0.(\mathbf{B}+\delta\mathbf{I})\mathbf{p}^*=-\mathbf{g},\qquad \delta(\Delta-\|\mathbf{p}^*\|)=0,\qquad \mathbf{B}+\delta\mathbf{I}\succeq0.

Feasibility ∥p∗∥≤Δ\|\mathbf{p}^*\|\le\Delta is essential. If δ>0\delta>0, the boundary is active. The converse fails: a Newton minimum may lie exactly on the boundary with δ=0\delta=0. At a singular shifted matrix, use the linear system and an appropriate null-space component, not an undefined inverse.

A feasible comparison point inside the ball and a boundary model-minimum candidate.

For sufficiency, put h=v−p∗\mathbf{h}=\mathbf{v}-\mathbf{p}^*, where v\mathbf{v} is any feasible comparison point. Expanding the quadratic and using stationarity yields

m(v)−m(p∗)=12hT(B+δI)h+δ2(∥p∗∥2−∥v∥2)≥0.m(\mathbf{v})-m(\mathbf{p}^*)= \frac12\mathbf{h}^T(\mathbf{B}+\delta\mathbf{I})\mathbf{h} +\frac{\delta}{2}(\|\mathbf{p}^*\|^2-\|\mathbf{v}\|^2)\ge0.

The first term is nonnegative by positive semidefiniteness. The second is zero if δ=0\delta=0; otherwise complementarity puts the candidate on the boundary and feasibility bounds the comparison norm. This certifies the model minimum, not a global minimum of the actual objective. The converse characterization is proved in Nocedal and Wright, pp. 89--91.

Sources: Nocedal and Wright (2006), Theorem 4.1, p. 70; Biegler (2010), Theorem 3.6 and Eq. (3.50), p. 54, with the missing feasibility condition supplied.

Powell Dogleg

For g≠0\mathbf{g}\ne\mathbf{0}, the Cauchy point minimizes the quadratic on the feasible steepest-descent ray. Write q=gTBgq=\mathbf{g}^T\mathbf{B}\mathbf{g}. Then

pC=−τCg,τC={min⁡{∥g∥2/q,Δ/∥g∥},q>0,Δ/∥g∥,q≤0.\mathbf{p}^C=-\tau_C\mathbf{g},\qquad \tau_C=\begin{cases} \min\{\|\mathbf{g}\|^2/q,\Delta/\|\mathbf{g}\|\},&q>0,\\ \Delta/\|\mathbf{g}\|,&q\le0. \end{cases}

If q≤0q\le0, the ray model keeps decreasing, so its best feasible point is the boundary. With q>0q>0, the unconstrained ray minimum is used only when it fits. Define that untruncated vector as pU=−∥g∥2g/q\mathbf{p}^U=-\|\mathbf{g}\|^2\mathbf{g}/q.

Biegler Eq. (3.52) calls the untruncated positive-curvature vector a Cauchy step and clips it in the later dogleg rule. Nocedal and Wright’s Cauchy point is already clipped. The formulas above distinguish these roles explicitly.

Sources: Biegler (2010), Eq. (3.52), p. 54; Nocedal and Wright (2006), Eqs. (4.11)--(4.12), p. 72.

For B≻0\mathbf{B}\succ0, calculate pN=−B−1g\mathbf{p}^N=-\mathbf{B}^{-1}\mathbf{g} by a solve, and let pU\mathbf{p}^U be the untruncated ray minimum:

  • If ∥pN∥≤Δ\|\mathbf{p}^N\|\le\Delta, take the full model minimum.

  • Otherwise, if Δ≤∥pU∥\Delta\le\|\mathbf{p}^U\|, take ΔpU/∥pU∥\Delta\mathbf{p}^U/\|\mathbf{p}^U\|, the first-leg boundary point.

  • Otherwise take pU+θd\mathbf{p}^U+\theta\mathbf{d}, where d=pN−pU\mathbf{d}=\mathbf{p}^N-\mathbf{p}^U and the second segment intersects the boundary.

The intermediate condition gives 0<θ<10<\theta<1. Expanding the norm constraint produces

∥d∥2θ2+2dTpUθ+∥pU∥2−Δ2=0.\|\mathbf{d}\|^2\theta^2+2\mathbf{d}^T\mathbf{p}^U\theta+ \|\mathbf{p}^U\|^2-\Delta^2=0.

The applicable root is

θ=−dTpU+(dTpU)2+∥d∥2(Δ2−∥pU∥2)∥d∥2.\theta=\frac{-\mathbf{d}^T\mathbf{p}^U+ \sqrt{(\mathbf{d}^T\mathbf{p}^U)^2+ \|\mathbf{d}\|^2(\Delta^2-\|\mathbf{p}^U\|^2)}}{\|\mathbf{d}\|^2}.

This avoids a scalar iteration. In the shared figure, B=diag⁡(1,10)\mathbf{B}=\operatorname{diag}(1,10), g=(−2,−6)T\mathbf{g}=(-2,-6)^T, and Δ=1.5\Delta=1.5. The inputs give pN=(2,0.6)T\mathbf{p}^N=(2,0.6)^T, pU=pC=(20/91,60/91)T\mathbf{p}^U=\mathbf{p}^C=(20/91,60/91)^T, and θ≈0.6434961\theta\approx0.6434961. The dogleg boundary point and the exact L--M boundary point generally differ; the former approximates the full subproblem.

Both norm growth and model decrease along this path rely on positive definiteness. An indefinite exact Hessian needs a method that can use negative curvature, as detailed in the hard-case reference below.

Sources: Biegler (2010), §3.5.1 and Figure 3.4, p. 55; Nocedal and Wright (2006), Eqs. (4.15)--(4.16), p. 74, and Lemma 4.2, p. 75. The generated picture and numerical implementation have one source in the course figure pipeline.

Reference: monotone decrease without stationarity

For f(x)=x2f(x)=x^2, x0=2x^0=2, the sequence xk=(−1)k(1+2−k)x^k=(-1)^k(1+2^{-k}) has decreasing objective values but two limit points, -1 and 1. Its displacement stays large while the actual decrease tends to zero. Let pk=xk+1−xkp_k=x^{k+1}-x^k and take αk=1\alpha_k=1. These are descent directions, but their predicted linear decrease has a nonzero asymptotic magnitude. Thus any fixed positive Armijo fraction eventually rejects them.

For xk=1+2−kx^k=1+2^{-k}, use pk=−1p_k=-1 and αk=2−(k+1)\alpha_k=2^{-(k+1)}. Direct subtraction verifies the recurrence, and the geometric series totals one. The iterates reach the nonstationary limit 1. Actual decrease relative to the initial directional derivative tends to one, so Armijo permits these arbitrarily small steps, while Goldstein or Wolfe eventually rejects them.

Two sequences with decreasing squared values and nonstationary limits.

The second exponent corrects the inconsistent printed step sequence in Dennis and Schnabel, p. 118. It follows from subtracting consecutive displayed iterates, rather than adopting an index convention silently.

Sources: Dennis and Schnabel (1996), §6.3 and Figure 6.3.2, pp. 117--118; Biegler (2010), §3.4, pp. 47--48.

Reference: safeguarded interpolation for backtracking

Write ϕ0=ϕ(0)\phi_0=\phi(0), d=ϕ′(0)<0d=\phi'(0)<0, and suppose the positive trial a1a_1 fails Armijo. Fit

q2(a)=ϕ0+da+Aa2,A=ϕ(a1)−ϕ0−da1a12.q_2(a)=\phi_0+da+Aa^2,\qquad A=\frac{\phi(a_1)-\phi_0-da_1}{a_1^2}.

If A>0A>0, its minimizer is aq=−d/(2A)a_q=-d/(2A). This uses only the initial value/slope and one rejected value. If the fit has no useful positive minimum, use a contraction instead.

After two distinct positive rejected trials, define

ri=ϕ(ai)−ϕ0−daiai2,B=r1−r2a1−a2,A=r1−Ba1.r_i=\frac{\phi(a_i)-\phi_0-da_i}{a_i^2},\quad B=\frac{r_1-r_2}{a_1-a_2},\quad A=r_1-Ba_1.

The cubic fit q3(a)=ϕ0+da+Aa2+Ba3q_3(a)=\phi_0+da+Aa^2+Ba^3 satisfies both values. Solve d+2Aa+3Ba2=0d+2Aa+3Ba^2=0, selecting a positive stationary point with positive second derivative. If B=0B=0, use the quadratic formula above; a negative discriminant or unusable minimum calls for fallback.

Do not accept a point merely because it minimizes an interpolant. Safeguard the next trial, for example within [0.1acurrent,0.5acurrent][0.1a_{\mathrm{current}},0.5a_{\mathrm{current}}], evaluate the actual objective there, and test Armijo again. Safeguards avoid almost unchanged trials and extremely small jumps caused by a poor fit. The two distinct trial values are essential; equal nodes do not define this cubic fit.

A Goldstein/Wolfe search has different lower-size logic: a trial that is too short must be increased or bracketed, not contracted forever. The reference backtracking experiment in the handout with −a+10a2-a+10a^2 demonstrates this distinction.

Sources: Dennis and Schnabel (1996), §6.3.2, pp. 126--128; Biegler (2010), Algorithm 3.2, p. 50, and Exercise 4, p. 61; Nocedal and Wright (2006), §3.5, pp. 56--60.

Reference: solving the Levenberg--Marquardt secular equation

First suppose B≻0\mathbf{B}\succ0, g≠0\mathbf{g}\ne\mathbf{0}, and the Newton model minimum lies outside the radius. For δ≥0\delta\ge0, solve

(B+δI)p(δ)=−g.(\mathbf{B}+\delta\mathbf{I})\mathbf{p}(\delta)=-\mathbf{g}.

The norm r(δ)=∥p(δ)∥r(\delta)=\|\mathbf{p}(\delta)\| decreases strictly from its outside value to zero. Solve r(δ)=Δr(\delta)=\Delta, preferably via the reciprocal secular function

h(δ)=1r(δ)−1Δ.h(\delta)=\frac1{r(\delta)}-\frac1\Delta.

Differentiating the solve gives p′=−(B+δI)−1p\mathbf{p}'=-(\mathbf{B}+\delta\mathbf{I})^{-1}\mathbf{p}. A second solve (B+δI)q=p(\mathbf{B}+\delta\mathbf{I})\mathbf{q}=\mathbf{p} yields

h′(δ)=pTq∥p∥3>0.h'(\delta)=\frac{\mathbf{p}^T\mathbf{q}}{\|\mathbf{p}\|^3}>0.

The same Cholesky factor can serve both solves. Establish a bracket with h(δlo)<0<h(δhi)h(\delta_{\mathrm{lo}})<0<h(\delta_{\mathrm{hi}}), increasing the upper trial until it is large enough. A Newton proposal δ−h/h′\delta-h/h' must remain in the admissible bracket; otherwise use a bracketed fallback. Stop at the accuracy appropriate for the model-reduction/feasibility requirement, rather than forcing unnecessary multiplier digits.

The reciprocal form is often nearly linear in the large-shift regime because r(δ)∼∥g∥/δr(\delta)\sim\|\mathbf{g}\|/\delta. Biegler’s two-or-three-iteration observation concerns a useful approximate root; it is not an iteration bound for every model.

For an indefinite matrix, the positive-definite solve domain starts above max⁡{0,−λmin⁡}\max\{0,-\lambda_{\min}\}. A root may fail to exist in that open domain: the hard case requires the singular endpoint and a null-space correction. Repeatedly increasing a shift cannot repair that missing component.

Sources: Biegler (2010), Eq. (3.51), p. 54; Nocedal and Wright (2006), §4.3 and Algorithm 4.3, pp. 85--87.

Reference: Cauchy reduction, stationarity, and collapsing radii

For symmetric B≠0\mathbf{B}\ne0, g≠0\mathbf{g}\ne0, use Euclidean/induced norms and let

t0=min⁡{Δ,∥g∥/∥B∥},p0=−t0g/∥g∥.t_0=\min\{\Delta,\|\mathbf{g}\|/\|\mathbf{B}\|\},\qquad \mathbf{p}_0=-t_0\mathbf{g}/\|\mathbf{g}\|.

This is a feasible ray trial. The quadratic-form norm bound gives

m(0)−m(p0)≥t0∥g∥−12∥B∥t02≥12t0∥g∥.m(0)-m(\mathbf{p}_0)\ge t_0\|\mathbf{g}\|-\frac12\|\mathbf{B}\|t_0^2 \ge\frac12t_0\|\mathbf{g}\|.

The Cauchy point minimizes over this ray, so its reduction is at least the trial reduction. Any step at least as good as Cauchy therefore supplies

m(0)−m(p)≥12∥g∥min⁡{Δ,∥g∥/∥B∥}.m(0)-m(\mathbf{p})\ge\frac12\|\mathbf{g}\| \min\{\Delta,\|\mathbf{g}\|/\|\mathbf{B}\|\}.

If B=0\mathbf{B}=0, the feasible boundary ray gives reduction Δ∥g∥\Delta\|\mathbf{g}\| directly; do not divide by its zero norm. If g=0\mathbf{g}=0, first-order stopping/classification is separate, and an indefinite model may still have a negative-curvature reduction.

A guaranteed feasible trial and the better Cauchy ray minimum.

Exact model minima satisfy the bound. Positive-definite dogleg steps do too, because the chosen point is at least as good as the feasible Cauchy point. A fixed positive fraction of this bound is enough in the general convergence framework.

With bounded model norms, an objective bounded below on the initial sublevel set and globally Lipschitz gradient, the standard trust-region iteration stated above with the ordered thresholds 0<γ<min⁡{1/4,κ1}0<\gamma<\min\{1/4,\kappa_1\} and 0<κ1<κ2<10<\kappa_1<\kappa_2<1 and feasible steps satisfying a fixed positive fraction of the displayed Cauchy reduction bound gives ∥∇f(xk)∥→0\|\nabla f(\mathbf{x}^k)\|\to0. This is a first-order conclusion; positive-definite approximations do not classify the true limiting Hessian.

Under that Lipschitz hypothesis, for an exact gradient and ∥B∥≤β\|\mathbf{B}\|\le\beta, the model mismatch obeys

∣ared⁡−pred⁡∣≤L+β2∥p∥2.|\operatorname{ared}-\operatorname{pred}| \le\frac{L+\beta}{2}\|\mathbf{p}\|^2.

If ∥g∥≥ε>0\|\mathbf{g}\|\ge\varepsilon>0 and the radius is small enough for the radius branch of the sufficient-reduction bound, then

∣ρ−1∣≤(L+β)Δ2c1ε.|\rho-1|\le\frac{(L+\beta)\Delta}{2c_1\varepsilon}.

Thus an accurate smooth model becomes relatively reliable at sufficiently small radii while the gradient stays large. Persistent collapse suggests inaccurate/noisy derivatives or values, a failed subproblem solve, or a numerically meaningless ratio when prediction is tiny. The ideal smooth proof does not apply unchanged to such errors. Stopping on a tiny radius or step should report the gradient norm, not label a minimum.

Near a nondegenerate minimum, fast local trust-region behavior requires stronger assumptions. Biegler Theorem 3.11 assumes Lipschitz Hessian, convergence to a point satisfying second-order sufficiency, model matrices converging to the limiting Hessian, and asymptotically exact subproblem solves with at least Cauchy reduction. Under that framework the radius bound eventually becomes inactive; it is not an unconditional noncollapse promise.

Sources: Nocedal and Wright (2006), Lemma 4.3, p. 78, and §4.2, pp. 77--84; Biegler (2010), Theorems 3.7--3.8, pp. 55--56, and Theorem 3.11, p. 58.

Reference: the hard case and a singular shifted system

Suppose B\mathbf B is symmetric, λmin⁡<0\lambda_{\min}<0, and let B=VΛVT\mathbf{B}=\mathbf{V}\boldsymbol{\Lambda}\mathbf{V}^T. In the positive-definite shifted domain,

p(δ)=−∑iviviTgλi+δ,δ>max⁡{0,−λmin⁡}.\mathbf{p}(\delta)=-\sum_i \frac{\mathbf{v}_i\mathbf{v}_i^T\mathbf{g}}{\lambda_i+\delta}, \qquad \delta>\max\{0,-\lambda_{\min}\}.

If the gradient has a component in the most-negative eigenspace, the norm can grow without bound as the shift approaches its lower endpoint. If the gradient is orthogonal to that entire eigenspace, the limit can be finite. Orthogonality alone is not enough to say every radius is unreachable: compare the limiting norm with the required radius. The hard case arises when the boundary cannot be reached by a nonsingular shifted solve.

At δ=−λmin⁡\delta=-\lambda_{\min}, solve for the component perpendicular to the singular eigenspace and add a vector in that null space. For a simple most-negative eigenvalue, one may write

p∗=p^+τvmin⁡,p^=−(B−λmin⁡I)†g.\mathbf{p}^*=\widehat{\mathbf{p}}+\tau\mathbf{v}_{\min},\qquad \widehat{\mathbf{p}}=-(\mathbf{B}-\lambda_{\min}\mathbf{I})^\dagger\mathbf{g}.

Here the dagger is the pseudoinverse, the base solution is perpendicular to the null space, and τ\tau is chosen to reach the radius. There is no ordinary inverse at that singular endpoint. For repeated most-negative eigenvalues, use the corresponding null space, not an arbitrarily chosen unrelated eigenvector.

For B=diag⁡(−1,2)\mathbf{B}=\operatorname{diag}(-1,2), g=(0,1)T\mathbf{g}=(0,1)^T, Δ=1\Delta=1, nonsingular shifts give p(δ)=(0,−1/(2+δ))T\mathbf{p}(\delta)=(0,-1/(2+\delta))^T, whose limiting norm is 1/31/3. At δ=1\delta=1, the base solution is (0,−1/3)T(0,-1/3)^T. The two boundary solutions are

p∗=(±8/9,−1/3)T,m(p∗)=−2/3.\mathbf{p}^*=(\pm\sqrt{8/9},-1/3)^T,\qquad m(\mathbf{p}^*)=-2/3.

They satisfy feasibility, shifted stationarity, complementarity and positive semidefiniteness. The added negative-curvature direction improves the base model value from −2/9-2/9 to −2/3-2/3.

The shifted norm cannot reach the radius, but a null-space component completes the boundary solution.

A pure positive-definite correction may suppress this useful curvature. For larger problems, truncated conjugate-gradient trust-region methods detect nonpositive curvature or a boundary crossing and truncate there, avoiding a full eigenvalue decomposition. This is a different mechanism from using an arbitrary indefinite Newton direction in a line search.

Sources: Nocedal and Wright (2006), §4.3, pp. 87--88, Eq. (4.45), and §7.1, pp. 169--175; Biegler (2010), Eqs. (3.54)--(3.55) and Algorithm 3.4, pp. 56--57.