Kaplan Scaling Laws › Loss vs. Data

Michael BrenndoerferJanuary 13, 20254 min read
Language AI HandbookAll chapters
Part 23 of 67Scaling Laws
Chapter 163Kaplan Scaling Laws › Loss vs. Data
Reading section 4 of 15 · Loss vs. Data · 4 minSection 4 of 15 · 4 min

Book contents

Section 4 of 15 · 4 min read

Kaplan Scaling Laws › Loss vs. DataOne section · Sections in this chapter4 / 15 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

The second scaling law describes how performance improves with more training data. This addresses a complementary question to parameter scaling: if you gather more text to train on, how much better will your model become? Understanding this relationship matters because data collection has its own costs. Curating high-quality training corpora requires substantial effort, and some domains have limited data availability.

The intuition behind data scaling is similar to parameter scaling but works differently. When you train on a small dataset, the model sees only a limited sample of language patterns. Common constructions appear often enough to learn well, but rarer phenomena (unusual vocabulary, domain-specific expressions, complex reasoning patterns) may appear too infrequently for reliable learning. As the dataset grows, these rare patterns appear more often, giving the model chances to learn them. Eventually, even very large datasets become saturated. The most common patterns are already learned, and additional data mainly provides more examples of patterns you already captured rather than new information.

When the model is large enough that it won't overfit (effectively infinite capacity), the loss follows:

L(D)=(DcD)αDL(D) = \left(\frac{D_c}{D}\right)^{\alpha_D}

where:

  • LL: the cross-entropy loss on held-out text
  • DD: the number of tokens in the training set (the total amount of text the model learns from)
  • DcD_c: a fitted constant representing the characteristic data scale (approximately 5.4×10135.4 \times 10^{13} tokens)
  • αD\alpha_D: the data scaling exponent (approximately 0.095), governing how quickly loss improves with more data

The formula's structure mirrors the parameter scaling law, with DcD_c serving as the characteristic data scale, similar to how NcN_c is the characteristic parameter scale. This parallel structure isn't coincidental. It reflects the symmetric role that model capacity and data quantity play in determining what a neural network can learn. The characteristic scale Dc≈5.4×1013D_c \approx 5.4 \times 10^{13} tokens represents roughly 54 trillion tokens, an enormous amount of text that far exceeds any practical training corpus. This large value ensures that the ratio Dc/DD_c/D remains well above 1 for realistic datasets. This produces the predictable decay in loss as data increases.

This follows the same intuition as parameter scaling: each additional training token gives diminishing returns, but the larger exponent (αD>αN\alpha_D > \alpha_N) means loss responds more to data increases than parameter increases when measured separately.

The fitted parameters are:

  • αD≈0.095\alpha_D \approx 0.095
  • Dc≈5.4×1013D_c \approx 5.4 \times 10^{13}

Notice that αD>αN\alpha_D > \alpha_N (0.095 vs 0.076). This comparison shows something important about how sensitive loss is to each resource. With a larger exponent, each multiplicative increase in data produces a bigger drop in loss than the same increase in parameters. Specifically, for the same increase (say, 10x), data scaling reduces loss by a factor of 100.095≈1.2410^{0.095} \approx 1.24 while parameter scaling reduces it by only 100.076≈1.1910^{0.076} \approx 1.19. Loss improves faster per unit increase in data than in parameters when measured separately. However, as we'll see shortly, this doesn't mean you should prefer more data over larger models when compute is constrained, because the cost of processing more data must be factored into the optimization.

In[5]:
Code
# Kaplan scaling law parameters for loss vs D
alpha_D = 0.095
D_c = 5.4e13

# Generate dataset sizes from 1B to 1T tokens
D_values = np.logspace(9, 12, 100)  # 10^9 to 10^12 tokens

# Calculate predicted loss
L_D = (D_c / D_values) ** alpha_D
Out[6]:
Visualization
Log-log plot showing test loss decreasing linearly with increasing dataset size.
Power-law relationship between test loss and training dataset size. The steeper slope compared to the parameter scaling law indicates that loss decreases more rapidly per 10x increase in data.