Manuscript Offprint
arXiv:2610.19281Exact Scaling Laws for a Random-Features Bigram Model
Abstract
Understanding neural scaling laws is increasingly important for theory and practice, yet first-principles explanations remain limited even in simple settings. In this work, we study capacity-limited scaling in a bottlenecked bigram model with power-law (Zipf) token statistics, viewed as an analytically tractable toy model of a large language model. Fixed random embeddings serve as a proxy for representational capacity and induce an explicit bottleneck of width, allowing us to derive scaling laws for prediction regret as a function of model width, vocabulary size, and the Zipf exponent. Our results complement recent theoretical accounts based on optimization dynamics by isolating scaling due purely to representational constraints. In the appropriate regime, the theory recovers the functional form of classical neural scaling laws and suggests that heavy-tailed language statistics may underlie both optimization- and capacity-driven scaling. Experiments natural language datasets (WikiText2, OpenWebText) closely match the predicted curves.
1. Introduction
Neural scaling laws describe systematic relationships between predictive performance, model size, training data, and compute, providing an empirical basis for allocating resources in language-model training (Kaplan et al., 2020). Theoretical studies have connected these relationships to data distributions, model capacity, and optimization dynamics (Maloney et al., 2022; Cabannes et al., 2024; Kunstner and Bach, 2025). An important challenge is to distinguish these mechanisms: similar learning curves can reflect insufficient observations, a restricted representation, or incomplete optimization.
In language modeling, the highly uneven frequencies of tokens make the role of representational capacity particularly interesting. An unconstrained bigram model assigns a separate next-token distribution to every context, regardless of how frequently that context occurs. Does accurate prediction require this degree of flexibility, or can a substantially smaller representation suffice? More broadly, how does the power-law structure of language determine the cost of compressing its predictive information? Addressing these questions provides a way to connect empirical capacity scaling to explicit properties of the underlying data distribution.
– A bottlenecked bigram model. We introduce a capacity-constrained bigram model with Zipfian token statistics as an analytically tractable toy model of a large language model. Fixed random embeddings serve as a proxy for representational capacity, imposing a width-N bottleneck with dN trainable parameters. By studying the optimally fitted predictor, we isolate the cost of limited capacity from optimization error. This extends the unrestricted bigram setting of Kunstner and Bach (2025) by introducing an explicit representational constraint, complementing their analysis of scaling with the number of optimization steps. In the summable Zipf regime , our results also recover the associative-memory scaling laws of Cabannes et al. (2024).
– Exact scaling laws. We obtain an exact representation of regret relative to the unconstrained empirical optimum and derive asymptotic scaling laws in vocabulary size , sample size , embedding dimension , and the Zipf exponent. The parameterization reveals distinct sublinear and linear capacity regimes. In the appropriate regime, the resulting laws recover the functional form of classical empirical neural scaling laws (Kaplan et al., 2020).
– An explicit account of finite-sample effects. Our theory incorporates vocabulary occupancy and variability in empirical transition probabilities, separating a capacity-dependent contribution to regret from a finite-sample correction. This identifies when capacity constraints dominate and when limited observations materially affect the scaling behavior.
– Empirical evaluation. In Section 4, we present results of extensive experiments which validate our scaling laws both on real-world natural language datasets, WikiText-2 (Merity et al., 2017) and OpenWebText2 (Gao et al., 2020), support the predicted scaling curves across vocabulary sizes d, sample sizes n, and embedding dimensions N. They examine both the decay of regret under sublinear capacity and its approach to zero as the bottleneck becomes sufficiently wide.
1.2. Related work
The pioneering work of Kaplan et al. (2020) established empirical relationships between language-model loss, parameter count, training data, and compute, motivating the use of scaling laws for resource allocation. Subsequent theoretical work has identified several mechanisms that can produce such behavior.
Zipfian statistics, sampling, and optimization. Hutter (2021) derive data-dependent learning curves for a memorization-based model, explaining how power-law frequencies lead to power-law decay of prediction error with sample size. More recently, Kunstner and Bach (2025) analyze gradient descent and sign descent for a linear bigram model under Zipfian assumptions, characterizing how optimization depends on vocabulary size and the frequency exponent. Their results emphasize the importance of the regime near . Neither analysis introduces a representation width that can be varied independently of vocabulary size: Hutter focuses on sample-size scaling, while Kunstner and Bach study optimization of an unrestricted bigram parameterization. Consequently, they do not characterize the approximation error caused by a separate embedding-width budget. We introduce that capacity axis through a fixed random embedding of width N, distinguishing representational limitations from finite-data and optimization effects.
Finite-capacity associative memories. Cabannes et al. (2024) provide a closely related capacity-based perspective, deriving sample- and parameter-scaling laws for associative memories built from outer products of random embeddings. Their analysis explicitly addresses finite memory and the efficiency of different storage schemes. The principal infinite-vocabulary power-law results concern the summable regime . In that regime, the Zipf normalizing constant has a finite limit as vocabulary size grows, allowing leading-order laws that do not retain an explicit vocabulary cutoff. This contrasts with , where normalization remains vocabulary-dependent. Our analysis keeps vocabulary size explicit and studies its interaction with the bottleneck width, including sublinear and linear parameterizations . We also study squared-loss regret for conditional next-token probabilities rather than the association-retrieval error analyzed in that work.
Spectral and random-feature theories. Kernel and random-feature models provide another route to analytical scaling laws. Cui et al. (2021) characterize how spectral decay, target regularity, noise, and regularization determine learning-curve exponents, including the crossover between noiseless and noisy regimes. Maloney et al. (2022) develop a solvable generative and random-feature model with joint dependence on dataset size and parameter count, and explain how a finite spectral range can interrupt power-law scaling. These works already incorporate statistical capacity constraints; our contribution is not to introduce capacity into scaling-law theory in general. Rather, we connect an explicit random-embedding bottleneck to discrete Zipfian token statistics and characterize regret relative to the unconstrained empirical bigram optimum. This distinction also matters when comparing our results with population generalization error or cross-entropy scaling in other models.
Bahri et al. (2024) distinguish variance-limited and resolution-limited regimes and relate scaling exponents to spectral properties of the learning problem. These results indicate that superficially similar power laws can arise from different statistical or computational limitations. Our work studies one such mechanism in a discrete next-token prediction setting: the error induced by a restricted representation, after optimizing the predictor within that representation.
Theory of skill acquisition in language models. Michaud et al. (2023) propose that smooth aggregate scaling can emerge from learning discrete skills with a heavy-tailed frequency distribution. Nam et al. (2024) develop an exactly solvable model for multitask sparse parity, connecting skill emergence with scaling in training time, data, and model size. In a stochastic-process formulation, Debowski (2023) construct multiperiodic Santa Fe processes and memory-based predictors exhibiting power-law cross-entropy decay with model and data resources. These approaches explain scaling through the acquisition of discrete information. Our model instead studies the approximation of empirical next-token distributions through a shared, finite-dimensional random representation, without postulating a sequence of separately acquired skills.
Distributional tails and model collapse. Dohmatob et al. (2024) study how incorporating synthetic data into training distributions changes scaling laws and can lead to model collapse (Shumailov et al., 2024). Their analysis highlights the importance of preserving distributional tails: increasing data or model size need not yield the same improvements when rare events are suppressed. This provides a complementary distributional perspective on scaling, whereas our work studies the regret induced by a representational bottleneck under a specified Zipfian distribution.
Attention models and n-gram structure. Lyu et al. (2025) derive scaling laws for a solvable self-attention model, characterizing dependencies on training time, model size, data, and context length. From a complementary empirical perspective, Nguyen (2024) investigate how well rules based on n-gram statistics approximate transformer next-token predictions. These studies motivate simplified sequence-prediction models as analytical testbeds, without equating them with full transformers. Our bottlenecked bigram model isolates the interaction between Zipfian token statistics and finite representational capacity, rather than modeling attention or long-context dependencies.
2. Theoretical Setup
Like Kunstner and Bach (2025), we consider a bigram model in which each word is associated with a unique integer , where is the vocabulary, and is the vocabulary size. The frequency of ith token/word is , and conditioned on the frequency of the next word being is . This defines a distribution over word pairs. We make the following assumption on this distribution.
Assumption 1 (i) Zipf marginals. There exists an exponent such that the ith word has frequency
(ii) Constant collision probability. There exists a constant such that for each word ,
The distributional constants and will play a crucial role in our theory. A similar assumption was made in (Cabannes et al., 2024). Also, Kunstner and Bach (2025) considered a similar but strong similar assumption as above was also made in and (Kunstner and Bach, 2025). Indeed, in place of the second part of the above assumption, they assumed that the next-word frequencies also followed a Zipf law with exponent . Such distributions verify the invariance (2) above with .
| Dataset | Vocabulary size | Sample size | Zipf exponent |
|---|---|---|---|
| WikiText-2 | 33277 | 2051910 | 0.9354 |
| OpenWebText | 50257 | 2110824721 | 0.9443 |
Table 1: Global parameters and descriptive statistics for real-world natural language datasets. In our experiments, we sample subsets of these datasets, restricting both the vocabulary size and the sample size .
2.1. Unconstrained Bigram Model
Our proposed capacity-constrained bigram model (Section 2.2) is motivated by the following full-capacity bigram model considered by Kunstner and Bach (2025), which we now describe.
Nature draws an i.i.d. sample of size from , where each and is the one-hot encoding of the corresponding symbol in the alphabet . Table 1 lists the values for the sample size and the vocabulary size for popular natural language datasets: WikiText-2 (Merity et al., 2017) and OpenWebText2 (Gao et al., 2020). Let and be the binary matrices whose th rows are and , respectively. Kunstner and Bach (2025) considered the problem of approximating by through minimization of the loss
over a parameter matrix . Here, denotes the squared Frobenius (aka Hilbert–Schmidt) norm of a matrix . The learnable parameters are the entries of . Let denote a minimizer of , and define the following matrices
When the matrix is invertible (which happens for large ), the normal equations give .
For a fitted matrix , the corresponding downstream predictor is , where is the one-hot encoding of . Predictive performance can also be assessed using top- accuracy, the proportion of examples for which the true next symbol appears among the highest-scoring predictions, with , for example.
Scaling Laws for Gradient Descent. Consider a sequence of iterates generated by gradient descent (GD) initialized at zero, . For invertible in (4), the regret at initialization satisfies
where is the constant defined in (2). The approximation replaces empirical frequencies by their population counterparts in the large-sample regime.
Kunstner and Bach (2025) studied as a function of optimization horizon T, the normalized regret measure
and distinguished three regimes of the Zipf exponent in (1): subcritical ( ), critical ( ), and supercritical ( ). For each regime, they identified appropriate scalings of the iteration count T with vocabulary size d and derived explicit asymptotic laws for GD. In particular, in the supercritical regime, their large-vocabulary analysis yields the epoch-wise scaling law
for large T. This exponent coincides with that obtained by Hutter (2021); Cabannes et al. (2024) for sample-size scaling, although the resource varied here is the number of optimization steps. The same work also derives scaling laws for sign gradient descent (sign-GD), showing how the choice of optimizer changes the dependence on vocabulary size.
These results describe optimization-time scaling under idealized Zipfian frequency assumptions. Normalizing the regret factors out the initialization scale A, which can itself depend on d, while the limiting curves express the remaining vocabulary-size dependence through a rescaling of time. Finite-sample fluctuations are not tracked explicitly in this formulation. Our results instead retain explicit dependence on vocabulary size d and sample size n, together with an independently adjustable embedding width N, to characterize regret under a representational constraint.
2.2. A Capacity-Constrained Biagram Model
In the model (3) studied in (Kunstner and Bach, 2025). the number of trainable parameters equals , with denoting the vocabulary size. However, this is unrealistic for the large-vocabulary setting considered here, which is also typical of real language models. To better reflect practice, we instead introduce a notion of capacity (i.e., parameter count) as follows. Given an embedding matrix with embedding dimension , we assume the weights matrix admits the following factorization:
with learnable factor . This is a capacity constraint, and reduced the number of learnable parameters from to . Consider the modified optimization problem
where is the loss function defined in (3).
Assumption 2 (Random Embeddings) The entries of the embedding matrix are sampled iid from a distribution with zero mean, variance 1/d, and with Gaussian concentration property. For example, the Gaussian distribution itself .
Let be any minimizer in (6) and set . Our main focus will be the analysis of the f expected normalized regret:
where is the constant in (2). We have made explicit the dependence on sample size , vocabulary size , and embedding dimension , as these will appear explicitly in our scaling laws.
3. Main Results
3.1. Bias-Variance Decomposition
Consider the vector defined by
the number of times the kth vocabulary symbol appears in the dataset. Let S be the number of unique vocabulary symbols present in the training dataset,
Note that but and are deterministic functions of the vector of counts . It is clear that and . Finally, for any , let be the empirical frequency of the th token.
We start with the following general result.
Proposition 1 Under Assumption 1, the conditional expected regret admits the following bias-variance decomposition:
where is defined in (2), , and when . For , is the unique positive solution to the fixed-point equation
The second term, in the decomposition (10) captures the finite-sample variability of the empirical transition probabilities and can be interpreted as a variance contribution. It is present only when the embedding width is smaller than the number of observed contexts, and vanishes once . Here, is the realized vocabulary occupancy defined in (9); its distribution depends on the sample size and the underlying context probabilities over the vocabulary. In particular, the unconstrained bigram model has , and so V = 0.
In contrast, the first term, captures the approximation cost of the representational bottleneck and can be interpreted as a bias contribution. This is reminiscent of model bias. For , the fixed-point equation gives the equivalent expression . Thus, unlike , this term depends on the full empirical context-frequency profile, rather than only on the number of observed contexts. For a fixed frequency profile, it decreases as the embedding width increases. However, it need not vanish as the sample size grows when : additional observations cannot by themselves remove the limitations of a fixed representation.
Finally, when , both terms in (10) vanish. This agrees with the exact interpolation property: whenever the embedding matrix restricted to the observed contexts has full row rank, the student can reproduce all empirical transition rows, yielding .
3.2. Sketch of Proof of Proposition 1
We provide the high-level ideas here. The complete proof is provided in the supplemental (appendix).
Conditioning on the empirical counts vector , one first show the exact identity
where is the th row of the empirical matrix of transition frequencies, i.e.
and is the expectation of the th diagonal of entry of the matrix which is the orthogonal projection onto the column space of , with . One then computes explicitly
By entry-wise concentration of to the next-word transition matrix (for example, see (Berend and Kontorovich, 2012)), we know that uniformly on , with high probability. where is the constant appearing in equation (2) of Assumption 1. It follows from (12) that
Finally, using random matrix theory, one shows that uniformly on , where is as defined in the proposition. Plugging this estimate into the above equation and rearranging then gives the desired result.
3.3. Explicit Scaling Laws
Note that the RHS in (10) is random as it depends on the random counts . In order to de-randomize the formula, we need the sample size to be sufficiently large as a function of the vocabulary size . Let the Zipfian exponent for the marginals as in Assumption 1.
Theorem 2 Consider the sublinear regime where the random embedding dimension grows with the vocabulary size . Finally, assume sample size is sufficiently large in the sense that . Then, we have the followin exact scaling law for the regret:
where the constant is the statistic defined in (2), while , , and is the unique positive solution to the following fixed-point equation
Furthermore, we have the following breakdown:
(i) (Sub-critical Zipf exponent). If the exponent in (1) verifies , then
where is the unique positive solution to the fixed-point equation
(ii) (Critical Zipf exponent). If , then
where is the unique positive solution to the following fixed-point equation:
(iii) (Super-critical Zipf exponent). If , then , where is a positive constant only depending on .
In the super-critical regime ( ), the exponent in our scaling law the one reported in one of the main results in (Cabannes et al., 2024). In the critical regime ( ), let , where denotes the -1 branch of the Lambert-W function. Then the term in (17) admits the following expansion:
Note that the condition is very mild and in satisfied in language datasets like OpenWebText2 (Gao et al., 2020), WikiText-2 (Merity et al., 2017), where (refer to Table 1), and so ; the condition then simply requires the sample size to grow super-linearly with vocabulary size . This condition ensures that the dataset contains enough information to allow for the estimation of the head of the marginal distribution of the tokens in the vocabulary.
In the sub-critical and critical regimes which better capture to natural language distribution, our theorem provides new scaling laws which better match the empirically observed laws of Kaplan et al. (2020).
3.4. A Canonical Scaling for the Embedding Dimension
A reasonable embedding dimension N w.r.t the vocabulary size d is
for constants with . In particular, captures the linear scaling regime where , while captures the sublinear regime where . By fixing and sample size , we empirically trace the decay of the excess risk and overlay the exact closed-form asymptotics derived from our random matrix theory approach. For example, in the critical setting where the marginal Zipf exponent is , the above theorem predicts that provided the sample size is sufficiently large (i.e. ), the quenched regret is given by
with .
4. Empirical Validation
4.1. Experimental Setup
We validate the capacity–risk predictions from Section 3 in a setting where representational capacity can be tuned independently of corpus statistics. We study the capacity-constrained linear bigram model in which the target embeddings are restricted to a rank-N subspace via a fixed random projection. For each configuration, we optimize to convergence and report the normalized excess risk (regret) relative to the unconstrained empirical optimum (cf. (13)).
To connect with the broader scaling-laws literature (Kaplan et al., 2020), we treat as an explicit capacity axis and couple it to vocabulary size through , sweeping and to probe both the linear-width regime () and sublinear-width regime ().


