Robustness to Unbounded Smoothness of Generalized SignSGD

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

This paper provides a theoretical bridge between the popular Adam optimizer and the challenges of training modern architectures like Transformers and LSTMs. The authors prove that Adam-like algorithms—specifically a "Generalized SignSGD"—are naturally robust to "unbounded smoothness," a condition where the loss surface becomes increasingly jagged as gradients grow. They show that the combination of momentum and coordinate-wise normalization provides an "implicit clipping" effect, explaining why Adam often succeeds on complex models without the need for explicit gradient clipping.

The Problem: Unbounded Smoothness

In classical optimization theory, researchers usually assume Lipschitz smoothness. This means the gradient of the loss function doesn't change too quickly; the "curviness" of the landscape is bounded by a constant.

However, recent studies have shown that deep learning models—especially Recurrent Neural Networks (RNNs), LSTMs, and Transformers—do not follow this rule. Instead, they exhibit unbounded smoothness (specifically $(L_0, L_1)$ smoothness), where the Hessian (the second derivative) can grow proportionally to the size of the gradient.

Smoothness vs. Gradient Norm on Wikitext-2

In these "spiky" landscapes, standard Stochastic Gradient Descent (SGD) can easily explode. While practitioners often fix this using gradient clipping, the authors sought to understand why Adam-type optimizers seem to handle these landscapes so well even without explicit clipping.

Methods: Generalized SignSGD

To analyze this phenomenon, the authors introduce and analyze Generalized SignSGD.

  1. Refined Assumption: They propose a coordinate-wise version of $(L_0, L_1)$ smoothness. They observed that in Transformers, different layers and even different coordinates within a layer have vastly different "spikiness" levels.
  2. The Algorithm: Generalized SignSGD uses:
  3. Momentum ($m_t$): An exponential moving average of the gradients.
  4. Second Moment ($v_t$): An exponential moving average of the squared momentum (unlike standard Adam, which uses squared gradients).
  5. Update Rule: $x_{t+1} = x_t - \eta \frac{m_t}{\sqrt{v_t}}$.
  6. Theoretical Analysis: They provide convergence guarantees for this algorithm under the relaxed $(L_0, L_1)$ smoothness assumption, showing how the hyperparameters $\beta_1$ and $\beta_2$ control the influence of the "unbounded" parts of the landscape.

Key Insights

  • Implicit Clipping: Adam-type algorithms have a built-in normalization ($m_t / \sqrt{v_t}$) that behaves like an extreme form of gradient clipping. This explains why adding explicit clipping to Adam often has zero effect on performance.
  • The Power of Momentum: In this "unbounded" setting, momentum does more than just smooth out noise. The authors prove it provides an exponentially decaying effect on the influence of large gradients and high local curvature. This allows the algorithm to "forget" the spikes in the landscape quickly.
  • Coordinate-wise Variance: By looking at Transformers, the authors found that $(L_0, L_1)$ constants vary significantly across layers. This justifies why coordinate-wise optimizers (like Adam and SignSGD) outperform global-scale optimizers (like standard SGD) on these architectures.
  • Bridging SignSGD and Adam: The algorithm they analyzed acts as a "missing link." When $\beta_2=0$, it becomes SignSGD (SIGNUM); when $\beta_2 \to 1$, it closely resembles Adam.

Key Results

The authors validated their findings across several standard deep learning benchmarks, including Language Modeling (Wikitext-2, WMT’16 de-en, Wikitext-103, Penn Treebank) and Image Classification (CIFAR-10).

  • Theoretical Parity: The authors proved that Generalized SignSGD achieves convergence rates similar to SGD-with-clipping, but without needing a manual clipping threshold.
  • Empirical Performance: On CIFAR-10 and Penn Treebank, their Generalized SignSGD matched or slightly outperformed Adam and significantly beat standard SGD and SGD with momentum.
  • Clipping Redundancy: They demonstrate that for a GPT-2 model on Wikitext-103, the training loss and perplexity curves for Adam with clipping versus Adam without clipping are virtually identical.
Adam With vs. Without Clipping

Limitations and Future Work

  • Algorithm Difference: The analyzed algorithm uses $m_t^2$ to update the second moment $v_t$, whereas standard Adam uses $g_t^2$ (the raw stochastic gradient). While similar, they aren't identical, and a full proof for "standard" Adam under these conditions remains an open challenge.
  • The $\beta_2$ Gap: Theory suggests that $\beta_2 = 0$ (SignSGD) provides the best worst-case convergence rate, but in practice, $\beta_2 \approx 0.999$ (Adam-like) usually performs better. The paper doesn't fully resolve this discrepancy between theory and practice.
  • Weight Decay: The authors noted that weight decay significantly impacts performance, and future work could look at better ways to integrate regularization into scale-free optimizers like SignSGD.

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