Towards Joint Scaling Laws with Optimal Batch Size Schedules
Summary (Overview)
-
Core contribution: This paper derives a closed-form optimal batch size schedule for any prescribed learning rate schedule, based on a convex optimization framework that characterizes deep learning training dynamics as a sequence-to-sequence mapping from (learning rate, batch size) schedules to loss values.
-
Key theoretical result: The optimal batch size schedule depends only on the shape of the learning rate schedule and the total data/compute budget—not on peak learning rate, model size, architecture, or optimizer.
-
Empirical gains: Dynamic batch size schedules improve compute efficiency by 6–15% with zero computational overhead across Llama3 (dense), Qwen3 (MoE), and vision-language models up to 7B parameters, using both AdamW and Muon optimizers.
-
Joint scaling laws: The authors establish joint scaling laws where peak learning rate scales as , weight decay scales as , and batch size follows the closed-form schedule—yielding loss convergence.
-
Universal dynamics preserved: The optimal batch size schedule maintains universal training dynamics ("supercollapse"), where different model sizes share the same normalized loss curve under properly scaled hyperparameters, enabling reliable prediction of large-scale training from small-scale runs.
Introduction and Theoretical Foundation
Background and Motivation
Large-scale model training critically depends on hyperparameter selection, particularly learning rate (LR) and batch size (BS). While learning rate schedules (warmup + decay) are standard practice, batch size is typically held static throughout training. This is potentially suboptimal: a fixed batch size is only a constrained special case of the broader class of batch size schedules .
Key research question: What is the optimal batch size schedule and which factors determine it?
Theoretical Foundation
The work builds on stochastic convex optimization theory, which has been shown to capture deep learning training dynamics empirically even though neural network training is non-convex and non-smooth. The authors follow the line of work by Defazio et al. (2023), Bu et al. (2026), and Schaipp et al. (2025).
Theorem 1 (Learning rate to loss sequence). For convex loss and any learning rate sequence under SGD:
where and is the mini-batch gradient at step .
Key Assumption on Batch Size
To incorporate batch size effects, the authors assume the gradient norm satisfies:
where bounds the norm of the expected gradient and bounds the trace of the per-example gradient covariance matrix.
Methodology
Sequence-to-Sequence Loss Prediction
The authors derive a general characterization (Theorem 2) that jointly predicts the loss from both learning rate and batch size sequences. This yields the following approximate equality (validated empirically):
Optimal Batch Size Derivation
The optimization problem minimizes the variance term subject to a data/compute budget :
Theorem 3 (Closed-form optimal batch size):
Optimal Batch Sizes for Common Schedules
| Learning Rate | formula | formula |
|---|---|---|
| constant | ||
| cosine | ||
| linear | ||
| WSD |
Key Properties
- Decoupling from learning rate tuning: The optimal batch size is independent of peak learning rate, weight decay, model size, architecture, and optimizer.
- Endpoint behavior: If as , then , meaning linear/WSD schedules yield constant terminal batch sizes while cosine schedules drive .
Empirical Validation / Results
Validation Approach
The authors validate their theory through linear regression fitting of the loss prediction (Eq. 2.4), demonstrating precise characterization of training dynamics across:
- Optimizers: Muon-NSGD and AdamW
- Models: Llama3 (dense), Qwen3 (MoE), SmoLM2-360M (VLM)
- Scales: 0.1B to 7B parameters, up to 1e21 FLOPs
Key Empirical Findings
1. Compute Efficiency Improvement
The dynamic batch size schedule delivers 6–15% improvement in compute efficiency over static batch size baselines under fixed compute of 1e20 FLOPs, with the same learning rate and weight decay settings.
2. Loss Convergence
- Dynamic batch size consistently outperforms static baselines across cosine, WSD, and constant learning rate schedules.
- Relative improvement in best perplexity: 0.8% (cosine), 2.5% (WSD), and 14.6% (constant LR).
3. Evaluation Benchmarks (Llama3-7B, last-iterate)
| Model | Batch Size | LAMBADA | HellaSwag | ARC-Easy | ARC-Challenge | WinoGrande | PIQA | OpenBookQA | BoolQ |
|---|---|---|---|---|---|---|---|---|---|
| Llama3 | static | 32.23 | 42.93 | 56.22 | 29.26 | 53.03 | 67.89 | 32.40 | 61.89 |
| Llama3 | dynamic | 35.36 | 44.33 | 56.36 | 30.46 | 53.99 | 68.34 | 33.20 | 62.26 |
| Qwen3 | static | 36.06 | 45.61 | 57.83 | 32.59 | 52.49 | 68.77 | 34.00 | 61.47 |
| Qwen3 | dynamic | 37.71 | 46.80 | 59.09 | 32.25 | 55.33 | 69.97 | 36.20 | 61.59 |
4. Post-training: Vision-Language Models
Dynamic batch size outperforms static baseline on 7 of 9 VLM evaluation tasks, with no significant regression on any benchmark.
5. Post-training: Math Fine-tuning
On Qwen3-0.6B fine-tuned on orca_math with WSD schedule, dynamic batch size shows better validation loss and GSM8K accuracy trajectories throughout training.
Variance Reduction Result
The advantage of dynamic over static batch size is formalized via Jensen's inequality:
where , confirming dynamic schedules always reduce the loss upper bound.
Theoretical and Practical Implications
Theoretical Implications
-
Convex dominance in deep learning: The empirical accuracy of the convex-theory-based loss prediction across non-convex neural networks and adaptive optimizers suggests that deep learning training dynamics are dominated by convex behavior, extending findings from prior work.
-
is not a sufficient statistic: The authors show that matching trajectories does NOT produce equivalent training dynamics—realizing schedules through learning rate consistently outperforms batch size (by +0.017 to +0.743 validation loss). This challenges the common simplification in prior work (Smith et al., 2018; Goyal et al., 2017).
-
Joint scaling laws: The framework unifies scaling of learning rate (), weight decay (), and batch size (closed-form schedule) into a single principled framework with provable convergence.
Practical Implications
-
Zero-cost improvement: The optimal batch size schedule requires no additional hyperparameter tuning—it is fully determined by the learning rate schedule shape and total compute budget.
-
Universal dynamics for prediction: The optimal batch size schedule preserves universal training dynamics ("supercollapse"), enabling reliable prediction of large-scale training behavior from small-scale experiments.
-
Generalization across domains: Benefits extend beyond pre-training to fine-tuning (math) and vision-language models, with no observed regressions.
-
Limitations: Advantages diminish as batch size grows (theoretically vanishing as ) and may disappear under purely low-precision training.
Conclusion
This work establishes that the optimal batch size schedule is a principled, closed-form function of the learning rate schedule shape and total computational budget—decoupled from peak learning rate, model architecture, and optimizer choice. The derived schedule consistently outperforms static batch size baselines by 6–15% in compute efficiency with zero additional cost, while preserving the universal dynamics that enable reliable scaling predictions.
Future directions include: extending the framework to more general cost functions (e.g., wall-clock time), investigating interactions with other hyperparameters beyond learning rate and weight decay, and exploring whether the convexity-driven insights hold at even larger scales and more diverse architectures.
Related papers
- The Scaffold Effect in Coding Agents: Harness Choice as a Hidden Variable in Coding-Agent Evaluation
Harness choice drives up to a 40x token cost difference per solved coding task while shifting pass rates by only 0-8 percentage points, making harness-model pairs the correct evaluation unit.
- COBS: Cumulant Order Block Sparse Attention
COBS stores compressed per-block key covariances to raise block sparse attention selection from first-order to second-order approximations, closing 86% of the gap to dense attention with minimal extra KV cache reads.
- Training Transformers for KV Cache Compressibility (KV-CAT)
KV-CAT trains transformers with learned routers to produce inherently compressible KV caches, improving compression quality up to 3.21x without sacrificing dense performance.