arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2311.08360cs.LGcs.AIcs.CL
收藏

Transformer 中涌现式上下文学习的瞬态特性

The Transient Nature of Emergent In-Context Learning in Transformers

UCL(伦敦大学学院);Google DeepMind(谷歌DeepMind)

Aaditya K. Singh, Stephanie C. Y. Chan, Ted Moskovitz, Erin Grant, Andrew M. Saxe, Felix Hill

AI总结:

该研究发现Transformer训练中涌现的上下文学习(ICL)多为瞬态现象,会最终被权重内学习取代,同时验证了L2正则化可增强ICL持久性,并初步指出其成因是两类学习回路的竞争。

摘要:

Transformer 神经网络即便未经过显式的上下文学习(in-context learning, ICL)训练,也能展现出惊人的 ICL 能力。已有研究从机制可解释性、贝叶斯推理或训练数据分布特性等角度,深化了对 Transformer 中 ICL 涌现机制的理解,但这些研究大多将 ICL 视为一种持久现象,即认为 ICL 一旦涌现,就会渐近性地持续存在。本文研究表明,Transformer 训练过程中涌现的 ICL 实际上往往是瞬态的。我们在合成数据上训练 Transformer,该数据的设计使得 ICL 和权重内学习(in-weights learning, IWL)两种策略都能得到正确预测结果。研究发现,ICL 首先涌现,随后会逐渐消失并被 IWL 取代,且整个过程中训练损失持续下降,表明模型渐近性地更偏好 IWL。这种 ICL 的瞬态特性在多种模型规模和数据集的 Transformer 中均被观测到,这也引出了一个问题:在追求紧凑、运行成本更低的模型时,应当对 Transformer 进行多大程度的“过训练”。我们发现 L2 正则化或许能让 ICL 更持久,从而无需基于 ICL 类验证任务执行早停。最后,我们提供了初步证据,表明 ICL 的瞬态性可能源于 ICL 与 IWL 回路之间的竞争。

英文摘要:

Transformer neural networks can exhibit a surprising capacity for in-context learning (ICL) despite not being explicitly trained for it. Prior work has provided a deeper understanding of how ICL emerges in transformers, e.g. through the lens of mechanistic interpretability, Bayesian inference, or by examining the distributional properties of training data. However, in each of these cases, ICL is treated largely as a persistent phenomenon; namely, once ICL emerges, it is assumed to persist asymptotically. Here, we show that the emergence of ICL during transformer training is, in fact, often transient. We train transformers on synthetic data designed so that both ICL and in-weights learning (IWL) strategies can lead to correct predictions. We find that ICL first emerges, then disappears and gives way to IWL, all while the training loss decreases, indicating an asymptotic preference for IWL. The transient nature of ICL is observed in transformers across a range of model sizes and datasets, raising the question of how much to "overtrain" transformers when seeking compact, cheaper-to-run models. We find that L2 regularization may offer a path to more persistent ICL that removes the need for early stopping based on ICL-style validation tasks. Finally, we present initial evidence that ICL transience may be caused by competition between ICL and IWL circuits.

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

↑