atlas

Research map / Large language models / Reasoning and chain of thought

CodeIO: Condensing Reasoning Patterns via Code Input-Output Prediction

ICML 2025 · Large language models › Reasoning and chain of thought · approach: Long CoT dynamics and efficiency

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 CodeI/O, which trains LLMs to predict code inputs/outputs with natural-language CoTs (distilled from DeepSeek-V2.5) as a first-stage intermediate training step, plus CodeI/O++ with execution-verified multi-turn revision, improving general reasoning across 14 benchmarks.

Problem

Reasoning training data beyond math and code generation is sparse and fragmented, and raw code training carries reasoning signals that are implicit and noisy.

Approach

Transform raw code into executable functions with queries, generated inputs and execution-verified outputs, then train models to predict outputs from inputs (or feasible inputs from outputs) entirely in natural-language CoT, decoupling reasoning from code syntax; a two-stage training with a separate instruction-tuning stage follows, and execution feedback drives a second revision turn (CodeI/O++).

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add CodeI/O training before instruction tuningQwen 2.5 Coder 7B · 14-benchmark AVGaverage score: 54.8 -> 57.2Helped
Add CodeI/O training before instruction tuningLLaMA 3.1 8B · 14-benchmark AVGaverage score: 49.3 -> 51.2Helped
Add CodeI/O training before instruction tuningDeepSeek Coder v2 Lite 16B · 14-benchmark AVGaverage score: 51.6 -> 53.6Helped
Add CodeI/O training before instruction tuningGemma 2 27B · 14-benchmark AVGaverage score: 59.5 -> 60.9Helped
Add execution-feedback-based single-turn revision to CodeI/O responsesQwen 2.5 Coder 7B · 14-benchmark AVGaverage score: 57.2 -> 57.7Helped
Add execution-feedback-based single-turn revision to CodeI/O responsesDeepSeek Coder v2 Lite 16B · 14-benchmark AVGaverage score: 53.6 -> 53.5No clear effect
Use only input-prediction samples instead of both prediction types (ablation)CodeI/O · 14-benchmark AVGaverage score: 57.2 -> 56.1Hurt
Use only output-prediction samples instead of both prediction types (ablation)CodeI/O · 14-benchmark AVGaverage score: 57.2 -> 56.4Hurt
Remove incorrect responses by rejection sampling (ablation)CodeI/O · 14-benchmark AVGaverage score: 57.2 -> 56.5Hurt
Replace incorrect responses with code-executed ground-truth answers without CoT (ablation)CodeI/O · 14-benchmark AVGaverage score: 57.2 -> 56.6Hurt
Remove CodeMix samples (ablation)CodeI/O · 14-benchmark AVGaverage score: 57.2 -> 56.3Hurt
Remove PyEdu-R samples (ablation)CodeI/O · 14-benchmark AVGaverage score: 57.2 -> 57.0Hurt

Surprising findings

Limitations

Experimental setup

Datasets: CodeMix PyEdu-R (Python-Edu subset) TheAlgorithms Python Project Euler LeetCode/Codewars/Edabit/Codeforces/AtCoder/CodeChef problems in-house instruction-tuning data WebInstruct OpenMathInstruct-2 OpenCoder-SFT-Stage-1 Tulu-3

Benchmarks: WinoGrande DROP GSM8K MATH GPQA MMLU-STEM LeetCode-O CRUXEval-I CRUXEval-O BBH-EN BBH-ZH ZebraLogic

Metrics: accuracy F1 average score

Baselines: WebInstruct OpenMathInstruct-2 OpenCoder-SFT-Stage-1 Python-Edu WebInstruct-DS25 Tulu-3

Builds on: CRUXEval Python-Edu rejection sampling

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