Skip to main content
QUICK REVIEW

[论文解读] Rethinking gradient sparsification as total error minimization

Atal Narayan Sahu, Aritra Dutta|arXiv (Cornell University)|Aug 2, 2021
Stochastic Gradient Optimization TechniquesComputer Science参考文献 58被引用 19
一句话总结

本文提出硬阈值稀疏化方法——在每次迭代中仅传输幅度超过固定阈值的梯度坐标,作为分布式深度神经网络训练中Top-k稀疏化的通信最优替代方案。通过最小化整个训练过程中的总压缩误差(而非每次迭代的误差),该方法在收敛速度和通信效率方面优于Top-k,且在凸与非凸设置下具有理论保证,并在ResNet和逻辑回归模型上得到实验验证。

ABSTRACT

Gradient compression is a widely-established remedy to tackle the communication bottleneck in distributed training of large deep neural networks (DNNs). Under the error-feedback framework, Top-$k$ sparsification, sometimes with $k$ as little as $0.1\%$ of the gradient size, enables training to the same model quality as the uncompressed case for a similar iteration count. From the optimization perspective, we find that Top-$k$ is the communication-optimal sparsifier given a per-iteration $k$ element budget. We argue that to further the benefits of gradient sparsification, especially for DNNs, a different perspective is necessary -- one that moves from per-iteration optimality to consider optimality for the entire training. We identify that the total error -- the sum of the compression errors for all iterations -- encapsulates sparsification throughout training. Then, we propose a communication complexity model that minimizes the total error under a communication budget for the entire training. We find that the hard-threshold sparsifier, a variant of the Top-$k$ sparsifier with $k$ determined by a constant hard-threshold, is the optimal sparsifier for this model. Motivated by this, we provide convex and non-convex convergence analyses for the hard-threshold sparsifier with error-feedback. Unlike with Top-$k$ sparsifier, we show that hard-threshold has the same asymptotic convergence and linear speedup property as SGD in the convex case and has no impact on the data-heterogeneity in the non-convex case. Our diverse experiments on various DNNs and a logistic regression model demonstrated that the hard-threshold sparsifier is more communication-efficient than Top-$k$.

研究动机与目标

  • 通过重新思考每次迭代之外的梯度稀疏化方法,解决大规模深度神经网络分布式训练中的通信瓶颈问题。
  • 将总压缩误差(所有迭代中平方误差之和)识别为衡量整个训练过程中稀疏化性能的更有意义指标。
  • 提出一种通信复杂度模型,在固定总通信预算下最小化总误差,从而推导出一种新型最优稀疏化器。
  • 从理论和实证两方面验证:采用固定阈值和每轮可变k的硬阈值稀疏化器,在收敛速度和通信效率方面优于固定k的Top-k。

提出的方法

  • 提出一种通信复杂度模型,在固定总通信预算下,以最小化总误差(所有迭代中||e_t||²之和)为目标,而非每次迭代的误差。
  • 引入硬阈值稀疏化器,即在每轮迭代中传输所有幅度≥λ的梯度坐标,其中λ为固定阈值,导致每轮k值可变。
  • 采用误差反馈(EF)机制累积并校正压缩误差,确保在有损压缩下仍能收敛。
  • 为带误差反馈的硬阈值稀疏化器提供凸与非凸设置下的收敛性分析,证明其具有与SGD相同的渐近收敛性和线性加速特性。
  • 推导出一种λ的启发式设置方法,基于Top-k的k值:λ ≈ 1/(2√k),并通过实证验证其在相似通信成本下优于Top-k。
  • 在多个数据集和不同参数量的ResNet-18、ResNet-50及逻辑回归模型上,对硬阈值与Top-k在相同通信预算下进行实验比较。

实验结果

研究问题

  • RQ1在考虑整个训练过程时,是否存在一种可证明优于固定每次迭代梯度稀疏化(如Top-k)的通信方案?
  • RQ2通过最小化所有迭代中的总压缩误差,是否能实现比最小化每次迭代误差更高效、更快速收敛的训练方案?
  • RQ3采用固定幅度阈值和每轮可变k的硬阈值稀疏化器,是否在收敛性和通信效率方面优于固定k的Top-k?
  • RQ4在凸与非凸优化设置下,带误差反馈的硬阈值稀疏化器的理论收敛行为如何?
  • RQ5如何调优硬阈值参数λ,使其在非凸深度神经网络训练中优于给定k值的Top-k?

主要发现

  • 在20个工作者、6,000个参数的逻辑回归模型上,硬阈值稀疏化器在相同通信预算下,收敛速度与全精度SGD相当,且显著快于Top-k。
  • 在CIFAR-10数据集上使用ResNet-18的实验表明,硬阈值稀疏化器在通信量仅为Top-k的1/600时,达到92.96%的测试准确率,优于Top-k在更新压缩下的90.78%准确率。
  • 硬阈值稀疏化器在凸设置下可实现与SGD相同的渐近收敛性和线性加速特性,且在非凸设置下仍保持收敛性,未加剧数据异质性问题。
  • 理论分析表明,在相同通信预算下,硬阈值稀疏化器的总误差小于Top-k,解释了其性能优势。
  • 推导出启发式调优规则λ ≈ 1/(2√k),并通过实证验证:采用该λ的硬阈值稀疏化器在最终准确率和收敛速度方面优于Top-k(k = k_min)。
  • 该方法在多种深度神经网络架构和数据集(包括ResNet-50在ImageNet上的实验)中均展现出一致的通信效率提升,同时保持了模型准确率。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。