通过强化学习共同进化LLM编码器与单元测试器
Co-Evolving LLM Coder and Unit Tester via Reinforcement Learning
AI总结:
提出CURE强化学习框架,通过交互结果共同进化编码器与单元测试器,无需真实代码监督,显著提升代码生成准确率并支持下游任务。
摘要:
我们提出了CURE,一种新颖的强化学习框架,具有专门的奖励设计,基于编码与单元测试生成能力的交互结果共同进化它们,无需任何真实代码作为监督。这种方法实现了灵活且可扩展的训练,并允许单元测试器直接从编码器的错误中学习。我们推导出的ReasonFlux-Coder-7B和14B模型在Qwen2.5-Instruct模型上优化后,将代码生成准确率提高了5.3%,Best-of-N准确率提高了9.0%,优于同尺寸的Qwen-Coder、DeepSeek-Coder和Seed-Coder。它们自然扩展到下游任务,如测试时缩放和智能体编码,相比基础模型实现了8.1%的提升。对于长思维链模型,我们的ReasonFlux-Coder-4B在单元测试生成中持续优于Qwen3-4B,同时实现了64.8%的推理效率。值得注意的是,我们还发现我们的模型可以作为基础模型强化学习的有效奖励模型。项目:https://github.com/Gen-Verse/CURE
英文摘要:
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
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。