Logit-Contribution Scoring Identifies Non-Literal Retrieval Heads

📄 arXiv: 2607.01002v1 📥 PDF

作者: Aryo Pradipta Gema, Beatrice Alex, Pasquale Minervini

分类: cs.CL, cs.AI, cs.LG

发布日期: 2026-07-01

备注: 41 pages, 18 figures


💡 一句话要点

提出Logit-Contribution评分以识别非字面检索头

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 长上下文理解 非字面检索 注意力机制 语言模型 模型可解释性

📋 核心要点

  1. 现有方法主要依赖字面复制标准,无法有效识别执行非字面检索的注意力头。
  2. 本文提出Logit-Contribution Scoring(LOCOS),通过关注输出值电路来评分每个头的贡献,识别非字面检索头。
  3. 在多个模型上进行的实验表明,LOCOS在识别非字面检索头方面优于传统方法,显著降低了ROUGE-L分数。

📝 摘要(中文)

在长上下文使用中,大型语言模型通常从相关上下文中合成答案,而非字面复制。识别执行此合成的注意力头对于理解长上下文模型的行为至关重要。现有检测器通过字面复制标准来评估头部,未能捕捉到非字面检索的机制。本文提出Logit-Contribution Scoring(LOCOS),一种关注写入的检测器,通过在单次前向传递中对每个头的输出进行评分,识别出非字面检索的特定头部。实验表明,LOCOS在多个模型上表现优异,显著降低了ROUGE-L分数,显示出其在检索特定任务中的有效性。

🔬 方法详解

问题定义:本文旨在解决现有方法无法有效识别执行非字面检索的注意力头的问题。现有检测器依赖于字面复制标准,未能捕捉到头部的输出值电路机制,导致识别不准确。

核心思路:LOCOS通过关注每个头的输出值电路,评分其在生成答案时的贡献。该方法设计旨在通过对比针头和非针头源位置,准确识别出执行非字面检索的头部。

技术框架:LOCOS的整体架构包括输入上下文的处理、注意力头的评分和输出的生成。通过单次前向传递,LOCOS能够高效地评估每个头的贡献。

关键创新:LOCOS的主要创新在于其关注写入的能力,能够识别出在生成过程中起关键作用的头部,与现有方法的字面复制标准形成鲜明对比。

关键设计:LOCOS的设计包括对每个头的输出进行评分,使用了特定的参数设置和损失函数,以确保能够准确反映头部在非字面检索中的作用。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,在Qwen3-8B模型上,去除50个LOCOS评分最高的头部后,ROUGE-L分数从0.401降至0.000,而最强基线仍保持在0.292,显示出LOCOS在识别非字面检索头方面的有效性和优势。

🎯 应用场景

该研究的潜在应用领域包括自然语言处理中的长文本理解、信息检索和对话系统等。通过识别非字面检索头,模型的可解释性和性能均可得到提升,未来可能对多种语言模型的优化和应用产生深远影响。

📄 摘要(原文)

In long-context use, large language models frequently synthesize answers from the meaning of a relevant context span rather than literally copy-pasting them. Identifying which attention heads perform this synthesis matters for interpreting long-context model behavior. Yet existing detectors miss these heads by construction: they reward heads whose attended token matches the generated token, a literal-copy criterion that captures where a head reads but not what it writes through its output-value (OV) circuit, the very mechanism that carries non-literal retrieval. We introduce Logit-Contribution Scoring (LOCOS), a write-aware detector that scores each head by the projection of its OV-circuit output onto the answer-token unembedding direction, contrasting needle and off-needle source positions in a single forward pass. Across three model families (Qwen3, Gemma-3, OLMo-3.1), mean-ablating the top LOCOS heads on the NoLiMa non-literal retrieval benchmark collapses ROUGE-L at lower head counts than prior attention-based detections; on Qwen3-8B, ablating 50 heads drives ROUGE-L from 0.401 to 0.000 while the strongest baseline still retains 0.292. The selected heads are retrieval-specific: parametric recall and arithmetic reasoning stay at baseline under the same ablation. On Qwen3-8B, the same ablation also drops MuSiQue from 0.55 to 0.08 and BABI-Long from 0.62 to 0.20, while a random-heads control stays within 0.05 of baseline.