Facts in Stats: Impacts of Pretraining Diversity on Language Model Generalization
Not on the map. Why?
Abstract (arXiv)
Language models are pretrained on sequences that blend statistical regularities (making text fluent) with factual associations between specific tokens (knowledge of facts). While recent work suggests that the variability of their interaction, such as paraphrases of factual associations, critically determines generalization ability, we lack a systematic analysis of these impacts. This paper introduces a flexible synthetic testbed that combines a statistical stream of generic tokens with an abstract factual stream of source-target token pairs, enabling fine-grained control over their interaction. The design enables the independent control of diversity nature by manipulating stream composition (contextual structure) and the diversity level by varying which statistical streams each fact appears in. Through controlled experiments, we find that while higher contextual diversity delays in-distribution (ID) factual accuracy, its impact on out-of-distribution (OOD) factual generalization depends critically on contextual structure. In some cases, OOD performance follows the same trend as ID, but in others, diversity becomes essential for non-trivial factual recall. Even when low diversity prohibits factual recall, optimal diversity levels depend on training duration. Beyond factual recall failures, we identify structures where statistical generalization fails independently, and others where both capabilities degrade. This shows how the interplay between contextual design and diversity level impacts different generalization aspects. Further, through a series of controlled interventions on the model components, we trace the OOD failures to distinct optimization bottlenecks, highlighting the importance of the embedding and unembedding layers. Our synthetic framework allows us to isolate effects that would be confounded in large-scale studies, offering a controlled testbed for future investigations.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 35 of its 39 references that are in the map. First posted on arXiv 17 Oct 2025.
Builds on
35 of 39 references.
References · 35
- 2022Locating and Editing Factual Associations in GPTcited by 2,691
- 2019Language Models as Knowledge Bases?cited by 1,936
- 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,336
- 2022When Not to Trust Language Models: Investigating Effectiveness of Parametric and Non-Parametric Memoriescited by 1,128
- 2023Progress measures for grokking via mechanistic interpretabilitycited by 839
- 2020How Much Knowledge Can You Pack Into the Parameters of a Language Model?cited by 719
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 715
- 2022Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasetscited by 629
- 2021Knowledge Neurons in Pretrained Transformerscited by 601
- 2023Dissecting Recall of Factual Associations in Auto-Regressive Language Modelscited by 528
- 2022Large Language Models Struggle to Learn Long-Tail Knowledgecited by 458
- 2022Last Layer Re-Training is Sufficient for Robustness to Spurious Correlationscited by 381
23 more
- 2023Physics of Language Models: Part 3.1, Knowledge Storage and Extractioncited by 270
- 2023Head-to-Tail: How Knowledgeable are Large Language Models (LLMs)? A.K.A. Will LLMs Replace Knowledge Graphs?cited by 168
- 2023Birth of a Transformer: A Memory Viewpointcited by 161
- 2023Teaching Arithmetic to Small Transformerscited by 123
- 2024The Evolution of Statistical Induction Heads: In-Context Learning Markov Chainscited by 118
- 2023Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformercited by 102
- 2024How Do Large Language Models Acquire Factual Knowledge During Pretraining?cited by 90
- 2021Probing Across Time: What Does RoBERTa Know and When?cited by 73
- 2024Synthetic continued pretrainingcited by 60
- 2022Measuring Causal Effects of Data Statistics on Language Model's `Factual' Predictionscited by 57
- 2024Competition Dynamics Shape Algorithmic Phases of In-Context Learningcited by 54
- 2024Understanding Factual Recall in Transformers via Associative Memoriescited by 51
- 2023ChatGPT versus Traditional Question Answering for Knowledge Graphs: Current Status and Future Directions Towards Knowledge Graph Chatbotscited by 47
- 2022How Pre-trained Language Models Capture Factual Knowledge? A Causal-Inspired Analysiscited by 42
- 2024Attention with Markov: A Framework for Principled Analysis of Transformers via Markov Chainscited by 40
- 2025How do language models learn facts? Dynamics, curricula and hallucinationscited by 37
- 2024Mechanics of Next Token Prediction with Self-Attentioncited by 34
- 2024Interpreting Key Mechanisms of Factual Recall in Transformer-Based Language Modelscited by 31
- 2024Transformers on Markov Data: Constant Depth Sufficescited by 27
- 2022Towards Tracing Factual Knowledge in Language Models Back to the Training Datacited by 21
- 2024Distributional Associations vs In-Context Reasoning: A Study of Feed-forward and Attention Layerscited by 12
- 2024Learning and Transferring Sparse Contextual Bigrams with Linear Transformerscited by 9
- 2025Do All Autoregressive Transformers Remember Facts the Same Way? A Cross-Architecture Analysis of Recall Mechanismscited by 3
Built on by
Citing papers per year: 2026: 3.
3 papers.
- 2026Outcome-Based RL Provably Leads Transformers to Reason, but Only With the Right Datacited by 6
- 2026Understanding Contextual Recall in Transformers: How Finetuning Enables In-Context Reasoning over Pretraining Knowledgecited by 3
- 2026Structure Before Collapse: Transient semantic geometry in next-token predictioncited by 2
- 2026Structure Before Collapse: Transient semantic geometry in next-token prediction25 Jun 2026
- 2026Understanding Contextual Recall in Transformers: How Finetuning Enables In-Context Reasoning over Pretraining Knowledge21 Mar 2026
- 2026Outcome-Based RL Provably Leads Transformers to Reason, but Only With the Right Data21 Jan 2026