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

EAP-GP:缓解基于梯度的自动化电路识别中的饱和效应

EAP-GP: Mitigating Saturation Effect in Gradient-based Automated Circuit Identification

King Abdullah University of Science and Technology(阿卜杜拉国王科技大学);University of Copenhagen(哥本哈根大学);Peking University(北京大学);University of Georgia(佐治亚大学);Huazhong University of Science and Technology(华中科技大学)

Lin Zhang, Wenshuo Dong, Zhuoran Zhang, Shu Yang, Lijie Hu, Ninghao Liu, Pan Zhou, Di Wang

AI总结:

针对基于梯度的自动化电路识别方法存在的饱和效应问题,提出EAP-GP方法,通过引入自适应梯度路径避开饱和区域,在6个数据集和3个GPT-2模型上实验,电路忠实性提升最高17.7%,精确率和召回率优于或相当现有方法。

摘要:

理解基于Transformer的语言模型的内部机制仍然具有挑战性。基于电路发现的机制可解释性旨在通过在计算子图层面分析神经网络的内部过程来对其进行逆向工程。本文重新审视了现有的基于梯度的电路识别方法,发现它们的性能要么受零梯度问题影响,要么受饱和效应影响——饱和效应下边缘归因分数对输入变化不敏感,导致电路组件的归因评估存在噪声且不可靠。为解决饱和效应,我们提出了带有梯度路径(EAP-GP)的边缘归因修补方法。EAP-GP引入了一条从输入开始的积分路径,自适应地遵循损坏输入与干净输入的梯度差异方向,以避开饱和区域。该方法提高了归因可靠性和电路识别的忠实性。我们使用GPT-2 Small、GPT-2 Medium和GPT-2 XL在6个数据集上评估EAP-GP。实验结果表明,EAP-GP在电路忠实性上优于现有方法,提升幅度最高达17.7%;与人工标注的真实电路相比,EAP-GP的精确率和召回率与之前的方法相当或更优,突显了其识别准确电路的有效性。

英文摘要:

Understanding the internal mechanisms of transformer-based language models remains challenging. Mechanistic interpretability based on circuit discovery aims to reverse engineer neural networks by analyzing their internal processes at the level of computational subgraphs. In this paper, we revisit existing gradient-based circuit identification methods and find that their performance is either affected by the zero-gradient problem or saturation effects, where edge attribution scores become insensitive to input changes, resulting in noisy and unreliable attribution evaluations for circuit components. To address the saturation effect, we propose Edge Attribution Patching with GradPath (EAP-GP), EAP-GP introduces an integration path, starting from the input and adaptively following the direction of the difference between the gradients of corrupted and clean inputs to avoid the saturated region. This approach enhances attribution reliability and improves the faithfulness of circuit identification. We evaluate EAP-GP on 6 datasets using GPT-2 Small, GPT-2 Medium, and GPT-2 XL. Experimental results demonstrate that EAP-GP outperforms existing methods in circuit faithfulness, achieving improvements up to 17.7%. Comparisons with manually annotated ground-truth circuits demonstrate that EAP-GP achieves precision and recall comparable to or better than previous approaches, highlighting its effectiveness in identifying accurate circuits.

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

↑