mlsanityData to 14 Oct 2026

Is your batch size the problem? Revisiting the Adam-SGD gap in language modeling

arXiv 2506.12543 ↗First posted 14 Jun 2025cs.LG math.OCcited by 15

Not on the map. Why?

Abstract (arXiv)

Adam is known to perform significantly better than Stochastic Gradient Descent (SGD) in language models, a phenomenon for which a number of explanations have been proposed. In this work, we revisit this "optimizer gap" through a series of comprehensively tuned baseline training runs for language modeling with Transformers. We exhaustively study how momentum, gradient clipping, and batch size affect the gap between SGD and Adam. Our empirical findings show that SGD with momentum can actually perform similarly to Adam in small-batch settings, if tuned correctly. We revisit existing explanations for Adam's advantage, including heavy-tailed class imbalance, directional sharpness, and Hessian heterogeneity, which struggle to directly explain this phenomenon. Towards bridging this gap in our understanding, by analyzing our Transformer training runs and simple quadratic settings inspired by the literature, we provide new insights, driven by stochastic differential equation models, into the role of batch size on the training dynamics.

Key facts. Cited by 15 papers in the map (data through 14 Oct 2026). Builds on 40 of its 49 references that are in the map. First posted on arXiv 14 Jun 2025.

Builds on

40 of 49 references.

References · 40

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
  3. 2024The Llama 3 Herd of Modelscited by 14,715
  4. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  5. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
  6. 2016SGDR: Stochastic Gradient Descent with Warm Restartscited by 5,045
  7. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
  8. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
  9. 2020GLU Variants Improve Transformercited by 1,804
  10. 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,786
  11. 2017Accurate, Large Minibatch SGD: Training ImageNet in 1 Hourcited by 1,492
  12. 2019Root Mean Square Layer Normalizationcited by 1,480
28 more
  1. 2024The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scalecited by 1,160
  2. 2020On Layer Normalization in the Transformer Architecturecited by 922
  3. 2022GPT-NeoX-20B: An Open-Source Autoregressive Language Modelcited by 713
  4. 2018signSGD: Compressed Optimisation for Non-Convex Problemscited by 571
  5. 2025Muon is Scalable for LLM Trainingcited by 428
  6. 2019Why gradient clipping accelerates training: A theoretical justification for adaptivitycited by 341
  7. 2017The Marginal Value of Adaptive Gradient Methods in Machine Learningcited by 250
  8. 2024Scaling Laws and Compute-Optimal Training Beyond Fixed Training Durationscited by 170
  9. 2019Transformers without Tears: Improving the Normalization of Self-Attentioncited by 153
  10. 2022Signal Propagation in Transformers: Theoretical Perspectives and the Role of Rank Collapsecited by 141
  11. 2024Why Transformers Need Adam: A Hessian Perspectivecited by 124
  12. 2023Noise Is Not the Main Factor Behind the Gap Between SGD and Adam on Transformers, but Sign Descent Might Becited by 114
  13. 2022On the SDEs and Scaling Rules for Adaptive Gradient Algorithmscited by 104
  14. 2023Linear attention is (maybe) all you need (to understand transformer optimization)cited by 98
  15. 2024Heavy-Tailed Class Imbalance and Why Adam Outperforms Gradient Descent on Language Modelscited by 80
  16. 2025Practical Efficiency of Muon for Pretrainingcited by 80
  17. 2024How Does Critical Batch Size Scale in Pre-training?cited by 73
  18. 2024Implicit Bias of AdamW: ℓ_∞ Norm Constrained Optimizationcited by 58
  19. 2023Toward Understanding Why Adam Converges Faster Than SGD for Transformerscited by 53
  20. 2020Disentangling Adaptive Gradient Methods from Learning Ratescited by 42
  21. 2024Deconstructing What Makes a Good Optimizer for Language Modelscited by 41
  22. 2025In Search of Adam's Secret Saucecited by 40
  23. 2022How Does Adaptive Optimization Impact Local Neural Network Geometry?cited by 24
  24. 2022How to Fine-Tune Vision Models with SGDcited by 23
  25. 2024Adam Exploits ℓ_∞-geometry of Loss Landscape via Coordinate-wise Adaptivitycited by 23
  26. 2024Adaptive Methods through the Lens of SDEs: Theoretical Insights on the Role of Noisecited by 23
  27. 2025Gradient Heterogeneity Complements Hessian Heterogeneity in Transformer Optimizationcited by 7
  28. 2025On the Interaction of Batch Noise, Adaptivity, and Compression, under (L0,L1)-Smoothness: An SDE Approachcited by 4

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 5; 2026: 10.

15 papers.

Sort:

By area: