[论文解读] On the Computational Inefficiency of Large Batch Sizes for Stochastic Gradient Descent
本文表明,增加 SGD 小批量大小在收敛速度上收益递减,且往往会增加总计算成本,存在一个显著低于当前 GPU 容量的临界批量大小;在多个领域中,较大批量的性能下降。
Increasing the mini-batch size for stochastic gradient descent offers significant opportunities to reduce wall-clock training time, but there are a variety of theoretical and systems challenges that impede the widespread success of this technique. We investigate these issues, with an emphasis on time to convergence and total computational cost, through an extensive empirical analysis of network training across several architectures and problem domains, including image classification, image segmentation, and language modeling. Although it is common practice to increase the batch size in order to fully exploit available computational resources, we find a substantially more nuanced picture. Our main finding is that across a wide range of network architectures and problem domains, increasing the batch size beyond a certain point yields no decrease in wall-clock time to convergence for \emph{either} train or test loss. This batch size is usually substantially below the capacity of current systems. We show that popular training strategies for large batch size optimization begin to fail before we can populate all available compute resources, and we show that the point at which these methods break down depends more on attributes like model architecture and data complexity than it does directly on the size of the dataset.
研究动机与目标
- 评估 SGD 收敛速度如何随不同架构和任务的 mini-batch 大小变化而变化。
- 量化批量大小标尺的尺度:线性收益、收益递减和停滞。
- 评估常见的大批量优化技巧是否在各问题上缓解低效问题。
- 理解除了数据集规模之外,模型架构、数据复杂度等因素如何影响大批量性能。
提出的方法
- 将 SGD 表述为带小批量梯度的优化,并将达到收敛的迭代次数定义为墙时钟代理。
- 在多种架构和任务(图像分类、分割、NLP)中经验性改变批量大小。
- 比较基础学习率策略、线性缩放规则(LSR)和平方根缩放规则(SRSR)。
- 通过达到固定损失阈值的迭代次数来衡量收敛速度,并评估泛化影响。
- 分析数据集大小、模型架构和数据复杂度如何影响加速曲线和临界批量大小。
实验结果
研究问题
- RQ1不同架构和任务中,批量大小与 SGD 收敛速度之间的关系是怎样的?
- RQ2是否存在一个临界批量大小,使得增加 m 不再降低收敛迭代次数,并且它如何与硬件容量相关?
- RQ3大批量优化启发式方法(LSR、SRSR)是否在各问题上缓解收敛变慢或泛化差距?
- RQ4与数据集大小相比,模型架构和数据复杂度在决定大批量效率方面的作用如何?
主要发现
- 超过某一批量大小后,增大 m 对收敛迭代次数几乎不再减少(即使在完美并行下也是如此)。
- 更大批量提高泛化误差,现有的缓解技术通常失败或发散,尤其是在非图像领域。
- 收敛速度提升更多取决于模型架构和数据复杂度,而非数据集大小,存在与问题相关的临界批量大小。
- 在图像、分割和 NLP 任务中,收益递减的加速在不同架构和数据复杂度下出现平台期。
- 适用于某些问题的大批量策略并不能跨领域推广,且常常无法维持稳定性。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。