Original post · AI translation
标题:“侵入路径:非证据性上下文如何降低语言模型的性能”
英伟达及其他实验室的一篇新论文表明,无关文本造成的损害主要在于削弱模型对问题的利用,而非直接压制正确答案。
RAG、工具使用和长上下文应用中的提示词常常包含与问题毫无关系的文本。即使是“计算机很有用”这样一句话,也会降低模型对正确答案的支持程度。
他们在开放模型内部追踪了这一现象,发现了“侵入注意力头”:一小组读取无关文本并削弱答案的注意力头。屏蔽这些注意力头对上下文的注意力,不会影响利用有用证据的注意力头。
在 7B 规模模型的 4 项任务中,屏蔽约 10 个注意力头,平均恢复了因干扰文本而损失的准确率的 57%。一种需要匹配的无干扰运行结果的理想修复方法恢复了 97.6%。
如果你使用含有噪声的检索上下文来提供开放权重模型服务,对少数特定于模型的注意力头施加无需训练的屏蔽,就能挽回大部分损失的准确率。
Original
New Nvidia + other labs paper shows that irrelevant text hurts mainly by weakening the model's use of the question, not by directly pushing against the right answer. Prompts in RAG, tool use, and long-context apps often carry text that has nothing to do with the question. Even a line like "Computers are useful" lowers a model's support for the right answer. They traced this inside open models and found intrusion heads, a small set of attention heads that read the unrelated text and weaken the answer. Masking those heads' attention to the context leaves the heads that use helpful evidence untouched. Across 4 tasks on 7B-scale models, masking about 10 heads recovered 57% of the accuracy lost to distractors on average. An oracle fix that needs a matching clean run recovered 97.6%. If you serve open-weight models with noisy retrieved context, a training-free mask on a few model-specific heads can win back much of the lost accuracy.