Code to Think, Think to Code: A Survey on Code-Enhanced Reasoning and Reasoning-Driven Code Intelligence in LLMs
Dayu Yang, Tianyang Liu, Daoan Zhang, Antoine Simoulin, Xiaoyi Liu, Yuwei Cao et al. · 2025 · 35 citationsRead the paper
Code and reasoning recently exhibit a mutually reinforcing relationship in large language models (LLMs): Code is abstract, modular, highly structured and has strong logic, guiding reasoning in training and inference. While reasoning translates high-level goals into small executable steps, enable more sophisticated code intellignece, solving real-world challenging software development problems. In this study, we examine how code serves as a structured medium for enhancing reasoning - providing verifiable execution paths, enforcing logical decomposition, and enabling runtime validation, and how advances in reasoning have transformed code intelligence from basic completion to sophisticated agent - enabling models to tackle complex software engineering tasks through deliberate planning and systematic debugging. Finally, we identify key challenges and propose future research directions may deepen the synergy, ultimately advancing LLM performance in both complex reasoning and code intelligence.
What the full text shows
Working prototype- Program-of-Thoughts (PoT) using GPT-4 achieves high accuracy on numerical reasoning. — 97.2% on GSM8K (Using deterministic code execution)
- AgentCoder using GPT-4 significantly improves code generation performance. — 96.3% on HumanEval (Using structured planning and iterative refinement)
- MARIO training with Python interpreter traces improves mathematical reasoning. — +26.7 on GSM8K score (Compared to Lemma baseline)
- OpenCodeInterpreter achieves high performance through immediate execution feedback. — 92.7% on HumanEval (Fine-tuned DeepseekCoder-33B)
- Agentic systems show lower success rates on repository-level tasks compared to single-function tasks. — 18.0% to 27.3% on SWE-Bench (Lite) (Using models like GPT-4 Turbo and Claude-3.5-Sonnet)
- Setup
- Analysis of multiple LLMs (GPT-4, GPT-3.5, Llama-2, Codex, DeepseekCoder) across various benchmarks including GSM8K, MATH, HumanEval, MBPP, and SWE-Bench.
- How
- The paper is a survey that analyzes the bidirectional relationship between code and reasoning, categorizing methods into code-enhanced reasoning (e.g., PaL, PoT) and reasoning-enhanced code intelligence (e.g., AgentCoder, SWE-agent). It evaluates these methods across benchmarks like GSM8K, HumanEval, and SWE-Bench.
- Limitations
- Lack of interpretability and debuggability of LLM-generated code · Difficulty in matching human-level performance on complex software engineering tasks · Dependence on the power of the underlying backbone LLM
Summarized by Gemma 4 from the open-access full text · 24 Nov 2026. Read it