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.


翻译:大型语言模型(LLM)已展现出强大的代码生成能力,但在单次尝试中正确解决竞争性编程问题仍存在困难。基于执行的重排序提供了一种有前景的测试时扩展策略,然而现有方法受限于难以生成测试用例或采用低效的随机输入采样。为应对这一局限,我们提出智能验证器(Agentic Verifier),这是一种基于执行的智能体,能够主动推理程序行为,并搜索具有高度区分性的测试输入,以揭示候选解决方案之间的行为差异。通过与代码执行环境进行多轮交互,验证器迭代优化候选输入生成器,并产生有针对性的反例,而非盲目采样输入。我们通过结合大规模数据合成、拒绝微调和智能体强化学习的可扩展流程,训练验证器获得这种区分性输入生成能力。在五个竞争性编程基准上的大量实验表明,该方法相较于强大的基于执行的基线模型取得了持续改进,在Best@K准确率上实现了高达+10-15%的绝对提升。进一步分析揭示了清晰的测试时扩展行为,并凸显了验证器在重排序之外的更广泛潜力。

0
下载
关闭预览

相关内容

人们为了让计算机解决各种棘手的问题,使用编程语言 编写程序代码并通过计算机运算得到最终结果的过程。
智能体评判者(Agent-as-a-Judge)研究综述
专知会员服务
37+阅读 · 1月9日
智能体检索增强生成:关于智能体RAG的综述
专知会员服务
89+阅读 · 2025年1月21日
走向通用虚拟智能体
专知会员服务
74+阅读 · 2023年11月26日
AI Agent,大模型时代重要落地方向, 42页ppt
专知会员服务
290+阅读 · 2023年10月12日
智能合约的形式化验证方法研究综述
专知
16+阅读 · 2021年5月8日
【强化学习】强化学习+深度学习=人工智能
产业智能官
55+阅读 · 2017年8月11日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2009年12月31日
VIP会员
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
6+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2009年12月31日
Top
微信扫码咨询专知VIP会员