# Co-Evolving LLM Coder and Unit Tester via Reinforcement Learning

Source: [Co-Evolving LLM Coder and Unit Tester via Reinforcement Learning](<https://www.sota2.com/research/paper/68fa7b951e209131cea89494>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2025-10-26T05:43:27.824Z

Authors: Yinjie Wang, Ling Yang, Ye Tian, Ke Shen, Mengdi Wang

Published: 2025-06-03T17:58:42.000Z

## Abstract

We propose CURE, a novel reinforcement learning framework with a dedicated reward design that co-evolves coding and unit test generation capabilities based on their interaction outcomes, without any ground-truth code as supervision. This approach enables flexible and scalable training and allows the unit tester to learn directly from the coder's mistakes. Our derived ReasonFlux-Coder-7B and 14B models improve code generation accuracy by 5.3% and Best-of-N accuracy by 9.0% after optimization on Qwen2.5-Instruct models, outperforming similarly sized Qwen-Coder, DeepSeek-Coder, and Seed-Coder. They naturally extend to downstream tasks such as test-time scaling and agentic coding-achieving a 8.1% improvement over the base model. For the long-CoT model, our ReasonFlux-Coder-4B consistently outperforms Qwen3-4B while achieving 64.8% inference efficiency in unit test generation. Notably, we also find that our model can serve as an effective reward model for reinforcement learning on base models. Project: https://github.com/Gen-Verse/CURE

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Code Generation on CodeContests (test)](<https://www.sota2.com/research/sota/code-generation-on-codecontests-test.md>): Code Generation; CodeContests (test); Pass@1: 32.1.

- [Code Generation on MBPP (test)](<https://www.sota2.com/research/sota/code-generation-on-mbpp-test.md>): Code Generation; MBPP (test); Pass@1: 78.5.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2506.03136>)

[PDF](<https://arxiv.org/pdf/2506.03136.pdf>)
