CoCoEvo: Co-Evolution of Programs and Test Cases to Enhance Code Generation
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) have shown remarkable performance in automated code generation. However, existing approaches often rely heavily on pre-defined test cases, which become impractical in scenarios where such cases are unavailable. While prior works explore filtering techniques between programs and test cases, they overlook the refinement of test cases. To address this limitation, we introduce CoCoEvo, a novel LLM-based co-evolution framework that simultaneously evolves programs and test cases. CoCoEvo eliminates the dependency on pre-defined test cases by generating both programs and test cases directly from natural language problem descriptions and function headers. The framework employs specialized evolutionary operators, including LLM-based crossover and mutation operators for program evolution, along with an additional test case generation operator for test case evolution. Additionally, we propose optimization strategies such as a crossover rate scheduler to balance exploration and convergence, and a multi-objective optimization method for test case selection. Experimental results on multiple state-of-the-art LLMs demonstrate that CoCoEvo surpasses existing methods, achieving state-of-the-art performance in automated code generation and testing. These results underscore the potential of co-evolutionary techniques in advancing the field of automated programming.
Key facts. Cited by 14 papers in the map (data through 7 Oct 2026). Builds on 33 of its 58 references that are in the map. First posted on arXiv 15 Feb 2025.
Builds on
33 of 58 references.
References · 33
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2016SGDR: Stochastic Gradient Descent with Warm Restartscited by 4,993
- 2024GPT-4o System Cardcited by 4,467
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2024Qwen2.5-Coder Technical Reportcited by 1,151
- 2023Eureka: Human-Level Reward Design via Coding Large Language Modelscited by 542
- 2022CodeT: Code Generation with Generated Testscited by 369
- 2024ReEvo: Large Language Models as Hyper-Heuristics with Reflective Evolutioncited by 266
- 2024Evolution of Heuristics: Towards Efficient Automatic Algorithm Design Using Large Language Modelcited by 258
- 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 193
21 more
- 2023Is Self-Repair a Silver Bullet for Code Generation?cited by 191
- 2019SPoC: Search-based Pseudocode to Codecited by 176
- 2023EvoPrompting: Language Models for Code-Level Neural Architecture Searchcited by 129
- 2024Debug like a Human: A Large Language Model Debugger via Verifying Runtime Execution Step-by-stepcited by 123
- 2022Natural Language to Code Translation with Executioncited by 122
- 2023Language Model Crossover: Variation through Few-Shot Promptingcited by 119
- 2022Large Language Models are Few-shot Testers: Exploring LLM-based General Bug Reproductioncited by 110
- 2023Self-Edit: Fault-Aware Code Editor for Code Generationcited by 110
- 2024Automated Unit Test Improvement using Large Language Models at Metacited by 73
- 2024DevEval: A Manually-Annotated Code Generation Benchmark Aligned with Real-World Code Repositoriescited by 71
- 2021TOGA: A Neural Method for Test Oracle Generationcited by 57
- 2023Using Large Language Models to Generate JUnit Tests: An Empirical Studycited by 53
- 2023Algorithm Evolution Using Large Language Modelcited by 52
- 2023CodeCoT: Tackling Code Syntax Errors in CoT Reasoning for Code Generationcited by 29
- 2024Large Language Models as Test Case Generators: Performance Evaluation and Enhancementcited by 27
- 2024TOGLL: Correct and Strong Test Oracle Generation with LLMscited by 23
- 2024A Pair Programming Framework for Code Generation via Multi-Plan Exploration and Feedback-Driven Refinementcited by 21
- 2024TestART: Improving LLM-based Unit Testing via Co-evolution of Automated Generation and Repair Iterationcited by 20
- 2023Neural-Based Test Oracle Generation: A Large-scale Evaluation and Lessons Learnedcited by 9
- 2024REACCEPT: Automated Co-evolution of Production and Test Code Based on Dynamic Validation and Large Language Modelscited by 5
- 2024AutoTest: Evolutionary Code Solution Selection with Test Casescited by 1
Built on by
Citing papers per year: 2025: 5; 2026: 9.
14 papers.
Sort:
By area:
- 2025Learning to Generate Unit Test via Adversarial Reinforcement Learningcited by 11
- 2025InfCode: Adversarial Iterative Refinement of Tests and Patches for Reliable Software Issue Resolutioncited by 7
- 2025EvoCAD: Evolutionary CAD Code Generation with Vision Language Modelscited by 6
- 2026AdaExplore: Failure-Driven Adaptation and Diversity-Preserving Search for Efficient Kernel Generationcited by 3
- 2026Efficient Test-Time Scaling via Temporal Reasoning Aggregationcited by 2
- 2026Beyond Fail-to-Pass: Iterative Hardening of Co-Generated Bug Reproduction Tests and Fixescited by 2
- 2026TDD-Agent: Test-Driven Reasoning for Code Generationcited by 2
- 2025REMoH: A Reflective Evolution of Multi-objective Heuristics approach via Large Language Modelscited by 1
- 2025BackportBench: A Multilingual Benchmark for Automated Backporting of Patchescited by 1
- 2026Overlooked Safety Vulnerability in LLMs: Malicious Intelligent Optimization Algorithm Request and its Jailbreakcited by 1
- 2026ACES: Who Tests the Tests? Leave-One-Out AUC Consistency for Code Generationcited by 1
- 2026DyACE: Dynamic Algorithm Co-evolution for Online Automated Heuristic Design with Large Language Modelcited by 0
- 2026CliffCompaction: Cost-Efficient Compaction for Long-Horizon Coding Agents22 Sep 2026
- 2026TDD-Agent: Test-Driven Reasoning for Code Generation17 Aug 2026
- 2026Beyond Fail-to-Pass: Iterative Hardening of Co-Generated Bug Reproduction Tests and Fixes22 Jul 2026
- 2026Efficient Test-Time Scaling via Temporal Reasoning Aggregation19 Apr 2026
- 2026AdaExplore: Failure-Driven Adaptation and Diversity-Preserving Search for Efficient Kernel Generation17 Apr 2026
- 2026ACES: Who Tests the Tests? Leave-One-Out AUC Consistency for Code Generation5 Apr 2026
- 2026Evolving Jailbreaks: Automated Multi-Objective Long-Tail Attacks on Large Language Models20 Mar 2026
- 2026DyACE: Dynamic Algorithm Co-evolution for Online Automated Heuristic Design with Large Language Model7 Mar 2026
- 2026Overlooked Safety Vulnerability in LLMs: Malicious Intelligent Optimization Algorithm Request and its Jailbreak1 Jan 2026
- 2025BackportBench: A Multilingual Benchmark for Automated Backporting of Patches1 Dec 2025
- 2025InfCode: Adversarial Iterative Refinement of Tests and Patches for Reliable Software Issue Resolution20 Nov 2025
- 2025EvoCAD: Evolutionary CAD Code Generation with Vision Language Models13 Oct 2025
- 2026TDD-Agent: Test-Driven Reasoning for Code Generation17 Aug 2026
- 2026Efficient Test-Time Scaling via Temporal Reasoning Aggregation19 Apr 2026
- 2025Learning to Generate Unit Test via Adversarial Reinforcement Learningcited by 11
- 2025InfCode: Adversarial Iterative Refinement of Tests and Patches for Reliable Software Issue Resolutioncited by 7
- 2025EvoCAD: Evolutionary CAD Code Generation with Vision Language Modelscited by 6
- 2026AdaExplore: Failure-Driven Adaptation and Diversity-Preserving Search for Efficient Kernel Generationcited by 3
- 2026Beyond Fail-to-Pass: Iterative Hardening of Co-Generated Bug Reproduction Tests and Fixescited by 2
- 2025REMoH: A Reflective Evolution of Multi-objective Heuristics approach via Large Language Modelscited by 1
- 2025BackportBench: A Multilingual Benchmark for Automated Backporting of Patchescited by 1
- 2026ACES: Who Tests the Tests? Leave-One-Out AUC Consistency for Code Generationcited by 1
- 2026DyACE: Dynamic Algorithm Co-evolution for Online Automated Heuristic Design with Large Language Modelcited by 0
- 2026Beyond Fail-to-Pass: Iterative Hardening of Co-Generated Bug Reproduction Tests and Fixes22 Jul 2026
- 2026AdaExplore: Failure-Driven Adaptation and Diversity-Preserving Search for Efficient Kernel Generation17 Apr 2026
- 2026ACES: Who Tests the Tests? Leave-One-Out AUC Consistency for Code Generation5 Apr 2026
- 2026DyACE: Dynamic Algorithm Co-evolution for Online Automated Heuristic Design with Large Language Model7 Mar 2026
- 2025BackportBench: A Multilingual Benchmark for Automated Backporting of Patches1 Dec 2025
- 2025InfCode: Adversarial Iterative Refinement of Tests and Patches for Reliable Software Issue Resolution20 Nov 2025
- 2025EvoCAD: Evolutionary CAD Code Generation with Vision Language Models13 Oct 2025
- 2025Learning to Generate Unit Test via Adversarial Reinforcement Learning28 Aug 2025
- 2025REMoH: A Reflective Evolution of Multi-objective Heuristics approach via Large Language Models9 Jun 2025