arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1903.06237cs.LGstat.ML
收藏

K-FAC在大批量训练中的效率低下

Inefficiency of K-FAC for Large Batch Size Training

University of California at Berkeley(加州大学伯克利分校)

Linjian Ma, Gabe Montague, Jiayu Ye, Zhewei Yao, Amir Gholami, Kurt Keutzer, Michael W. Mahoney

摘要:

在随机优化中,在训练期间使用大批量可以利用并行资源来产生更快的每个训练时期的挂钟训练时间。然而,对于训练损失和测试误差,最近分析大批量随机梯度下降(SGD)的结果发现,超过一定的临界批量大小,收益急剧递减。为了解决这一问题,已经提出,对于诸如神经网络优化的非凸机器学习问题,克罗内克因子近似曲率(\mbox{K-FAC})方法允许对大批量的更大可扩展性,以及对模型超参数的变化的更大鲁棒性。在这里,我们对这两个假设的大批量训练%进行了详细的实证分析,对于\mbox{K-FAC}和SGD,从挂钟时间和总计算成本两个方面评估性能。我们的主要结果有两个方面:首先,我们发现\mbox{K-FAC}和SGD在超过特定批量大小时都不具有理想的可伸缩性行为,并且与SGD相比,\mbox{K-FAC}没有表现出改进的大批量可伸缩性行为;其次,我们发现\mbox{K-FAC}除了需要更多的超参数来调优之外,还遭受与SGD类似的超参数敏感性行为。我们讨论了使用ResNet和AlexNet分别对\mbox{CIFAR-10}和SVHN的广泛结果,以及我们的研究结果的更一般的含义。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