Smoothness, strong convexity, and convergence rates
Use L-smoothness and strong convexity to prove sublinear and linear convergence rates.
The descent lemma says gradient descent makes progress; it does not say how fast. The speed depends on two curvature bounds: an upper bound (smoothness) that caps how large a step is safe, and a lower bound (strong convexity) that guarantees the function is not too flat. Their ratio, the condition number, sets the rate.
The two curvature bounds
is -smooth if (curvature at most ), giving the quadratic upper bound from the previous lesson. is -strongly convex if for some , equivalently
The function is sandwiched between two quadratics: . Strong convexity forces a unique minimizer and a paraboloid-like bowl no flatter than curvature .
The Polyak-Lojasiewicz inequality
Strong convexity implies a bound relating the suboptimality to the gradient norm. Minimizing both sides of the strong-convexity inequality over (the right side is a quadratic in , minimized at ) gives
A small objective gap forces a small gradient and vice versa: there are no flat near-optimal plateaus to stall on.
Linear convergence for strongly convex, smooth
Combine the descent lemma (with ) and the PL inequality. Let . The descent lemma gives , and PL bounds the gradient term below by :
Iterating,
[1]This is linear convergence: the gap shrinks by a constant factor each step, so reaching accuracy takes iterations.
The condition number
The ratio
is the condition number of the problem. It controls everything: the rate factor is , so a well-conditioned problem ( near 1) converges in few steps, while an ill-conditioned one ( large) crawls because the safe step size is tiny relative to the gentle curvature along the flat directions. For a quadratic, is the ratio of largest to smallest Hessian eigenvalue, the same condition number from the SVD.
To feel what buys, count the steps to shrink the gap to , which is steps:
- (nearly round bowl): factor , about 20 steps. The gap halves every iteration.
- : factor , about 131 steps.
- : factor , about 1375 steps.
- (a ravine 1000 times steeper across than along): factor , about 13800 steps.
The cost grows roughly in proportion to : each tenfold worsening of the conditioning multiplies the step count by about ten. The three runs in the code below () trace the first three rows.
Sublinear rate without strong convexity
If is convex and -smooth but not strongly convex (), the rate drops to
[2]an sublinear rate. Reaching now takes steps, far more than the of the strongly convex case. The lower curvature bound is what buys the exponential speedup.
Check it on arrays
import numpy as np
# Quadratic with controllable conditioning: f(x) = 0.5 x^T A x, A = diag(mu, L)
def run(mu, L, steps=200):
A = np.diag([mu, L])
grad = lambda x: A @ x
eta = 1.0 / L
x = np.array([1.0, 1.0])
gaps = []
for _ in range(steps):
gaps.append(0.5 * x @ A @ x) # f(x*) = 0
x = x - eta * grad(x)
return np.array(gaps)
for mu, L in [(1.0, 2.0), (1.0, 10.0), (1.0, 100.0)]:
gaps = run(mu, L)
kappa = L / mu
# empirical contraction factor vs predicted (1 - 1/kappa)
ratio = (gaps[100] / gaps[50]) ** (1 / 50)
print(f"kappa={kappa:>5.0f}: empirical factor {ratio:.4f}, "
f"predicted <= {1 - 1/kappa:.4f}")The per-step contraction factor stays at or below the predicted , and worsens as the condition number grows.
Exercises
Exercise 1. A problem is -smooth with and -strongly convex with . Compute the condition number , the linear-rate contraction factor , and the number of steps the bound predicts to shrink the gap to of its starting value.
Solution
Step 1. The condition number is .
Step 2. Each step multiplies the gap by at most .
Step 3. The gap after steps is at most of the start. Set and solve:
so about steps, matching the row of the lesson.
Exercise 2. Derive the PL inequality from the strong-convexity inequality. Show each step.
Solution
Step 1. Strong convexity gives, for all ,
The right side is a quadratic in ; minimizing it lower-bounds the left side's minimum, which is .
Step 2. Minimize the right side over . Setting its gradient in to zero, , gives the minimizer .
Step 3. Substitute that back. The linear and quadratic terms become
So the minimized right side is .
Step 4. Since the left side's minimum is ,
and rearranging gives .
Exercise 3 (code). For the diagonal quadratic with , , , run gradient descent with step from . Confirm the gap shrinks by no more than the predicted factor per step, and that the bound holds at .
Solution
import numpy as np
mu, L = 1.0, 50.0
kappa = L / mu
A = np.diag([mu, L])
eta = 1.0 / L
x = np.array([1.0, 1.0])
f = lambda z: 0.5 * z @ A @ z # f(x*) = 0, so gap = f(x)
gaps = [f(x)]
for _ in range(100):
x = x - eta * (A @ x)
gaps.append(f(x))
gaps = np.array(gaps)
factors = gaps[1:] / gaps[:-1]
assert np.all(factors <= (1 - 1/kappa) + 1e-9) # per-step contraction
assert gaps[100] <= (1 - 1/kappa)**100 * gaps[0] + 1e-12 # iterated bound
print("worst per-step factor:", round(factors.max(), 4),
" predicted bound:", round(1 - 1/kappa, 4))Every step contracts by at most , and the iterated bound at holds, confirming the linear rate.
The next lesson replaces the full gradient with a noisy estimate, the stochastic setting of real training.
References
- [1]Nesterov, Y. (2018). Lectures on Convex Optimization (2nd ed.), §2.1. Springer. Smoothness, strong convexity, and the linear rate for gradient descent.↩
- [2]Nocedal, J., & Wright, S. J. (2006). Numerical Optimization (2nd ed.), §3.3. Springer. Convergence rates and the role of the condition number (doi:10.1007/978-0-387-40065-5).↩