arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.00790cs.AI
收藏

RefineRL: 通过自我细化强化学习提升竞争性编程

RefineRL: Advancing Competitive Programming with Self-Refinement Reinforcement Learning

Microsoft Research(微软研究院)

Shaopeng Fu, Xingxing Zhang, Li Dong, Furu Wei

AI总结:

RefineRL通过引入自我细化代理和强化学习方法,提升大语言模型在竞争性编程中的性能,实验表明其在紧凑模型中表现优异,接近大模型单次尝试性能。

摘要:

尽管大型语言模型(LLMs)在复杂推理任务如竞争性编程(CP)上表现出色,但现有方法主要关注单次尝试设置,忽略了其迭代细化能力。本文提出RefineRL,一种旨在释放LLMs自我细化能力的新方法。RefineRL引入了两个关键创新:(1)Skeptical-Agent,一个配备本地执行工具的迭代自我细化代理,用于验证生成的解决方案是否符合公共测试用例;(2)一种强化学习(RL)解决方案,激励LLMs仅使用标准RLVR数据(即问题与其可验证答案配对)进行自我细化。在Qwen3-4B和Qwen3-4B-2507上的大量实验表明,我们的方法带来了显著收益:在我们的RL训练后,这些紧凑的4B模型集成Skeptical-Agent不仅优于更大的32B模型,而且接近235B模型的单次尝试性能。这些发现表明,自我细化在扩展LLM推理方面具有巨大潜力,进一步发展具有显著前景。

英文摘要:

While large language models (LLMs) have demonstrated strong performance on complex reasoning tasks such as competitive programming (CP), existing methods predominantly focus on single-attempt settings, overlooking their capacity for iterative refinement. In this paper, we present RefineRL, a novel approach designed to unleash the self-refinement capabilities of LLMs for CP problem solving. RefineRL introduces two key innovations: (1) Skeptical-Agent, an iterative self-refinement agent equipped with local execution tools to validate generated solutions against public test cases of CP problems. This agent always remains skeptical of its own outputs and thereby enforces rigorous self-refinement even when validation suggests correctness. (2) A reinforcement learning (RL) solution to incentivize LLMs to self-refine with only standard RLVR data (i.e., problems paired with their verifiable answers). Extensive experiments on Qwen3-4B and Qwen3-4B-2507 demonstrate that our method yields substantial gains: after our RL training, these compact 4B models integrated with the Skeptical-Agent not only outperform much larger 32B models but also approach the single-attempt performance of 235B models. Notably, although our models are trained solely on CP coding data, RefineRL also substantially improves their performance on mathematical reasoning benchmarks, suggesting that the learned self-refinement behavior can transfer beyond coding-specific tasks. These findings highlight self-refinement as a promising direction for scaling LLMs' general reasoning ability.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