atlas

Research map / Large language models / Agents, code and math

Unveiling the Magic of Code Reasoning through Hypothesis Decomposition and Amendment

ICLR 2025 · Large language models › Agents, code and math · approach: Inductive and abstract reasoning evaluation · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Introduces code reasoning as a task spanning inductive, deductive, and abductive reasoning over eight benchmarks, and proposes RHDA, an iterative hypothesis decomposition and amendment pipeline with tool feedback that improves GPT-4o performance.

Problem

LLMs struggle with tasks that combine reasoning and recall, such as code reasoning (inducing, executing, or inverting programs), and existing prompting methods fail to find satisfactory reasoning pathways that generalize to unseen observations.

Approach

An iterative pipeline in which the LLM proposes a step-by-step hypothesis, decomposes it into sub-hypotheses, translates it into executable code, verifies it with an external tool (Python executor or compiler), and amends sub-hypotheses based on the feedback.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use RHDA instead of the strongest listed baselineGPT-4o on inductive code reasoning · List Functiontask accuracy: 41.20 -> 48.80Helped
Use RHDA instead of the strongest listed baselineGPT-4o on inductive code reasoning · MiniARCtask accuracy: 13.08 -> 13.85Helped
Use RHDA instead of the strongest listed baselineGPT-4o on inductive code reasoning · RobustFilltask accuracy: 26.09 -> 34.78Helped
Use RHDA instead of the strongest listed baselineGPT-4o on inductive code reasoning · DeepCodertask accuracy: 26.04 -> 29.17Helped
Use RHDA instead of CoTGPT-4o · CRUXEval (deductive)accuracy: 89.12 -> 90.62Helped
Use RHDA instead of CoTGPT-4o · LiveCodeBench (deductive)accuracy: 83.14 -> 84.16Helped
Add hypothesis decomposition (ablation)RHDA on inductive code reasoning · List Functiontask accuracy: 33.20 -> 48.80Helped
Add hypothesis decomposition (ablation)RHDA on inductive code reasoning · MiniARCtask accuracy: 4.62 -> 13.85Helped
Add hypothesis decomposition (ablation)RHDA on inductive code reasoning · RobustFilltask accuracy: 21.74 -> 34.78Helped
Add hypothesis decomposition (ablation)RHDA on inductive code reasoning · DeepCodertask accuracy: 9.37 -> 29.17Helped
Add amendment reflection (ablation)RHDA on deductive code reasoning · CRUXEvalaccuracy: 86.62 -> 90.62Helped
Add amendment reflection (ablation)RHDA on deductive code reasoning · LiveCodeBenchaccuracy: 71.29 -> 84.16Helped

Surprising findings

Limitations

Experimental setup

Datasets: List Function MiniARC RobustFill DeepCoder CRUXEval LiveCodeBench VirtualHome

Benchmarks: List Function MiniARC RobustFill DeepCoder CRUXEval LiveCodeBench VirtualHome

Metrics: accuracy task accuracy execution error rate API cost

Baselines: IO prompting Program of Thought Chain of Code Self-Consistency Self-Refine Standard prompting Chain of Thought

Builds on: chain-of-thought program of thought self-refine chain of code

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy