English

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

Computation and Language 2025-06-09 v2 Artificial Intelligence Machine Learning Software Engineering

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

Keywords

Cite

@article{arxiv.2412.15118,
  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},
  journal= {arXiv preprint arXiv:2412.15118},
  year   = {2025}
}

Comments

Accepted to ICML 2025; 23 pages, 7 figures, code is available at: https://github.com/zhuohaoyu/ORPS

R2 v1 2026-06-28T20:42:40.880Z