将大模型推理拆分为记忆召回与逻辑推理两步,提升可解释性与可靠性。
Disentangling Memory and Reasoning Ability in Large Language Models
- 引入memory和reason特殊标记,显式区分知识检索与推理步骤。
- 实验显示该方法显著减少幻觉,提升任务准确率与错误定位能力。
- 适合关注模型可解释性与高可靠性的研究者与应用开发者。
大型语言模型在需要大量知识和推理能力的复杂任务中表现出色。然而,现有推理流程缺乏对知识检索与推理步骤的显式分离,导致决策过程不透明且混乱,易引发幻觉和知识遗忘,影响模型在高风险场景中的可靠性。本文提出一种新型推理范式,将复杂推理过程分解为两个明确的步骤:(1)记忆召回——检索相关知识;(2)推理——基于召回知识进行逻辑推导。为实现这一分解,我们引入special tokens memory和reason,引导模型区分需知识检索的步骤与需推理的步骤。实验结果表明,该方法不仅提升了模型性能,还增强了推理过程的可解释性,使用户能有效识别错误来源并优化响应。代码已开源。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have demonstrated strong performance in handling complex tasks requiring both extensive knowledge and reasoning abilities. However, the existing LLM inference pipeline operates as an opaque process without explicit separation between knowledge retrieval and reasoning steps, making the model's decision-making process unclear and disorganized. This ambiguity can lead to issues such as hallucinations and knowledge forgetting, which significantly impact the reliability of LLMs in high-stakes domains. In this paper, we propose a new inference paradigm that decomposes the complex inference process into two distinct and clear actions: (1) memory recall: which retrieves relevant knowledge, and (2) reasoning: which performs logical steps based on the recalled knowledge. To facilitate this decomposition, we introduce two special tokens memory and reason, guiding the model to distinguish between steps that require knowledge retrieval and those that involve reasoning. Our experiment results show that this decomposition not only improves model performance but also enhances the interpretability of the inference process, enabling users to identify sources of error and refine model responses effectively. The code is available at https://github.com/MingyuJ666/Disentangling-Memory-and-Reasoning.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。