Skip to main content
QUICK REVIEW

[论文解读] Layer-wise Adaptive Gradient Sparsification for Distributed Deep Learning with Convergence Guarantees

Shaohuai Shi, Zhenheng Tang|arXiv (Cornell University)|Nov 20, 2019
Stochastic Gradient Optimization Techniques参考文献 36被引用 14
一句话总结

该论文提出 LAGS-SGD,一种结合逐层自适应梯度稀疏化与同步 SGD 的分布式深度学习优化方法,通过流水线实现通信-计算重叠。通过根据通信-计算比自适应选择每层的重要梯度,LAGS-SGD 在保持与原始 SGD 相同收敛速率的同时,减少了通信开销,相较于密集 SGD 在 16-GPU 集群上实现了最高 30% 的训练加速。

ABSTRACT

To reduce the long training time of large deep neural network (DNN) models, distributed synchronous stochastic gradient descent (S-SGD) is commonly used on a cluster of workers. However, the speedup brought by multiple workers is limited by the communication overhead. Two approaches, namely pipelining and gradient sparsification, have been separately proposed to alleviate the impact of communication overheads. Yet, the gradient sparsification methods can only initiate the communication after the backpropagation, and hence miss the pipelining opportunity. In this paper, we propose a new distributed optimization method named LAGS-SGD, which combines S-SGD with a novel layer-wise adaptive gradient sparsification (LAGS) scheme. In LAGS-SGD, every worker selects a small set of "significant" gradients from each layer independently whose size can be adaptive to the communication-to-computation ratio of that layer. The layer-wise nature of LAGS-SGD opens the opportunity of overlapping communications with computations, while the adaptive nature of LAGS-SGD makes it flexible to control the communication time. We prove that LAGS-SGD has convergence guarantees and it has the same order of convergence rate as vanilla S-SGD under a weak analytical assumption. Extensive experiments are conducted to verify the analytical assumption and the convergence performance of LAGS-SGD. Experimental results on a 16-GPU cluster show that LAGS-SGD outperforms the original S-SGD and existing sparsified S-SGD without losing obvious model accuracy.

研究动机与目标

  • 通过结合流水线与梯度稀疏化,解决分布式深度学习中的通信瓶颈问题。
  • 克服现有稀疏化方法因梯度处理的单体性而无法实现通信与计算重叠的局限性。
  • 设计一种逐层自适应梯度稀疏化方案,实现通信-计算重叠,同时保持收敛性保证。
  • 在弱分析假设下,理论上证明 LAGS-SGD 的收敛速率阶与原始 S-SGD 相同。
  • 通过实验验证分析假设,并在真实世界 DNN 上展示更优的训练效率。

提出的方法

  • 提出一种逐层自适应梯度稀疏化(LAGS)方案,根据梯度幅值独立地为每层选择前 k 个重要梯度。
  • 根据每层的通信-计算比动态调整稀疏化比率,以平衡负载并隐藏通信延迟。
  • 将 LAGS 与同步 SGD(S-SGD)结合,形成 LAGS-SGD,支持流水线执行,使通信与反向传播重叠。
  • 采用误差补偿机制,在进行激进的梯度稀疏化时仍能保持模型精度。
  • 在弱分析假设下,推导出 LAGS-SGD 在非凸光滑优化问题上的理论收敛边界。
  • 使用 Horovod 和 NCCL 在 16-GPU 集群上的系统实现,评估实际运行时间性能。

实验结果

研究问题

  • RQ1逐层自适应梯度稀疏化能否在分布式 SGD 中实现通信-计算重叠?
  • RQ2在现实假设下,LAGS-SGD 是否保持与原始 S-SGD 相同的收敛速率阶?
  • RQ3每层自适应压缩比对收敛性和训练速度有何影响?
  • RQ4LAGS-SGD 是否能在不牺牲模型精度的前提下,显著超越密集和稀疏 S-SGD 的训练速度?
  • RQ5通信-计算比对 LAGS-SGD 的性能有何影响?

主要发现

  • 在 16-GPU 集群(10GbE 互连)上,LAGS-SGD 的训练速度相比密集 S-SGD 最快提升 30%。
  • 与 SLGS-SGD 相比,平均迭代时间减少 4.5%,表明系统可扩展性得到提升。
  • 在 ImageNet 上,LAGS-SGD 的实际运行时间相比 Dense-SGD 提升 22%-30%。
  • 使用 LAGS-SGD 的 ResNet-20、VGG-16 和 ResNet-50 模型的 Top-1 准确率与 Dense-SGD 相差不超过 0.3%,表明精度损失极小。
  • LAGS-SGD 的 LSTM-PTB 语言模型困惑度为 109.4,接近 Dense-SGD(106.7)和 SLGS-SGD(105.7),证实收敛一致性。
  • 理论分析表明,在弱分析假设下,LAGS-SGD 的收敛速率阶与原始 S-SGD 相同。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。