上下文扩展与任务扩展在上下文学习中的对比
Context-Scaling versus Task-Scaling in In-Context Learning
AI总结:
本文对比了上下文学习中的上下文扩展与任务扩展,发现标准MLPs仅具备任务扩展能力,并提出一种无key、query、value权重的简化transformer架构,通过将其特征映射输出与向量化数据拼接输入MLPs,成功实现了两种扩展能力的统一。
摘要:
Transformers 展现出上下文学习(ICL)能力,即这些模型利用提示中的示例解决新任务而无需额外训练。在我们的研究中,我们识别并分析了 ICL 的两个关键组成部分:(1)上下文扩展,即模型性能随着上下文示例数量的增加而提升;(2)任务扩展,即模型性能随着预训练任务数量的增加而提升。虽然 transformers 能够同时进行上下文扩展和任务扩展,但我们通过实验证明,采用向量化输入的标准多层感知机(MLPs)仅具备任务扩展能力。为了理解 transformers 如何实现上下文扩展,我们首先提出了一种显著简化的 transformer 架构,去除了 key、query、value 权重。我们表明,在包括线性回归、teacher-student 设置在内的各种统计学习任务中,该架构的 ICL 表现与原始 GPT-2 模型相当。此外,我们简化的 transformer 的单个模块可以被视为数据依赖的特征映射,其后接一个 MLP。该特征映射本身是一个强大的预测器,具备上下文扩展能力但不具备任务扩展能力。我们通过实验表明,将该特征映射的输出与向量化数据拼接作为 MLPs 的输入,能够同时实现上下文扩展和任务扩展。这一发现为研究 ICL 的上下文扩展和任务扩展提供了一个简单的设定。
英文摘要:
Transformers exhibit In-Context Learning (ICL), where these models solve new tasks by using examples in the prompt without additional training. In our work, we identify and analyze two key components of ICL: (1) context-scaling, where model performance improves as the number of in-context examples increases and (2) task-scaling, where model performance improves as the number of pre-training tasks increases. While transformers are capable of both context-scaling and task-scaling, we empirically show that standard Multi-Layer Perceptrons (MLPs) with vectorized input are only capable of task-scaling. To understand how transformers are capable of context-scaling, we first propose a significantly simplified transformer architecture without key, query, value weights. We show that it performs ICL comparably to the original GPT-2 model in various statistical learning tasks including linear regression, teacher-student settings. Furthermore, a single block of our simplified transformer can be viewed as data dependent feature map followed by an MLP. This feature map on its own is a powerful predictor that is capable of context-scaling but is not capable of task-scaling. We show empirically that concatenating the output of this feature map with vectorized data as an input to MLPs enables both context-scaling and task-scaling. This finding provides a simple setting to study context and task-scaling for ICL.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。