Learning to Code by Learning to Verify: Execution-Grounded Co-Evolution of Code Generation and Self-Verification for Reliable Code LLMs

Juyong Jiang, Chansung Park, Jiasi Shen, Sunghun Kim


Abstract
Large language models (LLMs) have made rapid progress in code generation, yet their ability to verify whether a program is correct has not necessarily improved at the same pace. We identify a generation-verification gap in code LLMs, where scaling substantially improves test-passing code generation, while execution-free correctness reasoning improves much more slowly. This gap challenges existing self-rewarding approaches, which often implicitly assume that a stronger generator also serves as a better judge. To bridge this gap, we propose CoVera, an execution-grounded co-evolution framework that jointly trains a code LLM to generate code and to verify code correctness. In generator mode, the model produces candidate programs and receives execution-based rewards from available tests. In verifier mode, the same model reads a problem-program pair, produces a reasoning trace, and predicts a correctness judgment, which is rewarded according to agreement with execution-derived labels. The calibrated verifier is then used as an auxiliary self-verification signal for generation, while the evolving generator continuously supplies increasingly challenging candidates for verifier training. This co-evolution enables an on-policy curriculum for correctness reasoning and grounds self-verification in execution feedback, without requiring exhaustive test suites or golden reference solutions. Extensive experiments across multiple benchmarks and model scales show that CoVera improves both code generation and intrinsic correctness verification, outperforming representative baselines from diverse code-learning paradigms.
Anthology ID:
2026.findings-emnlp.1634
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:
34751–34764
Language:
URL:
https://aclanthology.org/2026.findings-emnlp.1634/
DOI:
Bibkey:
Cite (ACL):
Juyong Jiang, Chansung Park, Jiasi Shen, and Sunghun Kim. 2026. Learning to Code by Learning to Verify: Execution-Grounded Co-Evolution of Code Generation and Self-Verification for Reliable Code LLMs. In Findings of the Association for Computational Linguistics: EMNLP 2026, pages 34751–34764, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
Learning to Code by Learning to Verify: Execution-Grounded Co-Evolution of Code Generation and Self-Verification for Reliable Code LLMs (Jiang et al., Findings 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.findings-emnlp.1634.pdf