mlsanityData to 7 Oct 2026

How to set AdamW's weight decay as you scale model and dataset size

arXiv 2405.13698 ↗First posted 22 May 2024cs.LG cs.AIcited by 42

Not on the map. Why?

Abstract (arXiv)

The scaling of the optimal AdamW weight decay hyperparameter with model and dataset size is critical as we seek to build larger models, but is poorly understood. We show that weights learned by AdamW can be understood as an exponential moving average (EMA) of recent updates. This gives critical insights for how to set the weight decay in AdamW, and how the weight decay should scale with model and dataset size. In particular, the key hyperparameter for an exponential moving average is the EMA timescale. Intuitively, the EMA timescale can be understood as the number of recent iterations the EMA averages over. We find that the optimal timescale, measured in epochs, is roughly constant as we change model and dataset size. Moreover, given a learning rate, there is a one-to-one mapping from the EMA timescale to the weight decay hyperparameter. Thus, if the optimal EMA timescale is constant, that implies that as the dataset size increases, the optimal weight decay should fall and as the model size increases, the optimal weight decay should increase (if we follow the muP recommendation for scaling the learning rate). We validate these scaling rules on ResNet-18 and Vision Transformers trained on CIFAR-10 and ImageNet, and on NanoGPT pre-training on OpenWebText. Finally, we found that as training progresses, muP's learning rate scaling breaks down for AdamW unless weight decay is scaled appropriately.

Key facts. Cited by 42 papers in the map (data through 7 Oct 2026). Builds on 30 of its 50 references that are in the map. First posted on arXiv 22 May 2024.

Builds on

30 of 50 references.

References · 30

  1. 2015Deep Residual Learning for Image Recognitioncited by 51,809
  2. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
  3. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  4. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  5. 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,464
  6. 2023Scaling Vision Transformers to 22 Billion Parameterscited by 690
  7. 2023Symbolic Discovery of Optimization Algorithmscited by 423
  8. 2017A Downsampled Variant of ImageNet as an Alternative to the CIFAR datasetscited by 374
  9. 2019S4L: Self-Supervised Semi-Supervised Learningcited by 335
  10. 2022Tensor Programs V: Tuning Large Neural Networks via Zero-Shot Hyperparameter Transfercited by 272
  11. 2018An Empirical Model of Large-Batch Trainingcited by 268
  12. 2023Sophia: A Scalable Stochastic Second-order Optimizer for Language Model Pre-trainingcited by 260
18 more
  1. 2018Measuring the Effects of Data Parallelism on Neural Network Trainingcited by 190
  2. 2023Small-scale proxies for large-scale Transformer training instabilitiescited by 182
  3. 2017Dissecting Adam: The Sign, Magnitude and Variance of Stochastic Gradientscited by 136
  4. 2017L2 Regularization versus Batch and Weight Normalizationcited by 121
  5. 2019An Exponential Learning Rate Schedule for Deep Learningcited by 121
  6. 2019Which Algorithmic Choices Matter at Which Batch Sizes? Insights From a Noisy Quadratic Modelcited by 116
  7. 2018Three Mechanisms of Weight Decay Regularizationcited by 112
  8. 2022On the SDEs and Scaling Rules for Adaptive Gradient Algorithmscited by 100
  9. 2023Why Do We Need Weight Decay in Modern Deep Learning?cited by 70
  10. 2018Theoretical Analysis of Auto Rate-Tuning by Batch Normalizationcited by 65
  11. 2023Depthwise Hyperparameter Transfer in Residual Networks: Dynamics and Scaling Limitcited by 64
  12. 2018Highly Scalable Deep Learning Training System with Mixed-Precision: Training ImageNet in Four Minutescited by 63
  13. 2020Reconciling Modern Deep Learning with Traditional Optimization Analyses: The Intrinsic Learning Ratecited by 59
  14. 2023Rotational Equilibrium: How Weight Decay Balances Learning Across Neural Networkscited by 50
  15. 2022Robust Training of Neural Networks Using Scale Invariant Architecturescited by 29
  16. 2024Super Consistency of Neural Network Landscapes and Learning Rate Transfercited by 23
  17. 2023How to Scale Your EMAcited by 22
  18. 2024Batch size invariant Adamcited by 4

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 5; 2025: 21; 2026: 16.

42 papers.

Sort:

