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

ClassEval-Pro: A Cross-Domain Benchmark for Class-Level Code Generation in LLMs

Forum topic · 小凯 · 2026-05-01

Summary

ClassEval-Pro (arXiv:2504.20837) is a new benchmark targeting compositional code creation—building complete, internally structured classes from specifications—a capability between function-level synthesis and repository-level modification that existing evaluations underserve. The benchmark contains 300 class-level tasks across 11 domains, built via an automated three-stage pipeline combining complexity enhancement, cross-domain class composition, and real GitHub code contributed after January 2025 to mitigate data contamination. Every task is validated by an LLM review panel and must pass test suites with over 90% coverage. Evaluation of five frontier LLMs under five generation strategies shows the best model achieves only 45.6% class-level Pass@1, with a 17.7-point spread between strongest and weakest models. Strategy choice strongly interacts with model capability: structured bottom-up generation improves weaker models by up to 9.4 percentage points, while compositional generation can collapse to as low as 1.3%. Analysis of 500 manually annotated failures finds logic errors (56.2%) and dependency errors (38.0%) dominate, identifying cross-method coordination as the core bottleneck.

Overview

Field: NLP Authors: Yeheng Chen, Chaoxiang Xie, Yuling Shi Published: 2025-04-30 arXiv: 2504.20837

Introduction

LLMs have achieved strong results on both function-level code synthesis and repository-level code modification, yet a capability that falls between these two extremes — compositional code creation, i.e., building a complete, internally structured class from a specification — remains underserved. Current evaluations are either confined to isolated functions or rely on manually curated class-level tasks that are expensive to scale and increasingly susceptible to data contamination.

ClassEval-Pro Benchmark

ClassEval-Pro is a benchmark of 300 class-level tasks spanning 11 domains, constructed through an automated three-stage pipeline:

1. Complexity enhancement 2. Cross-domain class composition 3. Integration of real-world GitHub code contributed after January 2025

Every task is validated by an LLM review panel and must pass test suites with over 90% coverage.

Key findings

  • Low ceiling: The best-performing model reaches only 45.6% class-level Pass@1.
  • Discriminative power: A 17.7-point gap separates the strongest and weakest models evaluated.
  • Strategy-model interaction: Generation strategy choice strongly interacts with model capability:
  • Structured approaches such as bottom-up generation improve weaker models by up to 9.4 percentage points.
  • Compositional generation can collapse to as low as 1.3%.
  • Error analysis: Among 500 manually annotated failures, logic errors (56.2%) and dependency errors (38.0%) dominate. Cross-method coordination is identified as the core bottleneck for class-level code generation.
  • Reference

  • arXiv paper: <https://arxiv.org/abs/2504.20837>
--- *Automatically collected on 2026-05-01.*

Tags

#llm#code-generation#benchmark#classeval-pro#nlp#software-engineering#arxiv

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/177618952