arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2303.01215cs.LG
收藏

为什么(以及何时)本地SGD的泛化能力优于SGD?

Why (and When) does Local SGD Generalize Better than SGD?

Tsinghua University(清华大学);Princeton University(普林斯顿大学)

Xinran Gu, Kaifeng Lyu, Longbo Huang, Sanjeev Arora

摘要:

本地SGD是SGD的一种通信高效变体,用于大规模训练,其中多个GPU独立执行SGD并定期对模型参数进行平均。最近已经观察到,本地SGD不仅可以实现减少通信开销的设计目标,而且还导致比相应的SGD基线更高的测试准确度(Lin等人,2020 b),尽管这种情况发生的培训制度仍在争论中(Ortiz et al.,2021年)。本文旨在了解为什么(以及何时)局部SGD基于随机微分方程(Stochastic Differential Equation,简称SGD)近似更好地推广。本文的主要贡献包括:(i)在小学习率范围内捕获局部SGD的长期行为的噪声的推导,显示噪声如何驱动噪声漂移和扩散后,它已经达到接近局部最小值的流形,(ii)局部SGD和SGD的SDES之间的比较,显示局部SGD引起更强的漂移项,其可以导致更强的正则化效果,例如,锐度的更快降低,以及(iii)经验证据证实,具有小的学习率和足够长的训练时间能够实现相对于SGD的泛化改进,但是去除这两个条件中的任何一个都不会导致改进。

英文摘要:

Local SGD is a communication-efficient variant of SGD for large-scale training, where multiple GPUs perform SGD independently and average the model parameters periodically. It has been recently observed that Local SGD can not only achieve the design goal of reducing the communication overhead but also lead to higher test accuracy than the corresponding SGD baseline (Lin et al., 2020b), though the training regimes for this to happen are still in debate (Ortiz et al., 2021). This paper aims to understand why (and when) Local SGD generalizes better based on Stochastic Differential Equation (SDE) approximation. The main contributions of this paper include (i) the derivation of an SDE that captures the long-term behavior of Local SGD in the small learning rate regime, showing how noise drives the iterate to drift and diffuse after it has reached close to the manifold of local minima, (ii) a comparison between the SDEs of Local SGD and SGD, showing that Local SGD induces a stronger drift term that can result in a stronger effect of regularization, e.g., a faster reduction of sharpness, and (iii) empirical evidence validating that having a small learning rate and long enough training time enables the generalization improvement over SGD but removing either of the two conditions leads to no improvement.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