AI
ZeroCoder co-evolves AI code and test generation without labeled training data
A new framework trains code-generating models and test-generating models together using only their own execution feedback, eliminating the need for expensive human-labeled datasets.
Generating reliable code with machine learning typically requires human-written test cases to give models feedback on whether their solutions work. A research team has developed an alternative: ZeroCoder, a framework that trains two models—a code generator and a test generator—in tandem, allowing them to improve each other without any labeled ground-truth data.
The problem with standard approaches#
Most methods for improving code-generating language models rely on reinforcement learning with verifiable rewards (RLVR), which uses execution-based feedback to score generated solutions. However, these pipelines depend on human-curated test cases to reliably measure correctness. This dependency becomes a bottleneck: collecting and labeling high-quality tests is expensive and limits how much the models can improve.
Earlier attempts to reduce this cost by generating tests automatically hit a wall—models that struggle at code generation also tend to produce weak tests, creating a catch-22 where weak tests provide weak feedback.
How ZeroCoder works#
The framework breaks the stalemate by having the Coder and Tester co-evolve together:
- For each coding problem, ZeroCoder samples multiple candidate solutions and multiple test cases, then runs each solution against each test to build a passing matrix
- A pluggable selection algorithm identifies which solutions likely work correctly and which tests are consistent and reliable
- Role-specific rewards are computed based on these validated subsets, guiding both models forward
- The Tester is trained with a curriculum that balances test validity against "discriminativeness"—the ability to distinguish correct from incorrect code
Addressing drift and improving results#
During co-evolution, the researchers found that fixed selection rules become miscalibrated over time—a phenomenon they call selector drift. To correct for this, they introduce DyB4, a Bayesian selector that uses as few as ten labeled examples to dynamically recalibrate its decision boundaries as training progresses.

