Theoretical Investigation of Adafactor for Non-Convex Smooth Optimization

Yusu Hong, Junhong LinNeurIPS 2025

The Memory Bottleneck in LLM Training

Training Large Language Models (LLMs) like GPT-3 and PaLM is notoriously memory-intensive. Standard adaptive optimizers, such as Adam, require storing two additional values for every single model parameter: the first moment (momentum) and the second moment (uncentered variance). For a model with billions of parameters, this overhead can easily exceed the memory capacity of modern GPUs, forcing practitioners to use smaller batch sizes or endure slower training times. For a weight matrix of size $m \times n$, this memory requirement scales as $O(mn)$.

Adafactor: A Memory-Efficient Alternative

Adafactor was introduced to solve this memory bottleneck. It achieves near-zero memory overhead by discarding the first-order momentum and employing a rank-1 matrix factorization to approximate the second-moment matrix. This reduces the memory requirement for gradient statistics from $O(mn)$ to $O(m+n)$.

While Adafactor has been an industry workhorse for years—powering the training of massive models like T5—its theoretical properties have remained a mystery. Specifically, it was unknown whether the rank-1 approximation fundamentally hindered convergence, or what hyperparameter settings were strictly necessary for stability. This gap in the literature was largely due to the mathematical challenges posed by Adafactor's matrix factorization and its unique update clipping mechanisms.

Theoretical Framework and Methodology

This paper bridges the gap between practice and theory by providing the first comprehensive convergence analysis of Adafactor for non-convex smooth optimization. To make the mathematics tractable, the authors introduce several novel technical steps:

  1. Proxy Step-Size Matrix: The primary hurdle in analyzing adaptive methods is the correlation between the current gradient and the adaptive step-size (which is built from previous gradients). The authors design a new "proxy" step-size matrix that is conditionally independent of the current stochastic gradient.
  2. Induction for Unbounded Gradients: Most optimization proofs assume gradients are bounded by a constant. This paper relaxes that assumption, using an induction argument to prove that the gradient magnitude remains controlled throughout the training process.
  3. Analysis of Update Clipping: Unlike standard gradient clipping, Adafactor scales updates based on their root-mean-square (RMS). The authors provide a specific analysis demonstrating how this mechanism affects the convergence rate.

Key Findings and Convergence Rates

The most significant insight from the paper is the theoretical confirmation that approximating the second-moment matrix with rank-1 factors does not fundamentally slow down convergence. Adafactor achieves the same optimal convergence rates as Adam and Gradient Descent.

  • Full-Batch Setting: Adafactor finds a stationary point at a rate of $O(1/T)$, matching standard Gradient Descent.
  • Stochastic Setting: Under sub-Gaussian noise and without update clipping, it achieves a rate of $\tilde{O}(1/\sqrt{T})$, which is the theoretical lower bound for first-order stochastic methods.
  • With Update Clipping: It maintains a nearly optimal $\tilde{O}(1/\sqrt{T})$ rate, provided the clipping threshold is adjusted appropriately over time.
  • Hyperparameter Insights: The theory suggests that the second-moment decay rate ($\beta_2$) should increase over time (e.g., $\beta_{2,k} = 1 - 1/k$) to ensure optimal convergence.

Empirical Validation

To complement their theoretical proofs, the authors conducted experiments on standard Natural Language Processing (NLP) benchmarks. They fine-tuned BERT-Base and BERT-Large on the GLUE/MNLI dataset and trained GPT-2 on BookCorpus. In these tests, Adafactor performed comparably to Adam in terms of final accuracy and loss, confirming empirically that the massive memory savings do not come at the cost of model quality.

Limitations and Future Directions

While this paper represents a major step forward in understanding memory-efficient optimizers, the authors note a few remaining gaps between theory and practice:

  • Constant vs. Time-Varying Clipping: The proof for update clipping requires a time-varying threshold, whereas practitioners typically use a constant one. Analyzing the constant case remains an open challenge.
  • Noise Assumptions: The study assumes sub-Gaussian noise. The authors hypothesize that while update clipping isn't strictly necessary for convergence under well-behaved noise, it plays a crucial role in stabilizing training against "heavy-tailed" noise (extreme gradient outliers), which is common in real-world LLM training. Future work could explore these heavy-tailed settings.
  • Scale of Validation: While the theoretical findings are general, the experiments were conducted at the BERT and GPT-2 scale. Testing these theoretical hyperparameter insights on 100B+ parameter models would serve as the ultimate validation of the framework.

Summary updated

BibTeX
@inproceedings{hong2025theoretical,
  author = {Yusu Hong and Junhong Lin},
  title = {{Theoretical Investigation of Adafactor for Non-Convex Smooth Optimization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=QIv5aXEAcc},
}
Figure