Reasoning Through Execution: Unifying Process and Outcome Rewards for Code Generation

Zhuohao Yu, Weizheng Gu, Yidong Wang, Xingru Jiang, Zhengran Zeng +3 more
12/19/2024
cs.CLcs.AIcs.LG

Official code: zhuohaoyu/ORPS (16 stars, last commit 2025-07-15).

Abstract

Large Language Models excel at code generation yet struggle with complex programming tasks that demand sophisticated reasoning. To bridge this gap, traditional process supervision relies on learned reward models requiring costly training data and suffering from reward misalignment, while outcome supervision fails for complex tasks needing coordinated intermediate steps. We introduce Outcome Refining Process Supervision, which unifies process and outcome supervision by leveraging executable verification: a tree-structured search framework generates strategic alternatives, profiles execution metrics, and scores candidates via self-critique mechanisms that integrate runtime feedback with reasoning. Experiments across 5 models and 3 benchmarks show consistent gains, with 26.9% higher correctness and 42.2% improved code efficiency. The results demonstrate that ORPS enables LLMs to overcome local optima in code generation, suggesting a promising direction for combining verifiable outcomes with structured reasoning to tackle complex challenges. We open-source at: https://github.com/zhuohaoyu/ORPS

View on arXivView PDF

Code Implementations(1)

zhuohaoyu/ORPSOfficial100%
161HTML, RubyDec 16, 20241 years ago

Similar Papers

Cite this paper

@article{yu2024reasoning,
  title  = {Reasoning Through Execution: Unifying Process and Outcome Rewards for Code Generation},
  author = {Zhuohao Yu and Weizheng Gu and Yidong Wang and Xingru Jiang and Zhengran Zeng and Jindong Wang and Wei Ye and Shikun Zhang},
  year   = {2024},
  eprint = {2412.15118},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.15118v2},
  journal = {ICML 2024 2024}
}

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/2412.15118.svg)](https://codeofpaper.com/paper/2412.15118)

Discussion