TL;DR
Researchers have identified three distinct phases in how language models learn to compare entities during pretraining: first relying on frequency (picking the most common entity), then position (picking the first or last mentioned), and finally the correct algorithm. By manipulating training data statistics, the authors demonstrate that these learning dynamics are causally driven by the data's distribution and that small-scale synthetic experiments can accurately predict the behavior of models as large as 32 billion parameters.
What Problem Does This Paper Address?
Large Language Models (LLMs) often rely on "heuristics"—clever-looking shortcuts—rather than actual reasoning. For example, when asked "Which country is larger, France or Brazil?", a model might pick France simply because it appeared more frequently in its training data, or because it was mentioned first in the prompt.
While we know these biases exist in finished models, we don't fully understand how or when they emerge during the pretraining process. This paper investigates the relationship between pretraining data statistics (like how often an entity is mentioned) and the specific "learning phases" a model goes through as it moves from simple pattern matching to actual task competence.
Methods
The authors combined controlled small-scale training with observations of large-scale open-source models:
- Controlled Pretraining: They trained 163M-parameter GPT-2 style models from scratch using mixtures of natural text (from the OLMo-2 corpus) and synthetic task-specific data.
- Regression Analysis: At every training checkpoint, they used a logistic regression model to "probe" the LM's outputs. They tested which features—Entity Frequency (how often the entity appeared in training), Position (first vs. second in the prompt), or Value (the actual ground truth, like country area)—best predicted the model's choice.
- Data Interventions: They systematically varied the ratio of synthetic task data and the distribution of entity frequencies (changing from a natural, heavy-tailed Zipfian distribution to a Uniform one) to see how these changes altered the learning phases.
- Scaling Validation: They applied the same analysis to the OLMo-2 family (1B to 32B parameters) to see if the phases observed in small models held true at scale.
Datasets
- OLMo-mix-1124: A subset of the fully open-source pretraining corpus used for the OLMo-2 models.
- Synthetic Comparison Tasks: Nine tasks spanning five entity types:
- Countries: Area, GDP.
- U.S. States: Area, Population.
- Universities: Endowment, Founding Year, Student Population.
- Movies: Release Year, Box Office.
- People: Birth Year.
- OLMo-2 Checkpoints: Pre-trained checkpoints for 1B, 7B, 13B, and 32B models.
Key Insights and Ideas
- The Three-Phase Pipeline: Learning isn't a smooth climb; it happens in stages. Models first learn the easiest statistical signal (frequency), then move to structural patterns (position), and only learn the "hard" factual comparison last.
-
Frequency as a Causal Driver: The initial frequency phase is a direct result of the Zipfian distribution of natural language (where a few words are extremely common and most are rare). Figure 1: The three phases of learning (Frequency, Position, Correct Algorithm) across different model scales.
-
The "Critical Density" Threshold: Models only reach the third phase (the correct algorithm) if they are exposed to enough task-relevant data. Below a certain threshold, they get "stuck" in the positional heuristic phase forever.
- Uniformity Speeds Up Learning: By flattening the entity frequency distribution (making rare entities as common as frequent ones), the authors could weaken the frequency bias phase and help the model learn the actual task faster.
- Predictive Power of Small Models: The fact that 163M models and 32B models exhibit the same phases suggests that researchers can use cheap, small-scale synthetic experiments to debug and understand the training dynamics of massive models.
Key Results
- Phase Consistency: In the 32B OLMo-2 model, the frequency heuristic dominates at the very first checkpoint (9B tokens), followed by a positional bias, with the correct algorithm emerging around 400B tokens.
-
Frequency vs. Truth: In early training, accuracy is high only when the correct answer is also the more frequent entity. If the correct answer is the rare entity, the model consistently fails until the later phases. Figure 2: Country frequency in the OLMo-2 corpus follows a Zipfian distribution, which correlates with attributes like area.
-
Data Ratio Impact: Increasing synthetic task data from 0.1% to 1% caused the model to "jump" directly from the frequency phase to the correct algorithm, effectively skipping the positional heuristic phase.
Limitations and Future Work
- Task Scope: The study focuses specifically on entity comparison. It remains to be seen if these three phases (Frequency -> Position -> Algorithm) generalize to other types of reasoning, like logic or math.
- Observational Scaling: While the authors proved causality in small models by manipulating data, their findings in the 32B model are purely observational since they couldn't re-train a 32B model from scratch with modified data.
- Mechanistic Origins: The authors suggest future work should investigate why these specific phases occur—for example, whether the positional bias is linked to the formation of "induction heads" in the transformer architecture.
Summary updated