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

低带宽网络中全局$k$稀疏化的分布式同步SGD算法

A Distributed Synchronous SGD Algorithm with Global Top-$k$ Sparsification for Low Bandwidth Networks

Hong Kong Baptist University(香港浸会大学);Shenzhen District Block Technology Co., Ltd.(深圳区块科技有限公司)

Shaohuai Shi, Qiang Wang, Kaiyong Zhao, Zhenheng Tang, Yuxin Wang, Xiang Huang, Xiaowen Chu

摘要:

分布式同步随机梯度下降(S-SGD)已被广泛用于训练大规模深度神经网络(DNN),但它通常需要计算工作者之间非常高的通信带宽(例如,GPU)迭代地交换梯度。最近,已经提出了$k$稀疏化技术以减少要在工作者之间交换的数据量。顶部- $k$稀疏化可以在不影响模型收敛的情况下将梯度的重要部分归零。然而,稀疏梯度必须以其不规则的索引进行传输,这使得稀疏梯度聚集困难。使用AllGather来累积稀疏梯度的当前方法具有$O(kP)$的通信复杂性,其中$P$是工作者的数量,这在具有大量工作者的低带宽网络上是低效的。我们观察到,并不是所有的顶部- $k$梯度从$P$工人需要的模型更新,因此,我们提出了一种新的全球顶部- $k$(gTop- $k$)稀疏化机制来解决这个问题。具体来说,我们从$P$工作者中选择全局最大的$k$梯度绝对值,而不是累积所有局部最大的$k$梯度来在每次迭代中更新模型。基于gTop- $k$稀疏化的梯度聚合方法将通信复杂性从$O(kP)$降为$O(k\log P)$。通过在不同DNN上的大量实验,我们验证了gTop- $k$ S-SGD与S-SGD具有几乎一致的收敛性能,并且在泛化性能上只有轻微的下降。在扩展效率方面,我们评估了gTop- $k$的集群与32 GPU机器互连1 Gbps以太网。实验结果表明,该方法实现了$2.7-12\times$比S-SGD更高的缩放效率,而$1.1-1.7\times$比现有的Top- $k$ S-SGD有了改进。

英文摘要:

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\times$ higher scaling efficiency than S-SGD and $1.1-1.7\times$ improvement than the existing Top-$k$ S-SGD.

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

↑