arXiv:2602.19239stat.MLcs.LG2026-02

大模型算对答案却说错,根源是读取阶段选错了。

Attention Deficits in Language Models: Causal Explanations for Procedural Hallucinations

  • 发现错误源于读取阶段的路由失败,分门别类为门控和绑定两类错误。
  • 模型已计算出正确答案但未使用,在长上下文任务中99.8%的错误属绑定失败。
  • 通过重述答案位置可近乎消除错误,适合调试大模型推理缺陷的研究者。

大型语言模型虽能遵循复杂流程,却常在看似简单的最后一步出错:报告自己刚计算出的值。我们称此现象为“程序幻觉”——即使正确答案存在于上下文中,模型仍无法执行明确提示要求的步骤。在具有已知单标记候选集的长上下文绑定任务中,发现多数错误源于读取阶段的路由失败。具体分为两阶段:第2A阶段(门控)错误,模型未进入回答模式;第2B阶段(绑定)错误,模型进入回答模式但选择了错误候选(常因最近性偏差)。在困难场景下,第2B阶段错误占所有模型族任务中的绝大多数(表1)。在第2B错误案例中,对最终层残差流的线性探测可远高于随机水平恢复正确值(如Qwen2.5-3B达74%对比2%;表2),表明答案已被编码但未被使用。我们通过可用与使用互信息及伪先验干预形式化‘存在但未使用’,生成输出可计算诊断与信息预算证书。最终,通过在查询附近重置真实绑定的模拟检查点干预,可在长距离下几乎完全消除第2B阶段错误(如Qwen2.5-3B在k=1024时从400次中错误0/400降至399/400;表8)。

原文摘要 · Abstract (English)

Large language models can follow complex procedures yet fail at a seemingly trivial final step: reporting a value they themselves computed moments earlier. We study this phenomenon as \emph{procedural hallucination}: failure to execute a verifiable, prompt-grounded specification even when the correct value is present in context. In long-context binding tasks with a known single-token candidate set, we find that many errors are readout-stage routing failures. Specifically, failures decompose into Stage~2A (gating) errors, where the model does not enter answer mode, and Stage~2B (binding) errors, where it enters answer mode but selects the wrong candidate (often due to recency bias). In the hard regime, Stage~2B accounts for most errors across model families in our tasks (Table~1). On Stage~2B error trials, a linear probe on the final-layer residual stream recovers the correct value far above chance (e.g., 74\% vs.\ 2\% on Qwen2.5-3B; Table~2), indicating that the answer is encoded but not used. We formalize ``present but not used'' via available vs.\ used mutual information and pseudo-prior interventions, yielding output-computable diagnostics and information-budget certificates. Finally, an oracle checkpointing intervention that restates the true binding near the query can nearly eliminate Stage~2B failures at long distance (e.g., Qwen2.5-3B $0/400 \rightarrow 399/400$ at $k = 1024$; Table~8).

大模型推理错误注意力缺陷幻觉分析

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。