arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2508.09101cs.CLcs.SE
收藏

AutoCodeBench:大型语言模型是自动代码基准生成器

AutoCodeBench: Large Language Models are Automatic Code Benchmark Generators

Hunyuan Team, Tencent(腾讯文心团队)
Jason Chou, Ao Liu, Yuchi Deng, Zhiying Zeng, Tao Zhang, Haotian Zhu, Jianwei Cai, Yue Mao, Chenchen Zhang, Lingyun Tan, Ziyan Xu, Bohui Zhai, Hengyi Liu, Speed… 展开作者

Jason Chou, Ao Liu, Yuchi Deng, Zhiying Zeng, Tao Zhang, Haotian Zhu, Jianwei Cai, Yue Mao, Chenchen Zhang, Lingyun Tan, Ziyan Xu, Bohui Zhai, Hengyi Liu, Speed Zhu, Wiggin Zhou, Fengzong Lian

AI总结:

提出AutoCodeGen方法自动生成高难度多语言代码数据集,构建包含3920个问题覆盖20种语言的AutoCodeBench基准,评估30多个LLM发现即使最先进模型也难以应对其复杂多语言任务。

摘要:

大型语言模型(LLMs)在各个领域展现出了卓越的能力,代码生成已成为其重点关注的领域。尽管已有许多基准被提出以评估模型的代码生成能力,但这些基准面临几个关键局限。首先,它们通常依赖人工标注,这非常耗时且难以在不同编程语言和问题复杂度上扩展。其次,大多数现有基准主要关注 Python,而少数多语言基准则存在难度有限和语言分布不均的问题。为了解决这些挑战,我们提出了 AutoCodeGen,这是一种无需人工标注即可自动生成高难度多语言代码生成数据集的方法。AutoCodeGen 通过使用 LLM 生成测试输入,并通过多语言沙盒获取测试输出,确保了测试用例的正确性和完整性,同时通过逆序问题生成和多重过滤步骤实现了高数据质量。利用这种新颖的方法,我们引入了 AutoCodeBench,这是一个包含 3,920 个问题、均匀分布在 20 种编程语言上的大规模代码生成基准。它专为评估 LLM 在具有挑战性、多样性和实用性的多语言任务上的表现而设计。我们在 AutoCodeBench 及其简化版 AutoCodeBench-Lite 上评估了 30 多个领先的开源和专有 LLM。结果表明,即使是最先进的 LLM 也难以应对这些任务的复杂性、多样性和多语言特性。此外,我们还引入了 AutoCodeBench-Complete,专为基座模型设计,以评估其少样本代码生成能力。我们希望 AutoCodeBench 系列能成为宝贵的资源,并激励社区关注更具挑战性和实用性的多语言代码生成场景。

英文摘要:

Large Language Models (LLMs) have demonstrated remarkable capabilities across various domains, with code generation emerging as a key area of focus. While numerous benchmarks have been proposed to evaluate their code generation abilities, these benchmarks face several critical limitations. First, they often rely on manual annotations, which are time-consuming and difficult to scale across different programming languages and problem complexities. Second, most existing benchmarks focus primarily on Python, while the few multilingual benchmarks suffer from limited difficulty and uneven language distribution. To address these challenges, we propose AutoCodeGen, an automated method for generating high-difficulty multilingual code generation datasets without manual annotations. AutoCodeGen ensures the correctness and completeness of test cases by generating test inputs with LLMs and obtaining test outputs through a multilingual sandbox, while achieving high data quality through reverse-order problem generation and multiple filtering steps. Using this novel method, we introduce AutoCodeBench, a large-scale code generation benchmark comprising 3,920 problems evenly distributed across 20 programming languages. It is specifically designed to evaluate LLMs on challenging, diverse, and practical multilingual tasks. We evaluate over 30 leading open-source and proprietary LLMs on AutoCodeBench and its simplified version AutoCodeBench-Lite. The results show that even the most advanced LLMs struggle with the complexity, diversity, and multilingual nature of these tasks. Besides, we introduce AutoCodeBench-Complete, specifically designed for base models to assess their few-shot code generation capabilities. We hope the AutoCodeBench series will serve as a valuable resource and inspire the community to focus on more challenging and practical multilingual code generation scenarios.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