Probabilistic Step-Size Selection and Line Searches

Summary

A line search decides the step size along a fixed direction by probing the univariate objective and its projected gradient , stopping when the Wolfe conditions hold. Under batch noise these deterministic ingredients break; the probabilistic line search of Mahsereci & Hennig replaces every non-probabilistic element by its Bayesian counterpart: cubic-spline interpolation becomes GP regression with an integrated-Wiener kernel, the bisection/evaluation rule becomes an expected-improvement decision, and the Boolean Wolfe test becomes a probability of the Wolfe conditions (a bivariate-normal integral). The same probabilistic reasoning yields runtime rules for batch size and early stopping (Ch. 27).

Overview

In the linear problem the step size was a trivial analytic ratio once was known; in the nonlinear setting it is not. Line searches are considered an “easier”, nearly-solved inner-loop problem in the noise-free world, but under significant computational noise they become genuinely hard (Thm. 25.3, Exercise 25.2 show step size is decisive). Ch. 26 is a case study: build a classical line search, then carefully replace each non-probabilistic aspect by a probabilistic equivalent, adding essentially no overhead. Ch. 27 generalises the theme — controlling other optimiser hyperparameters (batch size, stopping) by probabilistic estimates.

Main Content

The Wolfe termination conditions

(Weak and strong) Wolfe conditions

With constants , a step length is acceptable if

The strong Wolfe conditions replace (26.6) by (26.8), adding an upper bound on the gradient. Here are the value and projected gradient at the start of the search. The Armijo condition demands the function lie sufficiently below its initial value (linear decrease slope ); the curvature condition demands the gradient increase beyond its initial value. Practical lenient choices: , .

The Wolfe conditions do not guarantee the true optimum lies in the accepted bracket, nor that the chosen step is close to ; they merely rule out pathological behaviour (increasing values, tiny steps) and, combined with direction rules, give guarantees on (e.g. for BFGS the curvature condition guarantees is a descent direction). Requiring is necessary for acceptable steps to exist (Exercise 26.2).

Classical search by cubic-spline interpolation

The classical evaluation rule builds cubic local approximations of from collected values, stepping to a local minimum or an extrapolation point (Wahba; Nocedal & Wright §3.3). Starting from , the linear guess has no minimum, so a first step is set ad hoc (e.g. the previous search’s terminal step). Given four numbers , a unique cubic interpolates them (26.9), with coefficients (26.10) and its quadratic derivative minimised at . If the new point satisfies Wolfe, stop; else bisect the bracketing interval by the sign of and re-interpolate. This procedure is brittle to noise: a single erroneous bisection (from a noisy gradient sign) sends the search down a dead-end from which it cannot recover (Fig. 26.3).

Probabilistic line search: three replacements

The three probabilistic substitutions

The classical routine has three non-probabilistic ingredients replaced (Mahsereci & Hennig 2015):

  1. Spline interpolation → GP regression extended to noisy observations;
  2. Deterministic bisection → a candidate-set + utility rule (no region can be “bisected away” with certainty);
  3. Boolean Wolfe test → a probability of having found a suitable point.

All three are unified by casting spline interpolation as the noise-free limit of GP regression.

(1) Cubic splines as the integrated Wiener process

The SDE (26.11) — the integrated Wiener process (see Gauss-Markov Processes and SDEs) — has kernel . Its GP posterior mean is a piecewise-cubic polynomial that, in the noise-free limit , reverts exactly to the classical cubic spline. Conditioning on nontrivial gives mean and the joint value/derivative kernel (26.13, with )

The GP posterior mean/covariance (26.14–26.15) follow from standard Gaussian Process Regression with the noisy likelihood (Model 26.3):

Model 26.3 — Gaussian likelihood for values and gradients

stacks values (first ) then gradients, with spd noise covariance whose block structure allows value/gradient noise to co-vary at one node (correlation ) but assumes noise at different locations is independent (correct when batches are re-drawn per evaluation, Eq. 26.3). Since is block-diagonal the posterior can be computed by Kalman filtering/smoothing, at cost a constant multiple of the classical routine.

(2) Selecting evaluation nodes by expected improvement

In the noisy setting no region can be bisected away, so the search maintains a finite candidate set : (i) an extrapolation candidate (with growth policy , , or ), plus (ii) all local minima of the posterior mean in . The next node maximises a utility , e.g. the expected improvement over the best previous mean :

Expected improvement along the line (26.16)

where are the posterior mean and variance at . In practice the product works well. (See Acquisition Functions — this is the univariate ancestor of EI.)

(3) Probabilistic Wolfe conditions

Wolfe conditions as a bivariate-normal probability

The weak Wolfe conditions are a linear projection of : they require where

By closure of Gaussians under linear maps (Gaussian Distributions and Algebra), the GP posterior on induces a bivariate Gaussian with

The probability that the weak Wolfe conditions hold is the bivariate-normal integral

The point is accepted once this probability crosses a threshold (e.g. 0.3) after an evaluation. The strong condition adds a linear upper limit on (26.17).

The completed method (Algorithm 26.1, probLineSearch) operates on scaled pairs with , avoiding hyperparameters; it aborts after a fixed budget (~10 evaluations) with a rare fall-back to the posterior-mean minimum. It runs robustly on MLPs and logistic regression on MNIST/CIFAR10 (Fig. 26.6). Uncertain observations require additional observables: the noise variances (elements of ) are absent classically and must be estimated at runtime from within-batch statistics

Controlling other hyperparameters by probabilistic estimates (Ch. 27)

Optimal batch size for SGD

With (27.1), the gradient-element covariance whose diagonal is estimated by (27.2), assume is -Lipschitz-smooth. The per-step expected gain is

using . Since cost is linear in , maximising expected gain per cost gives

Under a scalar-Hessian approximation (, optimal rate ) and energy-type risks () this simplifies to the upper bound (27.4). The tuning heuristic again involves , a quantity absent in the noise-free case, estimated cheaply at runtime.

Statistical early-stopping test

In the noisy case never holds exactly; stop when we cannot rule out being at the population optimum. With , the evidence under is . Assuming independence across gradient elements and reusing (27.2), a log-likelihood-ratio test reduces to

i.e. stop when the average gradient element lies within its “error bar” . Here computational and empirical (population-vs-empirical-risk) uncertainty overlap and need not be distinguished.

Examples

Erroneous bisection under SNR = 1

With gradient noise and (a realistic SNR of 1 in big data), one may observe while the true . A classical line search bisects the wrong sub-interval and is permanently derailed (Fig. 26.3). The probabilistic line search instead reverts its GP mean toward the prior, yielding a smoother interpolant and a probability (not a certainty) of Wolfe satisfaction, so no irreversible decision is taken.

Connections

See Also