CodeElo:以人类可比的 Elo 评级对 LLM 竞赛级代码生成能力进行基准评测
CodeElo: Benchmarking Competition-level Code Generation of LLMs with Human-comparable Elo Ratings
AI总结:
本文提出 CodeElo 基准,基于 CodeForces 平台构建竞赛级代码生成评测体系,并首次给出 30 个开源和 3 个闭源 LLM 的 Elo 评级,揭示当前模型与人类选手的差距。
摘要:
随着现有大语言模型(LLMs)代码推理能力的不断增强,以及 OpenAI o1 和 o3 等推理模型取得突破,开发更具挑战性、更全面的基准来有效测试它们复杂的竞赛级编程能力的需求日益增长。现有基准如 LiveCodeBench 和 USACO 存在不足,原因包括私有测试用例不可用、缺乏对特殊评测器(special judges)的支持以及执行环境不一致。为弥补这一差距,我们提出了 CodeElo,这是首个有效解决上述所有挑战的标准化竞赛级代码生成基准。CodeElo 基准主要基于 CodeForces 官方平台构建,并尽可能与该平台保持一致。我们整理了 CodeForces 上最近六个月的竞赛题目,并包含竞赛分组、题目难度评级和题目算法标签等详细信息。我们引入了一种独特的评测方法,将题目直接提交到平台进行判定,并开发了一套可靠的 Elo 评级计算系统,该系统与平台对齐、可与人类参赛者比较,且具有更低的方差。通过在 CodeElo 上进行测试,我们首次给出了 30 个现有流行开源 LLM 和 3 个闭源 LLM 的 Elo 评级。结果表明,o1-mini 和 QwQ-32B-Preview 表现尤为突出,分别取得了 1578 和 1261 的 Elo 评级,而其他模型即使在最简单的问题上也表现困难,排名处于所有人类参赛者的最低 25% 区间。我们还进行了详细的分析实验,以提供关于不同算法上的表现以及使用 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 25 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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。