Skip to content

Statistical properties of pretraining data shape the stages of language model learning of entity comparisonPretraining Data Statistics Shape the Phases of Learning Entity Comparison in Language Models

arXiv· arXiv:2611.16882· Yik Siu Chan, Jing Huang, Yanai Elazar, Atticus GeigerUniversity of Maryland; Pr(Ai)2 R Group; Stanford University; Bar-Ilan University; GoodfireIndexed by this site · 10 days ago· Originally publishedAlignment

Quick read

Analysis and theory

Based on the paper PDF (AI-generated); refer to the original

The authors used controlled pretraining of a 163M small model to find that entity comparison learning proceeds in three stages—frequency, position, correct algorithm—and claim data distribution is its cause; the same order also appears on OLMo-2 32B.

Questions
How do the statistical properties of pretraining data drive language model learning dynamics? Using an entity comparison task as a case study, the authors study when models adopt heuristic strategies such as frequency and position rather than the correct algorithm during training.
Methods
Train a 163M GPT-2-scale model from scratch, mixing natural text with synthetic task data; use logistic regression drop-one accuracy to track the predictive power of three features—frequency, position, and ground truth—over model outputs at each checkpoint, and manipulate the synthetic data proportion and the entity frequency distribution (Zipfian/uniform).
Experiments and results
Learning proceeds in three stages: first answering by entity frequency, then by position in the prompt, and only finally learning the correct comparison. When synthetic task data is below a critical proportion, the model stalls at the position heuristic; uniformizing the frequency distribution weakens the frequency stage. The authors state that the same order appears on OLMo-2 13B and 32B, while 1B and 7B never learn the task.
Limitations and future work
The authors note: conclusions are limited to the entity comparison task; controlled experiments are only at the 163M scale; the data effects on OLMo-2 are only correlational evidence; uniformizing the distribution requires reselecting sequences, which may introduce domain shift. Future work includes investigating the mechanisms of each heuristic (e.g., the relationship between position bias and induction heads).
Experimental setupGPT-2-scale models (163M parameters, trained from scratch)、OLMo-2 1B et al. · OLMo-mix-1124、entity comparison tasks (9 tasks, 18 variants) · drop-one accuracy、per-pair accuracy et al.
Evaluated models
GPT-2-scale models (163M parameters, trained from scratch)OLMo-2 1BOLMo-2 7BOLMo-2 13BOLMo-2 32B
Benchmarks
OLMo-mix-1124entity comparison tasks (9 tasks, 18 variants)
Metrics
drop-one accuracyper-pair accuracydominant phase
AI summaryYik Siu Chan and other researchers trained a 163M-parameter small language model on a mixture of natural text and synthetic task data in the pretraining corpus, and found that learning of entity comparison tasks exhibits three stages, with each stage causally determined by the statistical properties of the training data. The study designed 9 comparison tasks across 5 types of entities (such as "which country is larger, France or Brazil"), and the three stages are, in order, selecting entities by frequency, selecting by the entity's position in the prompt, and selecting the correct answer. When the amount of synthetic task data is small, the model exhibits only the first two stages and fails to learn the task; when the amount of data is large, it jumps directly from the frequency heuristic to correct solving; changing the entity frequency distribution from the natural Zipf distribution (a few entities are extremely common and the vast majority are rare) to a uniform distribution weakens the frequency stage and accelerates learning. The same three-stage training dynamics also appeared in the open-source model OLMo-2 32B, and the authors state that these findings indicate that pretraining data properties are a causal driver of heuristic learning, and that small-scale synthetic experiments can predict larger-scale training dynamics.

