Below is a deep‐dive into why very different sequence‐models (LSTMs vs. Transformers) end up exhibiting nearly the same power‐law scaling exponent, yet keep a roughly constant gap in overall loss (i.e. the Transformer stays “ahead,” but both improve at the same rate).
1. The Empirical Scaling Law
Across many language‐model experiments (Kaplan et al. 2020, Hoffmann et al. 2022, etc.), the held‐out loss (L) as a function of parameter count (N) follows a simple form:
Scaling law
(L(N) \approx A,N^{-\alpha} + B)
- (\alpha): scaling exponent (~0.07–0.1 for language modeling on web‐text)
- (A): architecture‐dependent prefactor
- (B): irreducible “Bayes” or perplexity floor
When you plot (\log L) vs. (\log N), you get straight lines with slope (-\alpha). Different architectures have different vertical shifts (different (A, B)) but the same slope.
Measured exponents
| Model type | (\alpha) (approx.) | Prefactor (A) | Offset (B) |
|---|
| LSTM (medium) | 0.070 | large | ~0.80 |
| Transformer | 0.075 | smaller | ~0.75 |
| Mixture‐of‐Experts | 0.073 | even smaller | ~0.72 |
Notice how (\alpha) stays in the 0.07–0.08 ballpark even though the absolute loss of the Transformer is always lower.
2. Why the Same Exponent? Universality of Function‐Class Approximation
-
Underlying Task Complexity
The exponent (\alpha) is believed to reflect the intrinsic smoothness or “effective dimension” of the language‐modeling problem (i.e. how hard the prediction distribution is). It is not set by the details of the neural‐net architecture but by the data distribution itself.
-
Universal Approximation
Both LSTMs and Transformers are universal function approximators for sequence tasks. Once capacity is large enough, the rate at which they reduce approximation error is governed by the same statistical / information‐theoretic limits.
-
Kolmogorov n-width & Sobolev‐smoothness
In classical approximation theory, for a target function class of smoothness (s) in dimension (d), the minimal error with (N) parameters scales like (N^{-2s/d}). Here “(s/d)” is fixed by the language distribution, not by whether you used LSTMs or self‐attention.
3. Constant Performance Gap: The Prefactor (A)
Transformers consistently have:
- A smaller prefactor (A): they fit the same data more efficiently (better inductive bias, parallelism, gradient flow).
- A slightly lower irreducible offset (B): better long-context modeling reduces “floor” loss.
But both yield roughly the same (-\alpha) slope. Thus the gap in bits remains ∼constant on a log–log plot, or roughly a constant ratio in perplexity.
4. “Learning Rate” vs. “Learning‐Curve” Rate
I suspect by “learning rate” you mean the power‐law exponent (the rate at which loss improves with size). If, instead, you literally meant the optimizer’s step size, note:
- Empirically, the optimal peak-learning-rate (\eta) for Transformers also scales weakly with model size—
(\displaystyle \eta_{\rm opt}\propto N^{-\beta}) with (\beta\approx 0.06)—
and LSTMs show a very similar (\beta).
Why? Because gradient magnitudes and noise scale predictably with parameter count, for any RNN‐like or attention‐like architecture. To keep signal‐to‐noise stable in SGD, you end up with the same small negative exponent on (N).
5. Quick Intuition
-
Data Distribution Sets the Curve
- The “shape” (exponent (\alpha)) comes from language’s statistical properties, not network details.
-
Architecture Sets the Height
- LSTMs vs. Transformers shift you up/down (via (A,B)) but don’t rotate the slope.
-
Hyperparam Scaling is Universal
- Both families see the same SGD‐noise driven scaling of optimal learning‐rate.
📚 Further Reading
- Kaplan, Henighan et al. 2020, “Scaling Laws for Neural Language Models”
- Hoffmann et al. 2022, “Training Compute‐Optimal Large Language Models”
- Rahimi & Recht, “Weighted Sums of Random Kitchen Sinks…” (approximation rates)
Feel free to dive in on any one of these points— or tell me if you really meant something else by “learning rate”!