[论文解读] Accelerating Deep Neural Network Training with Inconsistent Stochastic Gradient Descent
本文提出了一种非一致随机梯度下降(ISGD)方法,该方法根据损失方差动态调整每批次的训练力度,利用统计过程控制识别出训练不足的批次,并通过求解约束子问题来加速收敛。ISGD 在 MNIST、CIFAR-10 和 ImageNet 上的训练速度相比标准 SGD 最快提升 28.57%,且无需额外内存或复杂修改。
SGD is the widely adopted method to train CNN. Conceptually it approximates the population with a randomly sampled batch; then it evenly trains batches by conducting a gradient update on every batch in an epoch. In this paper, we demonstrate Sampling Bias, Intrinsic Image Difference and Fixed Cycle Pseudo Random Sampling differentiate batches in training, which then affect learning speeds on them. Because of this, the unbiased treatment of batches involved in SGD creates improper load balancing. To address this issue, we present Inconsistent Stochastic Gradient Descent (ISGD) to dynamically vary training effort according to learning statuses on batches. Specifically ISGD leverages techniques in Statistical Process Control to identify a undertrained batch. Once a batch is undertrained, ISGD solves a new subproblem, a chasing logic plus a conservative constraint, to accelerate the training on the batch while avoid drastic parameter changes. Extensive experiments on a variety of datasets demonstrate ISGD converges faster than SGD. In training AlexNet, ISGD is 21.05\% faster than SGD to reach 56\% top1 accuracy under the exactly same experiment setup. We also extend ISGD to work on multiGPU or heterogeneous distributed system based on data parallelism, enabling the batch size to be the key to scalability. Then we present the study of ISGD batch size to the learning rate, parallelism, synchronization cost, system saturation and scalability. We conclude the optimal ISGD batch size is machine dependent. Various experiments on a multiGPU system validate our claim. In particular, ISGD trains AlexNet to 56.3% top1 and 80.1% top5 accuracy in 11.5 hours with 4 NVIDIA TITAN X at the batch size of 1536.
研究动机与目标
- 为解决标准 SGD 的低效问题,该方法针对采样偏差和图像内在差异导致的损失方差差异,不再对所有批次施加相同的训练力度。
- 通过动态重新分配训练资源至损失较高的批次,提升训练效率,因为这些批次对优化进展的贡献更大。
- 开发一种计算高效、无需额外内存的算法,可无缝集成至现有 SGD 框架中,包括动量和 Nesterov 加速等技术。
- 通过实证验证,非一致训练(即每批次梯度更新不一致)可实现更快的收敛速度和更好的泛化性能,适用于真实世界数据集。
提出的方法
- ISGD 将训练建模为随机过程,通过跟踪最近 n_b 次迭代的批次损失,估计平均损失并计算动态上控限。
- 当某批次损失超过动态上控限时,识别为训练不足批次,表明其需要额外更新。
- 对于此类批次,ISGD 求解一个子问题:在保守的参数变化约束下,最小化当前批次损失与平均损失之间的差异,以防止参数过度更新。
- 该子问题确保在高损失批次上实现加速更新,同时保持与当前模型参数的接近,从而维持训练稳定性。
- 该方法利用统计过程控制技术实时检测批次损失行为中的异常,实现在线自适应,无需辅助内存。
- ISGD 与标准优化技术(如动量和 Nesterov 加速)兼容,并可直接集成至现有的深度学习训练流水线中。
实验结果
研究问题
- RQ1能否基于损失方差动态调整每批次的训练力度,从而提升深度神经网络训练的收敛速度?
- RQ2通过基于损失的控制识别并加速训练不足的批次,是否能在不损害模型稳定性的前提下实现更快收敛?
- RQ3在多样化的数据集和网络架构下,非一致训练与标准 SGD 相比,在收敛速度和最终准确率方面有何差异?
- RQ4在多 GPU 环境下,小批量大小对收敛速度有何影响?ISGD 在不同系统约束下表现如何?
- RQ5ISGD 是否能与 Nesterov 加速等先进优化技术有效结合,进一步提升训练性能?
主要发现
- 在 ImageNet 上,ISGD 比 SGD 快 14.94% 的收敛速度,将达到 81% 顶-5 准确率的训练时间从 21.4 小时缩短至 18.2 小时。
- 在 CIFAR-10 上,ISGD 比 SGD 快 23.57% 达到 75% 顶-1 准确率,训练时间从 306 秒缩短至 234 秒。
- 在 MNIST 上,ISGD 比 SGD 快 28.57% 达到 99% 顶-1 准确率,训练时间从 56 秒缩短至 40 秒。
- 在所有数据集上,ISGD 的训练误差始终低于 SGD,解释了其更优的验证准确率。
- 当与 Nesterov 加速结合时,ISGD 比标准 Nesterov SGD 快 13.4% 达到 58% 顶-1 准确率阈值。
- 在 10 次重复实验中,ISGD 的性能增益保持一致,验证了非一致训练的鲁棒性与可复现性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。