一句话:提出测试用例驱动的 DePro 方法,结合暴力参考解、压力测试与迭代 LLM 精修来修复竞赛代码,显著减少调试次数与时间。
调试占据了软件开发周期的相当大比重,但研究者对大型语言模型(LLM)在调试任务中的有效性仍缺乏深入理解。竞赛编程因问题域多样且对效率要求严格,为这类评估提供了理想的基准。本文对竞赛编程问题上的 LLM 调试展开实证研究,并提出 DePro——一种测试用例驱动的调试方法:它不要求模型重新生成新解,而是辅助程序员修正已有代码。DePro 融合了暴力法参考解生成、压力测试(stress testing)以及迭代式 LLM 引导精修,从而高效地定位并消除错误。作者在来自 Codeforces 的 13 份错误用户提交上进行实验,结果表明 DePro 能稳定产出正确解,相比人类程序员与零样本 LLM 调试,调试尝试次数最多降低 64%,平均每题节省 7.6 分钟调试时间。
Debugging consumes a substantial portion of the software development lifecycle, yet researchers do not yet understand well the effectiveness of Large Language Models (LLMs) in this task. Competitive programming offers a rich benchmark for such evaluation, given its diverse problem domains and strict efficiency requirements. We present an empirical study of LLM-based debugging on competitive programming problems and introduce DePro, a test-case-driven approach that assists programmers by correcting existing code rather than generating new solutions. DePro combines brute-force reference generation, stress testing, and iterative LLM-guided refinement to efficiently identify and resolve errors. Experiments on 13 faulty user submissions from Codeforces demonstrate that DePro consistently produces correct solutions, reducing debugging attempts by up to 64% and debugging time by an average of 7.6 minutes per problem compared to human programmers and zero-shot LLM debugging.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@inproceedings{abs-2603-19399,
title = {DePro: Understanding the Role of LLMs in Debugging Competitive Programming Code},
author = {Nabiha Parvez and Md. Tanvin Sarkar Pallab and Mia Mohammad Imran and Tarannum Shaila Zaman},
booktitle = {FSE},
year = {2026},
doi = {10.1145/3803437.3805561}
}