Lune

NeurIPS2025顶会

Generalization or Hallucination? Understanding Out-of-Context Reasoning in Transformers

Yixiao Huang, Hanlin Zhu, Tianyu Guo, Jiantao Jiao, Somayeh Sojoudi, Michael I. Jordan, Stuart J. Russell, Song Mei

摘要

Large language models (LLMs) can acquire new knowledge through fine-tuning, but this process exhibits a puzzling duality: models can generalize remarkably from new facts, yet are also prone to hallucinating incorrect information. However, the reasons for this phenomenon remain poorly understood. In this work, we argue that both behaviors stem from a single mechanism known as out-of-context reasoning (OCR): the ability to deduce implications by associating concepts, even those without a causal link. Our experiments across five prominent LLMs confirm that OCR indeed drives both generalization and hallucination, depending on whether the associated concepts are causally related. To build a rigorous theoretical understanding of this phenomenon, we then formalize OCR as a synthetic factual recall task. We empirically show that a one-layer single-head attention-only transformer with factorized output and value matrices can learn to solve this task, while a model with combined weights cannot, highlighting the crucial role of matrix factorization. Our theoretical analysis shows that the OCR capability can be attributed to the implicit bias of gradient descent, which favors solutions that minimize the nuclear norm of the combined output-value matrix. This mathematical structure explains why the model learns to associate facts and implications with high sample efficiency, regardless of whether the correlation is causal or merely spurious. Ultimately, our work provides a theoretical foundation for understanding the OCR phenomenon, offering a new lens for analyzing and mitigating undesirable behaviors from knowledge injection.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 6 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Deep sequence models tend to memorize geometrically; it is unclear why 引用了 Birth of a Transformer: A Memory Viewpoint
  • Implicit Regularization in Deep Learning May Not Be Explainable by Norms 引用了 Gradient Descent Maximizes the Margin of Homogeneous Neural Networks
  • Emergence of Superposition: Unveiling the Training Dynamics of Chain of Continuous Thought 引用了 Birth of a Transformer: A Memory Viewpoint
  • Emergence of Superposition: Unveiling the Training Dynamics of Chain of Continuous Thought 引用了 Breaking the Reversal Curse in Autoregressive Language Models via Identity Bridge
  • Breaking the Reversal Curse in Autoregressive Language Models via Identity Bridge 引用了 Emergence of Superposition: Unveiling the Training Dynamics of Chain of Continuous Thought
  • Breaking the Reversal Curse in Autoregressive Language Models via Identity Bridge 引用了 The Reversal Curse: LLMs trained on "A is B" fail to learn "B is A"
  • Breaking the Reversal Curse in Autoregressive Language Models via Identity Bridge 引用了 Gradient Descent Maximizes the Margin of Homogeneous Neural Networks
  • Learning to Recall with Transformers Beyond Orthogonal Embeddings 引用了 Birth of a Transformer: A Memory Viewpoint
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper6

  1. Emergence of Superposition: Unveiling the Training Dynamics of Chain of Continuous ThoughtHanlin Zhu, Shibo Hao, Zhiting Hu, Jiantao Jiao 等ICLR 2026 · 21 次引用
  2. Deep sequence models tend to memorize geometrically; it is unclear whyShahriar Noroozizadeh, Vaishnavh Nagarajan, Elan Rosenfeld, Sanjiv KumarICML 2026 · 11 次引用
  3. Breaking the Reversal Curse in Autoregressive Language Models via Identity BridgeXutao Ma, Yixiao Huang, Hanlin Zhu, Somayeh SojoudiICML 2026 · 2 次引用
  4. Why Deep Jacobian Spectra Separate: Depth-Induced Scaling and Singular-Vector AlignmentNathanaël Haas, François Gatine, Augustin Cosse, Zied BouraouiICML 2026 · 1 次引用
  5. Learning to Recall with Transformers Beyond Orthogonal EmbeddingsNuri Mert Vural, Alberto Bietti, Mahdi Soltanolkotabi, Denny WuICLR 2026 · 1 次引用

它引用的 Paper29

  1. 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 次引用
  2. Gradient Descent Maximizes the Margin of Homogeneous Neural NetworksKaifeng Lyu, Jian LiICLR 2020 · 402 次引用
  3. When Not to Trust Language Models: Investigating Effectiveness of Parametric and Non-Parametric MemoriesAlex Mallen, Akari Asai, Victor Zhong, Rajarshi Das 等ACL 2023 · 233 次引用
  4. Birth of a Transformer: A Memory ViewpointAlberto Bietti, Vivien Cabannes, Diane Bouchacourt, Hervé Jégou 等NeurIPS 2023 · 182 次引用
  5. Implicit Regularization in Deep Learning May Not Be Explainable by NormsNoam Razin, Nadav CohenNeurIPS 2020 · 178 次引用

相关 Paper

  1. Connecting the Dots: LLMs can Infer and Verbalize Latent Structure from Disparate Training DataJohannes Treutlein, Dami Choi, Jan Betley, Samuel Marks 等NeurIPS 2024
  2. When Do Hallucinations Arise? A Graph Perspective on the Evolution of Path Reuse and Path CompressionXinnan Dai, Kai Yang, cheng Luo, Shenglai Zeng 等ICML 2026
  3. Understanding New-Knowledge-Induced Factual Hallucinations in LLMs: Analysis and InterpretationRenfei Dang, Peng Hu, Zhejian Lai, Changjiang Gao 等ACL Findings 2026
  4. Does Fine-Tuning LLMs on New Knowledge Encourage Hallucinations?Zorik Gekhman, Gal Yona, Roee Aharoni, Matan Eyal 等EMNLP 2024 · 53 次引用
  5. Why LLMs Hallucinate on Structured Knowledge: A Mechanistic Analysis of Reasoning over Linearized RepresentationsShanghao Li, Jinda Han, Yibo Wang, Yuanjie Zhu 等ACL 2026
黄昏的海面,两侧是细线勾勒的悬崖