Skip to main content
QUICK REVIEW

[论文解读] GradiVeQ: Vector Quantization for Bandwidth-Efficient Gradient Aggregation in Distributed CNN Training

Mingchao Yu, Zhifeng Lin|arXiv (Cornell University)|Nov 8, 2018
Advanced Neural Network Applications参考文献 32被引用 10
一句话总结

GradiVeQ 是一种向量量化技术,通过主成分分析(PCA)利用卷积神经网络(CNN)梯度中的线性相关性,实现与环形全部归约(RAR)兼容的可交换压缩,从而支持压缩与通信的并行化。该方法将梯度聚合时间减少 5 倍以上,端到端训练时间减少近 50%,且未造成显著的精度损失,优于 QSGD 等标量量化方法。

ABSTRACT

Data parallelism can boost the training speed of convolutional neural networks (CNN), but could suffer from significant communication costs caused by gradient aggregation. To alleviate this problem, several scalar quantization techniques have been developed to compress the gradients. But these techniques could perform poorly when used together with decentralized aggregation protocols like ring all-reduce (RAR), mainly due to their inability to directly aggregate compressed gradients. In this paper, we empirically demonstrate the strong linear correlations between CNN gradients, and propose a gradient vector quantization technique, named GradiVeQ, to exploit these correlations through principal component analysis (PCA) for substantial gradient dimension reduction. GradiVeQ enables direct aggregation of compressed gradients, hence allows us to build a distributed learning system that parallelizes GradiVeQ gradient compression and RAR communications. Extensive experiments on popular CNNs demonstrate that applying GradiVeQ slashes the wall-clock gradient aggregation time of the original RAR by more than 5X without noticeable accuracy loss, and reduces the end-to-end training time by almost 50%. The results also show that GradiVeQ is compatible with scalar quantization techniques such as QSGD (Quantized SGD), and achieves a much higher speed-up gain under the same compression ratio.

研究动机与目标

  • 为解决分布式 CNN 训练中因频繁梯度聚合导致的通信瓶颈问题。
  • 克服标量量化与去中心化聚合协议(如环形全部归约,RAR)之间的不兼容性,该不兼容性会阻止压缩与通信的并行化。
  • 开发一种与聚合可交换的梯度压缩方法,实现压缩梯度的直接求和。
  • 在保持模型精度的前提下,显著减少梯度聚合与端到端训练时间。
  • 展示与现有标量量化技术(如 QSGD)兼容,支持混合压缩策略。

提出的方法

  • GradiVeQ 对 CNN 梯度应用主成分分析(PCA),以利用其中强烈的线性相关性,降低梯度的维度。
  • 通过向量量化压缩低维 PCA 分量,实现与 RAR 的可交换压缩。
  • 压缩函数被设计为满足可交换性条件:∑Q(gₙ) = Q(∑gₙ),从而允许直接聚合压缩后的梯度。
  • 通过在下载远程梯度段的同时压缩本地梯度,实现压缩与 RAR 通信的并行化。
  • 该方法支持与标量量化混合使用:GradiVeQ 可选择性应用以减少带宽,而标量量化(如 4 位 QSGD)则在非 GradiVeQ 迭代中使用,以保持兼容性。
  • 系统在分布式学习框架中实现,将 GradiVeQ 压缩与 RAR 集成,支持端到端训练。

实验结果

研究问题

  • RQ1CNN 梯度中是否存在强线性相关性,可被利用以实现与去中心化聚合协议(如 RAR)兼容的可交换梯度压缩?
  • RQ2基于 PCA 的向量量化是否能实现压缩梯度的直接聚合,从而支持压缩与通信的并行化?
  • RQ3与 QSGD 等标量量化技术相比,GradiVeQ 在梯度聚合与端到端训练时间减少方面表现如何?
  • RQ4GradiVeQ 是否能与标量量化有效结合,进一步降低通信成本而不影响模型收敛性?
  • RQ5GradiVeQ 在不同硬件环境(包括 CPU 和 GPU)下的模型精度与训练效率影响如何?

主要发现

  • GradiVeQ 将 RAR 的墙钟梯度聚合时间减少 5 倍以上,在 CPU 环境下实现 5.25 倍加速,在 GPU 环境下实现 4 倍加速。
  • 端到端训练时间减少近 50%:在 CPU 上,从 135,000 秒(未压缩 RAR)降至 76,000 秒;在 GPU 上,从 75,000 秒降至 24,000 秒。
  • 所有系统中模型均在 45,000 次迭代后收敛,表明 GradiVeQ 未增加所需迭代次数。
  • 测试精度保持在极小范围内:未压缩为 0.676,4 位 QSGD 为 0.667,GradiVeQ 为 0.666,表明精度损失可忽略。
  • 在相同压缩比下,GradiVeQ 显著优于 4 位 QSGD,原因在于其能够并行化压缩与通信。
  • 在 GPU 环境中,通信成为主要瓶颈(占训练时间的 88%),GradiVeQ 相较未压缩 RAR 将端到端时间减少 4 倍,相较 4 位 QSGD 减少 1.4 倍。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

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