Robustness to Unbounded Smoothness of Generalized SignSGD

Michael Crawshaw, Mingrui Liu, Francesco Orabona, Wei Zhang, Zhenxun Zhuang

TL;DR

This paper provides a theoretical and empirical foundation for why Adam-like optimizers excel at training complex models like Transformers and LSTMs without needing explicit gradient clipping. The authors introduce a Generalized SignSGD algorithm and prove it achieves convergence on "unbounded smoothness" loss surfaces, revealing that momentum acts as a natural, implicit clipping mechanism.

What Problem Does This Paper Address?

Standard optimization theory assumes "smoothness," meaning the gradient doesn't change too abruptly (it's Lipschitz continuous). However, modern deep learning models like RNNs, LSTMs, and Transformers often violate this. Their loss surfaces exhibit "unbounded smoothness," where the Hessian (the rate of change of the gradient) grows in proportion to the gradient itself—a condition known as $(L_0, L_1)$-smoothness.

While researchers previously showed that Stochastic Gradient Descent (SGD) requires explicit gradient clipping to handle these volatile surfaces, practitioners often find that Adam works perfectly fine without it. This paper aims to bridge the gap between theory and practice by analyzing why Adam-type algorithms are inherently robust to these challenging optimization landscapes.

Methods

The authors propose Generalized SignSGD (Algorithm 1), a family of optimizers that bridges the gap between the sign-based SignSGD and the popular Adam optimizer.

Key technical contributions include:

  • Coordinate-wise Smoothness: They refine the global $(L_0, L_1)$ assumption into a more granular, coordinate-wise version, better capturing the variance observed across different layers of a neural network.
  • Momentum-based Normalization: Unlike standard Adam, which uses the squared raw gradient ($g_t^2$) for normalization, their algorithm uses the squared momentum ($m_t^2$). They argue this makes the update more controllable and robust to noise.
  • Theoretical Analysis: They provide a rigorous convergence proof under the relaxed $(L_0, L_1)$ assumption, showing that their algorithm matches the convergence rates of SGD with explicit clipping.

Datasets

The authors validated their findings across several standard benchmarks:

  • Wikitext-2 & WMT’16 (de-en): Used to empirically verify that Transformer models indeed satisfy the $(L_0, L_1)$ smoothness condition.
  • Wikitext-103: Used for training a GPT-2 model to demonstrate that explicit gradient clipping has negligible impact on Adam's performance.
  • CIFAR-10: Training a 20-layer ResNet for image classification.
  • Penn Treebank (PTB): Training an AWD-LSTM for language modeling.

Key Insights and Ideas

  • Transformers are "Rough": The authors empirically confirm that Transformers, like LSTMs, exhibit unbounded smoothness. Crucially, they show this property varies significantly by coordinate and layer, justifying their new coordinate-wise assumption. Local gradient Lipschitz constant vs. absolute gradient value on training a Transformer
  • Implicit Clipping: The normalization step in Adam-type algorithms (dividing by the square root of the second moment) acts as a form of "implicit clipping." This explains why adding an explicit clipping step often doesn't change the training trajectory. Training GPT-2 on Wikitext-103 using Adam with or without gradient clipping
  • The Magic of Momentum: The analysis reveals that momentum does more than just smooth out noise; it provides an exponentially decaying effect that counteracts the growth of unbounded gradients and smoothness constants.
Local gradient Lipschitz constant vs. absolute gradient value on training a Transformer
Training GPT-2 on Wikitext-103 using Adam with or without gradient clipping

Key Results

  • Matching Adam: On CIFAR-10 and Penn Treebank, Generalized SignSGD matched or slightly exceeded the performance of Adam, while significantly outperforming vanilla SGD and its clipped variants.
  • Superior Translation: In the WMT'16 translation task, the proposed algorithm achieved a test perplexity of 7.27, noticeably better than Adam's 8.91 (see Table 4).
  • Theoretical Parity: The authors proved that Generalized SignSGD achieves a convergence rate of $O(T^{-1/4})$ or $O(T^{-1/2})$ depending on noise levels, effectively removing the dependency on the problematic $L_1$ smoothness constant in the final bound.

Limitations and Future Work

  • Algorithm Gap: While Generalized SignSGD is very similar to Adam, they are not identical (due to the use of $m_t^2$ vs $g_t^2$). Proving convergence for the exact vanilla Adam under these conditions remains an open challenge.
  • Hyperparameter Disconnect: Theory suggests that setting $\beta_2 = 0$ (SignSGD with momentum) is optimal for worst-case convergence, yet in practice, values close to 1 (like Adam's default 0.999) perform better. Explaining this discrepancy is a key area for future research.
  • Regularization: The authors noted that weight decay significantly impacts performance and suggested that future work should explore how to integrate regularization while maintaining the "scale-free" properties of the optimizer.

Summary updated

BibTeX
@inproceedings{crawshaw2022robustness,
  author = {Michael Crawshaw and Mingrui Liu and Francesco Orabona and Wei Zhang and Zhenxun Zhuang},
  title = {{Robustness to Unbounded Smoothness of Generalized SignSGD}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=8oj_2Ypp0j},
}
Figure