paperbot · PL 论文追踪

全部论文 待读 收藏

P2 RealisticCodeBench: Towards More Realistic Evaluation of Large Language Models for Code Generation

RealisticCodeBench:面向更真实的大语言模型代码生成评估
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 3/10 · 该论文构建的是LLM代码生成能力评测基准,关注GitHub真实使用场景、多语言和模型差距,与用户关注的“静态分析/形式化验证与LLM交叉”并不直接相关;但其作为真实场景基准的构建思路,对用户感兴趣的“重要场景下缺乏benchmark”这一方向有间接参考价值。引用 0 inbox
Xiao Yu, Haoxuan Chen, Lei Liu, Xing Hu, Jacky Wai Keung, Xin Xia
crossref: 2026-09-12

AI 速览

一句话:从 GitHub 真实 LLM 使用场景出发构建多语言代码生成基准,揭示模型与现有基准间的差距。

现有代码生成基准(如 CoderEval、ClassEval)任务过难,GPT-4 在 ClassEval 上 pass@1 仅 37.0%,而开发者实际只把 LLM 用于其能可靠完成的任务。作者从 GitHub 挖掘标注为 ChatGPT/Copilot 生成的代码,整理出真实编程任务,改写并生成参考解与测试用例,再翻译到多种语言,构建含 376 题的 RealisticCodeBench。评测 12 个通用与代码专用 LLM 后:GPT-4.1 多语言平均 pass@1 最高,DeepSeek-V3-671B 紧随其后,CodeGeeX4-9B 可作 GPT-4o-mini 的廉价替代;与 HumanEval 的差异说明部分模型过度特化,文中还总结了失败模式与启示。

问题
现有代码生成基准不断加难,LLM 表现普遍很差,无法反映开发者日常真正交给 LLM 的那类编码任务。
方法
从 GitHub 挖掘标注为由 ChatGPT/Copilot 生成的代码样本,整理为真实编程任务,改写后生成参考解与测试用例,并翻译到 Python、JavaScript、TypeScript、Java、C++ 等多种语言。
评估
在构建的 376 题多语言基准上评测 12 个通用与代码专用 LLM 的 pass@1,并与 HumanEval 上的表现对比,同时分析失败案例以总结模型局限。
原文摘要(Abstract)

Evaluating the code generation capabilities of Large Language Models (LLMs) remains an open question. Recently, more advanced benchmarks—such as CoderEval, EvoCodeBench, and ClassEval—have been introduced to evaluate LLMs on practical coding tasks from GitHub repositories, such as non-standalone function generation and class-level code generation. However, even the most sophisticated LLMs struggle with these complex tasks; for instance, GPT-4 achieves only a 37.0% pass@1 on ClassEval. Prior studies show that developers often discard LLM-generated code or abandon code generation models when outputs are incorrect or require extensive debugging, which leads them to rely on LLMs primarily for code generation tasks that high-performing models can reliably handle.In response to this gap, we introduce RealisticCodeBench, a benchmark specifically designed to reflect the types of problems developers commonly tackle with LLMs. By mining GitHub repositories for code samples tagged as generated by ChatGPT or Copilot, we collect real-world coding tasks that capture typical LLM usage scenarios. We modify these tasks, generate reference solutions and test cases, and adapt the problems into multiple programming languages. This effort results in RealisticCodeBench, comprising a total of 376 programming problems translated across multiple languages: 361 in Python, 346 in JavaScript, 343 in TypeScript, 307 in Java, and 323 in C++, each with corresponding reference solutions and test cases. We evaluate 12 general-purpose and code-specific LLMs on RealisticCodeBench. Our findings reveal that GPT-4.1 achieves the highest average pass@1 score across languages, closely followed by DeepSeek-V3-671B, suggesting that DeepSeek-V3-671B provides a viable open-source alternative to GPT-4.1 for large companies with sufficient GPU resources and privacy concerns. CodeGeeX4-9B, a cost-effective model, emerges as a suitable substitute for GPT-4o-mini for individual developers and smaller organizations with similar privacy considerations. Additionally, LLM performance discrepancies between HumanEval and RealisticCodeBench suggest that some LLMs are either overly specialized for HumanEval-style problems or insufficiently optimized for real-world coding challenges. Finally, we analyze failed cases, summarize common LLM limitations, and provide implications for researchers and practitioners.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9410,
  title = {RealisticCodeBench: Towards More Realistic Evaluation of Large Language Models for Code Generation},
  author = {Xiao Yu and Haoxuan Chen and Lei Liu and Xing Hu and Jacky Wai Keung and Xin Xia},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00248}
}