Optimization Methods: Gradient Descent and Variants
Gradient descent is a first-order iterative algorithm that minimizes a differentiable function by repeatedly stepping in the direction of steepest decrease, . Key result: for a convex function with Lipschitz-continuous gradient, gradient descent with a suitable step size converges to the global minimum at rate . Where it applies: machine learning (neural network training), statistics (logistic/linear regression), control theory, and any large-scale continuous optimization. Who/when: introduced by Augustin-Louis Cauchy (1847); modern variants (momentum, Adam) developed 1964–2015.
A differentiable function locally looks like a tilted plane. The gradient points in the direction of steepest ascent; therefore points downhill most steeply. By taking small steps downhill and re-measuring the slope each time, we "flow" toward a minimum — like a marble rolling on a landscape, except we move in discrete jumps whose length we control through .
Formal Statement
For differentiable, the gradient is the vector of partial derivatives:
Derivation hint: The gradient is defined so that the directional derivative satisfies ; stack the partials measured along each coordinate axis . A vector is a descent direction at if , guaranteeing decreases along for small steps.
Given an initial point and step sizes , gradient descent produces:
Derivation hint: Choose the descent direction , which minimizes the linear (first-order Taylor) approximation subject to by Cauchy–Schwarz. Here may be fixed (), diminishing ( with ), or chosen by line search.
The negative gradient is the steepest descent direction in the Euclidean norm. Among all unit vectors :
Derivation hint: Apply Cauchy–Schwarz, , with equality iff is anti-parallel to .
Let be convex and L-smooth, meaning for all . With fixed step size , gradient descent satisfies:
Derivation hint: Combine the descent lemma with convexity , then telescope the bound on . If additionally is -strongly convex (), convergence is linear (geometric):
Derivation hint: Show the gradient step is a contraction; expand and use co-coercivity of together with strong convexity to bound the inner-product term.
Why It Holds / Derivation
Step 1 — Quadratic upper bound (descent lemma). L-smoothness implies, by integrating the gradient along the segment from to :
Derivation hint: Write , add and subtract , and bound the remainder using the Lipschitz property.
Step 2 — Guaranteed decrease. Substitute into [6] with :
Derivation hint: Plug into [6], collect the terms; the choice makes the coefficient .
Step 3 — Bound progress toward optimum. Expand the squared distance:
Derivation hint: Substitute and expand the binomial .
Step 4 — Apply convexity. Using and [7], one shows the per-step decrease in function value telescopes. Summing over and using monotonicity of yields the averaged bound, then convexity collapses it to [4].
∎The French mathematician Cauchy introduced the method of steepest descent in an 1847 note to the Comptes Rendus, "Méthode générale pour la résolution des systèmes d'équations simultanées." His motivation was astronomical: solving systems of nonlinear equations arising in orbit computations. Cauchy proposed minimizing the sum of squared residuals by repeatedly moving in the direction that most rapidly decreased it — the negative gradient. Though he lacked the modern convergence theory (and computers to exploit it), his insight that a local linear approximation dictates the best search direction remains the conceptual seed of every first-order method used today.
Building Intuition
Imagine you are blindfolded on a hillside in dense fog and want to reach the valley. You cannot see the destination, but you can feel the slope under your feet. The strategy: feel which way is steepest downhill, take a step that way, then re-feel and repeat. The step size is your stride length. Too small, and you inch along forever (slow convergence). Too large, and you overshoot the valley, perhaps bouncing up the opposite slope or diverging entirely. The valley floor — where the ground is flat in every direction — is where , a stationary point. For a single convex valley this is the global minimum; for a rugged landscape (non-convex ) you may settle into a local valley or pause on a flat saddle.
Worked Examples
Given: Minimize starting from with fixed .
Step 1 — Gradient. .
Step 2 — Iterate using :
- ,
Step 3 — Closed form. The error obeys , so . Here (since ) and , so convergence is geometric.
Given: Minimize , starting from , .
Step 1 — Gradient. . The Hessian is , so , , condition number .
Step 2 — Decoupled updates (the two coordinates evolve independently):
- — so reaches in one step.
- — so , decaying slowly.
Step 3 — Observe the imbalance. After 1 step: . After 10 steps: . After 50: . The poorly-scaled -direction limits overall speed — illustrating that the condition number governs convergence per [5]: rate factor .
Common Misconceptions
A larger step size is not always faster. If , gradient descent on a convex quadratic diverges — the iterates oscillate with growing amplitude. The safe range for a fixed step on an -smooth convex function is , with optimal for the guarantee. Practitioners who "crank up the learning rate" to speed training often trigger instability or NaNs.
does not mean you have found a minimum. A zero gradient identifies any stationary point: a minimum, maximum, or saddle. In high-dimensional non-convex problems, saddle points vastly outnumber local minima, and naive GD can crawl very slowly near them. Verifying a minimum requires second-order information (a positive-semidefinite Hessian).
GD can fail to converge with a constant step on a non-smooth function. Consider , which is convex but not differentiable at and has no finite Lipschitz constant for its (sub)gradient slope behavior near the kink. With fixed and near , the subgradient is , so the iterate jumps by and oscillates forever around in steps of size , never settling. The remedy is a diminishing step size with , which the standard smooth theory does not cover — this is the domain of Subgradient Methods.
Connections
Gradient descent sits at the center of a web of methods. Replacing the full gradient by a noisy estimate from a data minibatch gives Stochastic Gradient Descent, the workhorse of deep learning. Incorporating a velocity term yields Momentum Methods and Nesterov acceleration, improving the rate from to for smooth convex problems. Using the Hessian to rescale steps connects to Newton's Method and quasi-Newton (BFGS) methods, trading per-step cost for fewer iterations. The choice of geometry/norm in the steepest-descent definition [3] generalizes to Mirror Descent and the natural gradient. Finally, the convergence analysis rests squarely on Convex Analysis and the notion of Lipschitz Continuity of the gradient.
Real-World Applications
Historical Development
Subtleties & Limits
For non-convex objectives — the regime of essentially all modern deep learning — gradient descent comes with no guarantee of reaching a global minimum, yet it works astonishingly well in practice. Why? Several deep questions remain only partially answered: (1) the loss landscape geometry of overparameterized networks appears to have many connected, nearly-global minima and few "bad" local minima, but a complete theory is missing; (2) implicit regularization — why SGD's noise biases solutions toward those that generalize well — is an active research frontier; (3) escaping saddle points efficiently requires careful step-size or noise schedules, and the sharpest rates are still being established; (4) the edge of stability phenomenon, where networks train stably at learning rates exceeding the classical bound, defies the smooth-convex theory entirely. Bridging optimization guarantees with generalization remains one of the central open problems in machine learning theory.
See Also
Stochastic Gradient Descent · Momentum Methods · Newton's Method · Convex Analysis · Backpropagation · Mirror Descent · Subgradient Methods · Lipschitz Continuity · Constrained Optimization