检验大模型中微电路是否真能独立完成特定任务
Hypothesis Testing the Circuit Hypothesis in LLMs
- 设计一套标准测试,评估小网络是否满足'微电路'特征
- 发现人工构造的电路完全符合标准,而真实模型电路部分符合
- 开源工具包,让研究者轻松验证模型内部机制
大型语言模型(LLMs)表现出惊人能力,但其内在实现机制尚不清晰。一种假设认为这些能力主要由模型内部的小型子网络——即‘电路’——实现。本文提出一套用于评估电路是否符合理想特性的标准,并开发了一套假设检验方法。标准聚焦于行为保持程度、行为定位精度以及电路最小性。我们对文献中描述的六个电路进行了测试,结果发现:人工硬编码的合成电路完全符合理想特性;而从Transformer模型中发现的电路则在不同程度上满足这些标准。为支持未来研究,我们推出了名为 extit{circuitry} 的软件包,作为 extit{TransformerLens} 的封装,简化钩子与激活值操作。代码已公开于 exttt{https://github.com/blei-lab/circuitry}。
原文摘要 · Abstract (English)
Large language models (LLMs) demonstrate surprising capabilities, but we do not understand how they are implemented. One hypothesis suggests that these capabilities are primarily executed by small subnetworks within the LLM, known as circuits. But how can we evaluate this hypothesis? In this paper, we formalize a set of criteria that a circuit is hypothesized to meet and develop a suite of hypothesis tests to evaluate how well circuits satisfy them. The criteria focus on the extent to which the LLM's behavior is preserved, the degree of localization of this behavior, and whether the circuit is minimal. We apply these tests to six circuits described in the research literature. We find that synthetic circuits -- circuits that are hard-coded in the model -- align with the idealized properties. Circuits discovered in Transformer models satisfy the criteria to varying degrees. To facilitate future empirical studies of circuits, we created the \textit{circuitry} package, a wrapper around the \textit{TransformerLens} library, which abstracts away lower-level manipulations of hooks and activations. The software is available at \url{https://github.com/blei-lab/circuitry}.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。