Deconstructing What Makes a Good Optimizer for Autoregressive Language Models

Rosie Zhao, Depen Morwani, David Brandfonbrener, Nikhil Vyas, Sham M. Kakade

TL;DR

While the AI community often hunts for the "next big thing" in optimization, this paper reveals that most modern adaptive optimizers (Adam, Lion, Adafactor) perform remarkably similarly in both peak performance and hyperparameter stability. By "deconstructing" Adam, researchers show that its success isn't magic; it primarily stems from its behavior as a signed gradient optimizer and its specific ability to provide adaptivity to the model's final layer and LayerNorm parameters.

The Optimization Bottleneck in LLMs

Training large language models (LLMs) is prohibitively expensive, leading researchers to constantly propose new optimizers (like Lion or Sophia) that claim to be faster or more stable than the industry-standard, Adam. However, these claims are often made on different architectures or scales, leading to a lack of consensus.

The authors set out to answer two fundamental questions:

  1. Is the widespread reliance on Adam actually justified across different scales and architectures?
  2. What specific components of adaptive optimizers are actually necessary for training autoregressive models?

Experimental Setup and Novel Frameworks

The researchers conducted a massive, systematic evaluation of five standard optimizers: Adam, SGD, Adafactor (with momentum), Lion, and Signum. The models were trained on the C4 (Colossal Clean Crawled Corpus) dataset using a T5 tokenizer, with evaluation based on validation loss across "Chinchilla-optimal" token counts.

To understand the "why" behind the results, they introduced simplified frameworks:

  • Signum (Signed Momentum): A version of SGD that only uses the direction (sign) of the momentum, effectively removing the magnitude of the gradient.
  • Adalayer: A novel "coarse-grained" variant of Adam. Instead of giving every single parameter its own learning rate, Adalayer calculates a single adaptive scale for an entire layer.
  • Adalayer*: A refined version of Adalayer that treats the weights feeding into each individual output logit as separate blocks, providing finer control over the final layer.

The study involved rigorous 1D hyperparameter sweeps for learning rate, momentum ($\beta_1$), weight decay, and warmup across models ranging from 150 million to 1.2 billion parameters.

Key Insights: The "Adaptive Club" is a Level Playing Field

Except for SGD (which performed poorly), all tested adaptive optimizers—Adam, Lion, Adafactor, and Signum—achieved nearly identical optimal performance and showed similar "stability" (how much performance drops if you miss the perfect learning rate).

Validation loss across different model scales showing performance parity among adaptive optimizers and the relative instability of SGD.
  • It’s All About the Sign: The fact that Signum matches Adam’s performance suggests that Adam’s primary advantage over SGD is its resemblance to "signSGD." The exact magnitude of the gradient update matters less than its direction.
  • Adaptivity is a Local Requirement: Perhaps the most surprising finding is that per-parameter adaptivity isn't needed everywhere. The "secret sauce" of stability is concentrated in the last layer (the embedding/logit layer) and the LayerNorm parameters.
  • Frozen Ratios: For most of the network, you can actually "freeze" the adaptive learning rate ratios calculated at initialization. As long as the last layer and LayerNorms remain adaptive during training, the model performs as well as full Adam.

Key Results

  • Performance Parity: In sweeps across 150M to 1.2B parameter scales, the validation loss curves for Adam, Lion, and Adafactor were virtually overlapping when shifted to their respective optimal learning rates.
  • SGD Failure: SGD was significantly less stable and achieved worse final loss across all scales, requiring much higher momentum to even be competitive.
  • Adalayer* Success: By using Adalayer* (layer-wise adaptivity + specific last-layer block adaptivity), the authors recovered the performance of Adam while using significantly less memory for optimizer states.
  • The Last Layer Matters: Without specific adaptivity for the last layer, Adalayer failed to match Adam’s stability, proving that the final transformation to logits is a unique bottleneck in LLM optimization.

Limitations and Future Work

  • 1D Sweeps: Due to computational costs, the authors focused on one-dimensional hyperparameter sweeps. This might miss complex "higher-dimensional" interactions (e.g., how the best learning rate changes specifically when you change the batch size).
  • Architecture Scope: The study focused exclusively on decoder-only transformers. While this is the current industry standard, the results might differ for encoder-decoder models or non-transformer architectures.
  • Diagonal Focus: The study primarily looked at optimizers using diagonal preconditioning. The authors suggest that future performance breakthroughs likely won't come from new diagonal optimizers, but rather from exploring non-diagonal methods (like Shampoo) that account for correlations between different parameters.

Summary updated

BibTeX
@inproceedings{zhao2025deconstructing,
  author = {Rosie Zhao and Depen Morwani and David Brandfonbrener and Nikhil Vyas and Sham M. Kakade},
  title = {{Deconstructing What Makes a Good Optimizer for Autoregressive Language Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=zfeso8ceqr},
}
Figure