We provide causal mechanistic validation that in-context learning (ICL) decomposes into two separable mechanisms: Task Schema (abstract task type recognition) and Binding (specific input-output associations). Through activation patching experiments across 9 models from 7 Transformer families plus Mamba (370M-13B parameters), we establish three key findings: 1. Double dissociation: Task Schema transfers at 100% via late MLP patching; Binding transfers at 62% via residual stream patching -- proving separable mechanisms 2. Prior-Schema trade-off: Schema reliance inversely correlates with prior knowledge (Spearman rho = -0.596, p < 0.001, N=28 task-model pairs) 3. Architecture generality: The mechanism operates across all tested architectures including the non-Transformer Mamba These findings offer a mechanistic account of the ICL puzzle that contrasts with prior views treating ICL as a monolithic mechanism (whether retrieval-based, gradient descent-like, or purely Bayesian). By establishing that Schema and Binding are neurally dissociable -- not merely behavioral modes -- we provide causal evidence for dual-process theories of ICL. Models rely on Task Schema when prior knowledge is absent, but prior knowledge interferes through attentional mis-routing (72.7% recency bias) rather than direct output competition (0%). This explains why arbitrary mappings succeed (zero prior leads to full Schema reliance) while factual overrides fail -- and reveals that the true bottleneck is attentional, not output-level. Practical implications: Understanding these dual mechanisms enables more efficient prompt engineering -- reliable schema transfer reduces required demonstrations for novel tasks, while prior-aware design can mitigate the 38% binding failure rate in high-prior scenarios, improving ICL system reliability in production deployments.


翻译:我们通过因果机制验证表明,上下文学习(ICL)可分解为两种可分离的机制:任务模式(抽象任务类型识别)与绑定(特定输入-输出关联)。通过对7个Transformer系列及Mamba架构共9个模型(参数量370M-13B)的激活修补实验,我们确立了三个关键发现:1. 双重分离:任务模式通过后期MLP修补实现100%迁移;绑定通过残差流修补实现62%迁移——证明机制可分离 2. 先验-模式权衡:模式依赖性与先验知识呈负相关(Spearman ρ = -0.596, p < 0.001, N=28个任务-模型对) 3. 架构普适性:该机制在所有测试架构中均成立,包括非Transformer的Mamba模型。这些发现为ICL难题提供了机制性解释,与先前将ICL视为单一机制(无论是基于检索、类梯度下降还是纯贝叶斯)的观点形成对比。通过证实模式与绑定在神经层面可分离——而非仅仅是行为模式——我们为ICL的双过程理论提供了因果证据。当先验知识缺失时,模型依赖任务模式;但先验知识会通过注意力误路由(72.7%近因偏差)而非直接输出竞争(0%)产生干扰。这解释了为何任意映射能成功(零先验导致完全模式依赖)而事实覆盖会失败,并揭示真正的瓶颈在于注意力层面而非输出层面。实践意义:理解这两种双重机制可实现更高效的提示工程——可靠模式迁移能减少新任务所需的演示示例,而先验感知设计可缓解高先验场景下38%的绑定失败率,从而提升生产部署中ICL系统的可靠性。

0
下载
关闭预览

相关内容

[ICML2024]消除偏差:微调基础模型以进行半监督学习
专知会员服务
17+阅读 · 2024年5月23日
专知会员服务
31+阅读 · 2020年12月14日
【NeurIPS 2020】基于因果干预的小样本学习
专知会员服务
70+阅读 · 2020年10月6日
AAAI 2022 | ProtGNN:自解释图神经网络
专知
10+阅读 · 2022年2月28日
图机器学习 2.2-2.4 Properties of Networks, Random Graph
图与推荐
10+阅读 · 2020年3月28日
CosFace: Large Margin Cosine Loss for Deep Face Recognition论文笔记
统计学习与视觉计算组
44+阅读 · 2018年4月25日
读论文Discriminative Deep Metric Learning for Face and KV
统计学习与视觉计算组
12+阅读 · 2018年4月6日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
17+阅读 · 2008年12月31日
VIP会员
相关资讯
AAAI 2022 | ProtGNN:自解释图神经网络
专知
10+阅读 · 2022年2月28日
图机器学习 2.2-2.4 Properties of Networks, Random Graph
图与推荐
10+阅读 · 2020年3月28日
CosFace: Large Margin Cosine Loss for Deep Face Recognition论文笔记
统计学习与视觉计算组
44+阅读 · 2018年4月25日
读论文Discriminative Deep Metric Learning for Face and KV
统计学习与视觉计算组
12+阅读 · 2018年4月6日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
17+阅读 · 2008年12月31日
Top
微信扫码咨询专知VIP会员