Skip to content
nonconvexcard

Gradient Descent and Its Convergence Rates

Four complete convergence proofs — convex, strongly convex, non-smooth and non-convex — with the exact assumptions each one needs.

OptimizationAdvanced⏱ 1 day18 min readgradient descentconvergence ratesubgradientnon-convexlower bound
7 problems →

The algorithm is

xt+1=xt−η ∇f(xt),x_{t+1} = x_t - \eta\,\nabla f(x_t),

and the question is how fast f(xt)−f⋆f(x_t) - f^\star goes to zero. The answer depends entirely on which assumptions hold, and the four theorems below give four qualitatively different answers. The table is the summary.

AssumptionsQuantity boundedRateSteps for ε\eps
convex, LL-smoothf(xt)−f⋆f(x_t)-f^\starL∥x0−x⋆∥22t\dfrac{L\norm{x_0-x^\star}^2}{2t}O(1/ε)O(1/\eps)
μ\mu-strongly convex, LL-smoothf(xt)−f⋆f(x_t)-f^\star(1−1κ)t(f(x0)−f⋆)\left(1-\tfrac1\kappa\right)^{t}\big(f(x_0)-f^\star\big)O(κlog⁡(1/ε))O(\kappa\log(1/\eps))
convex, GG-Lipschitz (non-smooth)f(xˉt)−f⋆f(\bar x_t)-f^\starG∥x0−x⋆∥t\dfrac{G\norm{x_0-x^\star}}{\sqrt t}O(1/ε2)O(1/\eps^2)
LL-smooth onlymin⁡s≤t∥∇f(xs)∥\min_{s\le t}\norm{\nabla f(x_s)}2L(f(x0)−f⋆)t\sqrt{\dfrac{2L(f(x_0)-f^\star)}{t}}O(1/ε2)O(1/\eps^2)
Run it: Gradient descent, momentum and SGDTrajectories and suboptimality curves for GD, Nesterov acceleration, heavy ball and SGD on a quadratic.

The descent lemma applied

LemmaOne step decreases the objective

Let ff be LL-smooth and let x+=x−η∇f(x)x^+ = x - \eta\nabla f(x) with 0<η≤1/L0 < \eta \le 1/L. Then

f(x+)≤f(x)−η2∥∇f(x)∥22.f(x^+) \le f(x) - \frac{\eta}{2}\norm{\nabla f(x)}_2^2 .

Assumptions

LL-smoothness only. No convexity is used, which is why this lemma is the starting point of the non-convex analysis as well. The step-size restriction η≤1/L\eta \le 1/L is essential and is not a technical convenience — see the divergence proposition at the end of the page.

Convex and smooth: the O(1/t)O(1/t) rate

TheoremGradient descent on convex smooth functions

Let ff be convex, LL-smooth, with a minimiser x⋆x^\star. Run gradient descent with η=1/L\eta = 1/L. Then for all t≥1t\ge1,

f(xt)−f⋆≤L∥x0−x⋆∥222t.f(x_t) - f^\star \le \frac{L\norm{x_0-x^\star}_2^2}{2t}.

Key idea

Step 1 is the move to internalise: the squared distance to the optimum acts as a potential function (a Lyapunov function), and each step decreases it by an amount proportional to the suboptimality. Telescoping then converts a per-step decrease into a rate. Every convergence proof in this section — including the momentum and stochastic ones — is an instance of the same template with a cleverer potential.

What this does not say

The O(1/t)O(1/t) rate is sublinear: reaching ε\eps takes Θ(1/ε)\Theta(1/\eps) steps, so three more digits of accuracy costs a thousand times more work. There is no contradiction with the linear rate below; the difference is entirely the presence of strong convexity. Also note that the bound depends on ∥x0−x⋆∥2\norm{x_0-x^\star}_2, so it is not scale-free, and it says nothing about ∥xt−x⋆∥\norm{x_t-x^\star} — a convex smooth function can have a flat valley of near-minimisers far apart from each other.

Strongly convex and smooth: the linear rate

TheoremGradient descent on smooth strongly convex functions

Let ff be μ\mu-strongly convex and LL-smooth, κ=L/μ\kappa = L/\mu, and run gradient descent with η=1/L\eta = 1/L. Then

f(xt)−f⋆≤(1−1κ)t(f(x0)−f⋆),f(x_t) - f^\star \le \left(1-\frac1\kappa\right)^t\big(f(x_0)-f^\star\big),

and consequently, by quadratic growth, ∥xt−x⋆∥22≤2μ(1−1κ)t(f(x0)−f⋆)\norm{x_t-x^\star}_2^2 \le \frac2\mu\left(1-\frac1\kappa\right)^t\big(f(x_0)-f^\star\big).

Non-convex and smooth: stationarity only

TheoremGradient descent on smooth non-convex functions

Let ff be LL-smooth and bounded below by f⋆f^\star, and run gradient descent with η=1/L\eta = 1/L. Then

min⁡0≤s<t∥∇f(xs)∥2≤2L(f(x0)−f⋆)t.\min_{0\le s < t}\norm{\nabla f(x_s)}_2 \le \sqrt{\frac{2L\big(f(x_0)-f^\star\big)}{t}} .

What this does not say

