Sync-Switch:分布式深度学习的混合参数同步
Sync-Switch: Hybrid Parameter Synchronization for Distributed Deep Learning
摘要:
随机梯度下降(SGD)已经成为分布式集群中训练深度神经网络的实际方法。确定训练吞吐量和模型精度的关键因素是参数同步协议的选择。例如,虽然批量同步并行(BSP)通常可以实现更好的收敛精度,但相应的训练吞吐量可能会受到落伍者的负面影响。相比之下,异步并行(ASP)可以具有更高的吞吐量,但其收敛性和准确性可能会受到陈旧梯度的影响。为了提高同步协议的性能,最近的工作往往集中在设计新的协议,严重依赖于难以调整的超参数。在本文中,我们设计了一种混合同步方法,利用BSP和ASP的优点,即,减少训练时间,同时保持收敛精度。基于广泛的经验分析,我们设计了一个自适应的政策,确定如何以及何时切换同步协议之间的集合。我们的策略既包括针对重复作业的离线策略,也包括用于处理瞬时掉队作业的在线策略。我们在TensorFlow之上的一个名为Sync-Switch的原型系统中实现了所提出的策略,并使用流行的深度学习模型和数据集评估了训练性能。实验表明,与BSP相比,Sync-Switch实现了高达5.13倍的吞吐量加速和相似的收敛精度。此外,我们观察到,与使用ASP进行训练相比,Sync-Switch仅用1.23倍的训练时间就实现了3.8%的高收敛精度。此外,当使用ASP训练导致发散错误时,可以在设置中使用Sync-Switch。Sync-Switch以非常低的开销实现了所有这些优点,例如,框架开销可以低至总训练时间的1.7%。
英文摘要:
Stochastic Gradient Descent (SGD) has become the de facto way to train deep neural networks in distributed clusters. A critical factor in determining the training throughput and model accuracy is the choice of the parameter synchronization protocol. For example, while Bulk Synchronous Parallel (BSP) often achieves better converged accuracy, the corresponding training throughput can be negatively impacted by stragglers. In contrast, Asynchronous Parallel (ASP) can have higher throughput, but its convergence and accuracy can be impacted by stale gradients. To improve the performance of synchronization protocol, recent work often focuses on designing new protocols with a heavy reliance on hard-to-tune hyper-parameters. In this paper, we design a hybrid synchronization approach that exploits the benefits of both BSP and ASP, i.e., reducing training time while simultaneously maintaining the converged accuracy. Based on extensive empirical profiling, we devise a collection of adaptive policies that determine how and when to switch between synchronization protocols. Our policies include both offline ones that target recurring jobs and online ones for handling transient stragglers. We implement the proposed policies in a prototype system, called Sync-Switch, on top of TensorFlow, and evaluate the training performance with popular deep learning models and datasets. Our experiments show that Sync-Switch achieves up to 5.13X throughput speedup and similar converged accuracy when comparing to BSP. Further, we observe that Sync-Switch achieves 3.8% higher converged accuracy with just 1.23X the training time compared to training with ASP. Moreover, Sync-Switch can be used in settings when training with ASP leads to divergence errors. Sync-Switch achieves all of these benefits with very low overhead, e.g., the framework overhead can be as low as 1.7% of the total training time.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。