arXiv:2508.19576cs.AIcs.LG2025-08被引 9

通过优化自训练与解码,显著提升大模型代码推理准确率

ReST-RL: Achieving Accurate Code Reasoning of LLMs with Optimized Self-Training and Decoding

  • 结合改进的GRPO与价值模型引导的MCTS解码,统一强化学习框架
  • 在APPS、HumanEval等基准上超越现有方法,代码推理准确率大幅提高
  • 无需人工标注即可生成高精度验证信号,适合追求推理能力的开发者

针对大模型代码推理准确性问题,现有强化学习方法GRPO因奖励方差小而失效,基于过程奖励模型(PRM)的验证方法则面临训练数据获取难与验证效果差的困境。本文提出ReST-RL,一种统一的强化学习范式,通过改进的ReST-GRPO算法筛选高质量训练数据以增强奖励方差,并设计无需标注的价值模型引导的测试时解码方法VM-MCTS。该方法利用蒙特卡洛树搜索(MCTS)自动收集精确价值目标,用于训练价值模型(VM)。解码阶段,适配的MCTS结合VM提供精准过程信号与验证分数,显著提升大模型推理性能。在多个编码基准(如APPS、BigCodeBench、HumanEval)上的实验表明,本方法显著优于基线方法(如naive GRPO、ReST-DPO、PRM-BoN、ORM-MCTS),充分验证其在增强大模型推理能力方面的有效性。

原文摘要 · Abstract (English)

With respect to improving the reasoning accuracy of LLMs, the representative reinforcement learning (RL) method GRPO faces failure due to insignificant reward variance, while verification methods based on process reward models (PRMs) suffer from difficulties with training data acquisition and verification effectiveness. To tackle these problems, this paper introduces ReST-RL, a unified LLM RL paradigm that significantly improves LLM's code reasoning ability by combining an improved GRPO algorithm with a meticulously designed test time decoding method assisted by a value model (VM). As the first stage of policy reinforcement, ReST-GRPO adopts an optimized ReST algorithm to filter and assemble high-value training data, increasing the reward variance of GRPO sampling, thus improving the effectiveness and efficiency of training. After the basic reasoning ability of LLM policy has been improved, we further propose a test time decoding optimization method called VM-MCTS. Through Monte-Carlo Tree Search (MCTS), we collect accurate value targets with no annotation required, on which VM training is based. When decoding, the VM is deployed by an adapted MCTS algorithm to provide precise process signals as well as verification scores, assisting the LLM policy to achieve high reasoning accuracy. We conduct extensive experiments on coding problems to verify the validity of the proposed RL paradigm. Upon comparison, our approach significantly outperforms other reinforcement training baselines (e.g., naive GRPO and ReST-DPO), as well as decoding and verification baselines (e.g., PRM-BoN and ORM-MCTS) on well-known coding benchmarks of various levels (e.g., APPS, BigCodeBench, and HumanEval), indicating its power to strengthen the reasoning ability of LLM policies. Codes for our project can be found at https://github.com/THUDM/ReST-RL.

代码推理强化学习大模型解码优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。