Read the conclusion very carefully. It says: some iterate among the first tt has small gradient. It does not say

  • that the last iterate has small gradient (though the monotonicity of ff makes it plausible),
  • that any iterate is near a local minimum — a saddle point also has zero gradient,
  • that f(xt)f(x_t) is close to inf⁡f\inf f — the iterates may converge to a strictly suboptimal stationary point,
  • that anything converges at all, in the sense of the iterates having a limit.

This is the strongest general statement available for smooth non-convex optimisation with a first-order method, and the gap between it and what practitioners want is the subject of the deep learning theory page. A concrete example of the gap: f(x)=x3−3xf(x) = x^3 - 3x on R\R has a local minimum at x=1x=1 and a local maximum at x=−1x=-1; started at x0=−1x_0 = -1, gradient descent stays there forever, satisfying the theorem exactly and finding nothing.

Non-smooth convex: the subgradient method

DefinitionSubgradient

gg is a subgradient of a convex ff at xx if f(y)≥f(x)+⟨g,y−x⟩f(y)\ge f(x)+\ip{g}{y-x} for all yy. The set of subgradients is the subdifferential ∂f(x)\partial f(x), which is non-empty for convex ff on the interior of its domain and equals {∇f(x)}\{\nabla f(x)\} where ff is differentiable.

TheoremSubgradient method

Let ff be convex and GG-Lipschitz (equivalently, ∥g∥2≤G\norm{g}_2\le G for all g∈∂f(x)g\in\partial f(x) and all xx), with minimiser x⋆x^\star and ∥x0−x⋆∥2≤R\norm{x_0-x^\star}_2\le R. Run xt+1=xt−ηgtx_{t+1} = x_t - \eta g_t with gt∈∂f(xt)g_t\in\partial f(x_t) and fixed η=RGT\eta = \frac{R}{G\sqrt T} for a horizon TT. Then the average iterate xˉT=1T∑t<Txt\bar x_T = \frac1T\sum_{t<T}x_t satisfies

f(xˉT)−f⋆≤GRT.f(\bar x_T) - f^\star \le \frac{GR}{\sqrt T}.

Step size and lower bounds

PropositionDivergence above the threshold

Let f(x)=L2x2f(x) = \tfrac{L}{2}x^2 on R\R, so ff is LL-smooth and LL-strongly convex. Gradient descent with step η\eta satisfies xt=(1−ηL)tx0x_{t} = (1-\eta L)^tx_0, hence converges if and only if 0<η<2/L0<\eta<2/L, is stationary if η=2/L\eta = 2/L, and diverges if η>2/L\eta>2/L.

Key idea

The threshold 2/L2/L is exact, not an artefact. It is also the reason "learning rate too high" produces divergence rather than slow progress: past the threshold the dynamics are unstable, and the failure is qualitative. In deep learning the empirical counterpart is the "edge of stability" phenomenon, where training settles at a sharpness L≈2/ηL \approx 2/\eta — the largest value compatible with stability. That is an empirical observation, discussed as such on the deep learning theory page.

TheoremLower bound for first-order methods

Consider any method that, at step tt, outputs a point in the affine span of x0,∇f(x0),…,∇f(xt−1)x_0,\nabla f(x_0),\dots,\nabla f(x_{t-1}).

  • For convex LL-smooth ff in dimension d>td > t, there is an instance with f(xt)−f⋆≳L∥x0−x⋆∥22(t+1)2f(x_t)-f^\star \gtrsim \dfrac{L\norm{x_0-x^\star}_2^2}{(t+1)^2}.
  • For μ\mu-strongly convex LL-smooth ff, there is an instance with f(xt)−f⋆≳(κ−1κ+1)2t(f(x0)−f⋆)f(x_t)-f^\star \gtrsim \left(\dfrac{\sqrt\kappa-1}{\sqrt\kappa+1}\right)^{2t}\big(f(x_0)-f^\star\big).

Quoted from Nesterov's lectures; the instances are quadratics built from a tridiagonal matrix that "reveals" only one new coordinate per gradient query. The consequences are important:

  • Plain gradient descent's O(1/t)O(1/t) is not optimal; O(1/t2)O(1/t^2) is achievable and is attained by Nesterov acceleration.
  • The κ\sqrt\kappa in the strongly convex lower bound is also achieved by acceleration, so the gap between κ\kappa and κ\sqrt\kappa closes exactly.
  • No first-order method can do better. Beating these rates requires a stronger oracle — second-order information, as in Newton's method, or structure beyond smoothness and convexity.

Problems

Prove the O(1/t) rate for gradient descentProof · Advanced · 1 hour Linear convergence under strong convexityProof · Intermediate · 30 min Non-convex gradient descent reaches an approximate stationary pointProof · Intermediate · 30 min The exact step-size threshold on a quadraticProof · Beginner · 15 min Why the subgradient method needs averagingProof · Advanced · 30 min Implement gradient descent and verify all four ratesCoding · Advanced · 3 hours Gradient descent with exact line search on a quadraticProof · Advanced · 1 hour

References

These works are cited as sources to read, not reproduced. All exposition, examples and problems on this site are written independently; where an argument is standard, the citation points to a canonical treatment.

Results stated on this page

Experiments

Problems (7)

All problems

Papers that use this mathematics