Skip to main content
QUICK REVIEW

[论文解读] On the Promise of the Stochastic Generalized Gauss-Newton Method for Training DNNs

Matilde Gargiani, Andrea Zanelli|arXiv (Cornell University)|Jun 3, 2020
Stochastic Gradient Optimization Techniques被引用 5
一句话总结

本文提出随机广义高斯-牛顿(SGN)方法,一种无需计算 Hessian 矩阵的二阶优化技术,用于通过高斯-牛顿 Hessian 近似和共轭梯度迭代训练深度神经网络。与 SGD 相比,SGN 在大小小批量设置下显著减少了收敛迭代次数和运行时间,同时展现出对超参数调优——尤其是学习率——的优越鲁棒性,使其成为一阶方法的有前途替代方案。

ABSTRACT

Following early work on Hessian-free methods for deep learning, we study a stochastic generalized Gauss-Newton method (SGN) for training DNNs. SGN is a second-order optimization method, with efficient iterations, that we demonstrate to often require substantially fewer iterations than standard SGD to converge. As the name suggests, SGN uses a Gauss-Newton approximation for the Hessian matrix, and, in order to compute an approximate search direction, relies on the conjugate gradient method combined with forward and reverse automatic differentiation. Despite the success of SGD and its first-order variants, and despite Hessian-free methods based on the Gauss-Newton Hessian approximation having been already theoretically proposed as practical methods for training DNNs, we believe that SGN has a lot of undiscovered and yet not fully displayed potential in big mini-batch scenarios. For this setting, we demonstrate that SGN does not only substantially improve over SGD in terms of the number of iterations, but also in terms of runtime. This is made possible by an efficient, easy-to-use and flexible implementation of SGN we propose in the Theano deep learning platform, which, unlike Tensorflow and Pytorch, supports forward automatic differentiation. This enables researchers to further study and improve this promising optimization technique and hopefully reconsider stochastic second-order methods as competitive optimization techniques for training DNNs; we also hope that the promise of SGN may lead to forward automatic differentiation being added to Tensorflow or Pytorch. Our results also show that in big mini-batch scenarios SGN is more robust than SGD with respect to its hyperparameters (we never had to tune its step-size for our benchmarks!), which eases the expensive process of hyperparameter tuning that is instead crucial for the performance of first-order methods.

研究动机与目标

  • 研究随机广义高斯-牛顿(SGN)方法在训练深度神经网络中的经验性能与实际可行性。
  • 评估 SGN 相较于标准 SGD 的收敛速度、运行效率以及对超参数的鲁棒性。
  • 证明 SGN 不仅在迭代次数上优于 SGD,而且在总训练时间上也表现更优,尤其是在大尺寸小批量设置下。
  • 倡导在 PyTorch 和 TensorFlow 等深度学习框架中集成前向自动微分,以促进先进二阶优化技术的广泛应用。
  • 重燃对随机二阶优化方法的兴趣,推动其作为深度学习中一阶优化的可行且可扩展的替代方案。

提出的方法

  • SGN 使用 Hessian 矩阵的高斯-牛顿近似,高效捕捉曲率信息,而无需显式计算 Hessian 矩阵。
  • 通过共轭梯度(CG)方法求解所得线性系统,利用前向和反向自动微分计算 Hessian-向量乘积。
  • 该方法采用随机小批量策略,在保持收敛保证的同时降低计算成本。
  • 在 Theano 中的实现支持前向自动微分,从而高效且灵活地计算与曲率相关的操作。
  • 算法根据残差大小动态调整 CG 迭代次数,启发式建议在大尺寸小批量场景下采用更多迭代以提升性能。
  • 支持自适应信赖域方案,用于在优化过程中调整 CG 迭代次数,从而提高收敛稳定性。

实验结果

研究问题

  • RQ1随机广义高斯-牛顿(SGN)方法是否能在深度神经网络训练中实现比 SGD 更快的收敛速度,无论在迭代次数还是运行时间方面?
  • RQ2在大尺寸小批量场景下,SGN 的表现如何?此类场景中计算效率和对超参数的鲁棒性至关重要。
  • RQ3与对学习率选择高度敏感的 SGD 相比,SGN 在超参数调优——尤其是学习率——方面的鲁棒性如何?
  • RQ4在 PyTorch 或 TensorFlow 等深度学习框架中集成前向自动微分,是否能推动先进二阶优化技术的广泛应用?
  • RQ5在时间受限的训练场景下,SGN 中 CG 迭代次数与计算成本之间的最优权衡是什么?

主要发现

  • SGN 在所有基准测试中均显著少于 SGD 的收敛迭代次数,尤其在大尺寸小批量设置下表现更优。
  • 尽管单次迭代成本更高,但由于收敛更快,SGN 在运行时间上仍能实现竞争性或更优的表现。
  • SGN 展现出极强的超参数调优鲁棒性——尤其对学习率的敏感度远低于 SGD,后者对学习率选择极为敏感。
  • 该方法泛化性能优于 SGD,在更少的训练周期内达到更高的测试准确率,表明其具备更优的泛化能力。
  • Theano 中使用前向自动微分,使得 SGN 的实现更加高效且灵活,支持诸如自适应 CG 迭代控制等高级功能。
  • 结果表明,SGN 可能减少对大规模超参数调优的需求,有助于实现更可持续、更节能的深度学习训练。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。