arXiv:2502.19411cs.CLcs.AI2025-02EMNLP综述被引 60

代码与推理相互增强,提升大模型的逻辑能力与编程智能

Code to Think, Think to Code: A Survey on Code-Enhanced Reasoning and Reasoning-Driven Code Intelligence in LLMs

  • 用代码提供可验证、模块化的逻辑结构,强化推理能力
  • 推理进步使模型从简单补全升级为规划与调试复杂任务
  • 适合研究大模型推理与代码生成交叉方向的学者

在大语言模型中,代码与推理相互促进:代码以抽象、模块化和逻辑驱动的结构支持推理,而推理将高层目标分解为可执行步骤,推动代码智能的发展。本文探讨代码如何作为结构化媒介增强推理——提供可验证的执行路径,强制逻辑分解,并实现运行时验证。同时研究推理能力提升如何推动代码智能从基础补全演进至高级能力,使模型可通过规划与调试完成复杂软件工程任务。最后,识别关键挑战并提出未来研究方向,旨在加强两者协同,全面提升大模型在推理与代码智能方面表现。

原文摘要 · Abstract (English)

In large language models (LLMs), code and reasoning reinforce each other: code offers an abstract, modular, and logic-driven structure that supports reasoning, while reasoning translates high-level goals into smaller, executable steps that drive more advanced code intelligence. In this study, we examine how code serves as a structured medium for enhancing reasoning: it provides verifiable execution paths, enforces logical decomposition, and enables runtime validation. We also explore how improvements in reasoning have transformed code intelligence from basic completion to advanced capabilities, enabling models to address complex software engineering tasks through planning and debugging. Finally, we identify key challenges and propose future research directions to strengthen this synergy, ultimately improving LLM's performance in both areas.

代码推理大模型智能编程

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