Paper commentary
Pretraining Data Statistics Shape the Phases of Learning Entity Comparison in Language Models
Pretraining data frequency decides which shortcuts a language model learns first
- Problem Accuracy alone cannot show whether a language model answers country comparisons by real reasoning or by shortcuts like entity frequency and prompt position. Those shortcuts can land on the right answer by accident.
- Method The authors train small 163M-parameter models on controlled mixes of natural text and synthetic comparison data. At each checkpoint, a logistic regression on frequency, position and true value shows which strategy the model uses.
- Results With 0% or 0.01% synthetic data, models never reached the correct comparison algorithm. Flattening the entity frequency distribution weakened the frequency phase and sped up learning of the task.

Figure 1 : (a) An example of the entity comparison task we use to disentangle the three candidate strategies. The task requires comparing the areas of two countries; the correct answer is Brazil in the given example. However, if the model relies on positional or frequency bias, it would predict France. (b) The importance of each strategy across training checkpoints, measured by the decrease in accuracy when the feature for that strategy is removed.The frequency heuristic (orange) is most predictive of LM behavior in the earliest checkpoints, but is quickly taken over by the positional heuristic (blue), and the correct algorithm (green) appears in late training.The three-phase structure appears in both the small controlled setting and the large-scale natural text pretraining setting of OLMo-2 models, up to 32B parameters.
Original paper · CC BY 4.0 · Yik Siu Chan, Jing Huang, Yanai Elazar, Atticus Geiger · Pretraining Data Statistics Shape the Phases of Learning Entity Comparison in Language Models · Original paper figure · Extracted the figure area from page 2 of the original PDF.Why shortcuts hide what a model learned
A model can answer a country comparison without performing the comparison at all. Prompt position and how often each entity appears in training are cheaper signals that can land on the right answer by accident. So a single accuracy number doesn't reveal which strategy the model uses at a given checkpoint.
The frequency signal isn't arbitrary, because natural text is Zipfian, with a few entities mentioned very often and most rarely. In the OLMo-2 pretraining data, China appears 441M times, while Luxembourg appears only 6.8M times. Across 215 countries and territories in the OLMo-2-13B corpus, mention frequency tracks land area with a log-log Pearson's r of 0.62.
That correlation makes the more frequent country a usable guess for the larger one, which a model could learn.
The authors fit a logistic regression on three handpicked features: frequency, position and true value. The frequency feature is the log ratio of the cumulative occurrences of the two entities up to step t. The value feature is the log ratio of the true values, and it is the only one predictive of the ground truth answer.
The authors ask when different strategies emerge and disappear during training. They also ask how entity frequency in the pretraining data shapes that timing. Their analysis identifies three phases, moving from frequency to position to the correct answer.
A controlled pretraining setup
The authors train GPT-2-scale models with 163M parameters from scratch, so they can track every checkpoint. The architecture has 12 layers, 12 heads and 768-dim embeddings, and each model trains for two epochs with three random seeds. Training data is tokenized with the allenai/dolma2-tokenizer, which matches the OLMo-2 models, so token-level frequency counts stay comparable.
The pretraining tasks are country area, country GDP and people birth year, while OLMo-2 is evaluated on all nine tasks.
The synthetic sentences act as scaffolding that stands in for the task signal larger LMs absorb from massive corpora. Synthetic data is needed because a small model with natural text alone never picks up the comparison behavior. Training and evaluation use the full entity set, so the model could memorize the comparisons. To test this, an extra run holds out 20% of entity pairs from the synthetic data.
At each checkpoint, the authors extract the teacher-forced logits of the first generated token where the two entities differ. They turn those logits into a binary output distribution over the two entities and measure per-pair accuracy. Counts of entity occurrences and co-occurrences are taken up to each saved checkpoint, using the BatchSearch method adapted from Merullo et al.
(2025). For entities with several name variants, such as U.S.A. and United States, the authors add counts across all aliases. A regression model on these features then reveals which strategy the model uses at each checkpoint.
Reading strategies from each checkpoint
The key idea is to fit a small set of predictors to the model's choices at each checkpoint and see which predictor carries the fit. Logistic regression is the tool here, and it predicts the LM's output from handpicked features, each tied to one heuristic or to the correct algorithm. Figure 1 shows the candidate strategies on the country question and the importance of each one across checkpoints.
The authors tried a wide range of features in preliminary experiments, but the best fit used only frequency, position, and true value.
The frequency feature is the log ratio of the cumulative counts of the two entities up to step t. The authors expect this feature to dominate early in training, before the model has enough exposure to the relevant entities.
Every entity pair is evaluated in both orders, so entity-specific biases such as frequency, scalar value, or tokenization get counterbalanced across positions. The intercept therefore isolates the model's residual preference for a prompt position, and Appendix B.2 verifies this.
It is the only one of the three features that predicts the ground truth, so a model that depends on it has learned the task. The authors expect this feature to emerge late in training.
The regression uses an L1 penalty, which keeps only the most predictive features, and all features are standardized before fitting. The regularization strength is chosen with 5-fold cross-validation, and the reported accuracy is the mean across the five folds. Drop-one accuracy measures how much accuracy falls when one feature is removed from the predictor set.
The feature with the largest drop-one accuracy marks the dominant phase at that checkpoint.
Synthetic data ratio and the correct algorithm
The authors vary the synthetic share at 0%, 0.01%, 0.1% and 1% of a fixed budget of 1.1B tokens. The synthetic sentences follow the Zipfian distribution, so they resemble naturally occurring text. The frequency phase is nearly the same at all four ratios, peaking around step 200 and decaying by step 1K. So the amount of task data does not change the first phase.
The real difference is whether the model ever reaches the correct algorithm. At 0% and 0.01% the correct-algorithm feature stays near zero, while at 0.1% it appears around 2.5K steps. The authors read this as a threshold, where a model won't override an existing shortcut without enough task signal, which corroborates Gu et al. (2025) and Verma et al.
(2025).
The position phase shrinks as the synthetic share rises. At 0% and 0.01% the model settles into a strong positional bias that lasts through the rest of training. At 0.1% a shorter position phase still sits between the frequency and the correct-algorithm phases. At 1% the position phase is absent, and the model moves straight from frequency to solving the task.
Entity distribution and the frequency phase
Flattening the entity distribution tests whether the frequency phase depends on how often each entity appears in the data. The authors cross Zipfian and uniform distributions for natural text and synthetic data on country area and country GDP. Uniform sampling picks sequences with country or people mentions, aiming for roughly equal mentions per entity.
Person birth year is reported separately in Appendix C.2.
When the natural text is Zipfian, the early frequency phase is strong whatever the synthetic distribution. Switching the natural text to uniform makes that phase much weaker for both tasks. With both natural and synthetic data uniform, the frequency phase nearly disappears. Figure 4 shows the same frequency, position, and correct algorithm ordering across both tasks, averaged over 3 seeds.

