WIPIVERSE All articles

Line search

Line search is a fundamental technique in numerical optimization used to determine the step size (or learning rate) along a given descent direction during iterative optimization algorithms. It answers the question: given a direction in which to move, how far should one go?

Overview

In iterative optimization, each iteration computes a search direction $ \mathbf{d}_k $ (e.g., the negative gradient in gradient descent) and then updates the current point $ \mathbf{x}_k $ as:

$$ \mathbf{x}_{k+1} = \mathbf{x}_k + \alpha_k \mathbf{d}_k $$

where $ \alpha_k > 0 $ is the step length or step size. The line search is the procedure for selecting $ \alpha_k $. The goal is to choose a step size that sufficiently reduces the objective function $ f(\mathbf{x}) $ while avoiding excessive computational cost.

Types of Line Search Methods

1. Exact Line Search

Exact line search solves a one-dimensional optimization problem along the search direction:

$$ \alpha_k = \arg\min_{\alpha > 0} \psi(\alpha), \quad \psi(\alpha) = f(\mathbf{x}_k + \alpha \mathbf{d}_k) $$

This approach finds the exact minimizer of the function along the line. It is rarely used in practice for general problems because solving the univariate optimization problem exactly is computationally expensive. It is primarily applied to quadratic problems where a closed-form solution exists, or in theoretical analysis.

2. Inexact Line Search

Inexact line search methods find a step size that satisfies certain conditions, trading off optimality for computational efficiency. The most common conditions are:

Armijo Condition (Sufficient Decrease)

$$ f(\mathbf{x}_k + \alpha \mathbf{d}_k) \leq f(\mathbf{x}_k) + c_1 \alpha abla f(\mathbf{x}_k)^\top \mathbf{d}_k $$ where $ c_1 \in (0, 1) $ (typically $ c_1 = 10^{-4} $). This ensures the function decreases sufficiently relative to the step size.

Wolfe Conditions

The Wolfe conditions add a curvature condition to the Armijo condition:

  1. Sufficient decrease (Armijo condition): $ f(\mathbf{x}_k + \alpha \mathbf{d}_k) \leq f(\mathbf{x}_k) + c_1 \alpha abla f(\mathbf{x}_k)^\top \mathbf{d}_k $
  2. Curvature condition: $ abla f(\mathbf{x}_k + \alpha \mathbf{d}_k)^\top \mathbf{d}_k \geq c_2 abla f(\mathbf{x}_k)^\top \mathbf{d}_k $ where $ 0 < c_1 < c_2 < 1 $. The curvature condition ensures the step size is not too small by requiring that the slope of the function has been sufficiently reduced.

Strong Wolfe Conditions

The strong Wolfe conditions replace the curvature condition with: $$ | abla f(\mathbf{x}_k + \alpha \mathbf{d}_k)^\top \mathbf{d}_k| \leq c_2 | abla f(\mathbf{x}_k)^\top \mathbf{d}_k| $$ This prevents the step from being too large by bounding the absolute value of the directional derivative.

3. Backtracking Line Search

Backtracking line search is a simple and practical inexact method. Starting with a large initial step size $ \alpha = \alpha_0 $ (often $ \alpha_0 = 1 $), it iteratively shrinks the step size by a factor $ \beta \in (0, 1) $ (e.g., $ \beta = 0.5 $) until the Armijo condition is satisfied. This method is widely used due to its simplicity and robustness.

Common Applications

  • Gradient descent and its variants (stochastic gradient descent, mini-batch gradient descent)
  • Newton's method and quasi-Newton methods (BFGS, L-BFGS)
  • Conjugate gradient methods
  • Trust-region methods (as an alternative approach to step size selection)

Convergence Properties

Under standard assumptions (e.g., Lipschitz continuous gradient, sufficient decrease conditions), line search methods guarantee convergence to a stationary point. The Wolfe conditions, in particular, ensure global convergence for a broad class of algorithms, including gradient descent and quasi-Newton methods.

Key References

  • Nocedal, J. & Wright, S. J. (2006). Numerical Optimization. Springer.
  • Bertsekas, D. P. (2016). Nonlinear Programming. Athena Scientific.
  • Armijo, L. (1966). "Minimization of functions having Lipschitz continuous first partial derivatives." Pacific Journal of Mathematics, 16(1), 1–3.
  • Wolfe, P. (1969). "Convergence conditions for ascent methods." SIAM Review, 11(2), 226–235.
Browse

More topics to explore

    Browse all articles