Unveiling the Magic of Code Reasoning through Hypothesis Decomposition and Amendment
On the map: LLM reasoning → Reasoning for agents, planning and code
Abstract (arXiv)
The reasoning abilities are one of the most enigmatic and captivating aspects of large language models (LLMs). Numerous studies are dedicated to exploring and expanding the boundaries of this reasoning capability. However, tasks that embody both reasoning and recall characteristics are often overlooked. In this paper, we introduce such a novel task, code reasoning, to provide a new perspective for the reasoning abilities of LLMs. We summarize three meta-benchmarks based on established forms of logical reasoning, and instantiate these into eight specific benchmark tasks. Our testing on these benchmarks reveals that LLMs continue to struggle with identifying satisfactory reasoning pathways. Additionally, we present a new pathway exploration pipeline inspired by human intricate problem-solving methods. This Reflective Hypothesis Decomposition and Amendment (RHDA) pipeline consists of the following iterative steps: (1) Proposing potential hypotheses based on observations and decomposing them; (2) Utilizing tools to validate hypotheses and reflection outcomes; (3) Revising hypothesis in light of observations. Our approach effectively mitigates logical chain collapses arising from forgetting or hallucination issues in multi-step reasoning, resulting in performance gains of up to 3×. Finally, we expanded this pipeline by applying it to simulate complex household tasks in real-world scenarios, specifically in VirtualHome, enhancing the handling of failure cases. We release our code and all of results at https://github.com/TnTWoW/codereasoning.
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 22 of its 76 references that are in the map. First posted on arXiv 17 Feb 2025.
Builds on
22 of 76 references.
Closest ancestors · 4
Same direction, newest first
- 2024LLM as a Mastermind: A Survey of Strategic Reasoning with Large Language Models1 Apr
- 2024CodeMind: Evaluating Large Language Models for Code Reasoning15 Feb
- 2023An LLM Compiler for Parallel Function Calling7 Dec
- 2023Chain of Code: Reasoning with a Language Model-Augmented Code Emulator7 Dec
Other references · 18
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
- 2023Qwen Technical Reportcited by 3,344
- 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,076
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
- 2023CRITIC: Large Language Models Can Self-Correct with Tool-Interactive Critiquingcited by 783
- 2022Large Language Models Can Self-Improvecited by 664
- 2023Check Your Facts and Try Again: Improving Large Language Models with External Knowledge and Automated Feedbackcited by 353
- 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 300
- 2016DeepCoder: Learning to Write Programscited by 149
6 more
- 2019On the Measure of Intelligencecited by 144
- 2023The ConceptARC Benchmark: Evaluating Understanding and Generalization in the ARC Domaincited by 101
- 2023Phenomenal Yet Puzzling: Testing Inductive Reasoning Capabilities of Language Models with Hypothesis Refinementcited by 89
- 2023System 2 Attention (is something you might need too)cited by 89
- 2023Boosting Language Models Reasoning with Chain-of-Knowledge Promptingcited by 77
- 2023Code Prompting: a Neural Symbolic Method for Complex Reasoning in Large Language Modelscited by 16
Built on by
Citing papers per year: 2025: 5; 2026: 1.
6 papers.
- 2025Advancing Tool-Augmented Large Language Models via Meta-Verification and Reflection Learningcited by 24
- 2025Route to Reason: Adaptive Routing for LLM and Reasoning Strategy Selectioncited by 23
- 2025Pruning Long Chain-of-Thought of Large Reasoning Models via Small-Scale Preference Optimizationcited by 3
- 2025textttReMind: Understanding Deductive Code Reasoning in LLMscited by 2
- 2026What Really Improves Mathematical Reasoning: Structured Reasoning Signals Beyond Pure Codecited by 1
- 2025MARCO: Meta-Reflection with Cross-Referencing for Code Reasoningcited by 0
- 2026What Really Improves Mathematical Reasoning: Structured Reasoning Signals Beyond Pure Code19 May 2026
- 2025textttReMind: Understanding Deductive Code Reasoning in LLMs1 Nov 2025
- 2025Pruning Long Chain-of-Thought of Large Reasoning Models via Small-Scale Preference Optimization13 Aug 2025
- 2025Advancing Tool-Augmented Large Language Models via Meta-Verification and Reflection Learning5 Jun 2025
- 2025Route to Reason: Adaptive Routing for LLM and Reasoning Strategy Selection26 May 2025
- 2025MARCO: Meta-Reflection with Cross-Referencing for Code Reasoning23 May 2025
Similar, not cited
Close in wording, no citation either way
- 2025An Empirical Study of Reasoning Steps in Thinking Code LLMs
- 2025CodeCrash: Exposing LLM Fragility to Misleading Natural Language in Code Reasoning
- 2026Not All Code Is Equal: A Data-Centric Study of Code Complexity and LLM Reasoning
- 2025RE-IMAGINE: Symbolic Benchmark Synthesis for Reasoning Evaluation
- 2024The Role of Deductive and Inductive Reasoning in Large Language Models
- 2026Exploring Extrinsic and Intrinsic Properties for Effective Reasoning with Code Interpreter
- 2025Reasoning LLMs are Wandering Solution Explorers
- 2024Disentangling Memory and Reasoning Ability in Large Language Models