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

通过混合归因与剪枝框架发现Transformer回路

Discovering Transformer Circuits via a Hybrid Attribution and Pruning Framework

Algoverse AI Research(Algoverse AI研究)

Hao Gu, Vibhas Nair, Amrithaa Ashok Kumar, Jayvart Sharma, Ryan Lagasse

AI总结:

针对现有Transformer回路发现算法速度与忠实度难以兼顾的问题,提出混合归因与剪枝框架HAP,在保证回路忠实度的前提下比基线快46%,可助力机制可解释性研究向大模型扩展。

摘要:

语言模型的可解释性研究常涉及回路分析,其目标是识别完成特定任务的稀疏子网络(即回路)。现有回路发现算法存在一个核心权衡:归因修补速度快,但对完整模型的忠实度不足;而边剪枝忠实度高,但计算成本高昂。本研究提出一种混合归因与剪枝(Hybrid Attribution and Pruning, HAP)框架,先利用归因修补识别高潜力子图,再通过边剪枝从中提取忠实回路。我们证明,HAP比基线算法快46%,且不会牺牲回路忠实度。此外,我们在间接宾语识别(Indirect Object Identification)任务上开展了案例研究,结果表明,我们的方法保留了协作回路组件(例如S抑制头),而归因修补方法在高稀疏度下会剪除掉这些组件。研究结果显示,HAP可作为一种有效方法,提升机制可解释性研究向更大规模模型扩展的可扩展性。我们的代码可在https://anonymous.4open.science/r/HAP-circuit-discovery获取。

英文摘要:

Interpreting language models often involves circuit analysis, which aims to identify sparse subnetworks, or circuits, that accomplish specific tasks. Existing circuit discovery algorithms face a fundamental trade-off: attribution patching is fast but unfaithful to the full model, while edge pruning is faithful but computationally expensive. This research proposes a hybrid attribution and pruning (HAP) framework that uses attribution patching to identify a high-potential subgraph, then applies edge pruning to extract a faithful circuit from it. We show that HAP is 46\% faster than baseline algorithms without sacrificing circuit faithfulness. Furthermore, we present a case study on the Indirect Object Identification task, showing that our method preserves cooperative circuit components (e.g. S-inhibition heads) that attribution patching methods prune at high sparsity. Our results show that HAP could be an effective approach for improving the scalability of mechanistic interpretability research to larger models. Our code is available at https://anonymous.4open.science/r/HAP-circuit-discovery.

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

↑