Gradient descent is an optimization algorithm.
It is technically referred to as a first-order optimization algorithm as it explicitly makes use of the first-order derivative of the target objective function. The first-order derivative, or simply the “derivative,” is the rate of change or slope of the target function at a specific point, e.g. for a specific input.
If the target function takes multiple input variables, it is referred to as a multivariate function and the input variables can be thought of as a vector. In turn, the derivative of a multivariate target function may also be taken as a vector and is referred to generally as the “gradient.”
- Gradient : First order derivative for a multivariate objective function.
The derivative or the gradient points in the direction of the steepest ascent of the target function for an input.
Specifically, the sign of the gradient tells you if the target function is increasing or decreasing at that point.
- Positive Gradient : Function is increasing at that point.
- Negative Gradient : Function is decreasing at that point.
Gradient descent refers to a minimization optimization algorithm that follows the negative of the gradient downhill of the target function to locate the minimum of the function.
Similarly, we may refer to gradient ascent for the maximization version of the optimization algorithm that follows the gradient uphill to the maximum of the target function.
- Gradient Descent : Minimization optimization that follows the negative of the gradient to the minimum of the target function.
- Gradient Ascent : Maximization optimization that follows the gradient to the maximum of the target function.
Central to gradient descent algorithms is the idea of following the gradient of the target function.
By definition, the optimization algorithm is only appropriate for target functions where the derivative function is available and can be calculated for all input values. This does not apply to all target functions, only so-called differentiable functions.
The main benefit of the gradient descent algorithm is that it is easy to implement and effective on a wide range of optimization problems.Gradient descent refers to a family of algorithms that use the first-order derivative to navigate to the optima (minimum or maximum) of a target function.
There are many extensions to the main approach that are typically named for the feature added to the algorithm, such as gradient descent with momentum, gradient descent with adaptive gradients, and so on.
Gradient descent is also the basis for the optimization algorithm used to train deep learning neural networks, referred to as stochastic gradient descent, or SGD. In this variation, the target function is an error function and the function gradient is approximated from prediction error on samples from the problem domain.