大型语言模型中的计算思维推理
Computational Thinking Reasoning in Large Language Models
AI总结:
本文提出计算思维模型(CTM),通过将分解、抽象、归约等计算思维范式与实时代码执行及强化学习奖励融入大型语言模型,显著提升了其在代码生成和数学推理任务上的准确性、可解释性与泛化性。
摘要:
尽管大型语言模型(LLMs)已展现出卓越的推理能力,但在面对需要特定思维范式的复杂任务时,例如分治法和程序化演绎等,它们往往表现不佳。以往的研究通过集成外部可靠工具来缓解LLMs在问题求解过程中的逻辑不一致和幻觉问题。然而,我们认为根本挑战更为深刻:LLMs在推理过程中缺乏复杂的思维范式(即计算思维)。在本文中,我们提出计算思维模型(CTM),这是一个将计算思维范式融入LLMs的新颖框架。该框架使LLMs能够通过分解、抽象、归约和模拟等技术重新表述复杂问题。具体而言,实时代码执行被无缝集成到推理过程中,使CTM能够通过计算进行思考。CTM通过定制的强化学习奖励直接将计算思维目标注入LLMs,从而鼓励问题简化、模块化规划和迭代验证。我们在多个代码生成和数学基准上进行了广泛评估。结果表明,CTM在准确性、可解释性和泛化性方面均优于传统推理模型和工具增强基线。我们希望这项研究能为AI推理提供有价值的见解,使LLMs能够像计算机科学家一样,将问题转化为稳健、可验证且可扩展的计算工作流。
英文摘要:
While large language models (LLMs) have demonstrated remarkable reasoning capabilities, they often struggle with complex tasks that require specific thinking paradigms, such as divide-and-conquer and procedural deduction, \etc Previous researches integrate external, reliable tools to alleviate logical inconsistencies and hallucinations in LLMs' problem-solving processes. However, we argue that the root challenge is more profound: LLMs lack the complex thinking paradigms (\ie, computational thinking) during reasoning. In this paper, we propose Computational Thinking Model (CTM), a novel framework that incorporates computational thinking paradigms into LLMs. This framework enables LLMs to reformulate complex problems through decomposition, abstraction, reduction, and simulation, among other techniques. Specifically, live code execution is seamlessly integrated into the reasoning process, allowing CTM to think by computing. CTM directly instills computational thinking objectives into LLMs through tailored reinforcement learning rewards, which encourages problem simplification, modular planning, and iterative verification. We conduct extensive evaluations on multiple code generation and mathematical benchmarks. The results demonstrate that CTM outperforms conventional reasoning models and tool-augmented baselines in terms of accuracy, interpretability, and generalizability. We hope this study offers valuable insights for AI reasoning, where LLMs can transform problems into robust, verifiable, and scalable computational workflows, much like computer scientists do.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。