CodeElo: Benchmarking Competition-level Code Generation of LLMs with Human-comparable Elo Ratings
本文提出CODEELO,一个基于Codeforces平台的标准竞赛级代码生成基准,通过Elo评分系统评估大型语言模型(LLMs)的代码推理能力。
更新于 2025-01-03。作者:Shanghaoran Quan、Jiaxi Yang、Bowen Yu、Bo Zheng、Dayiheng Liu、An Yang、Xuancheng Ren、Bofei Gao、Yibo Miao、Yunlong Feng、Zekun Wang、Jian Yang、Zeyu Cui、Yang Fan、Yichang Zhang、Binyuan Hui、Junyang Lin。
中文摘要
随着现有大型语言模型(LLMs)的代码推理能力不断增强以及推理模型如OpenAI o1和o3的突破,开发更具挑战性和全面性的基准测试,以有效测试它们复杂的竞赛级编码能力的需求日益增长。现有的基准测试,如LiveCodeBench和USACO,由于缺乏私有测试案例、不支持特殊评委以及执行环境不匹配等原因而存在不足。为了填补这一空白,我们首次引入了CodeElo,这是一个标准化的竞赛级代码生成基准测试,有效解决了所有这些挑战。CodeElo基准主要基于官方的CodeForces平台,并尽可能地与该平台保持一致。我们编译了CodeForces上最近六个月的竞赛题目,包括比赛分组、问题难度评级和问题算法标签等详细信息。我们引入了一种独特的评判方法,即直接将问题提交到平台,并开发了一个与平台一致且可与人参与者的表现相媲美但方差更低的可靠Elo评级计算系统。通过在CodeElo上进行测试,我们首次提供了30个现有流行开源和3个专有LLMs的Elo评级。结果显示,o1-mini和QwQ-32B-Preview表现突出,分别获得1578和1261的Elo评级,而其他模型即使面对最简单的问题也表现不佳,在所有参与者中排名最低的20%。我们还进行了详细的分析实验,以深入了解算法性能和C++与Python使用之间的比较,这可以为未来的研究提供方向。
英文摘要
With the increasing code reasoning capabilities of existing large language models (LLMs) and breakthroughs in reasoning models like OpenAI o1 and o3, there is a growing need to develop more challenging and comprehensive benchmarks that effectively test their sophisticated competition-level coding abilities. Existing benchmarks, like LiveCodeBench and USACO, fall short due to the unavailability of private test cases, lack of support for special judges, and misaligned execution environments. To bridge this gap, we introduce CodeElo, a standardized competition-level code generation benchmark that effectively addresses all these challenges for the first time. CodeElo benchmark is mainly based on the official CodeForces platform and tries to align with the platform as much as possible. We compile the recent six months of contest problems on CodeForces with detailed information such as contest divisions, problem difficulty ratings, and problem algorithm tags. We introduce a unique judging method in which problems are submitted directly to the platform and develop a reliable Elo rating calculation system that aligns with the platform and is comparable with human participants but has lower variance. By testing on our CodeElo, we provide the Elo ratings of 30 existing popular open-source and 3 proprietary LLMs for the first time. The results show that o1-mini and QwQ-32B-Preview stand out significantly, achieving Elo ratings of 1578 and 1261, respectively, while other models struggle even with the easiest problems, placing in the lowest 20 percent among all human participants. Detailed analysis experiments are also conducted to provide insights into performance across algorithms and comparisons between using C++ and Python, which can suggest directions for future studies.
解读
一句话总结
本文提出CODEELO,一个基于Codeforces平台的标准竞赛级代码生成基准,通过Elo评分系统评估大型语言模型(LLMs)的代码推理能力。
问题1:这篇论文想要解决什么具体问题?
• 问题背景:随着LLMs的代码推理能力增强,需要更全面和有效的基准来测试其竞赛级编码能力。 • 现有方案不足:现有基准如LiveCodeBench和USACO缺乏私有测试案例,不支持特殊评委,且执行环境不匹配。 • 研究目标:开发一个标准化的竞赛级代码生成基准,解决上述挑战,并使用Elo评分系统评估LLMs的代码推理能力。
问题2:论文的核心创新点是什么?
• 技术创新:首次提出使用Elo评分系统评估LLMs的代码推理能力。 • 方法改进:引入了一种独特的评估方法,直接将问题提交到平台进行判断,实现零误判,支持特殊评委,并确保执行环境一致。 • 优势:提供了一种更准确、更公正的评估LLMs代码推理能力的方法。
问题3:实验结果如何验证了方法的有效性?
• 关键实验:对30个开源和3个专有LLMs进行测试,提供Elo评分。 • 性能提升:o1-mini和QwQ-32B-Preview表现出色,分别获得1578和1261的Elo评分,而其他模型即使在最简单的问题上也表现不佳。 • 对比结果:与基线方法相比,CODEELO在准确性和公正性方面表现更优。
问题4:这个研究的实际应用价值是什么?
• 应用场景:为LLMs的代码推理能力提供评估基准,帮助开发者改进模型。 • 实施建议:在Codeforces平台上进行测试,使用Elo评分系统进行评估。 • 局限与展望:目前仅限于Codeforces平台,未来可以扩展到其他在线评测平台。
来源
机器可读索引:llms.txt