修正梯度定位中因组件交互导致的误判,提升大模型机制分析准确性。
Correcting Gradient-Based Circuit Localization via Interaction-Aware Backpropagation
- 引入交互感知反向传播,显式建模神经网络组件间的相互作用。
- 在机制可解释性基准上达到当前最佳表现,显著优于传统梯度方法。
- 解决注意力自修复导致梯度消失问题,适合研究大模型内部机理的学者。
电路定位方法旨在识别大语言模型中负责特定行为的模型组件,实现细致的机制分析。现有方法通常假设组件独立,通过孤立扰动每个组件来估计重要性。然而神经网络中的组件存在相互作用,忽略这些交互会导致组件重要性系统性误估。我们发现一个关键问题:注意力自修复现象,即软最大值重分配使有影响力的注意力分数梯度消失,其他相似位置的值会进行补偿。为此,我们提出梯度交互修正(GIM),在反向传播过程中显式考虑特征交互。GIM在机制可解释性基准的电路定位任务中达到当前最优性能,并在多个任务上优于现有的基于梯度的特征归因方法。通过考虑交互效应并解释为何先前方法低估了组件重要性,GIM实现了更忠实的大语言模型机制分析。GIM 已作为 Python 包开源:https://github.com/corticph/gim。
原文摘要 · Abstract (English)
Circuit localization methods aim to identify the subset of model components responsible for specific behaviors in large language models, enabling detailed mechanistic analysis. Most existing methods assume components act independently and estimate importance by perturbing each component in isolation. However, components in neural networks interact, and ignoring these interactions leads to systematic misestimation of component importance. We find that one particularly problematic interaction is attention self-repair, in which softmax redistribution causes gradients for influential attention scores to vanish as other positions with similar values compensate. We introduce Gradient Interaction Modifications (GIM), a technique that explicitly accounts for feature interactions during backpropagation. GIM achieves state-of-the-art performance on the circuit localization track of the Mechanistic Interpretability Benchmark and outperforms existing gradient-based methods on feature attribution across diverse tasks. By accounting for interaction effects and explaining why prior methods underestimate component importance, GIM enables more faithful mechanistic analysis of large language models. GIM is available as a Python package at https://github.com/corticph/gim.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。