将函数视为推理步骤,提升代码生成的逻辑性与准确性。
DreamPRM-Code: Function-as-Step Process Reward Model with Label Correction for LLM Coding
- 用函数分解代码过程,模仿数学推理的分步思考方式。
- 通过双层优化修正错误中间标签,提升训练可靠性。
- 适合需要高精度代码生成的研究者和开发者使用。
过程奖励模型(PRM)在测试时扩展中已成为提升大语言模型性能的关键方法,但在代码生成任务中效果受限,主要因为代码缺乏有意义的步骤分解,以及蒙特卡洛生成的中间标签存在噪声。本文提出 DreamPRM-Code,一种面向代码的 PRM 模型,采用函数即步骤的链式函数提示策略,诱导模块化代码生成,使 PRM 的训练与应用类似于数学推理任务。为缓解标签噪声问题,该模型引入基于元学习的标签修正机制,利用干净的最终解单元测试标签,通过双层优化调整中间步骤标签。在测试时扩展框架下,DreamPRM-Code 在 LiveCodeBench 上取得 80.9% 的 pass@1 率,超越 OpenAI o4-mini,达到当前最优水平。
原文摘要 · Abstract (English)
Process Reward Models (PRMs) have become essential for improving Large Language Models (LLMs) via test-time scaling, yet their effectiveness in coding remains limited due to the lack of meaningful step decompositions in code and the noise of Monte-Carlo-generated partial labels. We propose DreamPRM-Code, a coding-focused PRM that treats functions as reasoning steps using a Chain-of-Function prompting strategy to induce modular code generation, enabling PRM training and application analogous to mathematical reasoning tasks. To address label noise, DreamPRM-Code introduces a meta-learning-based correction mechanism that leverages clean final-solution unit-test labels and performs bi-level optimization to refine intermediate labels. Applying on test-time scaling, DreamPRM-Code achieved state-of-the-art performance on LiveCodeBench with 80.9 pass@1 rate, surpassing OpenAI o4-mini.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。