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

预训练数据中的平行结构产生上下文学习能力

Parallel Structures in Pre-training Data Yield In-Context Learning

Columbia University(哥伦比亚大学);New York University(纽约大学);NYU Shanghai(上海纽约大学)

Yanda Chen, Chen Zhao, Zhou Yu, Kathleen McKeown, He He

AI总结:

本文发现预训练数据中的平行结构是语言模型上下文学习能力的关键来源,并通过消融实验证明移除这些结构会使ICL准确率大幅下降51%。

摘要:

预训练语言模型(LMs)具备上下文学习(ICL)能力:它们能够仅凭提示中给出的少量示例就适应一项任务,而无需任何参数更新。然而,这种能力从何而来尚不清楚,因为预训练文本与ICL提示之间存在明显的分布偏移。在这项工作中,我们研究预训练数据的哪些模式对ICL有所贡献。我们发现,LMs的ICL能力取决于预训练数据中的平行结构——即在同一上下文窗口中遵循相似模板的短语对。具体而言,我们通过检查在一个短语上的训练是否改善对另一个短语的预测来检测平行结构,并进行消融实验以研究它们对ICL的影响。我们表明,移除预训练数据中的平行结构会使LMs的ICL准确率降低51%(相比之下,随机消融仅降低2%)。即使排除n-gram重复和长距离依赖等常见模式,这种下降仍然存在,这表明平行结构的多样性和普遍性。对检测到的平行结构的进一步观察表明,它们涵盖了多种语言任务,并在数据中跨越了长距离。

英文摘要:

Pre-trained language models (LMs) are capable of in-context learning (ICL): they can adapt to a task with only a few examples given in the prompt without any parameter update. However, it is unclear where this capability comes from as there is a stark distribution shift between pre-training text and ICL prompts. In this work, we study what patterns of the pre-training data contribute to ICL. We find that LMs' ICL ability depends on $\textit{parallel structures}$ in the pre-training data -- pairs of phrases following similar templates in the same context window. Specifically, we detect parallel structures by checking whether training on one phrase improves prediction of the other, and conduct ablation experiments to study their effect on ICL. We show that removing parallel structures in the pre-training data reduces LMs' ICL accuracy by 51% (vs 2% from random ablation). This drop persists even when excluding common patterns such as n-gram repetitions and long-range dependency, showing the diversity and generality of parallel structures. A closer look at the detected parallel structures indicates that they cover diverse linguistic tasks and span long distances in the data.

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

↑