Skip to main content
QUICK REVIEW

[论文解读] How to scale distributed deep learning?

Peter Jin, Qiaochu Yuan|arXiv (Cornell University)|Nov 14, 2016
Stochastic Gradient Optimization Techniques被引用 53
一句话总结

本文比较了在 ImageNet 上训练 ResNet 时使用同步和异步分布式 SGD 的效果,提出了一种去中心化、无需参数服务器的 gossiping SGD 方法,该方法用本地平均代替了所有归约(all-reduce)。研究发现,在较小规模(最多约 32 个节点)下,异步方法(包括 gossiping 和弹性平均)收敛更快;而在超过约 32 个节点后,由于在大规模下收敛性能更优,同步所有归约方法的扩展性更好。

ABSTRACT

Training time on large datasets for deep neural networks is the principal workflow bottleneck in a number of important applications of deep learning, such as object classification and detection in automatic driver assistance systems (ADAS). To minimize training time, the training of a deep neural network must be scaled beyond a single machine to as many machines as possible by distributing the optimization method used for training. While a number of approaches have been proposed for distributed stochastic gradient descent (SGD), at the current time synchronous approaches to distributed SGD appear to be showing the greatest performance at large scale. Synchronous scaling of SGD suffers from the need to synchronize all processors on each gradient step and is not resilient in the face of failing or lagging processors. In asynchronous approaches using parameter servers, training is slowed by contention to the parameter server. In this paper we compare the convergence of synchronous and asynchronous SGD for training a modern ResNet network architecture on the ImageNet classification problem. We also propose an asynchronous method, gossiping SGD, that aims to retain the positive features of both systems by replacing the all-reduce collective operation of synchronous training with a gossip aggregation algorithm. We find, perhaps counterintuitively, that asynchronous SGD, including both elastic averaging and gossiping, converges faster at fewer nodes (up to about 32 nodes), whereas synchronous SGD scales better to more nodes (up to about 100 nodes).

研究动机与目标

  • 评估同步与异步 SGD 在大规模分布式深度学习中的收敛性能。
  • 解决大规模训练中同步 SGD(慢速节点问题)和异步 SGD(参数服务器瓶颈)的局限性。
  • 提出并评估 gossiping SGD,这是一种去中心化的参数服务器替代方案,可降低通信开销。
  • 根据可用节点数量,确定最优的分布式 SGD 策略。
  • 为实践者提供基于节点数量和收敛速度选择同步或异步训练的实证指导。

提出的方法

  • 提出 gossiping SGD,一种异步方法,通过使用随机节点对进行本地平均,替代集中式参数服务器。
  • 采用两步更新机制:首先计算本地梯度,然后通过与随机选择的邻居进行随机平均来更新参数。
  • 采用类似共识的更新方式:$\theta_{i,t+1} = (1-\beta)\theta_{i,t}^\prime + \beta\theta_{j_{i,t},t}^\prime$,其中 $\theta_{i,t}^\prime$ 为梯度更新,$j_{i,t}$ 为随机选择的节点。
  • 实现一种去中心化的 gossip 协议,避免同步障碍和中心化瓶颈。
  • 比较三种方法:同步所有归约 SGD、异步弹性平均 SGD 和所提出的 gossiping SGD。
  • 使用基于 CUDA 的快速图像缩放技术进行多尺度数据增强,以减少训练中的 I/O 开销。

实验结果

研究问题

  • RQ1在不同节点数量下,异步 SGD 的收敛速度与同步 SGD 相比如何?
  • RQ2作为去中心化替代方案,gossiping SGD 是否在收敛性和可扩展性方面优于集中式参数服务器方法?
  • RQ3在何种规模(节点数量)下,同步所有归约 SGD 的收敛速度会超过异步方法?
  • RQ4大步长和小步长对同步与异步 SGD 性能的影响如何?
  • RQ5在小到中等规模的节点数量下,gossiping SGD 是否能实现比弹性平均和所有归约 SGD 更快的收敛?

主要发现

  • 在较小规模(最多约 32 个节点)下,异步 SGD(包括弹性平均和 gossiping)的收敛速度优于同步所有归约 SGD。
  • 在更大节点数量(最多约 100 个节点)下,同步所有归约 SGD 扩展性更好,能在大规模下实现更快的收敛。
  • 尽管是去中心化且无同步障碍,gossiping SGD 在小节点数量下仍实现了比所有归约 SGD 更快的收敛。
  • 在大步长下,异步方法收敛更快;而在小步长下,所有归约 SGD 更快达到更高精度。
  • 异步与同步之间的性能权衡取决于节点数量:小规模下异步占优,大规模下同步占优。
  • 所提出的 gossiping SGD 方法避免了参数服务器瓶颈,并消除了慢速节点问题,使其在实践中更具鲁棒性和可扩展性。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

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