arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.17635cs.AIcs.CL

用于高效数学推理的马尔可夫思维链

Markov Chain of Thought for Efficient Mathematical Reasoning

Alibaba Tongyi Lab(阿里通义实验室)

Wen Yang, Minpeng Liao, Kai Fan

AI总结:

受人类认知启发,提出Markov Chain of Thought (MCoT)框架,将多步推理步骤压缩为简化问题,在保持准确率的同时显著提升了大型语言模型数学推理的计算效率。

摘要:

多步的Chain of Thought (CoT)受益于推理步骤的逻辑结构和任务特定动作,显著增强了大型语言模型的数学推理能力。随着长CoT的普及,推理步骤的数量超出了可管理的token限制,并导致了更高的计算需求。受人类认知基本逻辑“推导,然后缩减”的启发,我们将标准的多步CoT概念化为一种新颖的Markov Chain of Thought (MCoT)。在本研究中,我们考虑数学推理任务,将每个推理步骤定义为文本并附带Python代码片段。为促进更长的推理路径,通过与代码解释器的交互实现了自我纠错。我们的MCoT旨在将先前的推理步骤压缩为一个简化的问题,从而在不依赖冗长KV缓存的情况下实现高效的下一步推理。在实验中,我们整理了$\ exttt{MCoTInstruct}$数据集,实证结果表明,MCoT不仅显著提升了效率,还保持了相当的准确率。尽管仍有诸多待探索之处,这项工作为探索LLM的长CoT推理能力铺平了道路。代码可在https://github.com/james-yw/Markov-Chain-of-Thought获取。

英文摘要:

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

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

↑