EvolveCoder: Evolving Test Cases via Adversarial Verification for Code Reinforcement Learning

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Ruan, Chi, Jiang, Dongfu, Zeng, Huaye, Nie, Ping, Chen, Wenhu
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911511988928512
author Ruan, Chi
Jiang, Dongfu
Zeng, Huaye
Nie, Ping
Chen, Wenhu
author_facet Ruan, Chi
Jiang, Dongfu
Zeng, Huaye
Nie, Ping
Chen, Wenhu
contents Reinforcement learning with verifiable rewards (RLVR) is a promising approach for improving code generation in large language models, but its effectiveness is limited by weak and static verification signals in existing coding RL datasets. In this paper, we propose a solution-conditioned and adversarial verification framework that iteratively refines test cases based on the execution behaviors of candidate solutions, with the goal of increasing difficulty, improving discriminative power, and reducing redundancy. Based on this framework, we introduce EvolveCoder-22k, a large-scale coding reinforcement learning dataset constructed through multiple rounds of adversarial test case evolution. Empirical analysis shows that iterative refinement substantially strengthens verification, with pass@1 decreasing from 43.80 to 31.22. Reinforcement learning on EvolveCoder-22k yields stable optimization and consistent performance gains, improving Qwen3-4B by an average of 4.2 points across four downstream benchmarks and outperforming strong 4B-scale baselines. Our results highlight the importance of adversarial, solution-conditioned verification for effective and scalable reinforcement learning in code generation.
format Preprint
id arxiv_https___arxiv_org_abs_2603_12698
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle EvolveCoder: Evolving Test Cases via Adversarial Verification for Code Reinforcement Learning
Ruan, Chi
Jiang, Dongfu
Zeng, Huaye
Nie, Ping
Chen, Wenhu
Computation and Language
Reinforcement learning with verifiable rewards (RLVR) is a promising approach for improving code generation in large language models, but its effectiveness is limited by weak and static verification signals in existing coding RL datasets. In this paper, we propose a solution-conditioned and adversarial verification framework that iteratively refines test cases based on the execution behaviors of candidate solutions, with the goal of increasing difficulty, improving discriminative power, and reducing redundancy. Based on this framework, we introduce EvolveCoder-22k, a large-scale coding reinforcement learning dataset constructed through multiple rounds of adversarial test case evolution. Empirical analysis shows that iterative refinement substantially strengthens verification, with pass@1 decreasing from 43.80 to 31.22. Reinforcement learning on EvolveCoder-22k yields stable optimization and consistent performance gains, improving Qwen3-4B by an average of 4.2 points across four downstream benchmarks and outperforming strong 4B-scale baselines. Our results highlight the importance of adversarial, solution-conditioned verification for effective and scalable reinforcement learning in code generation.
title EvolveCoder: Evolving Test Cases via Adversarial Verification for Code Reinforcement Learning
topic Computation and Language
url https://arxiv.org/abs/2603.12698