揭示了上下文学习在训练中出现又消失的内在机制。
Toward Understanding In-context vs. In-weight Learning
- 用门控机制区分上下文与权重学习,分析其理论条件。
- 发现特定数据分布下,上下文学习可涌现并随训练减弱。
- 实验验证大模型与简化模型行为一致,适合研究学习机制者阅读。
近期实证表明,当训练数据具备特定分布特性时,Transformer 可涌现出上下文学习能力,但该能力可能在进一步训练后减弱。本文通过分析一个使用门控机制在权重学习与上下文学习间切换的简化模型,结合泛化误差与遗憾分析,识别出上下文学习涌现与消失的条件。这些理论发现通过对比全量 Transformer 在简化分布上的表现与简化模型的行为得到实验验证,结果高度一致。随后将研究扩展至大型语言模型,证明对自然语言提示的不同集合进行微调,可诱发类似的上下文学习与权重学习行为。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。