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

要約

大規模な言語モデル(LLM)は微調整を通じて新しい知識を獲得できますが、このプロセスは不可解な二重性を示します。モデルは新しい事実から著しく一般化できますが、誤った情報を幻覚に陥れやすいです。
ただし、この現象の理由はよく理解されていません。
この作業では、両方の動作は、概念の推論(OCR)として知られる単一のメカニズムに由来すると主張します。概念を関連付けることによって、因果関係のないものであっても、概念を関連付けることによって意味を推測する能力です。
5つの著名なLLMにまたがる実験では、OCRが実際に一般化と幻覚の両方を促進し、関連する概念が因果関係があるかどうかに応じて確認しています。
この現象の厳密な理論的理解を構築するために、OCRを合成事実のリコールタスクとして形式化します。
因数分解された出力と値行列を備えた1層のシングルヘッドの注意のみのトランスがこのタスクを解決することを学ぶことができる一方で、重みを組み合わせたモデルはマトリックス因数分解の重要な役割を強調することができないことを経験的に示します。
私たちの理論分析は、OCR能力が勾配降下の暗黙的なバイアスに起因する可能性があることを示しています。これは、統合された出力値マトリックスの核基準を最小限に抑えるソリューションを支持します。
この数学的構造は、相関が因果関係であるか単に偽物であるかに関係なく、モデルが事実と意味を高いサンプル効率と関連付けることを学ぶ理由を説明しています。
最終的に、私たちの研究は、OCR現象を理解するための理論的基盤を提供し、知識注入から望ましくない行動を分析し、軽減するための新しいレンズを提供します。

要約(オリジナル)

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.

arxiv情報

著者 Yixiao Huang,Hanlin Zhu,Tianyu Guo,Jiantao Jiao,Somayeh Sojoudi,Michael I. Jordan,Stuart Russell,Song Mei
発行日 2025-06-12 16:50:45+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL, cs.LG パーマリンク