mlsanityData to 14 Oct 2026

Unveiling the Magic of Code Reasoning through Hypothesis Decomposition and Amendment

arXiv 2502.13170 ↗First posted 17 Feb 2025cs.AI cs.LGcited by 6

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

  1. 2024LLM as a Mastermind: A Survey of Strategic Reasoning with Large Language Models1 Apr
  2. 2024CodeMind: Evaluating Large Language Models for Code Reasoning15 Feb
  3. 2023An LLM Compiler for Parallel Function Calling7 Dec
  4. 2023Chain of Code: Reasoning with a Language Model-Augmented Code Emulator7 Dec

Other references · 18

  1. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  2. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  3. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  4. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
  5. 2023Qwen Technical Reportcited by 3,344
  6. 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,076
  7. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
  8. 2023CRITIC: Large Language Models Can Self-Correct with Tool-Interactive Critiquingcited by 783
  9. 2022Large Language Models Can Self-Improvecited by 664
  10. 2023Check Your Facts and Try Again: Improving Large Language Models with External Knowledge and Automated Feedbackcited by 353
  11. 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 300
  12. 2016DeepCoder: Learning to Write Programscited by 149
6 more
  1. 2019On the Measure of Intelligencecited by 144
  2. 2023The ConceptARC Benchmark: Evaluating Understanding and Generalization in the ARC Domaincited by 101
  3. 2023Phenomenal Yet Puzzling: Testing Inductive Reasoning Capabilities of Language Models with Hypothesis Refinementcited by 89
  4. 2023System 2 Attention (is something you might need too)cited by 89
  5. 2023Boosting Language Models Reasoning with Chain-of-Knowledge Promptingcited by 77
  6. 2023Code Prompting: a Neural Symbolic Method for Complex Reasoning in Large Language Modelscited by 16

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 5; 2026: 1.

6 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025An Empirical Study of Reasoning Steps in Thinking Code LLMs
  2. 2025CodeCrash: Exposing LLM Fragility to Misleading Natural Language in Code Reasoning
  3. 2026Not All Code Is Equal: A Data-Centric Study of Code Complexity and LLM Reasoning
  4. 2025RE-IMAGINE: Symbolic Benchmark Synthesis for Reasoning Evaluation
  5. 2024The Role of Deductive and Inductive Reasoning in Large Language Models
  6. 2026Exploring Extrinsic and Intrinsic Properties for Effective Reasoning with Code Interpreter
  7. 2025Reasoning LLMs are Wandering Solution Explorers
  8. 2024Disentangling Memory and Reasoning Ability in Large Language Models