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

Transformer中的隐式推理是通过捷径进行的推理

Implicit Reasoning in Transformers is Reasoning through Shortcuts

Fudan University(复旦大学)

Tianhe Lin, Jian Xie, Siyu Yuan, Deqing Yang

AI总结:

本文通过在多步数学推理数据上训练GPT-2并进行解析实验,发现语言模型的隐式推理能力源于捷径学习,仅在固定模式数据上训练时才能涌现并泛化,而在非固定模式数据上则过拟合特定模式、缺乏泛化,且该局限性同样存在于最先进的大语言模型中。

摘要:

测试时计算正在成为增强语言模型复杂多步推理能力的新范式,OpenAI的o1和o3以及DeepSeek的R1的成功证明了这一点。与测试时计算中的显式推理相比,隐式推理的推理效率更高,所需的生成token更少。然而,为什么先进的推理能力未能以隐式推理风格出现?在这项工作中,我们从头开始在一个精心构建的多步数学推理数据集上训练GPT-2,并进行解析实验,以研究语言模型如何在多步任务中执行隐式推理。我们的发现揭示:1)语言模型可以通过隐式推理执行逐步推理,并在域内和域外测试中达到高准确率。然而,这种能力仅在固定模式数据上训练时才会出现。2)相反,从非固定模式数据训练中涌现的隐式推理能力倾向于过拟合特定模式,无法进一步泛化。值得注意的是,这一局限性在最先进的大语言模型中也同样被观察到。这些发现表明,语言模型通过捷径学习获得隐式推理能力,使其在具有相似模式的任务上表现强劲,但缺乏泛化能力。

英文摘要:

Test-time compute is emerging as a new paradigm for enhancing language models' complex multi-step reasoning capabilities, as demonstrated by the success of OpenAI's o1 and o3, as well as DeepSeek's R1. Compared to explicit reasoning in test-time compute, implicit reasoning is more inference-efficient, requiring fewer generated tokens. However, why does the advanced reasoning capability fail to emerge in the implicit reasoning style? In this work, we train GPT-2 from scratch on a curated multi-step mathematical reasoning dataset and conduct analytical experiments to investigate how language models perform implicit reasoning in multi-step tasks. Our findings reveal: 1) Language models can perform step-by-step reasoning and achieve high accuracy in both in-domain and out-of-domain tests via implicit reasoning. However, this capability only emerges when trained on fixed-pattern data. 2) Conversely, implicit reasoning abilities emerging from training on unfixed-pattern data tend to overfit a specific pattern and fail to generalize further. Notably, this limitation is also observed in state-of-the-art large language models. These findings suggest that language models acquire implicit reasoning through shortcut learning, enabling strong performance on tasks with similar patterns while lacking generalization.

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

↑