TL;DR
LLMs struggle to generate correct code without ground-truth unit tests (reference tests), which are expensive to create and limit scalability. CoSPlay, a training-free framework, jointly improves code and self-generated unit tests through cooperative iteration, using execution feedback to prune weak solutions.
✦ Why It Matters
Engineers can now generate reliable code without expensive ground-truth test data, scaling inference-time computation instead of training.
Key Takeaways
How It Works
CoSPlay operates by generating its own unit tests and using them to evaluate and refine code candidates. It employs a cooperative self-play mechanism where both code and tests evolve together.
The framework identifies diverse solution ideas and their failure modes, producing discriminative unit test ideas. By analyzing the execution results, it iteratively prunes weak code and updates unreliable tests, ensuring that the best-performing code is selected based on consensus among outputs.
Related