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

Mingrui Liu, Zhenxun Zhuang, Yunwei Lei, Chunyang Liao
5/10/2022
cs.LGcs.DCmath.OC

Official code: MingruiLiu-ML-Lab/Communication-Efficient-Local-Gradient-Clipping (0 stars, Python, GPL-3.0, last commit 2022-09-21).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

GPL-3.0

[NeurIPS 2022] A Communication-Efficient Distributed Gradient Clipping Algorithm for Training Deep Neural Networks

01Python, ShellSep 20, 20224 years agoGPL-3.0

Similar Papers

Cite this paper

@article{liu2022communicationefficient,
  title  = {A Communication-Efficient Distributed Gradient Clipping Algorithm for Training Deep Neural Networks},
  author = {Mingrui Liu and Zhenxun Zhuang and Yunwei Lei and Chunyang Liao},
  year   = {2022},
  eprint = {2205.05040},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2205.05040}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2205.05040.svg)](https://codeofpaper.com/paper/2205.05040)

Discussion