arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.23042cs.LG
收藏

迈向理解上下文学习与权重内学习

Toward Understanding In-context vs. In-weight Learning

University of Alberta(阿尔伯塔大学);Google DeepMind(谷歌DeepMind)

Bryan Chan, Xinyi Chen, András György, Dale Schuurmans

AI总结:

本文通过引入门控机制简化模型并结合泛化误差与遗憾分析,从理论上揭示了训练数据分布特性如何引发上下文学习的出现与消失,并在 transformer 与大型语言模型实验中验证了该理论。

摘要:

近期经验表明,当训练数据中存在某些分布特性时,transformers 中会出现上下文学习,但这种能力在进一步训练后也可能减弱。我们通过识别简化的分布特性,为这些现象提供了新的理论理解,这些特性引发了上下文学习的出现及其最终的消失。为此,我们首先分析了一个简化模型,该模型使用门控机制在权重内预测器和上下文预测器之间进行选择。通过结合泛化误差与遗憾分析,我们确定了上下文学习和权重内学习出现的条件。随后,通过比较完整 transformer 在简化分布上的行为与该风格化模型的行为,这些理论发现得到了实验证实,结果显示两者一致。接着,我们将研究扩展到完整的大型语言模型,展示了在各种自然语言提示集合上进行微调如何能引发类似的上下文与权重内学习行为。

英文摘要:

It has recently been demonstrated empirically that in-context learning emerges in transformers when certain distributional properties are present in the training data, but this ability can also diminish upon further training. We provide a new theoretical understanding of these phenomena by identifying simplified distributional properties that give rise to the emergence and eventual disappearance of in-context learning. We do so by first analyzing a simplified model that uses a gating mechanism to choose between an in-weight and an in-context predictor. Through a combination of a generalization error and regret analysis we identify conditions where in-context and in-weight learning emerge. These theoretical findings are then corroborated experimentally by comparing the behaviour of a full transformer on the simplified distributions to that of the stylized model, demonstrating aligned results. We then extend the study to a full large language model, showing how fine-tuning on various collections of natural language prompts can elicit similar in-context and in-weight learning behaviour.

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

↑