NVIDIA 与多家实验室联合发表论文,发现 RAG 和长上下文提示词中的无关文本主要通过削弱模型对问题的利用来降低表现,并定位到了特定的“入侵头”(intrusion heads)。在 7B 参数规模模型的 4 项任务测试中,无需重新训练、仅掩码约 10 个注意力头即可平均挽回 57% 因干扰项损失的准确率,而理想状态下的 Oracle 修复可挽回 97.6%。
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.
来源:Rohan Paul · x.com