arXiv:2606.12864cs.SEcs.AI2026-06被引 1

评测大模型在编程竞赛中生成、发现错误和修复代码的能力

Beyond Problem Solving: UOJ-Bench for Evaluating Code Generation, Hacking, and Repair in Competitive Programming

  • 构建UOJ-Bench,涵盖生成、黑客攻击、修复三类任务
  • 单次评估下最强模型纠错率不足50%,测试时缩放后超90%
  • 顶尖模型可发现超5%满分提交中的隐藏错误,适合教育辅助

尽管大型语言模型(LLMs)在编程竞赛中表现强劲,但其在该场景中支持人类学习的作用仍不明确。本文提出UOJ-Bench,一个用于评估LLMs不仅解决问题,还能识别人类代码错误的基准,这是在线判题系统传统上通过运行测试用例实现的教育功能。UOJ-Bench包含三个任务:代码生成、代码黑客攻击和代码修复,均基于通用在线判题系统(UOJ)的真实提交数据,并通过UOJ原生判题系统评估。结果显示,在单次评估下,即使最强模型也无法在超过50%的错误提交中识别出错误;而通过测试时缩放,成功率可提升至90%以上,但高昂的计算成本限制了其大规模部署。尽管如此,最佳模型在约30个问题中可发现超过5%的满分提交中的错误,表明前沿模型已能提供超越标准判题系统的补充信号。

原文摘要 · Abstract (English)

Despite strong performance in competitive programming, the role of Large Language Models (LLMs) in supporting human learning in the same setting remains largely unexplored. In this work, we introduce UOJ-Bench, a benchmark designed to evaluate not only the problem-solving ability of LLMs, but also their ability to identify errors in human-written code -- a crucial educational activity traditionally supported by running test cases over online judge systems. UOJ-Bench consists of three distinct tasks: code generation, code hacking, and code repair, all constructed from real-world code submissions on the Universal Online Judge (UOJ) and evaluated through UOJ's native judging infrastructure. Our results show that under one-shot evaluation, even the strongest models fail to identify errors in more than 50% of a set of submissions that have been found to be incorrect by UOJ users. While test-time scaling improves success rates to above 90%, the substantial computational costs incurred from model inference limit its practicality for large-scale deployment. Despite these limitations, we find that the best-performing models under test-time scaling can uncover errors in over 5% of full-score submissions across roughly 30 problems, suggesting that frontier LLMs can already provide complementary signals beyond standard judging systems.

代码生成错误检测竞赛编程

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。