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

CodeCriticBench: A Holistic Code Critique Benchmark for Large Language Models

Alexander Zhang, Marcus Dong, Jiaheng Liu, Wei Zhang, Yejie Wang, Jian Yang, Ge Zhang, Tianyu Liu, Zhongyuan Peng, Yingshui Tan, Yuanxing Zhang, Zhexu Wang, Weixun Wang, Yancheng He, Ken Deng, Wangchunshu Zhou, Wenhao Huang, Zhaoxiang ZhangarXiv 2025 · DOI

Introduction

While Large Language Models (LLMs) have demonstrated remarkable proficiency in code generation, their ability to act as reliable code reviewers—identifying subtle bugs and providing constructive, multi-dimensional feedback—remains a critical yet under-evaluated frontier. Existing benchmarks often focus on general reasoning or rely on simplistic datasets like HumanEval, which do not sufficiently challenge modern models. Furthermore, most evaluations are limited to binary correctness checks, failing to capture the nuance required for professional code critique.

To address these gaps, we introduce CodeCriticBench, a holistic benchmark designed to measure the "critique capacity" of LLMs across 4,300 tasks. Unlike previous efforts, CodeCriticBench incorporates both code generation and technical Q&A, utilizing a fine-grained scoring system that mirrors real-world senior developer reviews.

Comparison of CodeCriticBench with existing benchmarks, highlighting its unique inclusion of Advanced critique and Code QA.

Methodology

CodeCriticBench employs two distinct evaluation protocols to rigorously test model capabilities:

  1. Basic Critique Evaluation: A binary classification task where models judge if a provided answer is "Correct" or "Error," accompanied by a natural language reasoning process.
  2. Advanced Critique Evaluation: A sophisticated multi-dimensional scoring task. Models evaluate answers on a scale of 1–10 across 10 fine-grained dimensions, including Time Complexity, Space Complexity, Maintainability, Robustness, and Implementation Correctness.

To ensure objective evaluation, the benchmark provides fine-grained evaluation checklists for every problem. Additionally, a specialized "Debug" subset was created by systematically injecting 23 categories of programming errors (e.g., logic errors, security vulnerabilities) into verified code to test precision in bug identification.

The dual evaluation framework of CodeCriticBench, illustrating the flow from problem input to Basic and Advanced critique outputs.

Dataset Composition

The benchmark consists of 4,300 samples sourced from diverse and authentic environments:

  • Code Generation: Competitive programming tasks from CodeForces, MBPP, and LiveCodeBench.
  • Code QA: Real-world technical requirements and responses extracted from StackOverflow.
  • Debug Subset: A collection of buggy code samples generated by prompting LLMs to insert specific error types into correct solutions, subsequently filtered by human experts.

The dataset is balanced across three difficulty levels—Easy (1,517), Medium (1,084), and Hard (1,699)—based on the collective performance of 12 state-of-the-art models.

Key Results and Analysis

An extensive evaluation of 38 LLMs revealed several critical insights into the current state of AI code critique:

  • Top Performers: OpenAI o1-Preview led the benchmark with a 75.30% accuracy in basic critique, followed by DeepSeek-R1 (72.76%) and GPT-4o (68.06%). In advanced scoring, Claude 3.5 Sonnet and DeepSeek-R1 demonstrated the highest consistency with ground-truth labels, achieving the lowest Mean Squared Error (MSE).
  • The "o1" Overthinking Paradox: Reasoning-heavy models like o1 and DeepSeek-R1 dominated "Hard" problems but occasionally underperformed on "Easy" tasks, suggesting a tendency to over-analyze simple logic.
  • Checklist Alignment: Advanced evaluations using multi-dimensional checklists aligned significantly better with human judgment than simple binary checks. Breaking down critiques into specific metrics makes models more reliable judges.
  • Bug Identification Strengths: While models like Doubao-Coder-Preview and GPT-4o showed high precision in identifying security vulnerabilities, most models—including the strongest ones—still struggle to detect subtle performance bottlenecks.

Conclusion and Future Work

CodeCriticBench establishes a new standard for evaluating the reasoning and reliability of LLMs in the coding domain. Our results confirm that critique ability scales with model size and that fine-grained checklists are essential for aligning AI feedback with human standards.

Current limitations include a focus on single-file scenarios. Future iterations of CodeCriticBench will expand to repository-level critiques, requiring models to understand complex cross-file dependencies, and will aim to improve detection capabilities for nuanced performance issues.

Summary updated

BibTeX
@misc{zhang2025codecriticbench,
  author = {Alexander Zhang and Marcus Dong and Jiaheng Liu and Wei Zhang and Yejie Wang and Jian Yang and Ge Zhang and Tianyu Liu and Zhongyuan Peng and Yingshui Tan and Yuanxing Zhang and Zhexu Wang and Weixun Wang and Yancheng He and Ken Deng and Wangchunshu Zhou and Wenhao Huang and Zhaoxiang Zhang},
  title = {{CodeCriticBench: A Holistic Code Critique Benchmark for Large Language Models}},
  year = {2025},
  eprint = {2502.16614},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.16614},
}
Figure