Gradient descent
First-order iterative algorithm for minimizing differentiable multivariate functions.
Gradient descent is an iterative method for finding the minimum of a function that has multiple variables and is differentiable, without any constraints. It works by repeatedly moving in the direction opposite to the gradient (or an approximation of it) at the current point, since that is the steepest path downhill. Moving in the direction of the gradient instead would maximize the function, a process called gradient ascent. Although it is iterative, it is distinct from local search algorithms. This technique is especially important in machine learning and artificial intelligence for reducing a cost or loss function.
The method relies on the fact that, near a given point, a function decreases most rapidly when you move in the negative gradient direction. Starting from an initial guess for a local minimum, each step updates the point by subtracting a small, positive step size (also called the learning rate) multiplied by the gradient. If the step size is small enough, the function value at each new point is less than or equal to the previous one, creating a sequence that converges toward a local minimum.
Gradient descent was first proposed by Augustin-Louis Cauchy in 1847, with a similar method independently suggested by Jacques Hadamard in 1907. Haskell Curry was the first to study its convergence for non-linear problems in 1944, leading to deeper investigation and wider use in later decades. A simple variation, stochastic gradient descent, is the fundamental algorithm used to train most modern deep networks.
- field
- Mathematical optimization
- known_for
- Gradient descent method for minimizing functions
Lore & Background
Gradient descent is based on the observation that if a multi-variable function is defined and differentiable near a point, it decreases fastest in the direction of the negative gradient. The algorithm takes repeated steps in that direction, with each step subtracting a scaled gradient from the current point. The step size, or learning rate, can change at each iteration. The sequence of points produced yields a monotonic decrease in function values, converging to a local minimum under certain assumptions such as convexity and Lipschitz continuity of the gradient.
Reader's Guide
Gradient descent is a first-order iterative algorithm used for unconstrained mathematical optimization, specifically for minimizing a differentiable multivariate function. The core principle involves taking repeated steps in the direction opposite to the gradient of the function at the current point, as this represents the path of steepest descent. Conversely, moving in the direction of the gradient itself performs maximization, known as gradient ascent. The method is generally attributed to Augustin-Louis Cauchy, who first proposed it in 1847, with Jacques Hadamard independently developing a similar approach in 1907. Haskell Curry later studied its convergence properties for non-linear problems in 1944, leading to its increased study and use. A key practical challenge is selecting an appropriate step size, or learning rate; a step that is too small slows convergence, while one that is too large can cause overshoot and divergence. More sophisticated approaches allow the step size to change at each iteration, using techniques like the Barzilai-Borwein method or the Wolfe conditions, which can be found through line search. While the negative gradient provides the direction of steepest descent, using a direction that deviates from this can sometimes be beneficial if it allows for a much longer sustained step. The algorithm is particularly important in machine learning and artificial intelligence for minimizing cost or loss functions. A simple extension, stochastic gradient descent, is the fundamental algorithm used for training most modern deep networks.
Did You Know?
- Stochastic gradient descent, a simple extension, is the most basic algorithm used for training most deep networks today.
The Iterative Descent Mechanism
Gradient descent operates on a deceptively simple geometric insight: at any point where a differentiable multivariate function is defined, the direction in which the function value drops most rapidly is precisely the negative of the gradient vector. The algorithm exploits this by starting from an initial guess and repeatedly stepping a small distance in that negative-gradient direction. The step length, commonly called the learning rate, is a positive real number that may be adjusted independently at every iteration, giving practitioners flexibility in how aggressively the search progresses. Each update subtracts the scaled gradient from the current position, producing a new candidate point. Because the function value at each successive point is guaranteed to be no larger than the one before it, the sequence of function evaluations forms a monotonically non-increasing chain. Under suitable regularity conditions on the target function, this chain drives the iterates toward a local minimum. The entire procedure is a first-order method, meaning it relies solely on gradient information rather than second derivatives or higher-order approximations, and it addresses unconstrained optimization problems where no explicit bounds restrict the search space.
A Long Lineage of Mathematical Thought
The intellectual roots of gradient descent stretch back to the mid-nineteenth century. The theoretical understanding of the method deepened considerably in the mid-twentieth century. The decades that followed saw the technique grow steadily in both theoretical sophistication and practical adoption. Researchers refined convergence guarantees, explored variants, and extended the framework to increasingly complex problem settings. This gradual maturation over roughly a century and a half is what ultimately positioned gradient descent to become the workhorse optimization tool of the modern data-science era.
The Engine Behind Modern Machine Learning
In the landscape of contemporary artificial intelligence, gradient descent occupies a role that is almost impossible to overstate. Its primary application in this domain is the minimization of cost or loss functions, the mathematical objects that quantify how poorly a model's predictions match observed data. By iteratively nudging model parameters in the direction that reduces this discrepancy, the algorithm effectively learns the structure hidden in the data. A particularly important variant, stochastic gradient descent, introduces a simple modification that dramatically alters computational behavior, and it has become the most basic training algorithm employed for the vast majority of deep neural networks in use today. This means that the same geometric principle Cauchy sketched on paper in the nineteenth century now underpins the optimization of networks with billions of parameters. The method's utility in machine learning stems from its combination of conceptual simplicity, low per-iteration computational cost, and the fact that it requires only first-order derivative information, making it scalable to problem sizes that would overwhelm higher-order optimization techniques.
Theoretical Guarantees and Conceptual Boundaries
Understanding what gradient descent is—and equally important, what it is not—clarifies its place within the broader optimization landscape. It is explicitly an unconstrained method, meaning it does not impose explicit bounds on the variables being optimized. It is also a first-order algorithm, relying exclusively on gradient information. It should not be conflated with local search algorithms, even though both belong to the family of iterative optimization procedures; their underlying mechanisms and guarantees differ in important ways. On the theoretical side, convergence to a local minimum can be rigorously guaranteed under specific regularity assumptions on the target function, such as convexity of the function and a Lipschitz-continuous gradient. Without such conditions, the monotonic decrease of function values at each step does not automatically ensure arrival at a minimum. The method also has a natural mirror image: stepping in the positive gradient direction traces a path of steepest ascent, a procedure known as gradient ascent, which is used when the goal is maximization rather than minimization.
Frequently Asked Questions
Who is Gradient descent?
Gradient descent is a first-order iterative method in mathematical optimization that repeatedly takes steps in the direction of steepest decrease to find the minimum of a differentiable function of multiple variables. It belongs to the broader field of unconstrained optimization.
What are Gradient descent's powers/role?
Its core ability is to minimize differentiable multivariate functions by computing the gradient at each point and adjusting parameters accordingly. In practice, this makes it a workhorse technique for training machine learning models and reducing loss or cost functions across AI systems.
Why is Gradient descent important?
It offers a computationally tractable way to solve optimization problems that would otherwise be intractable in high-dimensional spaces. This is precisely why it underpins so much of modern machine learning and artificial intelligence, where minimizing a loss function is the central task.
More in Algorithms And Data Structures 1-24
Spotted an error? Know more?
This is a living reference — every entry is fact-audited, and reader corrections feed straight into our audit queue. Suggest an edit · See this site's audit record
