[论文解读] Inefficiency of K-FAC for Large Batch Size Training
本文研究了Kronecker-Factored Approximate Curvature(K-FAC)优化器在ResNet和AlexNet模型上使用大批次训练时,相较于随机梯度下降(SGD)是否能提升训练的可扩展性和鲁棒性。尽管K-FAC在理论上具有二阶优化的潜力,但作者发现其在大批次设置下表现出与SGD相似的收益递减现象、更低的加速效率以及相近的超参数敏感性,表明其在大批次训练中并无显著优势。
In stochastic optimization, using large batch sizes during training can leverage parallel resources to produce faster wall-clock training times per training epoch. However, for both training loss and testing error, recent results analyzing large batch Stochastic Gradient Descent (SGD) have found sharp diminishing returns, beyond a certain critical batch size. In the hopes of addressing this, it has been suggested that the Kronecker-Factored Approximate Curvature (\mbox{K-FAC}) method allows for greater scalability to large batch sizes, for non-convex machine learning problems such as neural network optimization, as well as greater robustness to variation in model hyperparameters. Here, we perform a detailed empirical analysis of large batch size training %of these two hypotheses, for both \mbox{K-FAC} and SGD, evaluating performance in terms of both wall-clock time and aggregate computational cost. Our main results are twofold: first, we find that both \mbox{K-FAC} and SGD doesn't have ideal scalability behavior beyond a certain batch size, and that \mbox{K-FAC} does not exhibit improved large-batch scalability behavior, as compared to SGD; and second, we find that \mbox{K-FAC}, in addition to requiring more hyperparameters to tune, suffers from similar hyperparameter sensitivity behavior as does SGD. We discuss extensive results using ResNet and AlexNet on \mbox{CIFAR-10} and SVHN, respectively, as well as more general implications of our findings.
研究动机与目标
- 评估K-FAC相较于SGD在大批次训练中是否能提升可扩展性和泛化能力。
- 研究在不同训练预算(基于epoch与基于iteration)下,批次大小对K-FAC超参数敏感性的影响。
- 比较随着批次大小增加,K-FAC与SGD在加速效率方面的表现,衡量实际运行时间和计算成本。
- 确定在大批次训练设置下,K-FAC的二阶近似是否在非凸深度学习优化中提供实际优势。
- 评估在大批次设置下,K-FAC是否能减少对超参数调优的依赖,相较于SGD
提出的方法
- 在CIFAR-10数据集上的ResNet20/32和SVHN数据集上的AlexNet上,使用从2^8到2^14的受控批次大小,对K-FAC和SGD进行实验评估。
- 通过测量训练和测试准确率、损失值以及迭代加速比,评估批次大小增加时的可扩展性和性能退化情况。
- 在阻尼系数和学习率范围内进行超参数搜索,以评估在固定epoch和固定iteration预算下的鲁棒性。
- 使用箱线图可视化每个批次大小下64组超参数配置的测试准确率和训练损失分布。
- 在相同训练条件和超参数调优投入下,对比K-FAC与SGD的性能表现和扩展行为。
- 通过评估在不同预算约束下,达到目标准确率阈值的超参数配置比例,分析其鲁棒性。
实验结果
研究问题
- RQ1K-FAC在训练加速比和收敛性方面是否比SGD展现出更好的大批次可扩展性?
- RQ2与SGD相比,批次大小增加如何影响K-FAC的超参数敏感性?
- RQ3在固定epoch和固定iteration训练预算下,K-FAC是否比SGD更具超参数调优鲁棒性?
- RQ4在同等调优条件下,K-FAC在大批次设置下是否能实现优于SGD的测试准确率或训练损失降低?
- RQ5在使用大批次训练时,K-FAC是否能在更广泛的超参数范围内保持稳定性能?
主要发现
- 在相同超参数调优水平和训练时长下,K-FAC的训练和测试性能与SGD相当,但未表现出优越性。
- 随着批次大小增加,K-FAC的加速增益小于SGD,表明其在迭代次数维度上的可扩展性更差。
- 在固定epoch预算下,更大的批次大小增加了K-FAC的超参数敏感性,导致能实现良好收敛的超参数空间区域缩小。
- 在固定iteration预算下,更大的批次大小降低了K-FAC的超参数敏感性,使其在更广泛的超参数范围内表现出更鲁棒的收敛性。
- 在基于epoch的预算下,K-FAC对超参数调优的鲁棒性与批次大小成反比,这一现象与SGD的发现一致。
- K-FAC未能缓解大批次训练的收益递减问题,其性能在超过临界批次大小后与SGD类似发生退化。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。