Large language models (LLMs) exhibit strong in-context learning capabilities, but how they track and retrieve information from context remains underexplored. Drawing on the free recall paradigm in cognitive science (where participants recall list items in any order), we show that several open-source LLMs consistently display a serial-recall-like pattern, assigning peak probability to tokens that immediately follow a repeated token in the input sequence. Through systematic ablation experiments, we show that induction heads, specialized attention heads that attend to the token following a previous occurrence of the current token, play an important role in this phenomenon. Removing heads with a high induction score substantially reduces the +1 lag bias, whereas ablating random heads does not reproduce the same reduction. We also show that removing heads with high induction scores impairs the performance of models prompted to do serial recall using few-shot learning to a larger extent than removing random heads. Our findings highlight a mechanistically specific connection between induction heads and temporal context processing in transformers, suggesting that these heads are especially important for ordered retrieval and serial-recall-like behavior during in-context learning.


翻译:大型语言模型展现出强大的上下文学习能力,但其如何跟踪和检索上下文中的信息仍未被充分探索。借鉴认知科学中的自由回忆范式(参与者可按任意顺序回忆列表项目),我们发现多个开源大型语言模型一致表现出类似序列回忆的模式,即对输入序列中重复标记后立即出现的标记赋予峰值概率。通过系统性消融实验,我们证明归纳头(一种特殊的注意力头,会关注当前标记先前出现位置之后的后续标记)在这一现象中发挥重要作用。移除高归纳分数的注意力头会显著降低+1滞后偏差,而随机消融注意力头则不会产生相同的减弱效果。我们还发现,相较于随机移除注意力头,移除高归纳分数的注意力头会在基于少样本学习的序列回忆任务中更大程度地损害模型性能。我们的发现揭示了Transformer中归纳头与时间上下文处理之间的机制性特异性关联,表明这些注意力头对于上下文学习中的有序检索和类序列回忆行为尤为重要。

0
下载
关闭预览

相关内容

ICML 2026 | 理解上下文持续学习中的泛化与遗忘
专知会员服务
10+阅读 · 5月28日
《语言模型的推理时间学习算法》162页博士论文
专知会员服务
16+阅读 · 2025年11月23日
论文浅尝 | 学习开发知识图谱中的长期关系依赖 - ICML 2019
用深度学习做文本摘要
专知
24+阅读 · 2019年3月30日
图上的归纳表示学习
科技创新与创业
23+阅读 · 2017年11月9日
【论文】图上的表示学习综述
机器学习研究会
15+阅读 · 2017年9月24日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
VIP会员
最新内容
美国从乌克兰无人机战争中学习经验
专知会员服务
1+阅读 · 今天15:03
ICML 2026 | 面向视觉语言模型的语义鲁棒性认证
专知会员服务
0+阅读 · 今天14:31
学习数据的几何:形状空间分析数学综述
专知会员服务
8+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
10+阅读 · 6月17日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员