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

谁在大型语言模型中进行推理?

Who Reasons in the Large Language Models?

National Key Laboratory for Novel Software Technology, Nanjing University, China(国家新型软件技术实验室,南京大学,中国);School of Artificial Intelligence, Nanjing University, China(人工智能学院,南京大学,中国)

Jie Shao, Jianxin Wu

AI总结:

本文探讨LLMs推理能力来源,假设其源于Transformer MHSA的输出投影模块,并引入SfN诊断工具验证oproj对推理的核心作用,为模型可解释性和训练策略提供新视角。

摘要:

尽管大型语言模型(LLMs)表现出色,但赋予其新能力(如数学推理)的过程在很大程度上仍是经验性的且不透明的。一个关键的开放性问题是,推理能力是源于整个模型、特定模块,还是仅仅是过拟合的产物。在这项工作中,我们假设训练良好的LLMs的推理能力主要归因于Transformer多头自注意力(MHSA)机制中的输出投影模块(oproj)。为了支持这一假设,我们引入了Networks的Stethoscope(SfN),这是一套旨在探测和分析LLMs内部行为的诊断工具。使用SfN,我们提供了旁证和经验证据,表明oproj在实现推理中起着核心作用,而其他模块对流畅对话的贡献更大。这些发现为LLMs的可解释性提供了新视角,并为更有针对性的训练策略开辟了途径,有可能实现更高效、更专业的LLMs。

英文摘要:

Despite the impressive performance of large language models (LLMs), the process of endowing them with new capabilities--such as mathematical reasoning--remains largely empirical and opaque. A critical open question is whether reasoning abilities stem from the entire model, specific modules, or are merely artifacts of overfitting. In this work, we hypothesize that the reasoning capabilities in well-trained LLMs are primarily attributed to the output projection module (oproj) in the Transformer's multi-head self-attention (MHSA) mechanism. To support this hypothesis, we introduce Stethoscope for Networks (SfN), a suite of diagnostic tools designed to probe and analyze the internal behaviors of LLMs. Using SfN, we provide both circumstantial and empirical evidence suggesting that oproj plays a central role in enabling reasoning, whereas other modules contribute more to fluent dialogue. These findings offer a new perspective on LLM interpretability and open avenues for more targeted training strategies, potentially enabling more efficient and specialized LLMs.

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

↑