Extractive Structures Learned in Pretraining Enable Generalization on Finetuned Facts
Jiahai Feng, Stuart Russell, Jacob Steinhardt
摘要
Pretrained language models (LMs) can generalize to implications of facts that they are finetuned on. For example, if finetuned on "John Doe lives in Tokyo," LMs correctly answer "What language do the people in John Doe's city speak?" with "Japanese". However, little is known about the mechanisms that enable this generalization or how they are learned during pretraining. We introduce extractive structures as a framework for describing how components in LMs (e.g., MLPs or attention heads) coordinate to enable this generalization. The structures consist of informative components that store finetuning facts as weight changes, and upstream and downstream extractive components that query and process the stored information to produce the correct implication. We hypothesize that extractive structures are learned during pretraining when encountering implications of previously known facts. This yields two predictions: a data ordering effect where extractive structures can be learned only if facts precede their implications, and a weight grafting effect where extractive structures can be grafted to predict counterfactual implications. We empirically show these effects in the OLMo-7b, Llama 3-8b, Gemma 2-9b, and Qwen 2-7b models. Of independent interest, our results also indicate that fact learning can occur at both early and late layers, which lead to different forms of generalization. FIRST-HOP dataset Fact (Train) (John Doe lives in, Tokyo) Impl. (Test) (People in the city John Doe is from speak, Japanese
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 8 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- From Style to Facts: Mapping the Boundaries of Knowledge Injection with Finetuning 引用了 Locating and Editing Factual Associations in GPT
- From Style to Facts: Mapping the Boundaries of Knowledge Injection with Finetuning 引用了 The Reversal Curse: LLMs trained on "A is B" fail to learn "B is A"
- Deep sequence models tend to memorize geometrically; it is unclear why 引用了 Locating and Editing Factual Associations in GPT
- Deep sequence models tend to memorize geometrically; it is unclear why 引用了 Generalization or Hallucination? Understanding Out-of-Context Reasoning in Transformers
- Deep sequence models tend to memorize geometrically; it is unclear why 引用了 Dissecting Recall of Factual Associations in Auto-Regressive Language Models
- The Reversal Curse: LLMs trained on "A is B" fail to learn "B is A" 引用了 Locating and Editing Factual Associations in GPT
- The Reversal Curse: LLMs trained on "A is B" fail to learn "B is A" 引用了 Large Language Models Struggle to Learn Long-Tail Knowledge
- The Reversal Curse: LLMs trained on "A is B" fail to learn "B is A" 引用了 Dissecting Recall of Factual Associations in Auto-Regressive Language Models
- Rote Learning Considered Useful: Generalizing over Memorized Data in LLMs 引用了 The Reversal Curse: LLMs trained on "A is B" fail to learn "B is A"
- Rote Learning Considered Useful: Generalizing over Memorized Data in LLMs 引用了 How Do Large Language Models Acquire Factual Knowledge During Pretraining?
- Generalization or Hallucination? Understanding Out-of-Context Reasoning in Transformers 引用了 The Reversal Curse: LLMs trained on "A is B" fail to learn "B is A"
- How Do Large Language Models Acquire Factual Knowledge During Pretraining? 引用了 Large Language Models Struggle to Learn Long-Tail Knowledge
- How Do Large Language Models Acquire Factual Knowledge During Pretraining? 引用了 Dissecting Recall of Factual Associations in Auto-Regressive Language Models
引用它的顶会 Paper8
- Deep sequence models tend to memorize geometrically; it is unclear whyShahriar Noroozizadeh, Vaishnavh Nagarajan, Elan Rosenfeld, Sanjiv KumarICML 2026 · 11 次引用
- Generalization or Hallucination? Understanding Out-of-Context Reasoning in TransformersYixiao Huang, Hanlin Zhu, Tianyu Guo, Jiantao Jiao 等NeurIPS 2025 · 10 次引用
- From Style to Facts: Mapping the Boundaries of Knowledge Injection with FinetuningEric Zhao, Pranjal Awasthi, Nika HaghtalabNeurIPS 2025 · 8 次引用
- Rote Learning Considered Useful: Generalizing over Memorized Data in LLMsQinyuan Wu, Soumi Das, Mahsa Amani, Bishwamittra Ghosh 等ICLR 2026 · 6 次引用
- Fresh in memory: Training-order recency is linearly encoded in language model activationsDmitrii Krasheninnikov, Richard E. Turner, David KruegerICLR 2026 · 5 次引用
它引用的 Paper12
- Locating and Editing Factual Associations in GPTKevin Meng, David Bau, Alex Andonian, Yonatan BelinkovNeurIPS 2022 · 3,415 次引用
- Large Language Models Struggle to Learn Long-Tail KnowledgeNikhil Kandpal, Haikang Deng, Adam Roberts, Eric Wallace 等ICML 2023 · 623 次引用
- The Reversal Curse: LLMs trained on "A is B" fail to learn "B is A"Lukas Berglund, Meg Tong, Maximilian Kaufmann, Mikita Balesni 等ICLR 2024 · 462 次引用
- How Do Large Language Models Acquire Factual Knowledge During Pretraining?Hoyeon Chang, Jinho Park, Seonghyeon Ye, Sohee Yang 等NeurIPS 2024 · 124 次引用
- Dissecting Recall of Factual Associations in Auto-Regressive Language ModelsMor Geva, Jasmijn Bastings, Katja Filippova, Amir GlobersonEMNLP 2023 · 38 次引用
相关 Paper
- Dynamic Weight Grafting: Localizing Finetuned Factual Knowledge in TransformersTodd Nief, David Reber, Sean M. Richardson, Ari HoltzmanICLR 2026 · 3 次引用
- Emergence and Effectiveness of Task Vectors in In-Context Learning: An Encoder Decoder PerspectiveSeungwook Han, Jinyeop Song, Jeff Gore, Pulkit AgrawalICML 2025
- What Do Learning Dynamics Reveal About Generalization in LLM Mathematical Reasoning?Katie Kang, Amrith Setlur, Dibya Ghosh, Jacob Steinhardt 等ICML 2025
- Understanding Finetuning for Factual Knowledge ExtractionGaurav Rohit Ghosal, Tatsunori Hashimoto, Aditi RaghunathanICML 2024 · 36 次引用
- DeepStruct: Pretraining of Language Models for Structure PredictionChenguang Wang, Xiao Liu, Zui Chen, Haoyun Hong 等ACL Findings 2022 · 78 次引用
