Abstract
The cross-entropy scaling law has long served as a key tool for guiding the development of large language models. It shows that cross-entropy loss decreases in a predictable power-law rate as the model size increases. However, recent evidence indicates that this law breaks down at very large scales: the loss decreases more slowly than expected, which causes significant trouble for developing large language models. In this paper, we hypothesize that the root cause lies in the fact that cross-entropy itself does not truly scale; instead, only one of its hidden components does. To investigate this, we introduce a novel decomposition of cross-entropy into three parts: Error-Entropy, Self-Alignment, and Confidence. We show both theoretically and empirically that this decomposition precisely captures the training dynamics and optimization objectives. Through extensive experiments on multiple datasets and 32 models spanning five orders of magnitude in size, we find that only error-entropy follows a robust power-law scaling, while the other two terms remain largely invariant. Moreover, error-entropy constitutes the dominant share of cross-entropy in small models but diminishes in proportion as models grow larger. This explains why the cross-entropy scaling law appears accurate at small scales but fails at very large ones. Our findings establish the error-entropy scaling law as a more accurate description of model behavior. We believe it will have wide applications in the training, understanding, and future development of large language models.
Introduction
For years, the "Cross-Entropy Scaling Law" has been the North Star for AI researchers, suggesting that as model size and data increase, the loss drops at a predictable mathematical rate. This allows engineers to predict the performance of massive models based on small-scale experiments. However, at very large scales, this law has begun to break down, with loss decreasing more slowly than predicted. This paper investigates why this breakdown occurs and identifies a more fundamental metric that remains robust across all scales: Error-Entropy.
Methods: Decomposing the Loss
The authors hypothesize that cross-entropy is a "noisy" metric because it conflates ranking ability with probability calibration. They introduce a novel mathematical decomposition of cross-entropy loss into three distinct components:
- Error-Entropy (EE): Based on Rank-based Error (RBE), this measures the entropy of the rank distribution—where the model ranks the correct token—rather than raw probability scores.
- Self-Alignment (SA): A measure of how well the model's internal confidence matches its actual error rate.
- Confidence (Conf): The overall magnitude of the model's prediction scores.
By isolating these terms, the study tracks which specific part of the loss follows the power law as models grow. While the overall cross-entropy deviates from the power law at massive scales, Error-Entropy continues to scale perfectly.
Experimental Setup
The study involved an exhaustive evaluation of 32 different models (including Pythia, Qwen, GPT-2, OPT, and Llama families) spanning five orders of magnitude in size (14M to 70B parameters). These models were tested on three major English corpora: Wikipedia, C4, and GitHub (from The Pile), the latter serving as a "stress-test" for harder data distributions.
Key Insights
- Ranking is the True Scaler: The most significant finding is that only Error-Entropy truly scales. While Self-Alignment and Confidence remain stagnant or fluctuate, the model's ability to rank the correct token higher follows a near-perfect power law.
- The "Small Model" Illusion: In small models, Error-Entropy accounts for 80–90% of the total loss. Because it dominates, the entire cross-entropy loss appears to follow a power law.
- Explaining the Breakdown: As models grow, the proportion of Error-Entropy in the total loss shrinks. The "non-scaling" terms (SA and Confidence) take up a larger share, "polluting" the metric and causing the observed breakdown in the scaling law.
- Robustness to Inference Hacks: Unlike raw cross-entropy, Error-Entropy is immune to tricks like temperature scaling or top-p sampling, which change probabilities but not relative rankings.
Results and Future Directions
Quantitative tests showed that Error-Entropy achieved a higher $R^2$ for the power law than standard cross-entropy in nearly all cases. The authors also proposed a "compensated loss" function that penalizes the Confidence term, focusing the model's optimization on improving Error-Entropy.
While Error-Entropy is currently non-differentiable, making direct optimization challenging, the development of surrogate losses offers a path forward. This framework shifts the focus toward the components that actually scale with intelligence, providing a more reliable compass for future LLM development.
Summary updated