arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2309.05858cs.LGcs.AI
收藏

揭示 Transformers 中的 mesa-optimization 算法

Uncovering mesa-optimization algorithms in Transformers

Google(谷歌公司);ETH Zürich(苏黎世联邦理工学院);Google Research(谷歌研究院);Google DeepMind(谷歌DeepMind)
Johannes von Oswald, Maximilian Schlegel, Alexander Meulemans, Seijin Kobayashi, Eyvind Niklasson, Nicolas Zucchet, Nino Scherrer, Nolan Miller, Mark Sandler, B… 展开作者

Johannes von Oswald, Maximilian Schlegel, Alexander Meulemans, Seijin Kobayashi, Eyvind Niklasson, Nicolas Zucchet, Nino Scherrer, Nolan Miller, Mark Sandler, Blaise Agüera y Arcas, Max Vladymyrov, Razvan Pascanu, João Sacramento

AI总结:

该研究分析了执行合成序列预测任务的 Transformer 模型,发现标准的 next-token prediction 误差最小化会产生一个基于梯度的辅助学习算法,从而解释了上下文学习的起源,并为设计基于优化的 Transformer 层提供了参考。

摘要:

一些自回归模型展现出上下文学习能力:能够在不经历任何参数变化且未被明确训练的情况下,随着输入序列的处理进行学习。这一现象的起源目前仍知之甚少。在此,我们分析了一系列被训练用于执行合成序列预测任务的 Transformer 模型,并发现标准的 next-token prediction 误差最小化产生了一个辅助学习算法,该算法会在新输入揭示时调整模型。我们证明,这一过程对应于对具有原则性的目标函数进行基于梯度的优化,从而在未见序列上实现了强大的泛化性能。我们的发现将上下文学习解释为自回归损失最小化的产物,并为基于优化的 Transformer 层的设计提供了参考。

英文摘要:

Some autoregressive models exhibit in-context learning capabilities: being able to learn as an input sequence is processed, without undergoing any parameter changes, and without being explicitly trained to do so. The origins of this phenomenon are still poorly understood. Here we analyze a series of Transformer models trained to perform synthetic sequence prediction tasks, and discover that standard next-token prediction error minimization gives rise to a subsidiary learning algorithm that adjusts the model as new inputs are revealed. We show that this process corresponds to gradient-based optimization of a principled objective function, which leads to strong generalization performance on unseen sequences. Our findings explain in-context learning as a product of autoregressive loss minimization and inform the design of new optimization-based Transformer layers.

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

↑