[论文解读] Pretraining Data Mixtures Enable Narrow Model Selection Capabilities in Transformer Models
论文研究预训练数据混合如何影响变换器中的上下文学习(ICL),在预训练的函数类内实现近似最优的模型选择,但对分布外(OOD)的一般化有限。
Transformer models, notably large language models (LLMs), have the remarkable ability to perform in-context learning (ICL) -- to perform new tasks when prompted with unseen input-output examples without any explicit model training. In this work, we study how effectively transformers can bridge between their pretraining data mixture, comprised of multiple distinct task families, to identify and learn new tasks in-context which are both inside and outside the pretraining distribution. Building on previous work, we investigate this question in a controlled setting, where we study transformer models trained on sequences of $(x, f(x))$ pairs rather than natural language. Our empirical results show transformers demonstrate near-optimal unsupervised model selection capabilities, in their ability to first in-context identify different task families and in-context learn within them when the task families are well-represented in their pretraining data. However when presented with tasks or functions which are out-of-domain of their pretraining data, we demonstrate various failure modes of transformers and degradation of their generalization for even simple extrapolation tasks. Together our results highlight that the impressive ICL abilities of high-capacity sequence models may be more closely tied to the coverage of their pretraining data mixtures than inductive biases that create fundamental generalization capabilities.
研究动机与目标
- 研究预训练数据组成如何影响跨越多种函数类的上下文学习。
- 评估当任务在预训练分布内或外时,变换器是否能够在上下文中识别并学习新任务。
- 考察模型选择能力以及在ICL期间在预训练函数类之间进行选择的成本。
提出的方法
- 在序列(x, f(x))配对数据上预训练一个解码器风格的变换器(参数量9.5M,12层,8头,256维嵌入)。
- 对来自函数类混合的序列使用教师 forcing 损失(密集线性、稀疏线性、ReLU 网络、正弦函数)。
- 通过从混合中抽样函数类来构建预训练混合 D(F) = w·D(F_A) + (1−w)·D(F_B)。
- 通过提供上下文示例并通过下一个标记预测来评估ICL(预测 f(x_{n+1}))。
- 将预测平方损失 E[(f̃(x_{n+1}) − f(x_{n+1}))^2] 作为ICL性能度量。
- 在纯预训练和混合预训练以及同分布与分布外测试函数之间比较行为。
实验结果
研究问题
- RQ1变换器在混合函数类上进行预训练后,是否能够在上下文学习中在这些类之间进行模型选择?
- RQ2当测试任务超出预训练分布(OOD)时,ICL性能如何变化?
- RQ3在组合函数类(例如凸组合)或遇到函数空间的稀有区域时,ICL的极限是什么?
- RQ4增大模型规模或改变函数类混合是否会改变模型选择和泛化属性?
主要发现
- 混合预训练的模型在预训练函数类内实现了接近最优的ICL性能,接近单一类基线水平。
- 混合预训练模型的ICL学习曲线接近最优样本复杂度,存在的小偏差随上下文示例增多而衰减。
- 当测试函数来自预训练分布之外时,ICL泛化恶化,预测变得不稳定或无法匹配任何预训练类。
- 模型在某些稀疏性阶段能够在预训练的函数类之间进行插值,但线性与正弦函数的凸组合通常不能被混合预训练模型很好预测。
- 当测试函数远离预训练的支持范围时,性能下降,表明超出已见数据的广泛泛化能力有限。
- 模型大小影响模型选择能力,较大模型表现出更鲁棒的ICL行为,同时对不同函数类的影响不对称。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。