arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2511.01033cs.AIcs.CL
收藏

关于为上下文学习产生归纳头的出现

On the Emergence of Induction Heads for In-Context Learning

ETH Zürich(苏黎世联邦理工学院)

Tiberiu Musat, Tiago Pimentel, Lorenzo Noci, Alessandro Stolfo, Mrinmaya Sachan, Thomas Hofmann

AI总结:

研究揭示了变换器中归纳头的出现机制,发现其在19维子空间内由3维主导,并与输入上下文长度的二次关系相关。

摘要:

变换器已成为自然语言处理的主导架构。其成功部分归功于一种称为上下文学习(ICL)的非凡能力:它们可以仅从输入上下文获得并应用新的关联,而无需对权重进行更新。在本工作中,我们研究了归纳头的出现,这是在双层变换器中已确定的机制,尤其对上下文学习至关重要。我们揭示了实现归纳头的权重矩阵相对简单且可解释的结构。我们使用一个最小的ICL任务公式和一个修改后的变换器架构,理论上解释了这种结构的起源。我们正式证明了训练动态仍然被参数空间的19维子空间所约束。实证上,我们验证了这一约束,并观察到只有3个维度导致归纳头的出现。通过进一步研究此3维子空间内的训练动态,我们发现归纳头出现的时间遵循一个紧密的渐近界,该界与输入上下文长度呈二次关系。

英文摘要:

Transformers have become the dominant architecture for natural language processing. Part of their success is owed to a remarkable capability known as in-context learning (ICL): they can acquire and apply novel associations solely from their input context, without any updates to their weights. In this work, we study the emergence of induction heads, a previously identified mechanism in two-layer transformers that is particularly important for in-context learning. We uncover a relatively simple and interpretable structure of the weight matrices implementing the induction head. We theoretically explain the origin of this structure using a minimal ICL task formulation and a modified transformer architecture. We give a formal proof that the training dynamics remain constrained to a 19-dimensional subspace of the parameter space. Empirically, we validate this constraint while observing that only 3 dimensions account for the emergence of an induction head. By further studying the training dynamics inside this 3-dimensional subspace, we find that the time until the emergence of an induction head follows a tight asymptotic bound that is quadratic in the input context length.

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

↑