Skip to main content
QUICK REVIEW

[论文解读] On the Relation Between the Sharpest Directions of DNN Loss and the SGD Step Length

Stanisław Jastrzȩbski, Zachary Kenton|arXiv (Cornell University)|Jul 13, 2018
Adversarial Robustness in Machine Learning参考文献 25被引用 28
一句话总结

本文研究了随机梯度下降(SGD)动力学如何与深度神经网络(DNN)损失曲面中最陡峭方向——由最大的海森矩阵特征值定义——相互作用。研究发现,由于学习率相对于曲率过大,SGD 初始阶段会进入越来越陡峭的区域。为此,本文提出一种变体 NSGD,通过在这些方向上降低学习率,从而加速训练并获得比标准 SGD 更陡峭、泛化性能更好的解,且使用相同的初始学习率。

ABSTRACT

Stochastic Gradient Descent (SGD) based training of neural networks with a large learning rate or a small batch-size typically ends in well-generalizing, flat regions of the weight space, as indicated by small eigenvalues of the Hessian of the training loss. However, the curvature along the SGD trajectory is poorly understood. An empirical investigation shows that initially SGD visits increasingly sharp regions, reaching a maximum sharpness determined by both the learning rate and the batch-size of SGD. When studying the SGD dynamics in relation to the sharpest directions in this initial phase, we find that the SGD step is large compared to the curvature and commonly fails to minimize the loss along the sharpest directions. Furthermore, using a reduced learning rate along these directions can improve training speed while leading to both sharper and better generalizing solutions compared to vanilla SGD. In summary, our analysis of the dynamics of SGD in the subspace of the sharpest directions shows that they influence the regions that SGD steers to (where larger learning rate or smaller batch size result in wider regions visited), the overall training speed, and the generalization ability of the final model.

研究动机与目标

  • 理解 DNN 损失曲面最陡峭方向上的 SGD 动力学如何影响泛化性能与优化轨迹。
  • 研究为何在大学习率或小批量大小下,尽管会进入更陡峭的区域,仍能实现更好的泛化性能。
  • 分析训练过程中,在最陡峭方向上 SGD 步长与曲率之间的不匹配问题。
  • 探索是否可通过在最陡峭方向上自适应调整学习率,来提升训练效率与泛化性能。
  • 表征整个训练轨迹中最高海森矩阵特征值的演化过程,而不仅限于收敛时刻。

提出的方法

  • 通过经验估计,在整个训练过程中追踪损失函数海森矩阵的前几大特征值与特征向量。
  • 将 SGD 更新投影到由前几大特征向量张成的子空间(即最陡峭方向),以分析步长对齐情况与曲率不匹配问题。
  • 提出一种改进的 SGD 变体 NSGD,该方法在最陡峭方向上应用更小且固定的更新步长。
  • 使用相同的基线学习率,将 NSGD 与标准 SGD 进行对比,评估收敛速度与最终泛化性能。
  • 采用多种网络架构(ResNet-32、SimpleCNN)与数据集,验证结果在不同设置下的普适性。
  • 通过经验观察海森矩阵谱的变化,分析学习率、批量大小与损失曲面峰值陡峭度之间的关系。

实验结果

研究问题

  • RQ1在 SGD 训练过程中,DNN 损失曲面最陡峭方向上的曲率如何演化?
  • RQ2SGD 步长在最陡峭方向上与曲率的不匹配程度有多大?这种不匹配如何影响优化过程?
  • RQ3学习率与批量大小在多大程度上影响最陡峭方向上达到的峰值陡峭度?
  • RQ4是否可以通过在最陡峭方向上专门降低学习率,来提升训练速度与泛化性能?
  • RQ5SGD 在最陡峭子空间中的动力学对最终访问的损失曲面区域有何影响?

主要发现

  • SGD 初始阶段会进入损失曲面中越来越陡峭的区域,其峰值陡峭度由学习率与批量大小共同决定。
  • 在最陡峭方向上,SGD 步长通常远大于曲率,导致其越过极小值并在其间震荡。
  • 海森矩阵的前几大特征值在训练初期增长,达到峰值后趋于稳定或衰减,峰值幅度受学习率与批量大小影响。
  • NSGD(在最陡峭方向上使用减小的学习率)相比使用相同基线学习率的标准 SGD,优化速度更快。
  • NSGD 比标准 SGD 更快收敛到损失曲面中更陡峭的区域,同时保持或提升了泛化性能。
  • 在最陡峭方向上的动力学显著影响 SGD 所访问的区域、训练速度以及最终的泛化能力。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

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