(a) Vocabulary size and sample size .


(b) Vocabulary size and sample size .
Figure 1: Capacity scaling on WikiText-2. Converged normalized excess risk (regret) (7) for the random-features bigram model, as the embedding width is scaled as ((19)). Left: vary the width multiplier at fixed exponents . Right: vary the exponent at fixed multipliers . Solid curves (markers) show empirical means over random projections; shaded regions indicate variability across trials. Dashed curves are the theoretical predictions from our Theorem 2. Notice the excellent match.


(a) Vocabulary size and sample size .


(b) Vocabulary size and sample size .
Figure 2: Capacity scaling on OpenWebText2. Converged normalized excess risk (regret) (7) for the random-features bigram model with a rank-N embedding bottleneck, where ((19)). Left: vary at fixed . Right: vary at fixed . Solid curves (markers) show empirical means over random projections; shaded regions show trial variability. Dashed curves are the corresponding theoretical predictions from our Theorem 2. Notice the excellent match.
4.2. Datasets
We run experiments across three distinct datasets: Synthetic data generated exactly from Zipfian distributions, and the empirical real-world corpora WikiText-2 (Merity et al., 2017) and OpenWebText2 (Gao et al., 2020). For the real-world datasets, the vocabulary size d and the token count n are calculated over the whole dataset. The Zipfian exponent are extracted through log-log regression over the corpus distribution. Table 1 provides a list of these descriptive statistics.
4.3. Results
The results across all configurations showcase an alignment between the empirical excess risk of the capacity-constrained models and our theoretical predictions. Despite the noise inherent in real-world distributions, the derived asymptotics capture the empirical behavior across all datasets.
WikiText-2. Figure 1a and 1b demonstrate the capacity scaling laws for the WikiText-2 dataset (Merity et al., 2017), for different values of the vocabulary size d and embedding dimension N, for different values of and in (19). Notice how excellently our theory predicts the performance of the model. From the figures, we see that increasing capacity N increases the model capacity and reduces regret in both settings. In the linear scaling regime ( ), the model reaches zero regret at , while in the sublinear scaling regime ( ) it retain nonzero regret floor.
OpenWebText2. Figure 2 shows the same capacity scaling analysis on OpenWebText2 (Gao et al., 2020) for two vocabulary cutoffs. Despite the substantially noisier empirical frequency profile of a web-scale corpus (and the resulting deviations from an ideal Zipf law at the head and tail), the predicted capacity–risk tradeoff remains remarkably accurate.
Qualitatively, we again observe the two regimes predicted by Theorem 2. First, in the linear-width regime ( ), increasing the width multiplier produces a sharp decrease in regret, approaching the unconstrained optimum once N is on the order of d. Second, in the sublinear regime ( ), improvements with diminish and the curves flatten, indicating that performance becomes variance-limited rather than approximation-limited. This saturation is consistent with the finite-sample term in (13), which scales with d/n and therefore persists even as N increases when N grows too slowly with d.
Beyond confirming the asymptotics on cleaner benchmarks (WikiText-2) and synthetic data, OpenWebText2 provides evidence that the scaling-law picture is robust to realistic corpus artifacts. In particular, the close match between empirical curves and the theorem-derived predictions suggests that the dominant driver of the observed scaling is the interaction between heavy-tailed token frequencies and the explicit embedding bottleneck, rather than details of text domain or preprocessing.
5. Concluding Remark
Our results isolate representational capacity as a source of scaling, complementing explanations based on optimization dynamics. Keeping vocabulary size explicit distinguishes increasing the capacity available for a fixed prediction problem from enlarging the problem itself. This distinction is particularly relevant near the critical Zipf exponent , where vocabulary-dependent normalization affects the scaling behavior. Together, these perspectives compare empirically supported believes that heavy-tailed language statistics may underlie both capacity- and optimization-driven scaling (Kaplan et al., 2020).
Our analytically tractable setting provides a quantitative benchmark for capacity-driven scaling, while experiments on synthetic and natural language data support the predicted dependence on model width. This framework opens the way to studying how learned embeddings, longer contexts, and finite optimization budgets modify these laws. Such extensions would help identify which scaling behaviors reflect the underlying language statistics and which depend on architectural and training choices.
Future Directions. A natural extension is to replace fixed random embeddings with learned representations and investigate how adaptation to predictive structure changes the capacity scaling.
Also, extending the analysis to higher-order token dependencies and heterogeneous transition distributions would further reveal how context length and richer language statistics shape these tradeoffs.
Acknowledgement
We would like to acknowledge that the first author Julian Enoch is a PhD student funded by bursaries from Canada Research Chair grant number CRC-2023-00228 (Computing for the Greater Good) awarded to Elvis Dohmatob.
AI use statement
In this work, we have made limited use of generative AI tools for spell-checking, and also reformulating chunks of text in the introduction (Section 1, specially 1.2). Also, AI was used to help with the tedious verification / sanity-checking of some of our proofs (Section A). No other use of AI was made in our work. The ideas and execution involved in this work is ours. We take full responsibility for the final content of this work, including text, claims, or artifacts produced with the aid of AI.
References
Yasaman Bahri, Ethan Dyer, Jared Kaplan, Jaehoon Lee, and Utkarsh Sharma. Explaining neural scaling laws. Proceedings of the National Academy of Sciences, 121(27), 2024.
Daniel Berend and Aryeh Kontorovich. On the convergence of the empirical distribution. 2012. arXiv preprint.
Vivien Cabannes, Elvis Dohmatob, and Alberto Bietti. Scaling laws for associative memories. In International Conference on Learning Representations, 2024.
Hugo Cui, Bruno Loureiro, Florent Krzakala, and Lenka Zdeborová. Generalization error rates in kernel regression: The crossover from the noiseless to noisy regime. In Advances in Neural Information Processing Systems, volume 34, 2021.
Łukasz Dębowski. A simplistic model of neural scaling laws: Multiperiodic Santa Fe processes, 2023.
Elvis Dohmatob, Yunzhen Feng, Pu Yang, Francois Charton, and Julia Kempe. A tale of tails: Model collapse as a change of scaling laws. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research. PMLR, 2024.
Leo Gao, Stella Biderman, Sid Black, Laurence Golding, Travis Hoppe, Charles Foster, Jason Phang, Horace He, Anish Thite, Noa Nabeshima, Shawn Presser, and Connor Leahy. The Pile: An 800GB dataset of diverse text for language modeling. arXiv preprint arXiv:2101.00027, 2020.
Marcus Hutter. Learning curve theory, 2021.
Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B. Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language models, 2020.
Frederik Kunstner and Francis Bach. Scaling laws for gradient descent and sign descent for linear bigram models under Zipf's law. In Advances in Neural Information Processing Systems, volume 38, 2025.
Bochen Lyu, Di Wang, and Zhanxing Zhu. A solvable attention for neural scaling laws. In International Conference on Learning Representations, 2025.
Alexander Maloney, Daniel A. Roberts, and James Sully. A solvable model of neural scaling laws, 2022.
Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. In International Conference on Learning Representations, 2017.
Eric Michaud, Ziming Liu, Uzay Girit, and Max Tegmark. The quantization model of neural scaling. In Advances in Neural Information Processing Systems, volume 36, 2023.
Yoonsoo Nam, Nayara Fonseca, Seok Hyeong Lee, Chris Mingard, and Ard A. Louis. An exactly solvable model for emergence and scaling laws in the multitask sparse parity problem. In Advances in Neural Information Processing Systems, volume 37, 2024.
Timothy Nguyen. Understanding transformers via N-gram statistics. In Advances in Neural Information Processing Systems, volume 37, 2024.
Ilia Shumailov, Zakhar Shumaylov, Yiren Zhao, Yarin Gal, Nicolas Papernot, and Ross Anderson. Ai models collapse when trained on recursively generated data. Nature, 631:755–759, 2024. doi: 10.1038/s41586-024-07566-y.
Appendix
Appendix A. Proof of Main Results
A.1. Proof of Proposition 1
As in the proposition, define , , and , where is the th row of the design matrix . For any candidate student model , one can write the loss as
Step 1: A Formula for Regret of any Student. Define an matrix M by setting
The th entry of is nothing but the (empirical) probability of observing the th token immediately after the th token. We can write , and so
But, by definition of . We deduce that
Since an unconstrained minimizer satisfies for all , we deduce that the regret of any is given by the following exact formula:
Step 2: Representation of the Optimal Student and Its Regret. We now restrict to students of the form for some . Let be the restriction of to the rows corresponding to observed tokens . Define
Then, the constrained estimator is , where minimizes
The normal equations for are . This gives
Note that is the orthogonal projection matrix onto the column space of . Defining , one has
We now marginalize of . We shall show that is diagonal. To this end, define
These scalars should be reminiscent of leverage scores in sketching methods. Let , with . Since commutes with (both being diagonal matrices), one has and so
On the other hand, due to the rotational invariance of the distribution of , we know that in distribution, and so
The above identity holds for any diagonal matrix with diagonal entries . For any , choose so that it flips the signs of the th but not the th row of . Then, , and so . We conclude that
This in turn gives
Now, one computes
where we have used the fact that for all because the 's are on-hot encodings, and for due to independence. under Assumption 1, we have , and so
Now, equals the rank of which is a.s. We deduce that , and so
Step 3: Random Matrix Theory. We now produce a deterministic equivalent for the random quantity . Observe that if , then the rank of is ; has full rank , and is therefore invertible a.s. Thus, for any , one has , where is row of corresponding to the th token.
We now use a leave-one-out (LOO) argument. Decompose the covariance matrix , where . The Sherman-Morrison formula gives
Plugging into the previous expression for and simplifying gives
The last step is because and are independent, so that . But (we have only removed one entry), and so we get
Now, by classical random matrix theory (RMT), it holds that for any , where the limiting Stieltjes transform satisfies the fixed-point equation
Defining , we have the equivalent formulation
In particular since , taking within , we get that satisfies the following fixed-point equation
This gives, , for all , and so
which completes the proof of Proposition 1.
A.2. Proof of Theorem 2
Proposition 1 already separates the contributions of limited representation and finite sampling. The remaining task is to replace the empirical frequencies by their population counterparts and understand how the resulting fixed point depends on the Zipf exponent.
To distinguish the two fixed points, write for the sample-dependent quantity in Proposition 1, and let solve
For , existence and uniqueness follow because the right-hand side is continuous and strictly decreasing from to zero. Throughout the proof, is fixed, , and either or .
We first analyze the population fixed point. Introduce
Then (27) becomes
The useful observation is that this sum is a Riemann approximation to the scalar function
Since the integrand is nonincreasing in t,
Meanwhile, the bias contribution has the exact representation
Thus all three scaling regimes follow from the behavior of and the normalization . When the width is proportional to the vocabulary size, , continuity and strict monotonicity imply
For sublinear width, , and (28) instead reduces the problem to the behavior of as .
For a subcritical exponent , the function is integrable on . Dominated convergence therefore gives
Together with , this immediately yields both subcritical laws. Indeed, if , then , and hence . For proportional width, the integral fixed point remains nontrivial, giving
At the critical exponent , the integral can be evaluated explicitly:
For , equations (28) and (30) give
The logarithmic factor changes more slowly than , so
Consequently,
Using in (29), we obtain
For proportional width, it is convenient to return to the discrete fixed point and set
This gives
In particular, the factor associated with this definition of is . An explicit expression is obtained by writing , where . The integral equation then reads
whose positive solution is
Thus, in the proportional-width regime,
The supercritical case has a different small- behavior. Substituting gives
The integral now converges as , with
Hence, for ,
Since , equation (29) becomes
This constant applies to sublinear width. If , the vocabulary cutoff remains relevant, and the corresponding law is
Equivalently, the dependence is still proportional to , but its prefactor also depends on .
It remains to justify replacing the empirical quantities in the proposition by those analyzed above. The sample-size assumption can be written as
Thus even the least frequent context has a diverging expected count. In particular,
Since eventually for some in both width regimes under consideration, the inequality
implies
The deterministic variance contribution is therefore
For sublinear width, this reduces to .
To handle the fixed point, define
Rather than requiring all empirical frequencies to concentrate uniformly, it is enough to control this aggregate. For every ,
The binomial variance bound gives
and hence
The population asymptotics also show that the root is stable under these perturbations. For any fixed ,
where . Each limit is greater than one for and smaller than one for . For any fixed , equation (32) therefore ensures that, with probability tending to one,
Monotonicity traps the empirical root between these two arguments:
Thus
Here, as in the proposition, when ; the preceding argument also shows that this event has vanishing probability in the regimes considered.
For an expectation over the sample, we need slightly more than convergence in probability. A useful feature of the fixed point is that its solution is concave in the frequency vector. Indeed, let denote the solution for a nonnegative vector , setting it to zero when has at most nonzero entries. For ,
with the continuous extension at . Because is jointly concave, this describes a convex hypograph. Jensen's inequality consequently gives
Together with (33), this implies relative convergence. To see this, put . Then , , and in probability, so
We can now return to Proposition 1. Writing its remainder as , the conditional expected regret is
where the expectation includes the next-token observations unless they have already been averaged in the definition of the regret. The estimates above show that the two displayed main terms equal
Therefore, provided the proposition’s approximation error satisfies , we conclude that
The three forms of B follow from the population fixed-point analysis, and the stated variance terms follow from (31).
The restriction is important: when , the quantity may be too small for the occupancy estimate above to give a relative approximation. At , however, the separate interpolation branch applies directly: , and both contributions vanish.