arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2205.05040cs.LGcs.DCmath.OCstat.ML
收藏

一种用于训练深度神经网络的通信高效分布式梯度裁剪算法

A Communication-Efficient Distributed Gradient Clipping Algorithm for Training Deep Neural Networks

George Mason University(乔治梅森大学);Meta Platforms, Inc.(元平台公司);University of Birmingham(伯明翰大学);Texas A&M University(得克萨斯农工大学)

Mingrui Liu, Zhenxun Zhuang, Yunwei Lei, Chunyang Liao

摘要:

在深度神经网络的分布式训练中,人们通常在每台机器上运行随机梯度下降(SGD)或其变体,并定期与其他机器进行通信。然而,SGD在训练一些深度神经网络(例如,RNN,LSTM),因为梯度爆炸问题。梯度裁剪通常用于解决单机环境中的这个问题,但在分布式环境中探索这项技术仍处于起步阶段:梯度裁剪方案是否可以利用多台机器来享受并行加速仍然是个谜。其主要技术难点在于同时处理非凸损失函数、非Lipschitz连续梯度和跳过通信轮。在本文中,我们探索了LSTM在以前的工作中所满足的损失景观的松弛平滑假设,并设计了一种通信高效的梯度裁剪算法。该算法可以在多台机器上运行,其中每台机器采用梯度裁剪方案,并在多个基于梯度的更新步骤之后与其他机器通信。我们的算法被证明有$O\left(\frac{1}{Nε^4}\right)$迭代复杂性和$O(\frac{1}{ε^3})$通信复杂性,寻找一个$ε$ -平稳点在齐次数据设置,其中$N$是机器的数量。这表明,我们的算法享有线性加速比和减少通信轮。我们的证明依赖于新的分析技术估计截断随机变量,我们相信是独立的利益。我们在多个基准数据集和各种场景上的实验表明,我们的算法在实践中确实表现出快速的收敛速度,从而验证了我们的理论。

英文摘要:

In distributed training of deep neural networks, people usually run Stochastic Gradient Descent (SGD) or its variants on each machine and communicate with other machines periodically. However, SGD might converge slowly in training some deep neural networks (e.g., RNN, LSTM) because of the exploding gradient issue. Gradient clipping is usually employed to address this issue in the single machine setting, but exploring this technique in the distributed setting is still in its infancy: it remains mysterious whether the gradient clipping scheme can take advantage of multiple machines to enjoy parallel speedup. The main technical difficulty lies in dealing with nonconvex loss function, non-Lipschitz continuous gradient, and skipping communication rounds simultaneously. In this paper, we explore a relaxed-smoothness assumption of the loss landscape which LSTM was shown to satisfy in previous works, and design a communication-efficient gradient clipping algorithm. This algorithm can be run on multiple machines, where each machine employs a gradient clipping scheme and communicate with other machines after multiple steps of gradient-based updates. Our algorithm is proved to have $O\left(\frac{1}{Nε^4}\right)$ iteration complexity and $O(\frac{1}{ε^3})$ communication complexity for finding an $ε$-stationary point in the homogeneous data setting, where $N$ is the number of machines. This indicates that our algorithm enjoys linear speedup and reduced communication rounds. Our proof relies on novel analysis techniques of estimating truncated random variables, which we believe are of independent interest. Our experiments on several benchmark datasets and various scenarios demonstrate that our algorithm indeed exhibits fast convergence speed in practice and thus validates our theory.

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

↑