FunPRM: Function-as-Step Process Reward Model with Meta Reward Correction for Code Generation

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Zhang, Ruiyi, Qin, Peijia, Cao, Qi, Xue, Eric, Xie, Pengtao
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866914292914192384
author Zhang, Ruiyi
Qin, Peijia
Cao, Qi
Xue, Eric
Xie, Pengtao
author_facet Zhang, Ruiyi
Qin, Peijia
Cao, Qi
Xue, Eric
Xie, Pengtao
contents Code generation is a core application of large language models (LLMs), yet LLMs still frequently fail on complex programming tasks. Given its success in mathematical reasoning, test-time scaling approaches such as Process Reward Model (PRM)-based Best-of-N selection offer a promising way to improve performance. However, existing PRMs remain ineffective for code generation due to the lack of meaningful step decomposition in code and the noise of Monte Carlo-estimated partial-solution correctness scores (rewards). To address these challenges, we propose FunPRM. FunPRM prompts LLMs to encourage modular code generation organized into functions, with functions treated as PRM reasoning steps. Furthermore, FunPRM introduces a novel meta-learning-based reward correction mechanism that leverages clean final-solution rewards obtained via a unit-test-based evaluation system to purify noisy partial-solution rewards. Experiments on LiveCodeBench and BigCodeBench demonstrate that FunPRM consistently outperforms existing test-time scaling methods across five base LLMs, notably achieving state-of-the-art performance on LiveCodeBench when combined with O4-mini. Furthermore, FunPRM produces code that is more readable and reusable for developers.
format Preprint
id arxiv_https___arxiv_org_abs_2601_22249
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle FunPRM: Function-as-Step Process Reward Model with Meta Reward Correction for Code Generation
Zhang, Ruiyi
Qin, Peijia
Cao, Qi
Xue, Eric
Xie, Pengtao
Machine Learning
Software Engineering
Code generation is a core application of large language models (LLMs), yet LLMs still frequently fail on complex programming tasks. Given its success in mathematical reasoning, test-time scaling approaches such as Process Reward Model (PRM)-based Best-of-N selection offer a promising way to improve performance. However, existing PRMs remain ineffective for code generation due to the lack of meaningful step decomposition in code and the noise of Monte Carlo-estimated partial-solution correctness scores (rewards). To address these challenges, we propose FunPRM. FunPRM prompts LLMs to encourage modular code generation organized into functions, with functions treated as PRM reasoning steps. Furthermore, FunPRM introduces a novel meta-learning-based reward correction mechanism that leverages clean final-solution rewards obtained via a unit-test-based evaluation system to purify noisy partial-solution rewards. Experiments on LiveCodeBench and BigCodeBench demonstrate that FunPRM consistently outperforms existing test-time scaling methods across five base LLMs, notably achieving state-of-the-art performance on LiveCodeBench when combined with O4-mini. Furthermore, FunPRM produces code that is more readable and reusable for developers.
title FunPRM: Function-as-Step Process Reward Model with Meta Reward Correction for Code Generation
topic Machine Learning
Software Engineering
url https://arxiv.org/abs/2601.22249