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

Transformer 电路的机制性揭示:自影响作为模型推理的关键

Mechanistic Unveiling of Transformer Circuits: Self-Influence as a Key to Model Reasoning

King Abdullah University of Science and Technology(阿卜杜拉国王科技大学);Harbin Institute of Technology, Shenzhen(哈尔滨工业大学(深圳))

Lin Zhang, Lijie Hu, Di Wang

AI总结:

本文结合电路分析与自影响函数追踪 token 重要性变化,以揭示 GPT-2 在 IOI 任务中的多步推理路径和可解释电路机制。

摘要:

基于 Transformer 的语言模型已经取得了显著成功;然而,由于非线性交互和高维运算的复杂性,它们的内部机制在很大程度上仍然不透明。尽管以往研究已经表明这些模型会隐式嵌入推理树,但人类通常会采用多种不同的逻辑推理机制来完成同一任务。目前仍不清楚语言模型使用哪些多步推理机制来解决此类任务。本文中,我们旨在通过研究语言模型的机制可解释性来解决这一问题,尤其是在多步推理任务的情境下。具体而言,我们采用电路分析和自影响函数来评估每个 token 在整个推理过程中不断变化的重要性,从而映射模型所采用的推理路径。我们将该方法应用于 GPT-2 模型上的一个预测任务(IOI),并证明底层电路揭示了模型所使用的、人类可解释的推理过程。

英文摘要:

Transformer-based language models have achieved significant success; however, their internal mechanisms remain largely opaque due to the complexity of non-linear interactions and high-dimensional operations. While previous studies have demonstrated that these models implicitly embed reasoning trees, humans typically employ various distinct logical reasoning mechanisms to complete the same task. It is still unclear which multi-step reasoning mechanisms are used by language models to solve such tasks. In this paper, we aim to address this question by investigating the mechanistic interpretability of language models, particularly in the context of multi-step reasoning tasks. Specifically, we employ circuit analysis and self-influence functions to evaluate the changing importance of each token throughout the reasoning process, allowing us to map the reasoning paths adopted by the model. We apply this methodology to the GPT-2 model on a prediction task (IOI) and demonstrate that the underlying circuits reveal a human-interpretable reasoning process used by the model.

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

↑