Skip to main content
QUICK REVIEW

[论文解读] A Distributed Synchronous SGD Algorithm with Global Top-$k$ Sparsification for Low Bandwidth Networks

Shaohuai Shi, Qiang Wang|arXiv (Cornell University)|Jan 14, 2019
Stochastic Gradient Optimization Techniques参考文献 35被引用 9
一句话总结

该论文提出 gTop-k S-SGD,一种使用全局 top-k 梯度稀疏化的分布式同步 SGD 算法,以减少低带宽网络中的通信开销。通过在所有工作节点中选择最大幅值的 top-k 梯度,而非聚合本地 top-k 梯度,该方法将通信复杂度从 O(kP) 降低至 O(k log P),在 32 个 GPU 的 1Gbps 以太网集群上,相比密集 SGD 实现了 2.7–12× 的更高扩展效率,相比现有 Top-k S-SGD 方法实现了 1.1–1.7× 的改进。

ABSTRACT

Distributed synchronous stochastic gradient descent (S-SGD) has been widely used in training large-scale deep neural networks (DNNs), but it typically requires very high communication bandwidth between computational workers (e.g., GPUs) to exchange gradients iteratively. Recently, Top-$k$ sparsification techniques have been proposed to reduce the volume of data to be exchanged among workers. Top-$k$ sparsification can zero-out a significant portion of gradients without impacting the model convergence. However, the sparse gradients should be transferred with their irregular indices, which makes the sparse gradients aggregation difficult. Current methods that use AllGather to accumulate the sparse gradients have a communication complexity of $O(kP)$, where $P$ is the number of workers, which is inefficient on low bandwidth networks with a large number of workers. We observe that not all top-$k$ gradients from $P$ workers are needed for the model update, and therefore we propose a novel global Top-$k$ (gTop-$k$) sparsification mechanism to address the problem. Specifically, we choose global top-$k$ largest absolute values of gradients from $P$ workers, instead of accumulating all local top-$k$ gradients to update the model in each iteration. The gradient aggregation method based on gTop-$k$ sparsification reduces the communication complexity from $O(kP)$ to $O(k\log P)$. Through extensive experiments on different DNNs, we verify that gTop-$k$ S-SGD has nearly consistent convergence performance with S-SGD, and it has only slight degradations on generalization performance. In terms of scaling efficiency, we evaluate gTop-$k$ on a cluster with 32 GPU machines which are interconnected with 1 Gbps Ethernet. The experimental results show that our method achieves $2.7-12 imes$ higher scaling efficiency than S-SGD and $1.1-1.7 imes$ improvement than the existing Top-$k$ S-SGD.

研究动机与目标

  • 解决在低带宽网络中大规模分布式同步 SGD(S-SGD)的高通信开销问题,尤其是在工作节点数量较多时。
  • 克服现有 Top-k 稀疏化方法因梯度索引不规则而需使用复杂度为 O(kP) 的 AllGather 操作所导致的低效问题。
  • 在大规模 DNN 训练中,在保持模型收敛性和泛化性能的前提下,降低通信复杂度。
  • 通过最小化冗余梯度传输,在消费级 1Gbps 以太网集群上提升扩展效率。

提出的方法

  • 提出一种全局 Top-k(gTop-k)稀疏化机制,从所有工作节点中选择绝对值最大的 k 个梯度,而非聚合本地 top-k 梯度。
  • 引入 gTopKAllReduce 算法,一种通信高效的集体操作,将梯度聚合复杂度从 O(kP) 降低至 O(k log P)。
  • 采用分布式选择协议,通过锦标赛式方法在 P 个工作节点中以 O(log P) 轮完成全局 top-k 梯度的识别。
  • 仅对选定的全局 top-k 值保留梯度索引信息,最大限度减少稀疏索引的通信开销。
  • 将 gTop-k 稀疏化集成到 S-SGD 框架中,结合动量修正和梯度裁剪,以保持收敛性和准确性。
  • 设计算法时尽量减少对训练循环的修改,确保与现有深度学习框架的兼容性。

实验结果

研究问题

  • RQ1全局 top-k 梯度选择是否能在不损害模型收敛性的情况下降低分布式 S-SGD 的通信复杂度?
  • RQ2gTopKAllReduce 的通信复杂度与基于 AllGather 的 Top-k 聚合(TopKAllReduce)相比,在工作节点数量增加时的扩展性能如何?
  • RQ3与密集 SGD 和本地 Top-k S-SGD 相比,gTop-k 稀疏化对模型准确率和收敛速度的影响如何?
  • RQ4在具有大量工作节点的低带宽网络中,gTop-k S-SGD 的扩展效率表现如何?
  • RQ5在带宽受限条件下,gTop-k S-SGD 是否能在 ResNet、VGG 和 RNN 等多样化 DNN 架构上保持高训练效率?

主要发现

  • gTop-k S-SGD 将通信复杂度从 O(kP) 降低至 O(k log P),显著提升了大规模集群的可扩展性。
  • 在通过 1Gbps 以太网连接的 32 个 GPU 集群上,gTop-k S-SGD 相比密集 S-SGD 实现了 2.7–12× 的更高扩展效率。
  • 在相同硬件环境下,gTop-k S-SGD 相比现有 Top-k S-SGD 方法提升了 1.1–1.7× 的扩展效率。
  • gTop-k S-SGD 的模型收敛性与 S-SGD 几乎完全一致,仅在泛化性能上出现轻微下降。
  • 在 ResNet-20 上,当小批量大小为 1024 时,gTop-k S-SGD 相比 Top-k S-SGD 的准确率下降约 9%,但当使用更小的小批量大小时,下降幅度降至约 0.5%。
  • 在 VGG-16 上,gTop-k S-SGD 相比 Top-k S-SGD 的准确率仅下降约 1%,在大批次大小下下降约 6%,表明其对批次大小变化具有更好的鲁棒性。

更好的研究,从现在开始

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

无需绑定信用卡

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