arXiv:2410.17635cs.AIcs.CL2024-10NAACL被引 25

用马尔可夫链压缩思维链,提升大模型数学推理效率。

Markov Chain of Thought for Efficient Mathematical Reasoning

  • 将推理步骤建模为马尔可夫链,每步输出简化问题与代码。
  • 在MCoTInstruct数据集上,效率提升显著且准确率相当。
  • 适合需要长链推理但资源受限的数学任务场景。

多步思维链(CoT)利用推理步骤的逻辑结构和任务特定动作,显著增强大语言模型的数学推理能力。随着思维链变长,推理步骤数超过可管理的令牌限制,导致计算开销增加。受人类认知“推导后简化”逻辑启发,我们提出新型马尔可夫链思维链(MCoT)。在数学推理任务中,每个推理步骤由文本和对应的Python代码片段组成。通过与代码解释器交互实现自校正,以支持更长的推理路径。MCoT将先前推理步骤压缩为简化问题,实现高效下一步推理,无需依赖长键值缓存。我们构建了MCoTInstruct数据集,实验表明,MCoT不仅显著提升效率,且保持相近准确率。本工作为探索大模型长链推理能力开辟新路径。代码已开源。

原文摘要 · Abstract (English)

Chain of Thought (CoT) of multi-step benefits from the logical structure of the reasoning steps and task-specific actions, significantly enhancing the mathematical reasoning capabilities of large language models. As the prevalence of long CoT, the number of reasoning steps exceeds manageable token limits and leads to higher computational demands. Inspired by the fundamental logic of human cognition, "derive, then reduce", we conceptualize the standard multi-step CoT as a novel Markov Chain of Thought (MCoT). In this study, we consider the mathematical reasoning task, defining each reasoning step as text accompanied by a Python code snippet. To facilitate a longer reasoning path, self-correction is enabled through interactions with the code interpreter. Our MCoT aims to compress previous reasoning steps into a simplified question, enabling efficient next-step inference without relying on a lengthy KV cache. In our experiments, we curate the $\texttt{MCoTInstruct}$ dataset, and the empirical results indicate that MCoT not only significantly enhances efficiency but also maintains comparable accuracy. While much remains to be explored, this work paves the way for exploring the long CoT reasoning abilities of LLMs. The code is available at https://github.com/james-yw/Markov-Chain-of-Thought

数学推理思维链马尔可夫链效率优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。