arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2603.04464cs.LGcs.AI
收藏

理解上下文学习中演示冲突的动力学

Understanding the Dynamics of Demonstration Conflict in In-Context Learning

University of Toronto(多伦多大学);King Abdullah University of Science(卡布斯国王科学大学);Mohamed bin Zayed University of Artificial Intelligence(穆罕默德·本·扎耶德人工智能大学)

Difan Jiao, Di Wang, Lijie Hu

AI总结:

本研究探讨了上下文学习中演示冲突的处理机制,发现模型在冲突证据下表现出两阶段计算结构,通过注意力头分析揭示了模型对腐败证据的敏感性,并验证了针对性消融对性能提升的显著影响。

摘要:

在上下文学习中,大型语言模型能够通过少量示例执行新任务。然而,演示本身可能自然包含噪声和冲突的例子,使这种能力变得脆弱。为了理解模型如何处理此类冲突,我们研究了需要模型推断潜在模式的演示依赖任务,这一过程我们称为规则推断。我们发现,模型从单个包含损坏规则的演示中会遭受显著的性能下降。这种系统性的误导行为促使我们研究模型如何内部处理冲突证据。通过线性探针和logit镜头分析,我们发现,在腐败情况下,模型在中间层中编码了正确和错误的规则,但在晚期层中只发展出预测信心,揭示出一种两阶段的计算结构。我们随后为每个阶段识别了注意力头,以揭示推理失败的原因:早期到中期层中的易损头表现出位置注意力偏见,对腐败高度敏感;而晚期层中的易感头在遇到腐败证据时显著减少对正确预测的支持。针对的消融验证了我们的发现,掩码少量识别出的头可以将性能提高超过10%。

英文摘要:

In-context learning enables large language models to perform novel tasks through few-shot demonstrations. However, demonstrations per se can naturally contain noise and conflicting examples, making this capability vulnerable. To understand how models process such conflicts, we study demonstration-dependent tasks requiring models to infer underlying patterns, a process we characterize as rule inference. We find that models suffer substantial performance degradation from a single demonstration with corrupted rule. This systematic misleading behavior motivates our investigation of how models process conflicting evidence internally. Using linear probes and logit lens analysis, we discover that under corruption models encode both correct and incorrect rules in intermediate layers but develop prediction confidence only in late layers, revealing a two-phase computational structure. We then identify attention heads for each phase underlying the reasoning failures: Vulnerability Heads in early-to-middle layers exhibit positional attention bias with high sensitivity to corruption, while Susceptible Heads in late layers significantly reduce support for correct predictions when exposed to the corrupted evidence. Targeted ablation validates our findings, with masking a small number of identified heads improving performance by over 10%.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