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

GPT-2 如何计算大于关系?:解读预训练语言模型中的数学能力

How does GPT-2 compute greater-than?: Interpreting mathematical abilities in a pre-trained language model

University of Amsterdam(阿姆斯特丹大学);Redwood Research(红木研究);Conjecture

Michael Hanna, Ollie Liu, Alexandre Variengien

AI总结:

该研究利用机制可解释性技术,识别出GPT-2 small中计算大于关系的电路及其组件作用,发现其通过通用复杂机制实现基础数学能力,为理解预训练语言模型的隐式能力提供了机制层面的解释。

摘要:

预训练语言模型在未经过显式训练的任务上也能表现出惊人的熟练度,但人们对其实现这些能力的机制知之甚少。本文研究了预训练语言模型通常具备的基础数学能力。具体而言,我们采用机制可解释性技术来解释 GPT-2 small(小型 GPT-2)有限的数学能力。作为案例研究,我们检验了它处理类似“战争从 1732 年持续到 17 年”这类句子并预测合理的两位结束年份(即大于 32 的年份)的能力。我们首先识别出一个电路——即 GPT-2 small 计算图中负责计算该任务输出的小子集。随后,我们阐释了该电路各组件的作用,表明 GPT-2 small 的最终多层感知器会提升大于起始年份的结束年份的概率。最后,我们找到了能激活该电路的相关任务。研究结果表明,GPT-2 small 借助一种复杂但通用的机制来计算大于关系,该机制可在多种不同语境下被激活。

英文摘要:

Pre-trained language models can be surprisingly adept at tasks they were not explicitly trained on, but how they implement these capabilities is poorly understood. In this paper, we investigate the basic mathematical abilities often acquired by pre-trained language models. Concretely, we use mechanistic interpretability techniques to explain the (limited) mathematical abilities of GPT-2 small. As a case study, we examine its ability to take in sentences such as "The war lasted from the year 1732 to the year 17", and predict valid two-digit end years (years > 32). We first identify a circuit, a small subset of GPT-2 small's computational graph that computes this task's output. Then, we explain the role of each circuit component, showing that GPT-2 small's final multi-layer perceptrons boost the probability of end years greater than the start year. Finally, we find related tasks that activate our circuit. Our results suggest that GPT-2 small computes greater-than using a complex but general mechanism that activates across diverse contexts.

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

↑