Figure 4 : Learning trajectories for country area (left) and country GDP (right) across four combina- tions of natural text and synthetic data distributions (Zipfian × Uniform).Both tasks show the same frequency, position, correct algorithm ordering. The frequency phase is strongest when natural text is Zipfian.Solid lines and shaded regions show mean and standard deviation across 3 seeds.
Original paper · CC BY 4.0The correct algorithm follows the opposite pattern, with its strongest emergence when both distributions are uniform. In that uniform setting it emerges earliest and reaches its largest drop-one accuracy. With both distributions Zipfian, the correct algorithm is at its weakest. Flattening the distribution therefore speeds up learning of the task while weakening the frequency phase.
The frequency bias doesn't vanish, though, so the authors group entity pairs by the ratio of correct to incorrect frequency. Late in training, accuracy stays higher on pairs where the correct answer is the more frequent entity. The next section checks whether the same three phases appear in OLMo-2 models trained on natural text.
Checking the phases in OLMo-2
The authors ask whether the same three phases show up in OLMo-2 models trained on natural text alone, with no synthetic task supervision. They run the same regression analysis as in Section 2 and evaluate 26 checkpoints per model, mostly from stage 1. Coverage is dense early, every 1K steps from 1K to 10K, and sparser with log-spaced checkpoints afterward.
Each checkpoint is scored with 3 prompt templates, and the mean and standard deviation are reported across them. The analysis has two parts: the country area task across all four sizes, then the 32B model across all nine tasks.
Across all four sizes, the frequency phase appears before the position phase. The frequency heuristic shows up briefly at the earliest checkpoint of every model. The 1B and 7B models then stay in a long position phase and never learn the task. The authors suspect the first public checkpoint already sits several billion tokens into training, which may hide a stronger early frequency phase.
Only the 13B and 32B models learn the correct algorithm, at 1T tokens and 400B tokens respectively. The authors draw a parallel with the synthetic threshold, where the correct algorithm fails below a critical density of task supervision. They attribute the gap to sparse task signal in natural text relative to the capacity of the 1B and 7B models.

