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-11
💡 一句话要点
提出UOJ-Bench以评估代码生成、黑客攻击与修复能力
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大型语言模型 代码生成 错误识别 教育技术 自动化评估
📋 核心要点
- 现有方法在评估LLMs的代码错误识别能力上存在不足,尤其是在教育支持方面。
- UOJ-Bench通过设计三个任务,评估LLMs在代码生成、黑客攻击和修复中的表现,填补了这一空白。
- 实验结果表明,尽管存在计算成本问题,LLMs在错误识别方面仍展现出潜力,尤其是在测试时间扩展后。
📝 摘要(中文)
尽管大型语言模型(LLMs)在竞争编程中表现强劲,但其在支持人类学习方面的作用仍未得到充分探索。本文介绍了UOJ-Bench,一个旨在评估LLMs问题解决能力及其识别人类编写代码错误能力的基准。UOJ-Bench包含三个任务:代码生成、代码黑客和代码修复,均基于真实的代码提交,并通过UOJ的评测基础设施进行评估。结果显示,即使是最强的模型,在单次评估下也未能识别超过50%的错误提交。尽管测试时间扩展提高了成功率至90%以上,但模型推理的计算成本限制了其大规模应用的实用性。尽管如此,最佳模型在测试时间扩展下能够发现超过5%的满分提交中的错误,表明前沿LLMs可以提供超出标准评测系统的补充信号。
🔬 方法详解
问题定义:本文旨在解决大型语言模型在竞争编程中对人类编写代码错误识别能力的评估问题。现有方法未能充分探索LLMs在教育支持中的应用,尤其是在错误识别方面的不足。
核心思路:UOJ-Bench通过构建三个任务(代码生成、黑客攻击和代码修复),评估LLMs的多维能力,旨在提供更全面的评估标准。这样的设计使得评估不仅限于问题解决,还包括对代码质量的分析。
技术框架:UOJ-Bench的整体架构包括三个主要模块:代码生成、代码黑客和代码修复。每个模块基于真实的代码提交,并通过UOJ的评测系统进行评估,确保结果的真实性和有效性。
关键创新:UOJ-Bench的最大创新在于其多任务评估框架,能够同时考察LLMs在不同编程任务中的表现,尤其是错误识别能力,这在现有评估体系中是前所未有的。
关键设计:在模型推理过程中,采用了测试时间扩展技术,显著提高了错误识别的成功率。尽管计算成本较高,但这种设计使得模型在特定任务上能够达到超过90%的成功率。
🖼️ 关键图片
📊 实验亮点
实验结果显示,在单次评估下,最强模型未能识别超过50%的错误提交,而通过测试时间扩展,成功率提升至90%以上。最佳模型在约30个问题中发现超过5%的满分提交中的错误,展示了LLMs在代码评估中的潜力。
🎯 应用场景
该研究的潜在应用领域包括教育技术、编程学习平台和自动化代码审查工具。通过评估LLMs在代码错误识别方面的能力,可以为编程学习者提供更有效的反馈,提升学习效果。此外,UOJ-Bench的设计理念也可为其他领域的模型评估提供参考。
📄 摘要(原文)
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.