MathLabs
TheoremProved

Convergence rate of gradient descent

Statement

Let LL be convex and LL-smooth (its gradient is Lipschitz with constant LL: ∥∇L(x)−∇L(y)∥≤L∥x−y∥\|\nabla L(x) - \nabla L(y)\| \le L\|x-y\|), and let θ⋆\theta^\star minimize LL. Gradient descent with step size η=1/L\eta = 1/L satisfies L(θK)−L(θ⋆)≤L∥θ0−θ⋆∥22KL(\theta_K) - L(\theta^\star) \le \dfrac{L\|\theta_0 - \theta^\star\|^2}{2K} after KK steps.

Why is it true?

Smoothness guarantees each gradient step decreases LL by an amount proportional to the squared gradient size, so L(θk)L(\theta_k) never goes up. Convexity lets us compare that per-step decrease to the still-remaining gap L(θk)−L(θ⋆)L(\theta_k) - L(\theta^\star). Adding up the guaranteed decreases over KK steps — a telescoping sum — shows the total decrease is bounded, and since the best point in a non-increasing sequence is at least as good as the average, the final gap must shrink like 1/K1/K.

Proof sketch

By LL-smoothness, for any x,yx, y: L(y)≤L(x)+∇L(x)⊤(y−x)+L2∥y−x∥2L(y) \le L(x) + \nabla L(x)^\top (y-x) + \dfrac{L}{2}\|y-x\|^2. Setting y=θk+1=θk−1L∇L(θk)y = \theta_{k+1} = \theta_k - \dfrac{1}{L}\nabla L(\theta_k) and x=θkx = \theta_k gives the descent lemma: L(θk+1)≤L(θk)−12L∥∇L(θk)∥2L(\theta_{k+1}) \le L(\theta_k) - \dfrac{1}{2L}\|\nabla L(\theta_k)\|^2.

By convexity of LL: L(θk)≤L(θ⋆)+∇L(θk)⊤(θk−θ⋆)L(\theta_k) \le L(\theta^\star) + \nabla L(\theta_k)^\top(\theta_k - \theta^\star). Adding this to the descent lemma: L(θk+1)−L(θ⋆)≤∇L(θk)⊤(θk−θ⋆)−12L∥∇L(θk)∥2L(\theta_{k+1}) - L(\theta^\star) \le \nabla L(\theta_k)^\top(\theta_k - \theta^\star) - \dfrac{1}{2L}\|\nabla L(\theta_k)\|^2.

Complete the square on the right-hand side: ∇L(θk)⊤(θk−θ⋆)−12L∥∇L(θk)∥2=L2(∥θk−θ⋆∥2−∥θk−θ⋆−1L∇L(θk)∥2)=L2(∥θk−θ⋆∥2−∥θk+1−θ⋆∥2)\nabla L(\theta_k)^\top(\theta_k - \theta^\star) - \dfrac{1}{2L}\|\nabla L(\theta_k)\|^2 = \dfrac{L}{2}\left(\|\theta_k - \theta^\star\|^2 - \left\|\theta_k - \theta^\star - \dfrac{1}{L}\nabla L(\theta_k)\right\|^2\right) = \dfrac{L}{2}\left(\|\theta_k - \theta^\star\|^2 - \|\theta_{k+1} - \theta^\star\|^2\right), since θk+1−θ⋆=θk−θ⋆−1L∇L(θk)\theta_{k+1} - \theta^\star = \theta_k - \theta^\star - \dfrac{1}{L}\nabla L(\theta_k).

So L(θk+1)−L(θ⋆)≤L2(∥θk−θ⋆∥2−∥θk+1−θ⋆∥2)L(\theta_{k+1}) - L(\theta^\star) \le \dfrac{L}{2}\left(\|\theta_k - \theta^\star\|^2 - \|\theta_{k+1} - \theta^\star\|^2\right). Summing this for k=0,…,K−1k = 0, \dots, K-1, the right-hand side telescopes to L2(∥θ0−θ⋆∥2−∥θK−θ⋆∥2)≤L2∥θ0−θ⋆∥2\dfrac{L}{2}\left(\|\theta_0 - \theta^\star\|^2 - \|\theta_K - \theta^\star\|^2\right) \le \dfrac{L}{2}\|\theta_0 - \theta^\star\|^2.

The descent lemma also shows L(θk)L(\theta_k) is non-increasing, so L(θK)L(\theta_K) is at most the average of L(θ1),…,L(θK)L(\theta_1), \dots, L(\theta_K): L(θK)−L(θ⋆)≤1K∑k=1K(L(θk)−L(θ⋆))≤L∥θ0−θ⋆∥22KL(\theta_K) - L(\theta^\star) \le \dfrac{1}{K}\sum_{k=1}^K \left(L(\theta_k) - L(\theta^\star)\right) \le \dfrac{L\|\theta_0 - \theta^\star\|^2}{2K}, which is exactly the claimed bound.

Topics that use this theorem

Step-by-step proofs

No step-by-step proof yet for this theorem.

References

  1. Ian Goodfellow, Yoshua Bengio, Aaron Courville (2016). Deep Learning
  2. Christopher M. Bishop (2006). Pattern Recognition and Machine Learning
  3. Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, Oriol Vinyals (2017). Understanding deep learning requires rethinking generalization · arXiv:1611.03530
  4. Arthur Jacot, Franck Gabriel, Clément Hongler (2018). Neural Tangent Kernel: Convergence and Generalization in Neural Networks · arXiv:1806.07572
  5. Mikhail Belkin, Daniel Hsu, Siyuan Ma, Soumik Mandal (2019). Reconciling modern machine learning practice and the classical bias-variance trade-off · arXiv:1812.11118