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

Ruiyi Zhang, Peijia Qin, Qi Cao, Eric Xue, Pengtao Xie
1/29/2026
cs.LGcs.SE

No confident code implementation found for this paper.

Abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{zhang2026funprm,
  title  = {FunPRM: Function-as-Step Process Reward Model with Meta Reward Correction for Code Generation},
  author = {Ruiyi Zhang and Peijia Qin and Qi Cao and Eric Xue and Pengtao Xie},
  year   = {2026},
  eprint = {2601.22249},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2601.22249v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2601.22249.svg)](https://codeofpaper.com/paper/2601.22249)

Discussion