atlas

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

CodePlan: Unlocking Reasoning Potential in Large Language Models by Scaling Code-form Planning

ICLR 2025 · Large language models › Agents, code and math · approach: Inductive and abstract reasoning evaluation

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.

Proposes CodePlan, which trains LLMs to generate pseudocode plans before responses, using a 2M-example dataset of (prompt, code plan, response) triples auto-annotated from WebInstruct.

Problem

LLMs have weak multi-step planning, and prior fixes rely on prompting or task-specific fine-tuning that generalize poorly; natural-language pretraining corpora do not expose latent reasoning structure.

Approach

Decompose generation into planning (generate a Python-style pseudocode plan) and surface realization (write the response conditioned on the plan), using explicit code plans annotated by an LLM from existing prompt-response corpora, trained as one shared-parameter LM with a combined loss.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Generate and follow code-form plans instead of directly generating responsesMistral-7B · GSM8Kaccuracy: 54.1 -> 59.5Helped
Generate and follow code-form plans instead of directly generating responsesMistral-7B · Last Letteraccuracy: 37.5 -> 57.5Helped
Generate and follow code-form plans instead of directly generating responsesMistral-7B · ALFWorldaccuracy: 14.1 -> 23.2Mixed
Use Llama-3-70B-Instruct instead of Llama-3-8B-Instruct to annotate plans (ablation)CodePlan · Mathematical Reasoningaverage score: 51.7 -> 50.8No clear effect
Use Gemma-2B-Instruct instead of Llama-3-8B-Instruct to annotate plans (ablation)CodePlan · Mathematical Reasoningaverage score: 51.7 -> 45.1Hurt
Replace code-form plans with natural-language plans (ablation)CodePlan · Symbolic reasoningaverage score: +27.2%Helped
Replace code-form plans with natural-language plans (ablation)CodePlan · Decision-makingaverage score: +27.5%Helped
Replace code-form plans with executable code solutions (ablation)CodePlan · SVAMPaccuracyHurt
Replace code-form plans with executable code solutions (ablation)CodePlan · MATHaccuracyHelped
Filter training examples using plan information gain (ablation)CodePlan · Downstream reasoning benchmarksperformanceNo clear effect
Add code-form plans instead of training on prompt-response pairs aloneCodePlan · Response generation NLLnegative log-likelihood: 0.689 -> 0.580Helped

Surprising findings

Limitations

Experimental setup

Datasets: WebInstruct UltraChat GSM8K MATH SVAMP BBH Boolean Expression BBH Dyck Language Coin Flipping Last Letter Concatenation AlpacaEval MT-Bench MuSiQue

Benchmarks: GSM8K MATH SVAMP BBH Boolean Expression Coin Flipping Last Letter Concatenation BBH Dyck Language AlpacaEval 1.0 AlpacaEval 2.0 MT-Bench MuSiQue HotpotQA

Metrics: accuracy win rate GPT-4 score EM F1

Baselines: Plan-and-Solve prompting Quiet-STaR Vanilla training CodeReason (executable code reasoning) natural language planning

Builds on: chain-of-thought Plan-and-Solve prompting Quiet-STaR WebInstruct

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