atlas

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

CURE: Co-Evolving Coders and Unit Testers via Reinforcement Learning

NeurIPS 2025 · Large language models › Reasoning and chain of thought · approach: RL with verifiable rewards for reasoning

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.

CURE co-evolves a single LLM as code generator and unit-test generator via RL using an execution-matrix reward derived from a reward-precision analysis, requiring no ground-truth code, yielding ReasonFlux-Coder 4B/7B/14B.

Problem

Training unit test generators typically requires ground-truth code solutions, which are costly; the paper asks whether code and unit-test generators can co-evolve without ground-truth code to improve coding ability and test-time selection (Best-of-N).

Approach

A self-play RL framework where a single policy generates both code and unit tests, with rewards for tests derived from an execution matrix against generated solutions (estimating a precision-like quantity mu = p_u(1-p_01) - (1-p_u)p_00), plus a response-length-guided reward transformation for long-CoT testers.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Train coder and unit tester jointly with CUREQwen2.5-7B-Instruct and Qwen2.5-14B-Instruct · Five coding benchmarksone-shot code generation accuracy: +5.3%Helped
Train coder and unit tester jointly with CUREQwen2.5-7B-Instruct and Qwen2.5-14B-Instruct · Five coding benchmarks; 16 codes and 16 unit testsBoN accuracy: +9.0%Helped
Train Qwen3-4B with CURE and response-length-guided unit-test rewardsQwen3-4B (Long) · Five coding benchmarksunit-test response length: 64.8% of its original lengthHelped
Use ReasonFlux-Coder-4B-generated unit tests as the reward supervision instead of labeled unit testsQwen2.5-14B-Instruct · Coding taskscode, unit-test, and BoN accuracyNo clear effect
Optimize only code generation instead of jointly optimizing coder and unit tester (ablation)CURE · LiveBenchunit-test accuracyHurt
Use supervised fine-tuning on positive-reward samples instead of reinforcement learning (ablation)CURE · LiveBenchoverall performanceHurt
Replace the theoretically derived unit-test reward with reward 1 if all correct codes pass and 0 otherwise (ablation)CURE · LiveBenchp01: 36.5% -> 42.2%Hurt
Replace the theoretically derived unit-test reward with reward 1 if all correct codes pass and 0 otherwise (ablation)CURE · LiveBenchp00: 9.1% -> 14.7%Hurt

Surprising findings

Limitations

Experimental setup

Datasets: CodeContests CodeForces LiveBench MBPP LiveCodeBench

Benchmarks: LiveBench MBPP LiveCodeBench CodeContests CodeForces

Metrics: unit test accuracy one-shot code accuracy Best-of-N accuracy response length API cost

Baselines: Qwen2.5-Coder-Instruct Qwen2.5-7B-Instruct Qwen2.5-14B-Instruct DeepSeek-Coder-V2-16B Seed-Coder-8B-Instruct Qwen3-4B GPT-4o-mini GPT-4.1-mini GPT-4o MPSC AlphaCodium S*

Builds on: GRPO PPO UTGEN O1-Coder S* MPSC AlphaCodium

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