Abstract
This paper establishes a rigorous mathematical foundation for the empirical scaling laws observed in Large Language Model (LLM) development. By modeling transformer training as an ordinary differential equation (ODE) system within the Neural Tangent Kernel (NTK) framework, the research identifies a fundamental phase transition in learning dynamics. The process begins with a "compute-starved" stage characterized by exponential error decay, followed by a "data-limited" stage governed by a power-law decay of $\Theta(C^{-1/6})$. The theoretical framework is validated through experiments on the GPT-2 model series and synthetic datasets, providing insights into the roles of model depth, data noise, and resource allocation.
Introduction
Since the release of GPT-3, the AI community has relied on "scaling laws"—empirical observations that model performance improves predictably as compute, parameters, and data increase. However, these laws have largely been treated as experimental phenomena rather than theoretical certainties. Existing theories often rely on "toy models" like simple linear regression or shallow networks, which fail to capture the complexity of multi-layer transformers or sequence-to-sequence data. This research seeks to bridge this gap by answering a critical question: What are the theoretical limits of computational resource allocation to ensure transformer convergence?
Methods and Experimental Setup
The study formalizes transformer learning dynamics through several key theoretical steps:
- ODE System Modeling: Stochastic Gradient Descent (SGD) is modeled as a system of ordinary differential equations.
- Kernel Approximation (NTK): The analysis leverages the Neural Tangent Kernel (NTK) framework and the "Lazy Learning" regime, assuming that in highly over-parameterized models, weights remain near their initial values while reaching a global minimum.
- Multivariable Chain Rules: Layer-wise training dynamics are derived using applications of chain rules to handle multi-layer attention mechanisms.
- Phase Transition Analysis: A specific condition is derived to divide the scaling trend into two distinct stages based on total compute $C$.
The theoretical findings are validated using the GPT-2 Series (Small 124M, Medium 355M, Large 774M, and XL 1.5B) and the TinyStories synthetic dataset. Additionally, "Noisy Scaling" strategies were introduced, where tokens were masked or replaced with random noise to evaluate the impact of data quality on scaling curves.
Key Insights: The Lifecycle of Scaling
The research identifies several critical properties of transformer scaling:
- The Two-Stage Lifecycle: Training is non-uniform. In Stage I (Compute-Starved), the model rapidly navigates the loss landscape with exponential error decay. In Stage II (Data-Limited), gains follow a slower power-law decay as "easy" information is exhausted.
- The "Potential Drag" of Noise: Scaling is not a panacea. If dataset noise grows too quickly (specifically $\xi(N) \propto \sqrt{N}$), the scaling law breaks, and the error floor stops dropping, explaining diminishing returns from scraping noisy internet data.
- Depth as a Catalyst: The theory demonstrates that training convergence rates improve exponentially as the number of layers ($N$) increases linearly, providing a mathematical justification for the preference for deeper models.
- Lambert W Correction: Performance is not a "pure" power law; a logarithmic correction involving the Lambert W function suggests that reducing error becomes slightly more expensive at extreme scales than simple power laws predict.
Key Results
The paper establishes a theoretical upper bound on excess risk in the data-limited stage following a power-law decay of $\Theta(C^{-1/6})$, where $C$ is total compute. Experiments on the GPT-2 series show a clear transition between "Longer Training Beats Data Scaling" and "More Data Beats Time Scaling," matching the predicted phase transition.
Furthermore, the research proves that when noise levels reach a certain threshold, the upper bound on excess risk degrades to $O(1)$, effectively nullifying the benefits of scaling.
Limitations and Future Work
The primary limitation is the reliance on the Lazy Learning Assumption (NTK regime). While mathematically tractable, it may not fully capture "Feature Learning," where weights move significantly to learn internal representations. Additionally, the proofs require specific scaling of initialization parameters for stability, which may differ from heuristic initializations used in production. Future work could explore these dynamics in active learning scenarios or with non-standard attention mechanisms like sparse or linear attention.
Summary updated