Code to Think, Think to Code: A Survey on Code-Enhanced Reasoning and Reasoning-Driven Code Intelligence in LLMs
Yang, Dayu, Tianyang Liu, Daoan Zhang, Antoine Simoulin, Xiaoyi Liu, Yuwei Cao et al. · 2025 · 48 citationsRead the paper
All 11 authors
Teng, Zhaopu, Qian, Xin, Grey Yang, Jiebo Luo, Julian McAuley
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.
What the full text shows
Working prototype- MARIO improves mathematical reasoning performance on GSM8K and MATH benchmarks. — +28.5% on GSM8K, +18.4% on MATH vs. baseline (34B model trained with Python interpreter traces)
- PoT (Program of Thoughts) achieves high accuracy on mathematical benchmarks. — 97.2% on GSM8K, 97.4% on SVAMP (GPT-4 model)
- CODEPLAN enhances instruction-following and decision-making. — +5.7 on AlpacaEval-2, +10.1 on ALFWorld vs. baseline (13B model)
- SIAM improves mathematical reasoning across multiple datasets. — +4.7 on APE, +5.9 on CMATH, +2.0 on GSM8K vs. baseline (7B model using a code-based critic model)
- CodeCoT significantly improves code generation correctness. — 79.3% on HumanEval, 89.5% on MBPP (GPT-3.5 model)
- POET improves common sense logic performance. — +1.1% on HotpotQA, +2.2% on LogiQA, +1.7% on DROP vs. baseline (355M model pretrained on programs and execution results)
- Setup
- Evaluation across multiple benchmarks including GSM8K, MATH, SVAMP, HumanEval, MBPP, and SWE-bench using models ranging from 355M to 70B parameters.
- How
- The paper is a survey that analyzes the synergy between code and reasoning, evaluating methods that use code as a scaffolding for reasoning (e.g., PaL, PoT) and methods that use reasoning to improve code intelligence (e.g., CodeAgents). It compares various LLM architectures and training strategies across mathematical, logical, and software engineering benchmarks.
- Limitations
- LLM-generated code may not faithfully reflect the model's actual chain of thought. · Manual inspection of generated code is time-consuming and prone to oversight. · Matching human-level performance in complex software engineering remains challenging.
Summarized by Gemma 4 from the open-access full text · 24 Nov 2026. Read it