TL;DR
The performance gap between Adam and SGD is not driven by a single isolated factor like text data properties or Transformer design. Instead, it is governed by a "crossover batch size" where the optimization advantage shifts from SGD to Adam, determined by complex, non-trivial interactions between data geometry and architectural choices.
What Problem Does This Paper Address?
Why does the Adam optimizer dominate Transformer-based language modeling, while SGD remains highly successful in computer vision? For years, the deep learning community has proposed isolated explanations for this "Adam–SGD gap." Some point to data properties (like the heavy-tailed Zipfian distribution of text), others blame architectural components (like softmax-attention), and some credit optimization traits (like gradient noise robustness).
However, because these hypotheses were mostly studied in isolation and within specific domains, their relative importance and interactions remained unclear. This paper systematically revisits these assumptions under a unified, controlled empirical and theoretical framework to find out what genuinely drives the gap.
Methods
The authors conduct a rigorous, controlled empirical study alongside a theoretical analysis:
- Empirical Control: To avoid confounding results, the authors jointly and extensively swept the learning rate ($\eta$) and momentum ($\beta$) for both optimizers across all configurations.
- Ablation & Interpolation: They systematically stripped away specific components (e.g., replacing softmax-attention with gated convolutions, changing vocabulary distributions) and progressively interpolated architectures (e.g., transforming a ResNet50 into a ConvNeXt) to isolate individual effects.
- Theoretical Modeling: They utilized non-convex convergence bounds to compare Normalized SGD (NSGD) with momentum against SignSGD with momentum (serving as a proxy for Adam). This allowed them to model how the gap changes as a function of batch size and Hessian smoothness ratios ($r = L_\infty / L_2$).
Datasets
The study spans four distinct data modalities:
- Language: FineWeb (1B tokens) and TinyStories (10M tokens).
- Vision: ImageNet21K (I21K) and a heavy-tailed subset of ImageNet1K (HT-I1K).
- Genomics: Human genome reference assembly (HG38), processed with different tokenizers to control vocabulary size and distribution.
- Graphs: ZINC250K, a real-world molecular regression dataset.
Key Insights and Ideas
- No Single Culprit: Popular single-factor explanations fail when isolated. Softmax-attention is not necessary to create the gap, nor is a heavy-tailed vocabulary distribution.
- The Crossover Batch Size: Across all settings, scaling up the batch size consistently shifts the performance advantage from SGD to Adam. Rather than a static choice, the optimal optimizer depends on where your training batch size sits relative to a dynamic "crossover point."
- Gradual Architectural Influence: Architecture doesn't cause a binary shift. Subtle design choices—such as swapping a ReLU activation function for GeLU, or BatchNorm for LayerNorm—gradually tilt the advantage toward Adam.
- Vision's High Threshold: The transition from SGD to Adam occurs at substantially larger batch sizes for image data than for text, explaining SGD's historical stronghold in computer vision.
Key Results
- Attention is Not Required: Replacing the softmax-attention layers in GPT with gated convolutions (GCNN) on FineWeb data did not eliminate the gap; Adam still significantly outperformed SGD ($\Delta^* = -0.454$), as shown in Figure 2.
- Vocabulary Imbalance is Not Required: On genomics data (HG38) configured with a near-uniform character-level vocabulary distribution ($v=5$), the gap favoring Adam persisted ($\Delta^* = -0.127$), contradicting the idea that Adam only wins on highly imbalanced text data (Figure 3).
- SGD Wins on Vision Transformers: When training a Vision Transformer (ViT) on ImageNet21K at a batch size of 256, SGD achieved a $12\%$ lower final loss than Adam ($\Delta^* = +0.851$), demonstrating that component heterogeneity alone does not guarantee an Adam advantage.
- Unified Crossover Trend: Figure 1 illustrates the overarching trend across language, vision, genomics, and graphs: as batch size scales, the relative final train loss gap moves from positive (SGD faster) to negative (Adam faster).
Limitations and Future Work
While this paper clarifies the relationship between Adam and SGD, it primarily focuses on this classic pairing. The authors acknowledge that the deep learning optimization landscape is rapidly evolving with newer methods like Muon, SOAP, and Scion. While they note that early evidence suggests trends from this paper (like Muon's effectiveness in large-batch regimes) may generalize, these newer optimizers were not deeply integrated into their benchmark.
Future work remains to pinpoint exactly which data properties beyond vocabulary distribution influence the optimization landscape, and how practitioners can leverage the crossover batch size model to design more hardware- and data-efficient optimizers.
Summary updated