Information-Gain Rewards over Diversity-Pruned Tests: GT-Anchored Verifier Co-Training for Reliable Code Generation
Organizations: Secure AI and Autonomy Lab University of Texas at San Antonio
Abstract
Self-play methods that co-train a single language model as both coder and test author promise to move code-generation RL beyond fixed test suites, but they suffer from two coupled pathologies: permissiveness collapse, where pass-rate rewards are maximised by trivial, non-discriminative tests, and concentration bias, where i.i.d. sampled tests cluster on modal inputs and inflate estimator variance. We introduce CoVer (Co-trained Coder and Verifier), a single-policy GRPO framework that addresses both failure modes. First, an information-gain (IG) reward scores each self-generated test by the mutual information between its pass/fail vector and a graded, ground-truth-anchored correctness signal y [0, 1] m, gated by the sign of their covariance so that only positively discriminative tests receive reward. Second, a three-stage diversity-aware selection step prunes a candidate pool to a behaviourally non-redundant suite (invalidity, input-string, execution-profile filtering), raising the effective sample size of the IG estimator at fixed execution budget. On five benchmarks (LiveBench, MBPP, LiveCodeBench, CodeContests, Code-Forces), CoVer raises one-shot pass@1 by +5.8 points at 7B and +7.1 points at 14B over the Qwen2.5-Instruct backbone, and achieves the highest macro-average among all compared methods at both scales. As a drop-in backbone inside the CodeT ranking pipeline, CoVer-7B adds +3.5 points, demonstrating the dual benefit of co-training for both generation and selection.
Figures & tables
| Method family | GT only at | Trains a | MI-based | Diversity | No GT at |
|---|---|---|---|---|---|
| training | verifier | reward | selection | evaluation | |
| Curated-test RL ( Gehring et al., 2025 ; Dou et al., 2024 ; Zeng et al., 2025 ) | ✓ | – | – | – | ✓ |
| Inference-time filtering ( Chen et al., 2023 ; Ridnik et al., 2024 ) | – | – | – | – | ✓ |
| Self-play co-training ( Lin et al., 2025 ; Wang et al., 2025 ) | –/✓ | ✓ | – | – | ✓ |
| CoVer (ours) | ✓ | ✓ | ✓ | ✓ | ✓ |
| Model | LiveBench | MBPP | LCB | CC | CF | Avg. |
|---|---|---|---|---|---|---|
| Baselines ( 7–8B scale) | ||||||
| RLEF-8B (Llama 3.1 8B Inst) ( Gehring et al., 2025 ) | – | – | – | 9.7 | – | – |
| Sol-Ver (Llama 3.1 8B) ( Lin et al., 2025 ) | – | 41.0 | 27.24 | – | – | – |
| ReasonFlux-Coder-7B ( Wang et al., 2025 ) | 37.1 | 70.2 | 31.2 | 25.9 | 8.2 | 34.52 |
| Qwen2.5-7B-Coder-Instruct | 35.0 | 68.0 | 29.8 | 22.8 | 6.7 | 32.46 |
| Qwen2.5-7B-Instruct | 31.1 | 66.3 | 26.9 | 21.2 | 5.4 | 30.18 |
| Variant (Qwen2.5-7B-Instruct) | LiveBench | MBPP | LCB | CC | CF | Avg. |
|---|---|---|---|---|---|---|
| CoVer-7B (diversity selection, ) | 40.0 | 72.4 | 32.8 | 26.0 | 8.5 | 35.94 |
| No pruning (all columns) | 37.64 | 70.0 | 30.68 | 24.81 | 8.2 | 34.27 |
| +2.36 | +2.4 | +2.12 | +1.19 | +0.3 | +1.67 |
| Variant | LB | MBPP | LCB | CC | CF | Avg. |
|---|---|---|---|---|---|---|
| CoVer-7B | 40.0 | 72.4 | 32.8 | 26.0 | 8.5 | 35.94 |
| A1: pass-rate rew. | 36.32 | 69.25 | 31.25 | 24.94 | 7.8 | 33.91 |
| A2: binary | 37.98 | 70.5 | 31.73 | 25.52 | 8.0 | 34.75 |
| A3: coder only | 38.03 | 67.7 | 30.19 | 23.92 | 7.7 | 33.51 |
| Method | LiveBench | MBPP | LCB | CC | CF | Avg. |
|---|---|---|---|---|---|---|
| Qwen2.5-7B-Instruct (one-shot) | 31.1 | 66.3 | 26.9 | 21.2 | 5.4 | 30.18 |
| CodeT ( ) | 44.53 | 75.95 | 37.76 | 28.03 | 8.56 | 38.97 |
| CodeT + CoVer-7B ( ) | 50.78 | 79.63 | 40.70 | 29.70 | 11.56 | 42.47 |
| vs CodeT | +6.25 | +3.68 | +2.94 | +1.67 | +3.00 | +3.50 |
| Comparison | LiveBench | MBPP | LCB | CC | CF |
|---|---|---|---|---|---|
| (std) | (std) | (std) | (std) | (std) | |
| CoVer-7B vs Qwen2.5-7B-Inst | +8.9 (0.36) | +6.1 (0.47) | +5.9 (0.31) | +4.8 (0.33) | +3.1 (0.28) |
| CoVer-14B vs Qwen2.5-14B-Inst | +11.4 (0.14) | +3.1 (0.32) | +8.0 (0.27) | +7.3 (0.37) | +5.6 (0.20) |
| CoVer-7B vs Coder-7B | +5.0 (0.36) | +4.4 (0.47) | +3.0 (0.31) | +3.2 (0.33) | +1.8 (0.28) |
| CoVer-14B vs Coder-14B | +5.6 (0.14) | +6.8 (0.32) | +3.3 (0.27) | +9.6 (0.37) | +5.1 (0.20) |
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
| Benchmark | Train | Eval |
|---|---|---|
| CodeContests (diff. ) | 4,500 | 239 |
| LiveBench | – | 128 |
| MBPP | – | 221 |
| LiveCodeBench (v2) | – | 511 |
| CodeForces | – | 467 |
| Total | 4,500 | 1,527 |
| Parameter | Value |
|---|---|
| Backbones | Qwen2.5-7B/14B-Instruct |
| Llama-3.1-8B-Instruct | |
| Candidate codes ( ) | 16 |
| Sampled tests ( ) | 32 |
| Kept tests ( ) | 16 |
| Learning rate |
| Tests passed (of ) | GT-correct |
|---|---|
| 0–3 | 4.2% |
| 4–7 | 17.4% |
| 8–11 | 37.1% |
| 12–15 | 53.7% |
| 16 (all) | 86.8% |
| Model | LiveBench | MBPP | LCB | CC | CF | Avg. |
|---|---|---|---|---|---|---|
| Llama-3.1-8B-Instruct | 17.38 | 49.97 | 14.56 | 12.47 | 2.50 | 19.38 |
| CoVer-Llama-8B (ours) | 31.34 | 59.04 | 26.29 | 20.10 | 4.80 | 28.31 |
| +13.96 | +9.07 | +11.73 | +7.63 | +2.30 | +8.94 |
| Run | LiveBench | MBPP | LCB | CC | CF | Avg. |
|---|---|---|---|---|---|---|
| CoVer-7B | ||||||
| Run 1 | 40.00 | 72.40 | 32.80 | 26.00 | 8.50 | 35.94 |
| Run 2 | 39.06 | 70.55 | 32.61 | 25.73 | 8.70 | 35.33 |
| CoVer-14B | ||||||
| Run 1 | 47.75 | 79.44 | 41.49 | 32.92 | 12.88 | 42.90 |
| Run 2 | 48.29 | 78.73 | 42.31 | 33.79 | 13.14 | 43.25 |
RL for Code Generation
Reinforcement learning for code generation trains models to write, repair, and optimize programs using execution-based and other task-specific feedback.
See all 150 papers