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

后继头:现实场景中反复出现的可解释注意力头

Successor Heads: Recurring, Interpretable Attention Heads In The Wild

University of Cambridge(剑桥大学)

Rhys Gould, Euan Ong, George Ogden, Arthur Conmy

AI总结:

本研究提出并验证了大语言模型中普遍存在的可解释“后继头”注意力组件,揭示其跨架构通用的mod-10数值表征机制,为理解LLM内部运算逻辑提供了新视角。

摘要:

在本研究中,我们提出了后继头(successor heads):一类能对具有自然顺序的token(如数字、月份、日期)执行递增操作的注意力头。例如,后继头可将“Monday(星期一)”递增为“Tuesday(星期二)”。我们采用基于机制可解释性的方法解释后继头的行为,该领域旨在以人类可理解的方式解释模型完成任务的原理。该领域现有研究已在小型玩具模型中发现了可解释的语言模型组件,但玩具模型的研究成果尚未能为前沿模型的内部运作提供洞见,目前人们对大语言模型的内部运行机制仍知之甚少。本文分析了大语言模型(LLM)中后继头的行为,发现它们实现了跨不同架构通用的抽象表征。这类头在参数量低至3100万、高至120亿的LLM中均会形成,例如GPT-2、Pythia和Llama-2。我们发现了一组“mod-10特征”,它们是不同架构、不同规模LLM中后继头执行递增操作的底层基础。我们利用这些特征进行向量运算以编辑头的行为,为LLM中的数值表征提供了洞见。此外,我们研究了后继头在自然语言数据上的行为,在一个Pythia后继头中识别出了可解释的多义性。

英文摘要:

In this work we present successor heads: attention heads that increment tokens with a natural ordering, such as numbers, months, and days. For example, successor heads increment 'Monday' into 'Tuesday'. We explain the successor head behavior with an approach rooted in mechanistic interpretability, the field that aims to explain how models complete tasks in human-understandable terms. Existing research in this area has found interpretable language model components in small toy models. However, results in toy models have not yet led to insights that explain the internals of frontier models and little is currently understood about the internal operations of large language models. In this paper, we analyze the behavior of successor heads in large language models (LLMs) and find that they implement abstract representations that are common to different architectures. They form in LLMs with as few as 31 million parameters, and at least as many as 12 billion parameters, such as GPT-2, Pythia, and Llama-2. We find a set of 'mod-10 features' that underlie how successor heads increment in LLMs across different architectures and sizes. We perform vector arithmetic with these features to edit head behavior and provide insights into numeric representations within LLMs. Additionally, we study the behavior of successor heads on natural language data, identifying interpretable polysemanticity in a Pythia successor head.

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

↑