arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2212.09095cs.CLcs.AI
收藏

重新思考规模在上下文学习中的作用:一项在660亿规模下基于可解释性的案例研究

Rethinking the Role of Scale for In-Context Learning: An Interpretability-based Case Study at 66 Billion Scale

University of California, Los Angeles(加州大学洛杉矶分校);AWS AI Labs(AWS人工智能实验室)

Hritik Bansal, Karthik Gopalakrishnan, Saket Dingliwal, Sravan Bodapati, Katrin Kirchhoff, Dan Roth

AI总结:

本文基于OPT-66B和14项任务,通过组件重要性与归纳头分析,揭示上下文学习能力集中于少数注意力头,并探讨其对预训练的启示。

摘要:

已有研究表明,在通过上下文学习(in-context learning)范式处理多种任务时,语言模型的性能会随着规模增加而提升。本文研究如下假设:大型语言模型通过上下文学习完成任务的能力,并非均匀分布在其所有底层组件中。我们在涵盖14种不同下游任务的集合上使用一个拥有660亿参数的语言模型(OPT-66B),发现情况确实如此:可以移除约70%的注意力头和约20%的前馈网络,而任务性能仅出现极小下降。我们发现,在不同任务以及不同数量的上下文示例之间,对上下文学习重要或不重要的注意力头集合存在大量重叠。我们还通过任务无关的视角分析该假设,发现OPT-66B中一小部分注意力头在执行与上下文学习相关的基础归纳操作(即前缀匹配和复制)方面得分很高。这些归纳头与特定任务的重要头相重叠,从而支持了Olsson等人(arXiv:2209.11895)关于归纳头可泛化到与上下文学习相关的更复杂行为的论点。总体而言,我们的研究提供了若干洞见,表明大型语言模型在上下文学习方面可能训练不足,并提出了如何预训练语言模型以更有效地执行上下文学习的问题。

英文摘要:

Language models have been shown to perform better with an increase in scale on a wide variety of tasks via the in-context learning paradigm. In this paper, we investigate the hypothesis that the ability of a large language model to in-context learn-perform a task is not uniformly spread across all of its underlying components. Using a 66 billion parameter language model (OPT-66B) across a diverse set of 14 downstream tasks, we find this is indeed the case: $\sim$70% of attention heads and $\sim$20% of feed forward networks can be removed with minimal decline in task performance. We find substantial overlap in the set of attention heads (un)important for in-context learning across tasks and number of in-context examples. We also address our hypothesis through a task-agnostic lens, finding that a small set of attention heads in OPT-66B score highly on their ability to perform primitive induction operations associated with in-context learning, namely, prefix matching and copying. These induction heads overlap with task-specific important heads, reinforcing arguments by Olsson et al. (arXiv:2209.11895) regarding induction head generality to more sophisticated behaviors associated with in-context learning. Overall, our study provides several insights that indicate large language models may be under-trained for in-context learning and opens up questions on how to pre-train language models to more effectively perform in-context learning.

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

↑