Paper Overview
- Field: Machine Learning (ML)
- Authors: Zhen Zhao, Qihang Yang, Feifei Dai, Xiangfang Li, Bo Li
- Published: 2026-07-24
- arXiv: 2607.22471
- HumanEval: 96.34% Pass@1
- MBPP: 87.40% Pass@1
- APPS: 64.00% Pass@1
- LiveCodeBench: 51.33% Pass@1
Abstract
Large Language Model (LLM)-based Test-Driven Development (TDD) has advanced automated code generation. However, existing approaches depend heavily on human-crafted test cases and cannot operate effectively when only natural-language requirements are available. Although recent work enables automatic test generation, it often overlooks the inherent stochasticity of LLMs, leading to two key defects: faulty tests generate misleading feedback that distorts code optimization, while mixed-quality test cases produce conflicting evaluation signals that hinder reliable code selection.
To address these challenges, we propose MineValiCoder, a collaborative closed-loop TDD framework based on the mutual reinforcement of test-case quality and code quality. MineValiCoder comprises three modules:
1. Test Case Quality Mining (TCQM) — self-verifies and filters faulty tests to provide reliable optimization supervision. 2. Parallel TDD Refinement — uses validated test feedback to iteratively refine code and generate diverse high-quality code candidates. 3. Bipartite-Graph Code-Test Mutual Verification (BiCoTeV) — dynamically models code-test interactions and performs mutual verification scoring for stable and reliable optimal code selection.
Key Results
Evaluated across four LLMs and mainstream benchmarks, MineValiCoder significantly outperforms state-of-the-art methods:
Original Abstract (English)
Large Language Model (LLM)-based Test-Driven Development (TDD) has advanced automated code generation. However, existing approaches depend heavily on human-crafted test cases and cannot operate effectively when only natural-language requirements are available. Although recent work enables automatic test generation, it often overlooks the inherent stochasticity of LLMs, leading to two key defects: faulty tests generate misleading feedback that distorts code optimization, while mixed-quality test cases produce conflicting evaluation signals that hinder reliable code selection. To address these challenges, we propose MineValiCoder, a collaborative closed-loop TDD framework based on the mutual reinforcement of test-case quality and code quality. MineValiCoder comprises three modules. The Test Case Quality Mining (TCQM) module self-verifies and filters faulty tests to provide reliable optimization supervision. The Parallel TDD Refinement module iteratively refines code using validated test feedback and generates diverse high-quality code candidates. The Bipartite-Graph Code-Test Mutual Verification (BiCoTeV) module dynamically models code-test interactions and performs mutual verification scoring for stable and reliable optimal code selection. Extensive evaluations across four LLMs and mainstream benchmarks show that MineValiCoder significantly outperforms state-of-the-art methods, achieving 96.34% Pass@1 on HumanEval, 87.40% on MBPP, 64.00% on APPS, and 51.33% on LiveCodeBench. These results demonstrate MineValiCoder's effectiveness in mitigating LLM randomness and improving the reliability of automated code generation.