arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2310.14491cs.CL
收藏

迈向语言模型多步推理能力的机制解释

Towards a Mechanistic Interpretation of Multi-Step Reasoning Capabilities of Language Models

ETH Zürich(苏黎世联邦理工学院);UC Irvine(加州大学欧文分校);AIWaves;SUTD(新加坡科技设计大学);EPFL(洛桑联邦理工学院)

Yifan Hou, Jiaoda Li, Yu Fei, Alessandro Stolfo, Wangchunshu Zhou, Guangtao Zeng, Antoine Bosselut, Mrinmaya Sachan

AI总结:

本文通过提出MechanisticProbe探测方法,从语言模型的注意力模式中恢复推理树,揭示了LMs在多步推理任务中确实在架构内部执行多步推理过程,而非依赖记忆答案。

摘要:

近期研究表明,语言模型(LMs)具有强大的多步(即过程性)推理能力。然而,目前尚不清楚LMs在执行这些任务时,是通过记忆预训练语料库中的答案来作弊,还是通过多步推理机制完成。在本文中,我们试图通过对LMs在多步推理任务中的机制解释来回答这个问题。具体而言,我们假设LM在其内部隐式地嵌入了类似于正确推理过程的推理树。我们通过引入一种新的探测方法(称为MechanisticProbe)来测试这一假设,该方法从模型的注意力模式中恢复推理树。我们使用该探针分析了两个LM:GPT-2在合成任务(第k小元素)上的表现,以及LLaMA在简单的基于语言的推理任务(ProofWriter和AI2 Reasoning Challenge)上的表现。我们证明,MechanisticProbe能够从大多数示例的模型注意力中检测出推理树的信息,这表明LM在许多情况下确实在其架构内部经历了多步推理过程。

英文摘要:

Recent work has shown that language models (LMs) have strong multi-step (i.e., procedural) reasoning capabilities. However, it is unclear whether LMs perform these tasks by cheating with answers memorized from pretraining corpus, or, via a multi-step reasoning mechanism. In this paper, we try to answer this question by exploring a mechanistic interpretation of LMs for multi-step reasoning tasks. Concretely, we hypothesize that the LM implicitly embeds a reasoning tree resembling the correct reasoning process within it. We test this hypothesis by introducing a new probing approach (called MechanisticProbe) that recovers the reasoning tree from the model's attention patterns. We use our probe to analyze two LMs: GPT-2 on a synthetic task (k-th smallest element), and LLaMA on two simple language-based reasoning tasks (ProofWriter & AI2 Reasoning Challenge). We show that MechanisticProbe is able to detect the information of the reasoning tree from the model's attentions for most examples, suggesting that the LM indeed is going through a process of multi-step reasoning within its architecture in many cases.

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

↑