序列相关性改变上下文学习:有效上下文长度与架构失配
Sequential Correlations Change In-Context Learning: Effective Context Length and Architectural Mismatch
AI总结:
针对现有ICL理论多聚焦独立样本提示的局限,研究序列关联数据下的ICL特性,基于线性注意力构建可解模型,发现关联提示会改变ICL有效样本量及最优适配注意力架构。
摘要:
现代序列模型具备出色的上下文学习(ICL)能力:仅依靠提示中给出的示例就能完成新任务。理解该能力的涌现机制需要能刻画自然数据核心属性的理论。线性回归已成为ICL理论研究的实用沙盒,但现有工作大多聚焦于含独立示例的提示。本工作将该场景拓展至作为真实序列基础特征的序列关联数据,提出基于线性注意力的可解模型,并在真实Transformer架构上验证预测结果。本研究发现两种不同效应:第一,当查询令牌与上下文独立时,上下文内的相关性会催生有效上下文长度:关联提示的表现等价于更短的独立同分布提示。第二,当查询也与其上下文相关时,测试误差会降低,且与线性注意力相比,softmax注意力的该特性尤为突出。这些结果表明,关联提示不仅会改变上下文学习的有效样本量,还会改变与任务最优适配的注意力架构类型。
英文摘要:
Modern sequence models have a striking capacity for in-context learning (ICL); they can perform new tasks based only on examples given in the prompt. Understanding how this ability emerges requires theory that captures important properties of natural data. Linear regression has served as a useful sandbox for ICL theory, but existing work has largely focused on prompts with independent examples. In this work, we extend this setting to sequentially correlated data, a basic feature of real sequences. We present a solvable model based on linear attention and test our predictions on realistic transformer architectures. We identify two distinct effects: First, when the query token is independent of the context, within-context correlations induce an effective context length: correlated prompts behave like shorter i.i.d. prompts. Second, when the query is also correlated with its context, test error is reduced, particularly for softmax attention when compared to linear attention. These results suggest that correlated prompts alter not only the effective sample size of in-context learning, but also which attention architectures are best matched to the task.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。