NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

AutoCodeBench: Large Language Models are Automatic Code Benchmark Generators

Changzhi Zhou, Ao Liu, Yuchi Deng, Zhiying Zeng, Tao Zhang, Haotian Zhu, Jianwei Cai, Yue Mao, Chenchen Zhang, Lingyun Tan, ZiyanXU, Bohui Zhai, HengyiLIu, Speed Zhu, Wiggin Zhou, Fengzong Lian

TL;DR

AutoCodeBench introduces a fully automated framework, AutoCodeGen, that leverages Large Language Models (LLMs) and a multilingual sandbox to generate high-difficulty coding benchmarks across 20 programming languages without manual intervention. The resulting dataset reveals that even state-of-the-art models like Claude Opus 4.1 and GPT-5 still struggle with complex, "multi-logical" programming tasks, particularly in low-resource languages.

The Problem: Outgrowing Traditional Benchmarks

Evaluating how well LLMs write code has traditionally relied on benchmarks like HumanEval or MBPP. However, as AI capabilities rapidly advance, these datasets face three major hurdles:

  1. Scalability Bottlenecks: They rely heavily on manual annotation, making it slow and expensive to add new languages or complex problems.
  2. Difficulty Saturation: Modern models are starting to "solve" these older benchmarks, which mostly focus on short, algorithmic Python snippets rather than complex software engineering tasks.
  3. Language Bias: Most benchmarks are heavily skewed toward Python. This leaves a massive gap in evaluating performance for low-resource or niche languages like Elixir, Racket, or Dart.

To truly advance AI coding, the community needs a way to automatically generate diverse, verifiable, and challenging problems that reflect real-world software engineering—where a single task might require implementing multiple interconnected functions or classes.

Methodology: The AutoCodeGen Framework

To overcome these limitations, the authors propose AutoCodeGen, a "reverse-generation" pipeline that prioritizes execution over description. Instead of writing a prompt and hoping the LLM can solve it, the system works backward from working code.

AutoCodeGen Pipeline

The pipeline consists of several key stages:

  1. Code Refinement: It starts with raw code snippets scraped from the web (e.g., Stack-Edu) and uses an LLM to refine them into self-contained, high-quality solutions.
  2. Test Input Generation: An LLM generates potential test inputs for that specific code.
  3. Sandbox Execution: These inputs are run through a high-concurrency multilingual sandbox to obtain ground-truth outputs. This ensures the test cases are 100% verifiable.
  4. Reverse Problem Generation: Only after the code and tests are verified does an LLM write the natural language problem description. This prevents the common issue of "hallucinated" requirements that don't match the underlying code.
  5. Multi-Stage Filtering: The team uses a "Difficulty Control" step (discarding problems a smaller model can easily solve) and an "LLM-as-Critic" step to prune low-quality or ambiguous tasks.

By using this "push-and-pull" mechanism—where one model generates and a different, reasoning-heavy model critiques—the authors achieved an impressive 87.6% human-verified accuracy rate for an entirely machine-generated benchmark.

Datasets Generated

  • AutoCodeBench (ACB-Full): The primary benchmark consisting of 3,920 problems evenly distributed across 20 programming languages.
  • ACB-Lite & ACB-Complete: Subsets designed for faster evaluation and testing base (non-chat) models.
  • AutoCodeInstruct: A massive training resource of 37,000 verifiable problems generated using the same pipeline to help train future coding models.

Key Findings and Results

Extensive testing on AutoCodeBench demonstrates that current models still have a long way to go before mastering multilingual code generation.

Main Results across 20 Languages
  • State-of-the-Art Performance: Claude Opus 4.1 emerged as the top performer with an average Pass@1 score of 55.4%, followed closely by GPT-5 and o3-high.
  • High Difficulty: Over 60% of the problems in the benchmark are classified as "Hard." With no current model surpassing a 56% average, the benchmark proves it is far from being saturated.
  • The "Multi-Logical" Challenge: The paper introduces tasks requiring the implementation of multiple functions or classes simultaneously. Results show a significant performance drop across all models on these tasks, suggesting that "reasoning" in code is about more than just following a single algorithmic path.
  • The Low-Resource Gap: The performance gap between models widens significantly in low-resource languages (like Elixir or Julia) compared to popular ones (like Python or C++), highlighting a major area for future model improvement.
  • The Power of Feedback: By allowing models to see error messages from the sandbox and "try again" (multi-turn refinement), performance improved drastically. For example, Qwen2.5-Coder-32B improved its score from 35.8% to 47.4% after three turns.
  • Complementary Strengths: While no single model dominated every language, the "Current Upper Bound" (the union of all problems solved by at least one model) reached 75.3%. This indicates that different models have vastly different "blind spots" in their training data.

Limitations and Future Work

While highly effective, the automated pipeline is not flawless. Human verification found that 13.7% of failed tasks were due to "Problem Design Errors" (such as ambiguous descriptions) or "Test Design Errors."

The authors suggest that future iterations should:

  • Scale to Repositories: Move beyond single-file tasks to "repository-level" evaluation where models must understand complex, multi-file dependencies.
  • Agentic Evaluation: Use the framework to test "AI Agents" that can browse files and use tools, rather than just generating a single block of code.
  • Self-Correction: Incorporate even more rigorous validation loops (double or triple-checks) to further reduce noise in the automated generation process.

Summary updated

BibTeX
@inproceedings{zhou2026autocodebench,
  author = {Changzhi Zhou and Ao Liu and Yuchi Deng and Zhiying Zeng and Tao Zhang and Haotian Zhu and Jianwei Cai and Yue Mao and Chenchen Zhang and Lingyun Tan and ZiyanXU and Bohui Zhai and HengyiLIu and Speed Zhu and Wiggin Zhou and Fengzong Lian},
  title = {{AutoCodeBench: Large Language Models are Automatic Code Benchmark Generators}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=fN0MED2Idq},
}
Figure