arXiv:2502.04577cs.LGcs.CL2025-02ACL被引 15

让电路发现能感知位置,提升模型机制理解精度

Position-aware Automatic Circuit Discovery

  • 改进梯度法,区分不同输入位置的贡献
  • 提出数据模式概念,支持变长输入场景
  • 用大模型自动生成模式,实现全流程自动化

现有语言模型机制分析中的电路发现方法通常假设电路对位置无关,即模型组件在所有输入位置上重要性相同。这限制了捕捉跨位置交互或位置依赖机制的能力。为填补这一空白,本文提出两种改进:首先,将基于梯度的边归因修补法扩展至区分不同标记位置;其次,引入数据集模式(dataset schema)概念,定义跨样本语义相似的标记跨度,使变长输入场景下也能进行位置感知的电路发现。同时,开发基于大语言模型的自动化模式生成与应用管道。所提方法实现了完全自动化的敏感位置电路发现,在电路规模与忠实度之间取得更优平衡,优于先前工作。

原文摘要 · Abstract (English)

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.

电路发现位置感知自动化语言模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。