Joint training improves code generation with reliable feedback
ExecuCritic: Calibrated Critic Shaping for Code Generation with Verifiable Rewards
Software Engineering
Summary
Writing correct computer code is hard because tests only say if a program works or not without explaining mistakes clearly. The authors present ExecuCritic, a way where a code-writing model and a feedback-giving model learn together based on test results. This feedback model gives clearer hints and only guides the coder when it agrees with the actual test outcome. Their method makes the code-writing process more efficient and accurate across many coding tasks compared to older approaches.
What this means in practice
- •For software development teams: Improve automated code generation tools by integrating jointly trained critics to provide reliable diagnostic feedback and reduce testing overhead.
- •For automated testing providers: Enhance test feedback systems to supply more informative guidance to code generation models by calibrating critics against execution results.
Authors
Junjie Cao, Yingjie He
Abstract
Execution feedback is a useful supervision signal for code models because unit tests are objective and directly measure program correctness. Its weakness is that an entire program is often reduced to one pass or fail bit, leaving RLVR to solve a difficult credit assignment problem. At the same time, coding systems often include separate reviewer or tester roles, but these critics are usually prompted rather than trained and are not calibrated against execution. We propose ExecuCritic, a joint training framework in which a coder and a critic are updated on the same execution rollouts. The critic predicts pass or fail outcomes and gives short diagnostic feedback; the coder uses this signal only when the critic agrees with the executor on the current rollout group. Across eight code benchmarks and two recent open backbones, ExecuCritic improves over GRPO without a critic, prompted reviewer systems and scalar reward model baselines, while requiring fewer policy gradient steps and fewer sandbox executions. Ablations and reliability analyses suggest that the gains come from better credit assignment rather than larger sampling budgets.