Gradient descent · Definition

Line search

continuous optimizationgradient descent

After choosing a descent direction, we still need to decide how far to move. A poorly calibrated step can make the method very slow or stop decreasing the function.

Definition

Line search is a procedure that chooses the step size \(\alpha\) along a descent direction \(p_k\) to reduce the value of the objective function.

\[f(x_k+\alpha p_k)\le f(x_k)+c_1\alpha\nabla f(x_k)^\top p_k\]

The Armijo condition demands a sufficient decrease relative to \(f(x_k)\), with \(0<c_1<1\), so that the decrease is proportional to the step. Backtracking starts with a large \(\alpha\) and multiplies it by \(\rho\in(0,1)\) until the condition holds; since the direction is a descent direction, some \(\alpha\) always satisfies it.

Take \(f(x)=x^2\), \(x_k=1\) and \(p_k=-2\), with \(c_1=0.5\). With \(\alpha=1\) the new point is \(-1\), with \(f=1\), which does not drop below the bound \(-1\). With \(\alpha=\tfrac12\) the point is \(0\), with \(f=0\) and bound \(0\), so backtracking accepts \(\alpha=\tfrac12\).

A typical mistake is demanding the exact minimum of \(f\) along the line at every iteration, which costs many evaluations without much gain in convergence. Another common error is using a direction that is not a descent direction, with \(\nabla f(x_k)^\top p_k\ge 0\), because the promised decrease no longer exists.

Think about it

If \(\nabla f(x_k)^\top p_k>0\), can Armijo hold for some sufficiently small \(\alpha\)? Explain why.

No. For small \(\alpha\), \(f(x_k+\alpha p_k)\approx f(x_k)+\alpha\nabla f(x_k)^\top p_k\), which exceeds the bound \(f(x_k)+c_1\alpha\nabla f(x_k)^\top p_k\) because \(c_1<1\). So backtracking never terminates.

Exercises 10

What comes next

References

  • Stephen Boyd, Lieven Vandenberghe, Convex Optimization, 1st edition, Cambridge University Press, 2004.
  • Jorge Nocedal, Stephen J. Wright, Numerical Optimization, 2nd edition, Springer, 2006.