[论文解读] Parallel Restarted SGD with Faster Convergence and Less Communication: Demystifying Why Model Averaging Works for Deep Learning
该论文提出并行重启SGD(Parallel Restarted SGD)作为一种理论框架,用以解释为何模型平均在分布式深度学习中能实现快速收敛且通信次数更少。通过周期性地对各工作者的模型进行平均并重启SGD,该方法在保持与并行小批量SGD相同的O(1/√(NT))收敛速度的同时,将通信轮次减少O(T^{1/4}),证明了在非凸优化中,低频模型平均既有效又高效。
In distributed training of deep neural networks, parallel mini-batch SGD is widely used to speed up the training process by using multiple workers. It uses multiple workers to sample local stochastic gradient in parallel, aggregates all gradients in a single server to obtain the average, and update each worker's local model using a SGD update with the averaged gradient. Ideally, parallel mini-batch SGD can achieve a linear speed-up of the training time (with respect to the number of workers) compared with SGD over a single worker. However, such linear scalability in practice is significantly limited by the growing demand for gradient communication as more workers are involved. Model averaging, which periodically averages individual models trained over parallel workers, is another common practice used for distributed training of deep neural networks since (Zinkevich et al. 2010) (McDonald, Hall, and Mann 2010). Compared with parallel mini-batch SGD, the communication overhead of model averaging is significantly reduced. Impressively, tremendous experimental works have verified that model averaging can still achieve a good speed-up of the training time as long as the averaging interval is carefully controlled. However, it remains a mystery in theory why such a simple heuristic works so well. This paper provides a thorough and rigorous theoretical study on why model averaging can work as well as parallel mini-batch SGD with significantly less communication overhead.
研究动机与目标
- 为了从理论上解释为何分布式深度学习中的模型平均能以远少于并行小批量SGD的通信量实现快速收敛。
- 为了分析在异构工作者设置下的非凸优化环境中,模型平均的收敛行为。
- 为了量化分布式训练中通信减少与收敛速度之间的权衡。
- 为了证明尽管同步频率降低,模型平均仍能保持与工作者数量成线性加速的关系。
提出的方法
- 提出并行重启SGD(PR-SGD)作为模型平均的形式化表达,即各工作者在I轮迭代后进行一次模型平均。
- 引入一种重启机制,将平均模型作为下一轮的初始值,以减少误差累积。
- 在非凸设置中,通过跨工作者和轮次的加权梯度平均来界定收敛误差。
- 在标准假设(光滑性、有界方差、Lipschitz连续梯度)下,推导出同质与异质工作者设置下的理论收敛边界。
- 通过将同步轮次减少至O(T^{1/4})(相比标准并行SGD的O(T)),分析通信成本。
- 采用步长γ = Θ(√N / √T)和平均间隔I_i = Θ(T^{1/4}/N^{3/4}),以平衡收敛速度与通信开销。
实验结果
研究问题
- RQ1为何模型平均在通信次数减少的情况下,仍能在深度学习中实现快速收敛?
- RQ2模型平均能否在通信轮次更少的情况下,仍保持与并行小批量SGD相同的O(1/√(NT))收敛率?
- RQ3在异构分布式训练中,模型平均的频率如何影响收敛性能?
- RQ4在分布式非凸优化中,通信成本与收敛速度之间的理论权衡是什么?
- RQ5模型平均中的重启机制是否能改善收敛,尤其是在初始值较差的情况下?
主要发现
- 通过并行重启SGD实现的模型平均,能达到与并行小批量SGD相同的O(1/√(NT))收敛率,同时保持与工作者数量成线性加速的关系。
- 相比标准并行小批量SGD,通信轮次减少了O(T^{1/4})的因子,显著降低了通信开销。
- 通过使用针对不同工作者的平均间隔I_i = Θ(T^{1/4}/N^{3/4}),该方法在异构工作者设置下仍能保持收敛性。
- 理论分析表明,较差的初始点可通过重启机制得到补偿,从而在异构设置中实现更快的早期收敛。
- 在CIFAR10数据集上的ResNet20实验结果表明,当I ∈ {4,8,16,32}时,模型平均的性能与并行小批量SGD(I=1)相当或更优,且通信量更少。
- 该方法在不同深度学习任务中均表现稳健,包括图像分类和语音识别,已有先前的实证研究验证了其有效性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。