Skip to main content
QUICK REVIEW

[Paper 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 LearningComputer Science25 references28 citations
TL;DR

This paper investigates how Stochastic Gradient Descent (SGD) dynamics interact with the sharpest directions of the DNN loss landscape—defined by the largest Hessian eigenvalues. It shows that SGD initially moves into increasingly sharp regions due to large step sizes relative to curvature, and proposes a variant (NSGD) that reduces learning rate along these directions, accelerating training and yielding sharper, better-generalizing solutions than standard SGD with the same learning rate.

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.

Motivation & Objective

  • Understand how SGD dynamics in the sharpest directions of the DNN loss surface affect generalization and optimization trajectory.
  • Investigate why large learning rates or small batch sizes lead to better generalization, despite moving into sharper regions.
  • Analyze the mismatch between SGD step size and curvature along the sharpest directions during training.
  • Explore whether adapting learning rate along the sharpest directions can improve training efficiency and generalization.
  • Characterize the evolution of the top Hessian eigenvalues throughout the full training trajectory, not just at convergence.

Proposed method

  • Track the top eigenvalues and eigenvectors of the Hessian of the training loss throughout training using empirical estimation.
  • Project SGD updates onto the subspace spanned by the top eigenvectors (sharpest directions) to analyze step alignment and curvature mismatch.
  • Introduce a modified SGD variant, NSGD, which applies a reduced and fixed learning rate specifically along the sharpest directions.
  • Compare NSGD to standard SGD using the same base learning rate, evaluating convergence speed and final generalization performance.
  • Use multiple architectures (ResNet-32, SimpleCNN) and datasets to validate findings across different settings.
  • Analyze the relationship between learning rate, batch size, and peak sharpness in the loss landscape via empirical observation of Hessian spectra.

Experimental results

Research questions

  • RQ1How does the curvature along the sharpest directions of the DNN loss surface evolve during SGD training?
  • RQ2To what extent is the SGD step size mismatched relative to curvature in the sharpest directions, and how does this affect optimization?
  • RQ3How do learning rate and batch size influence the peak sharpness reached along the sharpest directions?
  • RQ4Can reducing the learning rate specifically along the sharpest directions improve training speed and generalization?
  • RQ5What is the impact of SGD dynamics in the sharpest subspace on the final region of the loss landscape visited?

Key findings

  • SGD initially moves into increasingly sharp regions of the loss landscape, with the peak sharpness determined by both learning rate and batch size.
  • The SGD step size is typically too large compared to the curvature along the sharpest directions, causing it to overshoot minima and oscillate across them.
  • The top eigenvalues of the Hessian grow initially during training, reach a peak, and then stabilize or decay, with the peak magnitude influenced by learning rate and batch size.
  • NSGD—using a reduced learning rate along the sharpest directions—optimizes faster than standard SGD with the same base learning rate.
  • NSGD converges to sharper regions of the loss surface compared to standard SGD, while maintaining or improving generalization performance.
  • The dynamics along the sharpest directions significantly influence the regions visited by SGD, training speed, and final generalization capability.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.