Power Laws in Deep Learning › Log-Log Linear Relationships
Language AI HandbookAll chapters Power Laws in Deep Learning › Log-Log Linear RelationshipsOne section · Sections in this chapter3 / 11 ↓
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
Understanding the mathematical form of power laws is only the beginning. In practice, a transformation helps you identify and validate power laws, then work with them by converting their curved relationships into straight lines. This transformation bridges theory and practice, turning a specialized nonlinear analysis into the familiar, well-understood territory of linear regression. If you understand only one technical tool from this chapter, let it be this one: the log-log transformation is the lens through which all scaling law analysis is conducted.
Taking the logarithm of both sides of reveals the hidden linear structure. Let's step through this derivation carefully, as each step illuminates something important:
where:
- : the logarithm of the dependent variable
- : a constant term that becomes the y-intercept in the transformed space
- : the power law exponent, which becomes the slope of the line
- : the logarithm of the independent variable
To see the linear structure most clearly, introduce substitutions and . The equation becomes:
This is unmistakably the equation of a straight line in slope-intercept form, where the slope is the power law exponent and the intercept encodes the coefficient. Each component has a clear geometric interpretation:
- : the logarithm of the dependent variable, which becomes our new vertical axis in the transformed space
- : a constant term that becomes the y-intercept, the value where the line crosses the vertical axis when , that is, when
- : the power law exponent, which becomes the slope of our line, telling us how many units changes for each unit change in
- : the logarithm of the independent variable, which becomes our new horizontal axis
Why does this matter so much? Because straight lines are easy to work with. We have centuries of well-developed tools for analyzing linear relationships, fitting them to data, and extrapolating from the result. By transforming power laws into lines, we gain access to this entire toolkit: linear regression, confidence intervals, residual analysis, hypothesis testing. The slope of a line is one of the most intuitive quantities in mathematics: it tells you the rate of change, and we have immediate intuitions about what different slopes look like and what they mean.
The slope interpretation is particularly useful for comparing scaling behaviors. If architecture A has a parameter-scaling slope of in log-log space and architecture B has a slope of , architecture A's loss drops faster with increasing parameters. The difference between these slopes represents a 43% advantage in scaling efficiency (0.10 vs. 0.07) that compounds sharply over large scale ranges.
This transformation has three concrete practical implications that you'll use repeatedly when working with scaling data:
- Detection: If your data forms a straight line on log-log axes, where both axes are logarithmic, you've found a power law. This gives you a simple visual test. Plot your scaling data with logarithmic scales on both axes and look for linearity. No complex statistical test is needed at first.
- Parameter estimation: The slope gives you the exponent directly. You don't need specialized nonlinear optimization. Basic linear regression on log-changed data is enough and more reliable.
- Extrapolation: Linear extrapolation in log space corresponds to power law extrapolation in linear space. We can extend a straight line with confidence. The log-log transformation lets us translate that confidence to power law predictions across orders of magnitude beyond our observed data.
Worked Example: Computing Scale from Exponent
Let's make each of these steps concrete with a worked numerical example. Suppose loss decreases with compute according to:
where:
- : the model's loss (lower is better, no units)
- : compute budget in FLOPs (floating-point operations)
- : the coefficient, representing the loss we would observe at FLOP (an entirely hypothetical anchor point with no physical interpretation, but a useful mathematical reference)
- : the scaling exponent, with the negative sign showing loss decreases as compute increases
Before diving into the calculation, consider what this equation is telling us qualitatively. The coefficient 5.4 anchors the curve but isn't real on its own, since no real model trains with one floating-point operation. The exponent carries the prediction: loss decreases slowly as compute increases, and the small magnitude (0.05) tells us the improvement per order of magnitude is modest. A large lab running this kind of experiment would typically see the curve covering 10 or more orders of magnitude of compute, from small ablation runs to the largest training runs they can afford.
Taking base-10 logarithms of both sides:
In log space, our line has y-intercept 0.73 and slope . Now we can answer a concrete question: if we increase compute by a factor of 10 (one order of magnitude), meaning increases by exactly 1, how much does loss change?
What does a change of in mean for actual loss? We work backwards: if decreases by , then is multiplied by:
The new loss is approximately 89.1% of its previous value. This is an 11% reduction in loss for every tenfold increase in compute. Each order of magnitude of compute reduces loss by about 11%. This fixed proportional improvement per order of magnitude is the signature of power law scaling, and it's the kind of prediction that makes planning possible.
Why does this formula make sense? Notice that the exponent appears as a conversion factor between "orders of magnitude of compute" and "fractional reduction in loss." The negative sign enforces the inverse relationship. The magnitude (0.05) determines the efficiency of the conversion. If you had a larger exponent in magnitude, say , each order of magnitude of compute would buy you more improvement. Comparing scaling laws from different architectures or training configurations therefore amounts to comparing these exponents.
Let's extend this to a multi-step planning exercise. Suppose you have access to a compute budget that allows you to do a training run that costs FLOPs. You've run small experiments at and FLOPs, measured losses of approximately 3.0 and 2.8 respectively, and fit the power law above. What loss should you expect?
Step 1: Verify the fit. Using the formula , compute predicted losses at your observed scales.
At : .
Wait, that doesn't match the observed 3.0. This means our example power law needs re-anchoring to the observed data. Let's instead work with the observed data directly. From the two observations:
Subtracting: , so .
Then , so .
At : .
The predicted loss at your large training run is approximately 2.27. You've made a specific, quantitative, checkable prediction before spending a cent on the expensive run. This is the practical power of power law scaling.
Let's visualize this relationship concretely:
import numpy as np
# Generate power law data: L = 5.4 * C^(-0.05)
compute = np.logspace(15, 24, 50) # From 10^15 to 10^24 FLOPs
loss = 5.4 * np.power(compute, -0.05)

The left plot shows the curved relationship typical of power laws on linear axes, while the right plot reveals the elegant simplicity of the log-log representation. The slope of the line in log-log space gives us the exponent directly. Notice how the curve that appeared complex on linear axes becomes a perfectly straight line once we transform both axes to logarithmic scales. This visual simplicity shows the mathematical simplicity we derived above: power laws are linear relationships in disguise, and the log-log transformation reveals that hidden linearity.
Log-log plots are a mathematical lens rather than a visualization choice. They make the structure of the data visible. When researchers at AI labs plot training curves or scaling results, they almost universally use log-log or semi-log axes because linear axes obscure the simple relationship that makes the data interpretable and extrapolable.