用智能验证器主动找反例,提升编程竞赛解题准确率
Scaling Agentic Verifier for Competitive Coding
- 构建可迭代优化的智能验证代理,主动寻找能暴露代码差异的测试用例
- 在五个竞赛基准上实现最高15%的准确率提升,显著优于现有方法
- 适合追求高精度编程解题的AI研究者和竞赛系统开发者
大型语言模型虽具备较强编程能力,但在单次尝试中仍难以正确解决竞赛编程问题。基于执行结果的重排序是一种有前景的测试时扩展策略,但现有方法受限于测试用例生成困难或低效的随机输入采样。为此,我们提出Agentic Verifier,一种基于执行的智能代理,能够主动推理程序行为,并搜索能有效区分候选解的判别性测试输入。通过与代码执行环境进行多轮交互,验证器迭代优化候选输入生成器,生成有针对性的反例而非盲目采样。我们通过结合大规模数据合成、拒绝式微调和智能体强化学习的可扩展管道训练该验证器,使其获得判别性输入生成能力。在五个竞赛编程基准上的大量实验表明,该方法持续优于强基线,最佳@K准确率提升高达10%-15%。进一步分析揭示了明显的测试时扩展特性,并凸显其在重排序之外的更广泛应用潜力。
原文摘要 · Abstract (English)
Large language models (LLMs) have demonstrated strong coding capabilities but still struggle to solve competitive programming problems correctly in a single attempt. Execution-based re-ranking offers a promising test-time scaling strategy, yet existing methods are constrained by either difficult test case generation or inefficient random input sampling. To address this limitation, we propose Agentic Verifier, an execution-based agent that actively reasons about program behaviors and searches for highly discriminative test inputs that expose behavioral discrepancies among candidate solutions. Through multi-turn interaction with code execution environments, the verifier iteratively refines the candidate input generator and produces targeted counterexamples rather than blindly sampling inputs. We train the verifier to acquire this discriminative input generation capability via a scalable pipeline combining large-scale data synthesis, rejection fine-tuning, and agentic reinforcement learning. Extensive experiments across five competitive programming benchmarks demonstrate consistent improvements over strong execution-based baselines, achieving up to +10-15% absolute gains in Best@K accuracy. Further analysis reveals clear test-time scaling behavior and highlights the verifier's broader potential beyond reranking.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。