What Is the Steepest Descent Method?
At a glance
- 1. Choose a starting point
Select an initial point where the objective function and its gradient can be evaluated.
- 2. Compute the gradient
Find the gradient at the current point; its negative is the steepest local descent direction under the Euclidean norm.
- 3. Choose a step length
Use a line search or a chosen learning rate to determine how far to move in that direction.
- 4. Update and check
Take the step, then repeat until the gradient or change in the objective is sufficiently small.
The steepest descent method is an iterative way to find a minimum of a differentiable function. Starting from a point, it moves in the direction that gives the greatest immediate decrease in the function, then repeats the process.
The method is easy to implement, but its locally steepest direction is not always the fastest route to the minimum. The choice of step length matters, and some functions make the method converge very slowly.
The basic idea
For a differentiable function , the gradient points in the direction of greatest local increase under the usual Euclidean distance. Therefore, the negative gradient, , gives the direction of greatest local decrease.
The first-order approximation
shows why. If , then the linear change is , which is negative for a positive step length whenever the gradient is nonzero.
At iteration , the update is
where is the step length, also called the learning rate. The direction is prescribed by the gradient; choosing the step length determines how far to travel along it.
How to apply the method
- Choose an initial point .
- Calculate the gradient at the current point.
- Select a step length . It may be fixed, determined by a line search, or computed by minimizing over .
- Update the point using the steepest descent formula.
- Repeat until a stopping condition is met, such as a sufficiently small gradient norm or a small change in the function value.
An exact line search chooses the step length that minimizes the function along the current direction. In practice, an exact minimum may be expensive to compute, so optimization algorithms often use an inexact line search that finds a step satisfying suitable decrease conditions.
Worked example
Consider
and start at . Its gradient is
so at the starting point . The steepest descent direction is therefore , and points along the line search have the form .
Substitute this into the objective:
Differentiating with respect to gives . Setting this derivative to zero gives . The next point is thus
The function value falls from to . The minimum is at , so this step has reduced the objective but has not reached the minimum. The method computes a new gradient there and continues.
Connection to solving linear systems
Steepest descent is also used to solve when is symmetric positive definite. In that case, solving the system is equivalent to minimizing
Its gradient is . If is the residual, then the negative gradient is , so the update moves along the residual direction. With an exact line search, the step length is
and . This version is related to, but generally less efficient than, the conjugate gradient method for large symmetric positive-definite systems.
Common mistakes and limitations
- Using the gradient instead of its negative: For minimization, the update subtracts the gradient. Adding it moves uphill for a sufficiently small positive step.
- Assuming any step length will work well: A step that is too large can increase the function or cause oscillation; one that is too small makes progress painfully slow.
- Expecting the method to reach the global minimum: A zero gradient is a stationary point, which may be a local minimum, a maximum, or a saddle point. Convexity provides stronger guarantees about global minimization.
- Treating steepest as fastest overall: The direction is steepest only for the immediate local decrease measured with the Euclidean norm. On elongated or poorly scaled contours, successive steps can zigzag and make slow progress.
For a convex function, gradient-based methods can converge toward a global minimum under appropriate conditions on the step lengths. For a nonconvex function, the outcome can depend on the starting point. In either case, check the gradient norm and objective change rather than relying only on a fixed number of iterations.
References
- Numerical Optimization, 2nd ed., Jorge Nocedal and Stephen J. Wright
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.