Yik Siu Chan and other researchers trained a 163M-parameter small language model on a mixture of natural text and synthetic task data in the pretraining corpus, and found that learning of entity comparison tasks exhibits three stages, with each stage causally determined by the statistical properties of the training data. The study designed 9 comparison tasks across 5 types of entities (such as "which country is larger, France or Brazil"), and the three stages are, in order, selecting entities by frequency, selecting by the entity's position in the prompt, and selecting the correct answer. When the amount of synthetic task data is small, the model exhibits only the first two stages and fails to learn the task; when the amount of data is large, it jumps directly from the frequency heuristic to correct solving; changing the entity frequency distribution from the natural Zipf distribution (a few entities are extremely common and the vast majority are rare) to a uniform distribution weakens the frequency stage and accelerates learning. The same three-stage training dynamics also appeared in the open-source model OLMo-2 32B, and the authors state that these findings indicate that pretraining data properties are a causal driver of heuristic learning, and that small-scale synthetic experiments can predict larger-scale training dynamics.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    How do the statistical properties of pretraining data causally drive LM learning dynamics? A controlled case study using an entity comparison task.

    Core question: How do the statistical properties of pretraining data shape language model behavior and learning dynamics throughout pretraining?

    • Research setting: The authors use entity comparison as a case study—given two entities and a numerical attribute (such as country area), select the larger or smaller one. The correct approach requires retrieving the scalar attributes of both entities and performing a numerical comparison, but the model may instead use simpler heuristics.
    • Why it matters (per the authors): Models may rely on shortcuts such as the position of the answer in the prompt, or how frequently the answer is mentioned in the training data; understanding when these strategies emerge and what data properties drive them is an important direction for interpretability research.
    • Gaps in existing work (per the paper): Prior analyses of heuristics and mixed strategies were conducted on static, fully trained checkpoints; the authors instead study the learning trajectory itself, asking when each heuristic emerges during training and what data properties drive its emergence.
    • Core observation: Entity mention frequencies in natural corpora follow a Zipfian long-tail distribution (a few entities are high-frequency, most are low-frequency), and frequency correlates with certain attributes (e.g., country frequency and area have a log-log Pearson r = 0.62, Figure 2b), making "choose the more frequently mentioned entity" a viable shortcut.
    • What the paper proposes: A controlled pretraining framework—training a 163M GPT-2-scale model from scratch, mixing natural text with synthetic task data, and using regression methods to track the dominant strategy at each checkpoint; and validating on OLMo-2 (1B–32B) checkpoints whether the stage structure also appears in natural pretraining.
  2. What related research exists?

    Related research falls into three groups: heuristics and task strategies, the influence of pretraining data, and training stages and dynamics; this paper turns to the learning trajectory itself.

    Heuristics and task strategies

    • McCoy et al. (2019), Razeghi et al. (2022), Nikankin et al. (2025), Yang et al. (2025)—find shortcuts in natural language inference, arithmetic reasoning, and multi-hop reasoning; Mallen et al. (2023), Kandpal et al. (2023) find that entity popularity predicts whether factual recall is correct.
    • Lehmann et al. (2026)—closest to this paper's setting, studies entity comparison on fully trained LLMs and identifies three heuristic biases that affect predictions.
    • Wu et al. (2025), Gur-Arieh et al. (2025), Pîslar et al. (2025), Todd et al. (2025)—characterize LM behavior as a mixture of multiple strategies rather than a single mechanism. The paper notes that these analyses all operate on static checkpoints, whereas this paper studies the learning trajectory.

    Pretraining data

    • Wang et al. (2025) measure the correlation between LLM output probabilities and the frequency of task-related n-grams in pretraining data; Razeghi et al. (2022), He et al. (2025), Kandpal et al. (2023), Mallen et al. (2023) trace model biases and failures to asymmetries in entity frequency.
    • Wei et al. (2021), Chan et al. (2022), Allen-Zhu and Li (2024) directly intervene on training data composition to make causal claims; Nadkarni et al. (2025) provide methods for document-level intervention; Longpre et al. (2024) systematically study the effects of data age, domain coverage, and quality. The authors state that this paper builds on this intervention methodology.

    Training stages and dynamics

    • Olsson et al. (2022), Singh et al. (2024)—the formation of induction heads coincides with loss drops and the emergence of in-context learning; Chen et al. (2024), Saphra and Lopez (2019) study abrupt changes and stages during pretraining.
    • Tigges et al. (2024)—attention heads implementing the same algorithm can be replaced over training; Hakimi et al. (2025)—components can shift from general-purpose to task-specific.
    • Zucchet et al. (2025)—closest to this paper's setting, finds that factual recall emerges in stages and that more balanced training data can shorten the plateau before exact recall; Chang et al. (2024) study the acquisition and forgetting of factual knowledge during pretraining; Gu et al. (2025) study phase transitions induced by data mixing proportions.

    Positioning: The authors state that this paper extends the "stages and training dynamics" perspective to natural pretraining data statistics, identifying entity distribution as a causal driver of the emergence of heuristic stages. The paper has no comparison baseline methods; the analysis subjects are the authors' self-trained 163M model and the public OLMo-2 series checkpoints.

  3. How does the paper address this problem?

    Train a 163M model from scratch and manipulate the data, using logistic regression drop-one accuracy to track the dominant strategy at each checkpoint.

    Overall approach: pretrain small models from scratch in a controlled setting, systematically manipulate two properties of the training data (the proportion of synthetic task data and the entity frequency distribution), use regression analysis to identify which strategy best predicts model outputs at each checkpoint, and then verify the stage structure on public OLMo-2 checkpoints.

    Task and Data Setup

    • Task formalization: an entity comparison task is defined by a triple (d, e1, e2), where d is a numeric attribute domain and each entity-domain pair has a scalar value vd,e; the correct algorithm is A(d, e1, e2) = max(vd,e1, vd,e2), i.e., returning the entity with the higher value. There are 9 tasks and 5 entity types (countries, U.S. states, U.S. universities, movies, people), each task has two directions, "larger" and "smaller", for 18 variants in total (Appendix A).
    • Training data: natural text is taken from the OLMo-2 pretraining corpus OLMo-mix-1124; because a 163M-scale model cannot learn long-tail facts from natural text alone, the authors add synthetic comparison sentences identical to the evaluation templates as scaffolding. The total data budget is fixed at 1.1B tokens, and the synthetic data proportion takes 0%, 0.01%, 0.1%, 1% (Table 4 gives the token split for each run).
    • Model and training: GPT-2 architecture (12 layers, 12 heads, 768 dimensions), 163M parameters, trained from scratch for each data mixture, tokenized with allenai/dolma2-tokenizer to align with OLMo-2; trained for 2 epochs with 3 random seeds, saving a checkpoint every 200 steps (Appendix C).

    Strategy Identification: Regression and Drop-One Accuracy

    • Three features: the frequency feature is the log ratio of the two entities' cumulative occurrence counts, log(countt(e1)/countt(e2)); the position feature is represented by the regression intercept (each entity pair is evaluated in both orders, so entity-level biases cancel out; validated in Appendix B.2); the value feature is log(vd,e1/vd,e2), the only feature related to the correct answer.
    • Regression model: p̂ = σ(w⊤ ϕ(d, e1, e2)) predicts the probability that the model chooses e1, with L1 regularization, regularization strength selected by 5-fold cross-validation, and standardized features; this formula means using logistic regression to predict the LM's binary choice from handcrafted features.
    • Metric: drop-one accuracy—the decrease in regression accuracy after removing a feature from the feature set; a larger decrease means the feature is more important for explaining model behavior; the dominant stage of a checkpoint is defined as the stage corresponding to the feature with the largest drop-one accuracy at that point.

    Data Intervention Experiments

    • Synthetic data proportion: with both natural and synthetic data fixed as Zipfian, only the synthetic proportion is varied (0%–1%), to observe whether the three stages appear.
    • Frequency distribution: with the synthetic proportion fixed at 0.1%, the entity distributions of natural text and synthetic data are each changed from Zipfian to uniform (reselecting sequences containing the target entities so that mention counts are roughly uniform), giving 2×2 = four conditions; the main experiments are run on country area and country GDP, with person birth year in Appendix C.2. Table 5 reports the Gini coefficient for each condition (e.g., OLMo-mix-1124 reference value 0.772, all-uniform condition 0.031).
    • Memorization check: another model is trained with 1% synthetic data, but the synthetic sentences cover only a random 80% of country pairs, with the remaining 20% (4,644/23,220 pairs) used only as holdout evaluation (Appendix B.5).

    OLMo-2 Analysis

    • The same regression analysis is performed on public checkpoints of OLMo-2 1B/7B/13B/32B: 26 checkpoints per model, one every 1K steps from 1K–10K and logarithmically spaced thereafter; 3 prompt templates per checkpoint, reporting mean and standard deviation (Appendix D).
    • In addition, the first 1,000 steps of OLMo-2 1B are retrained from random initialization following the official recipe, to check whether the frequency stage precedes the first public checkpoint (Appendix D.1).
  4. What experiments did the paper conduct?

    The 163M controlled experiment confirms the three stages and their data causes; on OLMo-2, 13B/32B exhibit the three stages, while 1B/7B stall at the position heuristic.

    Experimental Setup

    • Models tested: the authors' self-trained GPT-2-scale 163M model (3 seeds per data mixture); OLMo-2 1B, 7B, 13B, 32B (public checkpoints, 26 per model).
    • Tasks: 9 entity comparison tasks × 2 directions = 18 variants; the 163M pretraining experiments used 3 tasks (country area, country GDP, person birth year), and OLMo-2 used all tasks.
    • Data: natural text is a subset of OLMo-mix-1124; synthetic data matches the evaluation templates; total budget about 1.1B tokens (Table 4).
    • Metrics: drop-one accuracy (the decrease in regression accuracy at predicting LM outputs after removing a feature), per-pair accuracy, dominant stage.
    • Evaluation method: no LLM judge; model choice is determined by teacher-forced logits at the first differing token of the two entities, and each entity pair is evaluated in both orders.
    • Repetitions: 3 seeds per condition in the 163M experiments; 3 prompt templates per checkpoint for OLMo-2.

    Main Results

    Dominant stage of OLMo-2 32B on the 18 task variants (cell numbers are the drop-one accuracy % of the feature of that stage, per Figure 7; F=frequency, P=position, V=value):

    Swipe horizontally to read the table

    Task variant9B84B1T5T
    Country area (larger)F 3.7F 3.5V 15.2V 19.4
    U.S. state area (larger)F 3.5P 11.3V 17.5V 29.8
    Person birth year (larger)F 8.4P 32.7F 1.3V 29.6
    Movie box office (larger)F 2.6F 4.1P 7.9V 9.1
    University founding year (larger)F 4.9P 13.3P 8.2V 5.1
    Country area (smaller)F 3.6P 8.5P 9.4V 17.9
    Movie box office (smaller)F 3.2F 1.5P 13.5V 29.7
    University founding year (smaller)F 5.1P 6.8P 14.2V 26.7

    (18 variants in total; this table omits 10; these include the weakest-performing category—e.g., U.S. state population (larger) has V of only 4.5 at 5T, and University endowment (smaller) has V of only 3.5 at 5T; see Figure 7 for the full data.)

    • Frequency dominates at the earliest checkpoint: at 9B tokens, 15 of the 18 variants are dominated by the frequency stage, including 8 of the 9 smaller-direction variants (in that direction, choosing the higher-frequency entity is usually wrong); the authors take this to indicate that the early stage reflects entity frequency statistics rather than partial task knowledge.
    • Order preserved, stages can be skipped: the authors state that which stages appear varies by task, but as long as two stages successively become dominant, they basically follow the order frequency→position→value.
    • Scale effects: OLMo-2 13B transitions to the correct algorithm stage at about 1T tokens, and 32B at about 400B tokens; the value feature of 1B and 7B stays near zero throughout, and the authors state that they never learn the task (Figure 6).

    Critical Effect of Synthetic Data Proportion (163M Model)

    • Frequency stage unaffected by synthetic proportion: Figure 3 shows that under all four proportions (0%, 0.01%, 0.1%, 1%), the frequency stage peaks at around step 200 and fades at around step 1K.
    • Correct algorithm requires a critical density: at 0% and 0.01%, the value feature stays near zero throughout, and the model converges to a persistent position bias; at 0.1%, the correct algorithm stage appears at about 2.5K steps; at 1%, it appears within the first 1K steps, drop-one accuracy reaches 18 at the end of training, and the position stage disappears, with the model jumping directly from the frequency stage to correct problem solving.
    • Authors' interpretation: the authors believe there is a critical density—below it, the loss reduction from learning the task is insufficient to outweigh the existing shortcut (citing Gu et al., 2025; Verma et al., 2025).

    Frequency Distribution Interventions and Memorization Checks

    • Zipfian natural text drives the frequency stage: Figure 4 shows that when natural text is Zipfian, both tasks (country area, GDP) have a strong early frequency stage, independent of the synthetic data distribution; when natural text is uniform, this stage is much weaker, and when both are uniform it almost disappears.
    • The correct algorithm shows the opposite pattern: when both distributions are uniform, the correct algorithm appears earliest and drop-one accuracy is largest; when both are Zipfian, it is weakest.
    • Frequency bias is not fully eliminated: Figure 5 groups by "correct entity frequency / incorrect entity frequency"; early in training, accuracy is high only when the correct answer's frequency is clearly higher; this bias weakens with training, but later in training, entity pairs whose correct answer is more frequent still have higher accuracy.
    • Holdout experiment: with 1% Zipfian synthetic data, 20% of country pairs (4,644/23,220) do not appear in the synthetic data; Figure 16 shows that the value feature on holdout pairs rises later in training to a level comparable to same-distribution pairs, and the authors take this to mean that the correct algorithm stage is not a product of memorization.

    Other Ablations and Analyses

    • OLMo-2 1B retrained from scratch (Appendix D.1, Table 7): within the first 1,000 steps, 7 of the 9 tasks are dominated by the frequency stage from step 200 onward; movie box office and state population show value dominance, but the authors consider this more likely noise than genuine task ability (the 1B model's end-of-training accuracy on these two tasks remains low).
    • Position feature validation (Appendix B.2, Table 3): at checkpoints with high position drop-one accuracy, most entity pairs fall into the two categories "always choose the first" or "always choose the second" (e.g., people birth year 84B checkpoint: second 72.5%); when the position feature is weak, most pairs fall into "correct in both orders" (country area 5T: 78.1%).
    • Feature-subset regression (Appendix B.3/B.4, Figure 8–15): regression is fitted for each non-empty subset of {P,F,V} and compared with the full P+F+V regression, to confirm that the three features already explain model behavior.
    • Person birth year task (Appendix C.2, Figure 18): the early frequency stage is strong when synthetic data is Zipfian (up to about 1,000 steps), and weakens when synthetic data is uniform; the authors' possible explanation is that people are mentioned far fewer times than countries in natural text (in Zipfian natural text, people at most 9,598 times and at least 0 times; countries at most 165,998 times and at least 26 times).
  5. What are some points that can be further explored?

    The authors list limitations such as a single task, limited scale, and no causal evidence on large models; future work will investigate the mechanisms of each heuristic.

    Limitations and Future Directions Noted by the Authors

    • Single task family (Discussion/Limitations): the experiments focus on entity comparison tasks, and the observed stage structure may not generalize to tasks with different structure.
    • Scale of the controlled experiments (Discussion/Limitations): the intervention experiments are conducted at the 163M scale, in order to vary data composition under feasible compute; the authors also state that it is itself an interesting finding that small-scale toy settings can provide insight into large-model training dynamics.
    • No causal evidence at large scale (Discussion/Limitations): the OLMo-2 analysis shows the same stages appear at larger scale, but the authors cannot establish causal evidence for the role of data at large scale.
    • Confounders in the distribution interventions (Discussion/Limitations): changing the entity distribution from Zipfian to uniform requires reselecting sequences containing the target entities (e.g., excluding U.S. politics sequences, selecting Madagascar fruit sequences), which may introduce uncontrolled confounders such as domain shift; the authors state there is currently no direct solution and this remains an open research question (citing Nadkarni et al., 2025).
    • Future directions at the mechanism level (Discussion/Future work): the authors plan to clarify the underlying mechanism of each heuristic and trace the origin of the three-stage order more fully, for example whether position bias depends on induction-head-style in-context retrieval, whether it correlates with the time at which induction heads form, and whether there is a latent representation that tracks entity frequency.

    Scope of the Experiments

    • The models tested are the authors' self-trained 163M GPT-2-scale model and OLMo-2 1B, 7B, 13B, 32B, 5 in total; 26 checkpoints are evaluated per OLMo-2 model (Section 4).
    • The tasks cover 9 entity comparison tasks and 18 variants; the 163M pretraining intervention experiments use only 3 of them (country area, country GDP, person birth year, the latter in Appendix C.2).
    • The 163M experiments use 3 random seeds per condition; OLMo-2 uses 3 prompt templates per checkpoint (Section 2, Section 4).
    • Causal interventions (changing the synthetic proportion, changing the frequency distribution) are performed only on the 163M model; on OLMo-2 there is only observational regression analysis (Section 3, Section 4).
    • The paper does not report statistical significance tests; the OLMo-2 analysis covers only stage-1 pretraining (Section 4).
  6. Summarize the main content of the paper

    Entity comparison learning proceeds in three stages—frequency, position, correct algorithm—which the authors claim data distribution causally drives; the same also appears on a 32B model.

    An analysis paper on pretraining learning dynamics: using an entity comparison task as a case study, it studies how data statistical properties determine which strategy a model adopts during training.

    • Problem: When comparing the numerical attributes of two entities, the model may take shortcuts—choosing the entity that appears more frequently in training, or the entity at a particular position in the prompt—rather than performing the correct numerical comparison. The authors ask when these strategies emerge and what data properties drive them.
    • Method: Train a 163M GPT-2-scale model from scratch, mixing OLMo-mix-1124 natural text with synthetic comparison sentences; use logistic regression drop-one accuracy to track the explanatory power of three features—frequency, position, and ground truth—over model outputs at each checkpoint; manipulate the synthetic data proportion (0%–1%) and the entity frequency distribution (Zipfian/uniform).
    • Three stages: Learning passes through three stages in sequence: the frequency heuristic (peaking around step 200), the position heuristic, and the correct algorithm; when synthetic data is below a critical proportion (0%, 0.01%), the model stalls at position bias, while at 1% the position stage disappears and the ground-truth feature's drop-one accuracy reaches 18 at the end of training (Figure 3).
    • Causal role of data distribution: When natural text has a Zipfian distribution, the frequency stage is strong; after uniformization, the frequency stage weakens and the correct algorithm appears earlier and stronger (Figure 4); a holdout experiment (20% of entity pairs unseen) rules out a pure memorization explanation (Figure 16).
    • Scaling validation: OLMo-2 13B (about 1T tokens) and 32B (about 400B tokens) transition to the correct algorithm stage; at the 9B tokens checkpoint, 32B is dominated by the frequency stage in 15 of 18 variants; 1B and 7B never learn the task (Figures 6, 7).
    • Authors' conclusion: The authors state that pretraining data statistics are a causal driver of heuristic learning and a controllable research lever; the long-tail distribution of natural corpora may impose a real cost on downstream task acquisition, and uniformizing heavy-tailed distributions can make learning more efficient. The authors also acknowledge that conclusions are limited to the entity comparison task, and that the data effects on large models are only correlational evidence.
Read originalarxiv.org