Figure 7 : Dominant phase for OLMo-2 32B across all 18 task variants at four stage-1 checkpoints (9B, 84B, 1T, and 5T tokens). Each cell is colored by the feature with the largest drop-one accuracy at that checkpoint, and the number is that feature’s drop-one accuracy (%). Left: larger-magnitude comparisons; right: smaller-magnitude comparisons.Frequency dominates the earliest checkpoint for most variants, and later phases largely follow the frequency–position–value structure.
Original paper · CC BY 4.0At the first checkpoint, 9B tokens, frequency dominates 15 of the 18 variants. That count includes 8 of the 9 smaller-magnitude variants, where choosing the more frequent entity is typically incorrect. Phases can be skipped, but when two become dominant they keep the frequency, position, value order. Figure 7 shows the dominant phase at four checkpoints, 9B, 84B, 1T, and 5T tokens.
Limitations of the entity comparison study
The results rest on one task, so the phase order may not carry over to tasks with different structure. The controlled experiments run at the 163M scale, because larger pretraining runs would be infeasible under the compute budgets the authors had. The toy setting still gives insight into much larger models, which the authors call an interesting finding.
Changing the country distribution from Zipfian to uniform requires re-selecting sequences that contain the target entities.
They also ask whether latent representations exist that track entity frequency.
Paper info
- Authors
- Yik Siu Chan, Jing Huang, Yanai Elazar, Atticus Geiger
- Venue
- arXiv · Preprint
- First published
- 2026-11-12
- Added
- 2026-11-13
- Updated
- 2026-11-12
- Version
- v1
- arXiv
- 2611.16882
- Category
- cs.CL · cs.LG
- Original paper terms
- CC BY 4.0
- What we show
- Paper info, commentary and permitted figures from the original paper
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Abstract
How does data shape language model (LM) behavior throughout pretraining? We investigate this question through a case study on entity comparison, e.g., Between France and Brazil, which country is larger?, across nine comparison tasks spanning five entity types. We begin with controlled experiments in which we train small LMs (163M parameters) on mixtures of natural text from pretraining corpora and synthetic task data. Our analysis identifies three distinct phases of learning: (1) an early phase where the LM selects entities by frequency, (2) a middle phase where the LM selects entities by position in the prompt (first vs. last mentioned entity), and (3) a late phase where the LM selects the entity that is the correct answer. We show that the emergence of these three phases is causally determined by statistical properties of the training data. With small amounts of task-specific synthetic data, we observe only the first two phases and the model fails to learn the task; with large amounts, the model jumps directly from the frequency-based heuristic to solving the task correctly. Moreover, changing the entity frequency distribution from a naturally occurring Zipfian distribution (a small number of entities are very common and the vast majority are rare) to a uniform one weakens the frequency phase and speeds up learning of the task. Lastly, we show that the three phases of training dynamics from our controlled experiments appear in the open source model OLMo-2 32B. Together, our findings demonstrate that properties of pretraining data are causal drivers of heuristic learning and show that small-scale synthetic experiments can predict training dynamics at larger scales.
Quote from the paper
Yik Siu Chan, Jing Huang, Yanai Elazar, Atticus Geiger (2026). Pretraining Data Statistics Shape the Phases of Learning Entity Comparison in Language Models. arXiv:2611.16882v1. https://arxiv.org/abs/2611.16882v1
BibTeX
@misc{chan2026pretraining,
title = {{Pretraining Data Statistics Shape the Phases of Learning Entity Comparison in Language Models}},
author = {Yik Siu Chan and Jing Huang and Yanai Elazar and Atticus Geiger},
year = {2026},
eprint = {2611.16882},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2611.16882v1}
}