arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.04577cs.LGcs.CL
收藏

位置感知的自动电路发现

Position-aware Automatic Circuit Discovery

Technion – Israel Institute of Technology(以色列理工学院);Northeastern University(东北大学)

Tal Haklay, Hadas Orgad, David Bau, Aaron Mueller, Yonatan Belinkov

AI总结:

本文针对现有电路发现方法忽略位置信息的问题,提出位置感知的自动电路发现方法,通过扩展边归因修补和引入数据集模式,实现位置敏感电路的全自动发现,并在电路规模与忠实度之间取得更好平衡。

摘要:

电路分析是一种广泛用于发现和理解语言模型机制的策略。电路是模型计算图中执行特定任务的最小子图。我们发现现有电路发现方法存在一个不足:它们假设电路是位置不变的,将模型组件视为在不同输入位置上具有相同相关性。这限制了它们捕捉跨位置交互或随位置变化的机制的能力。为了解决这一不足,我们提出了两项改进,以将位置性纳入电路,即使在包含变长示例的任务上也能实现。首先,我们扩展了边归因修补(edge attribution patching)——一种基于梯度的电路发现方法——以区分不同token位置。其次,我们引入了数据集模式(dataset schema)的概念,该模式定义了跨示例具有相似语义的token跨度,从而能够在具有变长示例的数据集中进行位置感知的电路发现。我们还开发了一个使用大型语言模型进行模式生成和应用的自动化流程。我们的方法能够实现位置敏感电路的全自动发现,与先前工作相比,在电路规模和忠实度之间取得了更好的权衡。

英文摘要:

A widely used strategy to discover and understand language model mechanisms is circuit analysis. A circuit is a minimal subgraph of a model's computation graph that executes a specific task. We identify a gap in existing circuit discovery methods: they assume circuits are position-invariant, treating model components as equally relevant across input positions. This limits their ability to capture cross-positional interactions or mechanisms that vary across positions. To address this gap, we propose two improvements to incorporate positionality into circuits, even on tasks containing variable-length examples. First, we extend edge attribution patching, a gradient-based method for circuit discovery, to differentiate between token positions. Second, we introduce the concept of a dataset schema, which defines token spans with similar semantics across examples, enabling position-aware circuit discovery in datasets with variable length examples. We additionally develop an automated pipeline for schema generation and application using large language models. Our approach enables fully automated discovery of position-sensitive circuits, yielding better trade-offs between circuit size and faithfulness compared to prior work.

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

↑