By area:

  1. 2025Practical Efficiency of Muon for Pretrainingcited by 74
  2. 2025Don't be lazy: CompleteP enables compute-efficient deep transformerscited by 69
  3. 2025Power Lines: Scaling Laws for Weight Decay and Batch Size in LLM Pre-trainingcited by 41
  4. 2024Scaling Optimal LR Across Token Horizonscited by 35
  5. 2025Straight to Zero: Why Linearly Decaying the Learning Rate to Zero Works Best for LLMscited by 34
  6. 2024u-μP: The Unit-Scaled Maximal Update Parametrizationcited by 29
  7. 2025Communication-Efficient Language Model Training Scales Reliably and Robustly: Scaling Laws for DiLoCocited by 23
  8. 2025Completed Hyperparameter Transfer across Modules, Width, Depth, Batch and Durationcited by 22
  9. 2024Rethinking Conventional Wisdom in Machine Learning: From Generalization to Scalingcited by 21
  10. 2025Scaling Collapse Reveals Universal Dynamics in Compute-Optimally Trained Neural Networkscited by 21
  11. 2025Weight Decay may matter more than muP for Learning Rate Transfer in Practicecited by 20
  12. 2025MuLoCo: Muon is a practical inner optimizer for DiLoCocited by 16
30 more
  1. 2025Hyperparameter Transfer Enables Consistent Gains of Matrix-Preconditioned Optimizers Across Scalescited by 15
  2. 2024How Much Can We Forget about Data Contamination?cited by 14
  3. 2025Training Dynamics Impact Post-Training Quantization Robustnesscited by 13
  4. 2026Fantastic Pretraining Optimizers and Where to Find Them II: Hyperball Optimizationcited by 12
  5. 2026Rethinking Language Model Scaling under Transferable Hypersphere Optimizationcited by 11
  6. 2025Decoder-Hybrid-Decoder Architecture for Efficient Reasoning with Long Generationcited by 10
  7. 2026Hyperparameter Transfer with Mixture-of-Expert Layerscited by 10
  8. 2025Scaling with Collapse: Efficient and Predictable Training of LLM Familiescited by 8
  9. 2025Robust Layerwise Scaling Rules by Proper Weight Decay Tuningcited by 8
  10. 2025FOCUS: First Order Concentrated Updating Schemecited by 7
  11. 2026VideoFlexTok: Flexible-Length Coarse-to-Fine Video Tokenizationcited by 6
  12. 2025μnit Scaling: Simple and Scalable FP8 LLM Trainingcited by 5
  13. 2026How to Set the Learning Rate for Large-Scale Pre-training?cited by 5
  14. 2025Efficient Hyperparameter Tuning via Trajectory Invariance Principlecited by 4
  15. 2026Weight Decay Improves Language Model Plasticitycited by 4
  16. 2026A Two-Parameter Weibull Framework for Diagnosing Transformer Weight Distributionscited by 3
  17. 2026Improving Neural Network Training by Decoupling the Magnitude and Direction of Weight Vectorscited by 3
  18. 2026Configuration-to-Performance Scaling Law with Neural Ansatzcited by 2
  19. 2026Weight Decay Regimes in Grokking Transformers: Cheap Online Diagnosticscited by 2
  20. 2026On the Nonlinearity of Learning Rate Scaling for LLM Trainingcited by 2
  21. 2024Robust Real-Time Mortality Prediction in the Intensive Care Unit using Temporal Difference Learningcited by 1
  22. 2025Correction of Decoupled Weight Decaycited by 1
  23. 2026GQA-μP: The maximal parameterization update for grouped query attentioncited by 1
  24. 2026How to Allocate Your Tokens? Scaling Laws with Training Steps and Batch Sizecited by 1
  25. 2026Data Predictability Shapes Weibull Weight-Scale Growth in Transformer Trainingcited by 1
  26. 2025Predicting Training Re-evaluation Curves Enables Effective Data Curriculums for LLMscited by 0
  27. 2025CRACQ: A Multi-Dimensional Approach To Automated Document Assessmentcited by 0
  28. 2025Sentiment Analysis Of Shopee Product Reviews Using Distilbertcited by 0
  29. 2026Beyond Modality Fusion: Deep Ensembles for Multimodal Classificationcited by 0
  30. 2026RODE: A Radial-Orthogonal Decoupled Engine for Optimizationcited by 0