提出统一分析框架,解释有限权重平均为何比SGD收敛更快、泛化更好。
A Unified Analysis for Finite Weight Averaging
- 将SGD与LAWA统一为有限权重平均(FWA),从优化与泛化双角度分析优势。
- 理论证明FWA收敛速度为O(log(T/k)/√T),快于SGD的O(log(T)/√T)。
- 首次建立累积梯度的递归边界,适用于不同学习率和凸/非凸场景。
随机梯度下降(SGD)的迭代加权平均在深度学习训练中表现优异,如随机权重平均(SWA)、指数移动平均(EMA)和最新权重平均(LAWA)。特别是有限权重平均方法(LAWA)能实现更快收敛与更优泛化。然而其理论解释仍不充分,因有限与无限设定存在本质差异。本文首次将SGD与LAWA统一为有限权重平均(FWA),并从优化与泛化视角阐明其优势。核心挑战在于传统期望或最优值分析法难以适用于无限维设定下的FWA收敛性。此外,FWA引入的累积梯度使泛化分析更复杂,尤其在不同假设下讨论困难。本文在凸性假设下,将最终迭代收敛分析扩展至FWA,建立收敛界为$\ ext{O}(\log(T/k)/\sqrt{T})$,其中 $k \in [1, T/2]$ 表示最后 $k$ 次迭代。相比SGD的$\ ext{O}(\log(T)/\sqrt{T})$,理论证明FWA具有更快收敛速率,并揭示平均点数量的影响。在泛化分析中,通过数学归纳法建立累积梯度的递归表示,给出常数与衰减学习率、凸与非凸情形下的边界,验证了FWA的优良泛化性能。多个基准实验结果支持理论结论。
原文摘要 · Abstract (English)
Averaging iterations of Stochastic Gradient Descent (SGD) have achieved empirical success in training deep learning models, such as Stochastic Weight Averaging (SWA), Exponential Moving Average (EMA), and LAtest Weight Averaging (LAWA). Especially, with a finite weight averaging method, LAWA can attain faster convergence and better generalization. However, its theoretical explanation is still less explored since there are fundamental differences between finite and infinite settings. In this work, we first generalize SGD and LAWA as Finite Weight Averaging (FWA) and explain their advantages compared to SGD from the perspective of optimization and generalization. A key challenge is the inapplicability of traditional methods in the sense of expectation or optimal values for infinite-dimensional settings in analyzing FWA's convergence. Second, the cumulative gradients introduced by FWA introduce additional confusion to the generalization analysis, especially making it more difficult to discuss them under different assumptions. Extending the final iteration convergence analysis to the FWA, this paper, under a convexity assumption, establishes a convergence bound $\mathcal{O}(\log\left(\frac{T}{k}\right)/\sqrt{T})$, where $k\in[1, T/2]$ is a constant representing the last $k$ iterations. Compared to SGD with $\mathcal{O}(\log(T)/\sqrt{T})$, we prove theoretically that FWA has a faster convergence rate and explain the effect of the number of average points. In the generalization analysis, we find a recursive representation for bounding the cumulative gradient using mathematical induction. We provide bounds for constant and decay learning rates and the convex and non-convex cases to show the good generalization performance of FWA. Finally, experimental results on several benchmarks verify our theoretical results.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。