Skip to main content
QUICK REVIEW

[论文解读] QSGD: Communication-Efficient SGD via Gradient Quantization and Encoding

Dan Alistarh, Demjan Grubic|arXiv (Cornell University)|Oct 7, 2016
Stochastic Gradient Optimization Techniques被引用 907
一句话总结

QSGD 引入带 Elias 编码的随机梯度量化,以减少数据并行 SGD 的通信,在不降低准确性的前提下,为深度网络提供收敛性保证和实际加速。

ABSTRACT

Parallel implementations of stochastic gradient descent (SGD) have received significant research attention, thanks to excellent scalability properties of this algorithm, and to its efficiency in the context of training deep neural networks. A fundamental barrier for parallelizing large-scale SGD is the fact that the cost of communicating the gradient updates between nodes can be very large. Consequently, lossy compression heuristics have been proposed, by which nodes only communicate quantized gradients. Although effective in practice, these heuristics do not always provably converge, and it is not clear whether they are optimal. In this paper, we propose Quantized SGD (QSGD), a family of compression schemes which allow the compression of gradient updates at each node, while guaranteeing convergence under standard assumptions. QSGD allows the user to trade off compression and convergence time: it can communicate a sublinear number of bits per iteration in the model dimension, and can achieve asymptotically optimal communication cost. We complement our theoretical results with empirical data, showing that QSGD can significantly reduce communication cost, while being competitive with standard uncompressed techniques on a variety of real tasks. In particular, experiments show that gradient quantization applied to training of deep neural networks for image classification and automated speech recognition can lead to significant reductions in communication cost, and end-to-end training time. For instance, on 16 GPUs, we are able to train a ResNet-152 network on ImageNet 1.8x faster to full accuracy. Of note, we show that there exist generic parameter settings under which all known network architectures preserve or slightly improve their full accuracy when using quantization.

研究动机与目标

  • 通过解决梯度交换中的通信瓶颈,激励可扩展的数据并行 SGD。
  • 在凸/非凸目标下,开发具有收敛性保障的量化 SGD 框架。
  • 提供一种实用的编码方案,以在不破坏收敛性的前提下高效压缩量化梯度。
  • 展示其在深度神经网络中的适用性,并显著缩短端到端训练时间。

提出的方法

  • 提出具有 s 个等级的随机梯度量化 Q_s(v),以保持无偏性并控制方差。
  • 使用基于 Elias 的无损编码方案对量化梯度进行编码,利用量化值的分布特性。
  • 允许分桶量化,通过桶大小 d 控制方差,并以向量范数进行缩放以实现稳定性。
  • 推导理论界限:方差膨胀为 min(n/s^2, sqrt(n)/s) 且每轮通信长度。
  • 扩展到包括 QSVRG(方差降低)等变体以及具备收敛性保障的非凸情形。
  • 提供对桶化、最大归一化和 GPU 友好编码的实际实现要点。

实验结果

研究问题

  • RQ1梯度量化在并行 SGD 对凸/非凸目标的收敛性保证方面有何影响?
  • RQ2每次迭代的通信比特与收敛性/方差之间的权衡是什么?
  • RQ3在深度网络上,采用高效编码的随机量化是否能在保持精度的同时实现显著的通信缩减?
  • RQ4与完整精度 SGD 相比,QSGD 的变体(包括方差降低版本)在实际表现上如何?

主要发现

网络数据集参数量初始化速率Top-1 (32bit)Top-1 (QSGD)加速 (8 GPUs)
AlexNetImageNet62M0.0759.50%60.05% (4bit)2.05×
ResNet152ImageNet60M177.0%76.74% (8bit)1.56×
ResNet50ImageNet25M174.68%74.76% (4bit)1.26×
ResNet110CIFAR-101M0.193.86%94.19% (4bit)1.10×
BN-InceptionImageNet11M3.6--1.16× (projected)
VGG19ImageNet143M0.1--2.25× (projected)
LSTMAN413M0.581.13%81.15% (4bit)2× (2 GPUs)
  • QSGD 实现显著的通信缩减并具有收敛性保证,在 GPU 上实现了实际的加速。
  • 在密集情形下 (s = sqrt(n)),每轮通信可低至 2.8n + 32 bits,方差增加最多为 2x。
  • 两种极端情况:要么在每轮期望比特为 O(sqrt(n) (log n + O(1))),方差增加至 O(sqrt(n)),要么每轮 ≤ 2.8n + 32 bits,迭代次数约为原来的两倍。
  • 实证结果表明,在 ImageNet 分类器和 LSTM 语音模型上实现了显著的训练时间降低,准确率几乎不受影响(如:AlexNet 在 16 GPU 上:通信减少 4x,epoch 提速 2.5x;ResNet-152 在 16 GPU 上:端到端约快 2x)。
  • 如 QSVRG 之类的 QSGD 变体保持指数收敛特性,并提供相对于问题条件数的每个 epoch 的有利通信。
  • 量化噪声在某些设置中甚至可以略微提高准确率,与深度学习中梯度噪声的有益效应一致。

更好的研究,从现在开始

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

无需绑定信用卡

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