Quasi-Newton's method in the class gradient defined high-curvature subspace

Mark Tuddenham, Adam Prügel-Bennett, Jonathan HarearXiv 2020

TL;DR

This paper explores using a specialized quasi-Newton method to accelerate deep learning optimization by focusing on a high-curvature subspace identified by class gradients. Surprisingly, their naive implementation slowed down convergence, suggesting that simply applying Newton's method to this subspace isn't a straightforward win and hinting at deeper complexities in loss landscape geometry.

What Problem Does This Paper Address?

Training deep neural networks is notoriously challenging, and while many optimization methods exist, choosing the right combination of learning rates, decay schedules, and optimizers often feels like a black art, frequently requiring extensive hyperparameter tuning (e.g., DAWNBench). Second-order methods, like Newton's method, are theoretically more powerful because they consider the curvature of the loss landscape. However, their computational cost (involving the Hessian matrix) makes them impractical for the high-dimensional spaces of deep learning. This paper investigates a specific scenario in classification problems where the loss landscape is known to have a "high-curvature subspace" whose dimension is equal to the number of classes. The authors hypothesize that by applying a more sophisticated optimization technique (quasi-Newton) specifically to this subspace, while using standard methods for the rest of the landscape, they could achieve faster and more robust training.

Methods

The core idea is to leverage the observation that in classification tasks, a significant portion of the loss landscape's curvature is concentrated in a low-dimensional subspace. This subspace is related to the gradients of the logits for each class. The authors propose a quasi-Newton method that operates in this "high-curvature subspace" and uses stochastic gradient descent (SGD) in the orthogonal "co-space."

Specifically, they:

  • Approximate the Hessian: Instead of computing the full Hessian, they focus on a low-rank approximation derived from the class gradients. This approximation, denoted $H^{\text{Low Rank}}$, is shown to be positive definite.
  • Generalized Inverse: Since $H^{\text{Low Rank}}$ is singular, they use a generalized inverse to perform the Newton step within the high-curvature subspace.
  • Projection Operator: For the co-space, they use a projection operator to ensure that the optimization step remains orthogonal to the high-curvature subspace, effectively applying SGD there.
  • Update Equation: They combine these two components into a single update rule for the network parameters.
  • Noise Reduction: To mitigate the stochasticity inherent in minibatch updates, they employ an exponential moving average for eigenvalues and root mean square for eigenvalues.

Datasets

The paper mentions experiments on:

  • CIFAR-10: Used for training a ResNet9 model to compare the proposed quasi-Newton method with standard SGD.
  • MNIST: Used for experiments with different batch sizes to investigate the impact of inter-batch noise.

Key Insights and Ideas

  • High-Curvature Subspace is Real: The paper builds on prior work suggesting that deep learning loss landscapes, particularly for classification, have a dominant low-dimensional subspace characterized by high curvature.
  • Class Gradients as a Proxy: The authors propose that the gradients associated with each class provide a good basis for this high-curvature subspace.
  • Naive Application Fails: The most striking finding is that their direct, "naive" implementation of this quasi-Newton approach slowed down convergence compared to standard SGD. This is counter-intuitive and suggests that simply isolating and optimizing within this subspace isn't a guaranteed win.
  • Noise is a Major Culprit: The paper strongly suspects that noise from minibatch sampling significantly degrades the accuracy of the Hessian approximation and the estimated subspace, leading to spurious updates that hinder learning.
  • Subspace Intersection is Imperfect: While there's a correlation between class gradients and top Hessian eigenvectors, it's not perfect. This imperfect alignment might mean that some high-curvature directions are still missed, limiting the method's effectiveness.

Key Results

  • No Improvement, Worse Performance: In experiments on CIFAR-10 with a ResNet9, the proposed quasi-Newton method showed similar final performance to SGD but was "more volatile, slower to improve in general, and does end on average with lower accuracy."
  • Divergence at Higher Learning Rates: Both SGD and the quasi-Newton method diverged at learning rates greater than $10^{-1}$, indicating that the proposed method did not enable the use of higher learning rates as might be expected from a second-order method.
  • Batch Size Impact: Experiments on MNIST showed that while the quasi-Newton method might start faster, SGD eventually overtakes it, regardless of batch size. This suggests that inter-batch noise, rather than just the number of steps, is a significant factor.
  • Correlation with Eigenvectors: Appendix C shows a "significant correlation" (cosine-maximised linear assignment of $\approx 0.36$) between the top-C eigenvectors of the Hessian and the class gradient directions, supporting the initial hypothesis. However, this correlation is not perfect.

Limitations and Future Work

  • Naive Implementation Failure: The primary limitation is that the proposed "naive" implementation did not yield improvements and even degraded performance. The authors acknowledge this is "disappointing and mysterious."
  • Noise Sensitivity: The method appears highly sensitive to noise from minibatch sampling, which corrupts the estimation of the Hessian and the high-curvature subspace.
  • Subspace Alignment: The alignment between the class gradient subspace and the true high-curvature subspace is not perfect, leaving some high-curvature directions unaddressed.
  • Future Work: The authors are actively investigating the reasons for the poor performance. Potential future directions include:
  • Developing more robust methods to estimate the high-curvature subspace and its properties in the presence of noise.
  • Exploring alternative definitions or identification methods for the relevant subspace, as the number of classes ($C$) might not be the optimal cutoff.
  • Investigating whether the observed structure is an artifact of the specific network architectures or datasets used.
  • Developing more sophisticated quasi-Newton approximations that are less susceptible to noise.

Summary updated

BibTeX
@misc{tuddenham2020quasi,
  author = {Mark Tuddenham and Adam Prügel-Bennett and Jonathan Hare},
  title = {{Quasi-Newton's method in the class gradient defined high-curvature subspace}},
  year = {2020},
  eprint = {2012.01938},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2012.01938},
}
Figure