RewardCode: Training Generalist Code Reward Model via Pairwise Reinforcement Learning

Songtao Huang, Shiyang Feng, Xiaohan He, Xiangchao Yan, Bo Zhang, Lei Bai


Abstract
Reward modeling aligns language models with human preferences, yet coding tasks, requiring strict logic and syntax, pose challenges due to their domain diversity. In this paper, we propose RewardCode, a generalist code reward model trained via a two-stage pipeline, enabling scalable and precise evaluation through principle-based scoring and unit test generation. Specifically, the first stage combines Structured Fine-Tuning and Rejective Fine-Tuning to distill cross-domain summarization and code evaluation capabilities from advanced LLMs. The second stage introduces Pairwise-GRPO, a reinforcement learning method that uses preference pairs to improve solution discrimination, while ensuring the generation of consistent and verifiable unit tests. Further, to train a cross-domain code reward model, we construct CodePair-18K, a dataset of verifiable code preference pairs and executable unit tests. Experiments on multiple benchmarks show that RewardCode outperforms strong baselines in evaluation accuracy, verifying its effectiveness in advancing general-purpose code LLMs.
Anthology ID:
2026.findings-emnlp.448
Volume:
Findings of the Association for Computational Linguistics: EMNLP 2026
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
Findings
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
9409–9431
Language:
URL:
https://aclanthology.org/2026.findings-emnlp.448/
DOI:
Bibkey:
Cite (ACL):
Songtao Huang, Shiyang Feng, Xiaohan He, Xiangchao Yan, Bo Zhang, and Lei Bai. 2026. RewardCode: Training Generalist Code Reward Model via Pairwise Reinforcement Learning. In Findings of the Association for Computational Linguistics: EMNLP 2026, pages 9409–9431, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
RewardCode: Training Generalist Code Reward Model via Pairwise Reinforcement Learning (Huang et al., Findings 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.findings-emnlp.448.pdf