MathLabs
定理已证明

梯度下降的收敛速度

命题陈述

设 LL 为凸函数且 LL-光滑(其梯度满足利普希茨常数为 LL:∥∇L(x)−∇L(y)∥≤L∥x−y∥\|\nabla L(x) - \nabla L(y)\| \le L\|x-y\|),且 θ⋆\theta^\star 使 LL 取最小值。步长 η=1/L\eta = 1/L 的梯度下降在 KK 步后满足 L(θK)−L(θ⋆)≤L∥θ0−θ⋆∥22KL(\theta_K) - L(\theta^\star) \le \dfrac{L\|\theta_0 - \theta^\star\|^2}{2K}。

为什么成立?

光滑性保证每次梯度步骤使 LL 下降的量与梯度大小的平方成正比,因此 L(θk)L(\theta_k) 永不增加。凸性使我们能将每步的下降量与仍剩余的差距 L(θk)−L(θ⋆)L(\theta_k) - L(\theta^\star) 相比较。把 KK 步中保证的下降量累加起来——一个望远镜求和——表明总下降量是有界的,而由于不增数列中的最佳点至少和平均值一样好,最终的差距必须以 1/K1/K 的速度缩小。

证明思路

由 LL-光滑性,对任意 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。取 y=θk+1=θk−1L∇L(θk)y = \theta_{k+1} = \theta_k - \dfrac{1}{L}\nabla L(\theta_k)、x=θkx = \theta_k,得到下降引理:L(θk+1)≤L(θk)−12L∥∇L(θk)∥2L(\theta_{k+1}) \le L(\theta_k) - \dfrac{1}{2L}\|\nabla L(\theta_k)\|^2。

由 LL 的凸性:L(θk)≤L(θ⋆)+∇L(θk)⊤(θk−θ⋆)L(\theta_k) \le L(\theta^\star) + \nabla L(\theta_k)^\top(\theta_k - \theta^\star)。将其加到下降引理上: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。

对右边配方:∇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),因为 θk+1−θ⋆=θk−θ⋆−1L∇L(θk)\theta_{k+1} - \theta^\star = \theta_k - \theta^\star - \dfrac{1}{L}\nabla L(\theta_k)。

于是 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)。对 k=0,…,K−1k = 0, \dots, K-1 求和,右边望远镜式相消为 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。

下降引理还表明 L(θk)L(\theta_k) 是非增的,因此 L(θK)L(\theta_K) 不超过 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},这正是所要证明的界。

用到此定理的主题

分步证明

该定理暂无分步证明。

参考文献

  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