[论文解读] Overthinking the Truth: Understanding how Language Models Process False Demonstrations
本文研究了语言模型在 few-shot 学习中如何错误地模仿虚假示范,识别出两个关键现象:'过度思考'(overthinking),即在接收到错误示例后,模型在某个临界层之后性能下降;以及'虚假归纳头'(false induction heads)——晚期层中特定的注意力头,会复制错误的模式。通过移除这些注意力头,平均在14个数据集上将有害模仿减少了38.9%,且未对正确示范下的性能造成损害。
Modern language models can imitate complex patterns through few-shot learning, enabling them to complete challenging tasks without fine-tuning. However, imitation can also lead models to reproduce inaccuracies or harmful content if present in the context. We study harmful imitation through the lens of a model's internal representations, and identify two related phenomena: "overthinking" and "false induction heads". The first phenomenon, overthinking, appears when we decode predictions from intermediate layers, given correct vs. incorrect few-shot demonstrations. At early layers, both demonstrations induce similar model behavior, but the behavior diverges sharply at some "critical layer", after which the accuracy given incorrect demonstrations progressively decreases. The second phenomenon, false induction heads, are a possible mechanistic cause of overthinking: these are heads in late layers that attend to and copy false information from previous demonstrations, and whose ablation reduces overthinking. Beyond scientific understanding, our results suggest that studying intermediate model computations could be a promising avenue for understanding and guarding against harmful model behaviors.
研究动机与目标
- 理解语言模型如何从虚假 few-shot 示范中复制不准确信息。
- 探究导致大语言模型有害上下文跟随行为的内部机制。
- 定位模型推理过程中错误模仿出现的时间与位置。
- 识别负责传播错误模式的具体注意力头。
- 评估移除这些注意力头是否能在不损害正确任务性能的前提下减少有害模仿。
提出的方法
- 在多个 NLP 任务中,通过对比正确与错误 few-shot 示范下模型行为的差异进行分析。
- 从中间残差流层解码,追踪推理过程中预测准确率的演变。
- 识别出性能在正确与错误示范之间出现剧烈分化的'临界层'。
- 使用激活修补和注意力头移除技术,隔离并测试特定注意力头对模型行为的影响。
- 通过分层测量校准准确率,量化过度思考现象及干预措施的效果。
- 在包括 SST-2、Financial-Phrasebank 和 TweetEval 在内的14个多样化数据集上验证研究发现。
实验结果
研究问题
- RQ1在推理的哪个阶段,模型在接收到正确与错误示范后开始出现性能差异?
- RQ2哪些内部模型组件负责传播来自示范的错误模式?
- RQ3是否可以通过早期层干预或注意力头移除来减少有害模仿,同时不影响对正确示例的性能?
- RQ4模型在推理过程中,其内部对正确性的表征如何随层的变化而演变?
- RQ5识别并移除'虚假归纳头'在多大程度上能缓解过度思考并提升模型鲁棒性?
主要发现
- 模型表现出'过度思考'现象——在错误示范下,性能在临界层之后下降,而在正确示范下性能持续提升,表明模型在后期阶段无法纠正错误。
- 性能分化的临界层出现在早期表征已形成之后,表明早期处理对示范质量具有鲁棒性。
- 虚假归纳头——晚期层中关注并复制示范中错误信息的注意力头——是导致过度思考的主要机制原因。
- 仅移除5个此类注意力头(占总注意力头的1%),即可在14个数据集上平均将正确与错误示范之间的准确率差距减少38.9%。
- 该干预措施在面对正确示范时对性能影响可忽略不计,表明可针对性地缓解有害行为。
- 研究结果表明,中间层的模型计算是可解释性与安全干预的可行目标,后续工作已将这些洞见应用于检测提示注入攻击。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。