arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2211.00889cs.LGcs.DC
收藏

利用非阻塞小批量加速并行随机梯度下降

Accelerating Parallel Stochastic Gradient Descent via Non-blocking Mini-batches

New York University(纽约大学);IBM Research(IBM研究院)

Haoze He, Parijat Dube

摘要:

SOTA分散式SGD算法可以通过使用Ring All-Reduce等通信集体进行同步来克服参数服务器处的带宽瓶颈。虽然分布式SGD中的参数更新可能异步发生,但仍然存在同步障碍,以确保每个学习器的本地训练时期在学习器可以前进到下一个时期之前完成。等待最慢的学习者(掉队者)的延迟仍然是这些最先进的去中心化框架的同步步骤中的一个问题。在本文中,我们提出了(去)集中式非阻塞SGD(非阻塞SGD),它可以解决异构环境中的落伍问题。非阻塞SGD的主要思想是将原始批次分割成小批次,然后累积梯度并基于完成的小批次更新模型。非阻塞思想可以使用分散算法来实现,包括Ring All-reduce,D-PSGD和MATCHA来解决掉队者问题。此外,使用梯度累积来更新模型还保证了收敛性并避免了梯度失效。随机离散延迟和计算效率/设备吞吐量的运行时分析也显示了非阻塞SGD的优势。在一组数据集和深度学习网络上的实验验证了理论分析,并证明了非阻塞SGD加快了训练速度并改善了收敛性。与最先进的分散式异步算法(如D-PSGD和MACHA)相比,非阻塞SGD在异构环境中达到相同的训练损失所需的时间减少了2倍。

英文摘要:

SOTA decentralized SGD algorithms can overcome the bandwidth bottleneck at the parameter server by using communication collectives like Ring All-Reduce for synchronization. While the parameter updates in distributed SGD may happen asynchronously there is still a synchronization barrier to make sure that the local training epoch at every learner is complete before the learners can advance to the next epoch. The delays in waiting for the slowest learners(stragglers) remain to be a problem in the synchronization steps of these state-of-the-art decentralized frameworks. In this paper, we propose the (de)centralized Non-blocking SGD (Non-blocking SGD) which can address the straggler problem in a heterogeneous environment. The main idea of Non-blocking SGD is to split the original batch into mini-batches, then accumulate the gradients and update the model based on finished mini-batches. The Non-blocking idea can be implemented using decentralized algorithms including Ring All-reduce, D-PSGD, and MATCHA to solve the straggler problem. Moreover, using gradient accumulation to update the model also guarantees convergence and avoids gradient staleness. Run-time analysis with random straggler delays and computational efficiency/throughput of devices is also presented to show the advantage of Non-blocking SGD. Experiments on a suite of datasets and deep learning networks validate the theoretical analyses and demonstrate that Non-blocking SGD speeds up the training and fastens the convergence. Compared with the state-of-the-art decentralized asynchronous algorithms like D-PSGD and MACHA, Non-blocking SGD takes up to 2x fewer time to reach the same training loss in a heterogeneous environment.

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

↑