CVeDRL: An Efficient Code Verifier via Difficulty-aware Reinforcement Learning

Ji Shi, Peiming Guo, Meishan Zhang, Miao Zhang, Xuebo Liu, Weili Guan, Min Zhang


Abstract
Code verifiers play a critical role in post-verification for LLM-based code generation, yet existing supervised fine-tuning methods suffer from data scarcity, high failure rates, and poor inference efficiency. While reinforcement learning (RL) offers a promising alternative by optimizing models through execution-driven rewards without labeled supervision, our preliminary results show that naive RL with only functionality rewards fails to generate effective unit tests for difficult branches and samples. We first theoretically analyze showing that branch coverage, sample difficulty, syntactic and functional correctness can be jointly modeled as RL rewards, where optimizing these signals can improve the reliability of unit-test–based verification. Guided by this analysis, we design syntax- and functionality-aware rewards and further propose branch- and sample-difficulty–aware RL using exponential reward shaping and static analysis metrics. With this formulation, CVeDRL achieves performance with only 0.6B parameters, outperforming GPT-4o by up to 17.55% in pass rate with over 20 faster inference than competitive baselines.
Anthology ID:
2026.findings-emnlp.1864
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:
39791–39809
Language:
URL:
https://aclanthology.org/2026.findings-emnlp.1864/
DOI:
Bibkey:
Cite (ACL):
Ji Shi, Peiming Guo, Meishan Zhang, Miao Zhang, Xuebo Liu, Weili Guan, and Min Zhang. 2026. CVeDRL: An Efficient Code Verifier via Difficulty-aware Reinforcement Learning. In Findings of the Association for Computational Linguistics: EMNLP 2026, pages 39791–39809, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
CVeDRL: An Efficient Code Verifier via Difficulty-aware Reinforcement Learning (Shi et al., Findings 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.findings-emnlp.1864.pdf