Dissecting Recall of Factual Associations in Auto-Regressive Language Models
Mor Geva, Jasmijn Bastings, Katja Filippova, Amir Globerson
摘要
Transformer-based language models (LMs) are known to capture factual knowledge in their parameters. While previous work looked into where factual associations are stored, only little is known about how they are retrieved internally during inference. We investigate this question through the lens of information flow. Given a subject-relation query, we study how the model aggregates information about the subject and relation to predict the correct attribute. With interventions on attention edges, we first identify two critical points where information propagates to the prediction: one from the relation positions followed by another from the subject positions. Next, by analyzing the information at these points, we unveil a three-step internal mechanism for attribute extraction. First, the representation at the lastsubject position goes through an enrichment process, driven by the early MLP sublayers, to encode many subject-related attributes. Second, information from the relation propagates to the prediction. Third, the prediction representation "queries" the enriched subject to extract the attribute. Perhaps surprisingly, this extraction is typically done via attention heads, which often encode subject-attribute mappings in their parameters. Overall, our findings introduce a comprehensive view of how factual associations are stored and extracted internally in LMs, facilitating future research on knowledge localization and editing. 1
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 223 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Function Vectors in Large Language Models 引用了 Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Space
- Function Vectors in Large Language Models 引用了 Analyzing Transformers in Embedding Space
- The Reversal Curse: LLMs trained on "A is B" fail to learn "B is A" 引用了 Fast Model Editing at Scale
- The Reversal Curse: LLMs trained on "A is B" fail to learn "B is A" 引用了 Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Space
- Towards Best Practices of Activation Patching in Language Models: Metrics and Methods 引用了 Progress measures for grokking via mechanistic interpretability
- Towards Best Practices of Activation Patching in Language Models: Metrics and Methods 引用了 Does Localization Inform Editing? Surprising Differences in Causality-Based Localization vs. Knowledge Editing in Language Models
- Towards Best Practices of Activation Patching in Language Models: Metrics and Methods 引用了 Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Space
- Towards Best Practices of Activation Patching in Language Models: Metrics and Methods 引用了 Analyzing Transformers in Embedding Space
- Does Localization Inform Editing? Surprising Differences in Causality-Based Localization vs. Knowledge Editing in Language Models 引用了 Fast Model Editing at Scale
- Does Localization Inform Editing? Surprising Differences in Causality-Based Localization vs. Knowledge Editing in Language Models 引用了 Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Space
- HippoRAG: Neurobiologically Inspired Long-Term Memory for Large Language Models 引用了 Language Models Represent Space and Time
- HippoRAG: Neurobiologically Inspired Long-Term Memory for Large Language Models 引用了 Fast Model Editing at Scale
- Analyzing Transformers in Embedding Space 引用了 Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Space
引用它的顶会 Paper223
- 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 次引用
- HippoRAG: Neurobiologically Inspired Long-Term Memory for Large Language ModelsBernal Jimenez Gutierrez, Yiheng Shu, Yu Gu, Michihiro Yasunaga 等NeurIPS 2024 · 395 次引用
- Language Models Represent Space and TimeWes Gurnee, Max TegmarkICLR 2024 · 303 次引用
- Towards Best Practices of Activation Patching in Language Models: Metrics and MethodsFred Zhang, Neel NandaICLR 2024 · 233 次引用
- Function Vectors in Large Language ModelsEric Todd, Millicent L. Li, Arnab Sen Sharma, Aaron Mueller 等ICLR 2024 · 229 次引用
它引用的 Paper10
- Fast Model Editing at ScaleEric Mitchell, Charles Lin, Antoine Bosselut, Chelsea Finn 等ICLR 2022 · 527 次引用
- Does Localization Inform Editing? Surprising Differences in Causality-Based Localization vs. Knowledge Editing in Language ModelsPeter Hase, Mohit Bansal, Been Kim, Asma GhandehariounNeurIPS 2023 · 307 次引用
- Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary SpaceMor Geva, Avi Caciularu, Kevin Ro Wang, Yoav GoldbergEMNLP 2022 · 92 次引用
- Progress measures for grokking via mechanistic interpretabilityNeel Nanda, Lawrence Chan, Tom Lieberum, Jess Smith 等ICLR 2023 · 54 次引用
- Analyzing Transformers in Embedding SpaceGuy Dar, Mor Geva, Ankit Gupta, Jonathan BerantACL 2023 · 36 次引用
相关 Paper
- Linearity of Relation Decoding in Transformer Language ModelsEvan Hernandez, Arnab Sen Sharma, Tal Haklay, Kevin Meng 等ICLR 2024 · 163 次引用
- Do All Autoregressive Transformers Remember Facts the Same Way? A Cross-Architecture Analysis of Recall MechanismsMinyeong Choe, Haehyun Cho, Changho Seo, Hyunil KimEMNLP 2025
- Factual Retrieval in LLMs Is a Redundant, Distributed and Non-Contiguous ProcessHail Hochman, Natalie Shapira, Yoav GoldbergACL 2026
- A Mechanistic Interpretation of Arithmetic Reasoning in Language Models using Causal Mediation AnalysisAlessandro Stolfo, Yonatan Belinkov, Mrinmaya SachanEMNLP 2023 · 11 次引用
- Relation Also Knows: Rethinking the Recall and Editing of Factual Associations in Auto-Regressive Transformer Language ModelsXiyu Liu, Zhengxiao Liu, Naibin Gu, Zheng Lin 等AAAI 2025 · 4 次引用
