Beyond Problem Solving: UOJ-Bench for Evaluating Code Generation, Hacking, and Repair in Competitive Programming
作者: Tingqiang Xu, Hangrui Zhou, Tianle Cai, Alex Gu, Kaifeng Lyu
分类: cs.SE, cs.AI
发布日期: 2026-06-12
💡 一句话要点
提出UOJ-Bench以评估代码生成、黑客攻击和修复能力
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 代码生成 代码修复 错误识别 教育技术 大型语言模型
📋 核心要点
- 现有方法在识别人类编写代码中的错误方面存在显著不足,尤其是在教育支持中。
- 论文提出UOJ-Bench基准,专注于评估LLMs在代码生成、黑客和修复任务中的表现,填补了现有研究的空白。
- 实验结果表明,尽管在一次性评估中模型表现不佳,但通过测试时间扩展,成功率显著提升,展示了LLMs的潜力。
📝 摘要(中文)
尽管大型语言模型(LLMs)在竞争编程中表现出色,但其在支持人类学习方面的作用仍未得到充分探索。本文介绍了UOJ-Bench,一个旨在评估LLMs的代码生成、代码黑客和代码修复能力的基准,基于真实的代码提交并通过在线评测系统进行评估。结果显示,在一次性评估下,最强模型未能识别超过50%的错误提交,而在测试时间扩展下成功率超过90%。尽管存在计算成本的限制,最佳模型仍能发现超过5%的满分提交中的错误,表明前沿LLMs可以提供超出标准评测系统的补充信号。
🔬 方法详解
问题定义:本文旨在解决大型语言模型在竞争编程中对人类编写代码错误识别不足的问题。现有方法主要集中在问题解决能力上,忽视了教育支持的重要性。
核心思路:论文通过引入UOJ-Bench基准,评估LLMs在代码生成、黑客和修复任务中的能力,强调了这些任务在学习过程中的重要性。
技术框架:UOJ-Bench由三个主要任务组成:代码生成、代码黑客和代码修复,所有任务基于真实的代码提交,并通过UOJ的原生评测基础设施进行评估。
关键创新:UOJ-Bench的设计使得评估不仅限于问题解决,还包括错误识别,填补了现有基准的不足,提供了更全面的评估标准。
关键设计:在实验中,采用了一次性评估和测试时间扩展两种策略,测试时间扩展显著提高了成功率,尽管计算成本较高,但仍显示出LLMs在教育支持中的潜力。
🖼️ 关键图片
📊 实验亮点
实验结果显示,在一次性评估中,最强模型未能识别超过50%的错误提交,而在测试时间扩展后,成功率提升至90%以上。此外,最佳模型能够发现超过5%的满分提交中的错误,展示了LLMs的潜力。
🎯 应用场景
该研究的潜在应用领域包括教育技术、编程学习平台和自动化代码审查工具。通过评估和提升LLMs在代码处理中的能力,可以为学习者提供更有效的反馈和支持,促进编程教育的发展。
📄 摘要(原文)
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.