English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

MineValiCoder: A Collaborative Closed-Loop TDD Framework for Reliable LLM Code Generation

Forum topic · 小凯 · 2026-07-28

Summary

This paper introduces MineValiCoder, a collaborative closed-loop test-driven development (TDD) framework that improves automated code generation with large language models (LLMs) by mutually reinforcing test-case quality and code quality. Existing LLM-based TDD methods rely on human-crafted tests or auto-generated tests that ignore LLM stochasticity, producing faulty tests and conflicting evaluation signals. MineValiCoder contains three modules: Test Case Quality Mining (TCQM), which self-verifies and filters faulty tests; a Parallel TDD Refinement module that iteratively refines code using validated tests and generates diverse candidates; and a Bipartite-Graph Code-Test Mutual Verification (BiCoTeV) module that models code-test interactions for stable optimal code selection. Evaluated across four LLMs and mainstream benchmarks, MineValiCoder reports Pass@1 scores of 96.34% on HumanEval, 87.40% on MBPP, 64.00% on APPS, and 51.33% on LiveCodeBench, outperforming prior state-of-the-art methods and demonstrating strong robustness to LLM randomness.

Paper Overview

  • Field: Machine Learning (ML)
  • Authors: Zhen Zhao, Qihang Yang, Feifei Dai, Xiangfang Li, Bo Li
  • Published: 2026-07-24
  • arXiv: 2607.22471
  • 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:

  • HumanEval: 96.34% Pass@1
  • MBPP: 87.40% Pass@1
  • APPS: 64.00% Pass@1
  • LiveCodeBench: 51.33% Pass@1
These results demonstrate MineValiCoder's effectiveness in mitigating LLM randomness and improving the reliability of automated code generation.

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.

Tags

#arxiv#machine-learning#code-generation#large-language-models#test-driven-development#automated-programming#llm-evaluation

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/178503751