CodeVerifier: Unified Generative Verification across Code Generation and Development
Anonymous authors
ICLR 2027
TL;DR. CodeVerifier gives coding agents early, structured feedback on programs, edits, and repository patches, helping them select better candidates, guide repairs, and learn before full testing.
Abstract. Code generation for competitive programming and repository level software engineering can be viewed as a sequence of decisions over code states such as complete programs ongoing edits and repository patches. Reinforcement learning with verifiable rewards can improve these decisions beyond finite demonstration data provided that the policy receives a reliable reward before selecting its next action. This condition is difficult to meet at scale since short test prefixes leave many candidates tied deeper execution pushes latency into a long tail and intermediate edits often lack a testable entry point while querying a larger general purpose model at every step is too costly. We turn this missing feedback into a reusable signal with CodeVerifier, a generative verifier that judges code states before final testing and outputs a rationale repair relevant code regions and a verdict. Supervision comes from two kinds of history where execution outcomes indicate whether a state succeeds and successful repairs indicate where a failed state must change. A two stage procedure first projects this evidence into structured targets and then optimizes verdicts and regions with separate field wise signals. CodeVerifier outperforms size matched code judging baselines across competitive programming and repository code by points on average. On LiveCodeBench residual errors, one 9B judgment matches the mean detection rate of 8 additional tests; on the hardest TACO slice, matched-recall execution is slower even with idealized 64-way parallelism. Used as a reward it improves candidate selection distinguishes successful from unsuccessful edits and raises final task success which shows that structured early judgments can fill the feedback vacuum and replace many repeated executions.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
ICLR 2027
Under review · 3 reviews · OpenReview
Updated 24 Nov 2026, 17:12 UTC.
- Rating
- 3/4
- Confidence
- 3/4
- Soundness
- 2/3
- Presentation
- 2/3
- Informativeness
- 2/3
Read review
Summary
This paper focuses on the code RLVR problems, where short tests make many solutions tied in deep execution, and querying a larger model can be too costly. Therefore, they propose the CodeVerifier, a generative verifier judging the codes and outputing the repair relevant code regions with a verdict. The empirical experiments show the improvements on both competitive programming and repository code on average. Also, the code is available.
Strengths
- The experiments are sufficient, as well as the ablations.
- The motivation is sounded, and the figure is also easy to understand and clear.
Weaknesses
- One thing i would like to suggest is the writing, which i believe it could be polished, and the math symbols/annotations should also be reframed, since now it is kind of difficult for people to follow.
- I am wondering did you compare the experiments with CodeScaler, AceCoder, and other reward models? I am curious to see the comparisons.
Questions for the authors
See the weakness.
7 comments
Thanks for the responses. I have one further question: why you only choose CodeScaler-1.7B, which is the smallest size compared to AceCoder-7B and your model 9B. Therefore, the comparison might not be fair. If I remember, there are also 7B available size for CodeScaler.
Thank you for your discussion.
This paper studies a unified verifier interface for verdicts, repair regions, and rewards when tests are limited or execution is costly. The paper reports structured judgment, the binary CodeJudge comparison, and downstream reward-to-policy results. The initial response used the verified direct-score CodeScaler-1.7B and near-scale AceCodeRM-7B on the common problem/program pool. After the scale concern was raised, we added CodeScaler-8B in this turn.
The current Test BAcc values are 84.87% for CodeVerifier-9B, 72.46% for AceCodeRM-7B, 72.03% for CodeScaler-8B, and 65.77% for CodeScaler-1.7B.
The released CodeScaler family provides 1.7B, 4B, and 8B checkpoints The current Test BAcc values are 65.77% for CodeScaler-1.7B, 72.03% for CodeScaler-8B, 72.46% for AceCodeRM-7B, and 84.87% for CodeVerifier-9B.
Thank you again for the suggestion. We hope the added results support a favorable reassessment. :)
- Rating
- 2/4
- Confidence
- 3/4
- Soundness
- 2/3
- Presentation
- 2/3
- Informativeness
- 2/3
Read review
Summary
The research context of this paper concerns code generation for competitive programming and repository-level software engineering, which can be framed as a sequence of decisions based on the current state of the code. While reinforcement learning is well-suited for learning such decision-making processes, it requires reliable feedback. At scale, however, testing becomes prohibitively expensive; short test prefixes fail to distinguish between candidate solutions, while long prefixes incur excessive computational costs. To address this, the paper introduces "CodeVerifier"—a model that takes the current code state (represented as text or a snapshot) as input to predict whether a candidate solution will succeed or fail, while simultaneously identifying specific regions that may require modification. This approach eliminates or reduces the need for extensive testing. The model’s output consists of structured data: a brief rationale for the prediction, the code regions requiring repair (omitted if the prediction is "success"), and the final outcome. Training data is categorized based on the Intersection over Union (IoU) metric: samples with high IoU are used in the first stage, while those with low IoU are used in the second. The first stage involves Supervised Fine-Tuning (SFT), where the model learns to emulate curated, corrected demonstration examples. The second stage employs a reinforcement learning method developed by the authors called "Region-aware Verifier Policy Gradient" (RVPG). The authors argue that in a standard scalar reward setup, the signals for outcome prediction and local repair localization can interfere with or cancel each other out; RVPG, by contrast, evaluates both the accuracy of the final outcome and the correctness of the identified repair regions. These evaluations are then converted into "advantages" assigned to the corresponding output tokens. Additionally, Kullback-Leibler (KL) divergence is used to preserve the knowledge acquired during the SFT stage. Experimental results—including comparisons with Qwen3.5 and CodeJudge, as well as ablation studies—demonstrate that CodeVerifier achieves a slight improvement in prediction accuracy and offers significant advantages over traditional testing-based approaches. Furthermore, the ablation studies for RVPG confirm its effectiveness in enhancing both the success rate of outcome predictions and the precision of identified repair regions. I also have some reservations regarding the experimental results. While CodeVerifier shows a clear improvement in accuracy compared to Qwen3.5, it outperforms CodeJudge by only 3.2% on average; this leads me to question the overall effectiveness and practical utility of the CodeVerifier model. That said, I do believe the proposed approach has real-world value in scenarios where test information is limited or execution costs are high. Furthermore, the RVPG reinforcement learning method introduced in the paper represents a noteworthy innovation.
Strengths
The approach proposed in the paper—to be adopted when test information is insufficient or execution costs are high—carries practical significance. The RVPG reinforcement learning method introduced in the paper also represents a noteworthy innovation.
Weaknesses
The effectiveness of the model training is limited. Furthermore, I have reservations regarding the experimental results: while CodeVerifier shows a clear improvement in accuracy compared to Qwen 3.5, it outperforms CodeJudge by only 3.2% on average—a margin that leads me to question the model's overall efficacy and practical utility. The paper also lacks sufficient innovation. Although the specific implementation of RVPG contains some novel elements, the concept of determining code correctness without full execution has been explored in prior research; similarly, existing literature already addresses the identification of errors and the localization of the corresponding faulty code segments. Regarding the experiments, it is unclear why the authors did not utilize models with larger parameter counts, opting instead for the 9B version of Qwen. Additionally, I question the methodology used to evaluate cost differences—specifically, the comparison between the time required for prediction and the time spent on testing.
Questions for the authors
Can the repair-related regions identified in the paper provide a meaningful improvement to the final repair outcome, and do these regions effectively assist in the actual code modification process? The paper does not address scenarios where the prediction fails. While the study compares the time required for prediction against the time required for testing, it is important to note that predictions are not 100% accurate; how does the cost incurred in the event of a failed prediction compare to the cost of testing? Furthermore, how is the effectiveness of these repair-related regions measured? Since there can be multiple ways to fix code—ranging from localized patches to comprehensive refactoring—the identified repair regions should not be viewed as a definitive or "perfect" solution. Additionally, why did the authors not opt for a model with a larger number of parameters, and why was the specific model configuration from the original CodeJudge paper not utilized?
11 comments
Response to Reviewer FgPX
Thank you for recognizing CodeVerifier's practical value when test information is limited or execution is costly, as well as the contribution of RVPG. We further clarify the verifier's full scope, the effect of regions on repair, prediction-error costs, model scale, and related work.
Overall utility and paper positioning
The paper's Main Results and RQ1--RQ4 evaluate binary verdicts, repair regions, limited execution, editing states, and policy rewards separately. The 3.2% figure belongs to the dedicated binary-verdict protocol; the full use of CodeVerifier is also characterized by the repair-region score ( in Table 1), limited-execution, editing-state, and policy-reward results. After the first eight LiveCodeBench tests, the 9B model identifies 81.25% of the remaining incorrect candidates; on the fixed candidate pool, Top-1 gains after 1/2/4/8 tests are +6.46/+5.00/+2.55/+1.38%; editing-state AUC improves by 6.8% relative to Base; and the expected number of repository repairs solved with five samples increases from 5.49 to 8.52. The appendix section “Additional Controls and Comparisons” places these use cases in one evidence chain for easier comparison.
Q1 Whether regions improve repair
RQ1 already evaluates regions against real repair locations and a same-file translation control, and Table 10 reports the correspondence on human repairs. Here, a region is defined as an actionable cue for a subsequent decision, while the agent remains free to choose the patch. To connect localization quality to actual repair, the appendix section “Repair intervention and region utility” runs three trajectories per task with the same 9B policy on 11 BugsInPy tasks whose repositories are disjoint from training. With region hints, successful trajectories increase from 8/33 to 12/33, and solved tasks from 3/11 to 4/11; four paired trajectories change from failure to pass, none changes from pass to failure, and the average number of interaction turns decreases by 1.39. Final outcomes are still determined by the project tests.
Q2 What happens when a prediction is wrong, especially false acceptance without further tests
RQ2 and the appendix section “RQ2 Judgment quality and execution cost” already report the LiveCodeBench residual-error analysis and the TACO matched-recall timing comparison separately. The efficiency comparison uses a common error-recall target and explicitly states the corresponding test-confirmation protocol. To make the cost of stopping after a verifier judgment immediately visible, the appendix section “Operating point and direct reward-model comparison” adds the false-acceptance readout: at the reported operating point on the complete TACO test slice, the 9B verifier recalls 77.23% of incorrect programs; if testing stops at that point and the verifier judgment is accepted directly, 22.77% of incorrect programs are retained as correct, while the correct-program retention rate is 43.96%.
A single judgment is not the only operating mode. Section 2 defines a mean-utility readout for repeated judgments, and the five-judgment protocols in RQ2/RQ4 already use this aggregation for candidate selection. When a single call is uncertain, the same state can be sampled independently several times and the outputs aggregated by voting or mean utility before deciding whether to continue execution. The repeated-judgment analysis in the appendix shows that disagreement tracks harder verdicts, making repeated voting a lightweight confidence gate before stopping tests.
A separate offline pool of 18,397 common candidates reports the BAcc and test-budget frontier: 9B BAcc is 84.31%, while 1/2/3/5/8 tests give 82.28%/89.02%/92.24%/95.44%/97.53%. At the same error recall, uniform test sampling requires 419$\times$ the serial execution time, and idealized 64-way parallelism still requires 6.5$\times$; if every verifier judgment is followed by complete test confirmation, the added cost is 0.24% of serial test time or 15.4% under the idealized 64-way accounting. These readings correspond to the evaluation pools identified in the appendix.
Q3 How regions are measured when repairs are non-unique
Section 2 and the appendix section “Evaluation metrics” define a region as a location associated with a subsequent repair rather than a unique patch, and measure its correspondence to later modified lines with line recall, coverage hit, and IoU. Table 10 uses human repairs and same-file translations to test the relation between regions and repair evidence, while the appendix section “Repair intervention and region utility” reports the intervention on actual repair trajectories. This evaluates whether the localization reaches repair-relevant code while allowing multiple valid repair strategies.
Response to Reviewer FgPX (Part2)
Q4 Why not use the original CodeJudge configuration
RQ4 describes CodeJudge's published two-pass counterexample-analysis procedure. For comparison, every scale uses the same Qwen3.5 backbone and the same frozen candidate pool. This preserves the baseline's judgment procedure while fixing the model family, input pool, and output interface within an interpretable comparison; the revision places these correspondences together.
Whether larger models show a stable trend
Table 1 shows binary accuracy increasing from 0.804/0.839/0.887 at 2B/4B/9B; on the common binary comparison, CodeVerifier's overall accuracy also rises from 81.81%→84.32%→87.67%. The 9B model exceeds the 397B teacher (87.67% versus 85.37%), while 4B reaches 84.32%, close to 9B CodeJudge at 85.44%. This gives a clear scale trend; Figure 5(a) simultaneously shows the service-time cost as scale increases, making 9B an explicit quality--service-cost operating point.
Innovation and representative related work
The paper's Related Work and the appendix section “Outcome verifiers, process rewards, and model judges” already cover the two relevant lines of work: judgment without complete execution and fault localization. CodeJudge: Evaluating Code Generation with Large Language Models judges terminal correctness from the task and program semantics; Fault-Aware Neural Code Rankers rank code candidates by fault risk. CodeVerifier has a broader scope: execution outcomes supervise the verdict, successful repair edits supervise the region, and evidence projection plus field-wise RVPG organize both signals in one structured interface. The interface covers complete programs, editing states, and repository views, and supports candidate selection, repair guidance, and RL rewards; the revision only adds a concise statement of this distinction in the appendix.
Response to Reviewer FgPX (Part3)
Taken together, these results place CodeVerifier on a continuous usage path rather than in a single binary-accuracy comparison. We hope the clarifications and additional results help you reassess the method in this broader scope; we would be happy to continue the discussion if any detail would benefit from further clarification. :)
- Rating
- 2/4
- Confidence
- 3/4
- Soundness
- 2/3
- Presentation
- 3/3
- Informativeness
- 2/3
Read review
Summary
The paper targets the missing reward signal in RLVR for code, where short test prefixes tie candidates, deep execution is slow, and intermediate edits often lack an entry point (Fig. 1). It proposes CodeVerifier, one generative model that reads complete programs, edits, trajectory prefixes, and repository views and outputs a verdict plus repair-relevant line regions; execution outcomes label the verdict and subsequent successful repairs label the regions. Training is two-stage: SFT on teacher judgments projected onto execution/repair evidence, then RVPG, which routes separate verdict and region advantages to their own output fields (Eqs. 9–11). Qwen3.5-{2B,4B,9B} are trained on temporally split AtCoder/NowCoder and SWE-Gym/R2E-Gym data, and evaluated on verdict accuracy, region IoU, candidate selection, execution-cost savings, and as an RL reward on OpenR1 / LiveCodeBench v6 / SWE-bench Verified.
Strengths
- Using lines changed in the next successful repair as location supervision is a principled way to obtain grounded regions without manual labels, and the same structured interface unifies programs, edits, patches, and coordinate-free prefixes (Sec. 2.1, A.7).
- The ablations control initialization and instances well: every Stage-II run starts from the same projected-SFT checkpoint, and "Shared, routed" updates the same tokens with one scalar, isolating the gain of field-wise routing (Table 1; G 0.545→0.617 at 9B).
- The execution-cost claim is calibrated, not a strawman: equivalent tests are derived analytically from full-suite hypergeometric detection (Eq. 19), and the paper reports both serial (419×) and ideal 64-way (6.5×) timings (Fig. 5).
- Downstream reward experiments use three paired seeds with per-seed numbers and a correctly labeled untrained reference (Table 16), and region grounding is tested on human repairs with a same-file translation control (Table 10).
Weaknesses
- The reward gains over test/Qwen are only +1.70/+1.52/+1.4 pp with three seeds and no paired test (Table 16), i.e. one to two tasks on ~105–110 problems.
- CodeVerifier benefits from ~8.9K labeled SFT plus RL samples while CodeJudge uses its published two-pass procedure (Table 11), and a same-backbone, verdict-label-only baseline is absent, so the gain cannot be attributed to the proposed method rather than extra data.
- Several ablations sit in a tight 0.545–0.559 cluster (Table 1), so the fine-grained routing attribution may not survive training-seed variance; the 0.06 Stage-I→II jump is more convincing.
Questions for the authors
See the Weaknesses
8 comments
Response to Reviewer 494m
Thank you for recognizing the grounding of repair-region supervision, the Stage-II controls, and the execution-cost analysis.
W1 Downstream reward replication and task scale
Table 16 already reports the Test/Qwen and CodeVerifier reward results by benchmark and seed. The three evaluation sets contain 236 OpenR1 problems, 175 LiveCodeBench v6 problems, and 500 SWE-bench Verified instances. Relative to the same-seed Test/Qwen arm, CodeVerifier reward solves 3--5, 2--3, and 3--12 additional instances per seed, respectively. All six independently trained seed pairs (three competitive-programming pairs and three repository-repair pairs) favor the corresponding arm on their respective evaluation sets; the exact two-sided sign test over training pairs gives . OpenR1 and LiveCodeBench share the competitive policy, so the training pair is the natural unit for this comparison. Looking only at the decimal change in mean pass rate can obscure the fact that this is a fixed-policy, fixed-pool test of whether verifier rewards consistently change final decisions; the consistent direction across seeds is the central evidence for this use case.
After normalizing by the number of tasks in each benchmark, the average pass-rate gains are approximately 1.69%, 1.52%, and 1.33%, respectively; the per-seed solved counts are retained in the appendix table.
Downstream pass rate measures the value of the verifier as a reward, while Table 1 and RQ2--RQ3 directly measure verifier quality, candidate selection, and execution cost. The appendix section “Policy learning” adds only the task counts, per-seed solved counts, and paired test to make these results easy to check.
W2 Structured supervision and verdict-only control
Table 1 already places Teacher SFT and Projected SFT side by side with the same Stage-I instances and initialization, and the appendix section “Evidence projection and structured supervision targets” defines evidence projection. Thus, this comparison concerns target construction for the same tasks and output interface, rather than a change in training scale or sample count. We add two complementary controls in the appendix to close this control chain.
Teacher SFT and Projected SFT use the same training instances, initialization, output structure, and verdict labels; they differ in whether the target is constructed through execution/repair evidence projection. At 9B, increases from 0.753 to 0.792, and from 0.462 to 0.553. The appendix further reports a verdict-only SFT control with the same 9B backbone, splits, decoding protocol, and frozen 1,435-state test pool. Keeping only the verdict target gives 1,098/1,435 = 76.5% binary accuracy, compared with 87.67% for the full CodeVerifier.
For the online stage, we fix the projected-SFT starting point, the same 1,941 online records and order, and the same 60-update budget, changing only whether the region field receives reward:
| Metric | Verdict-only | Joint | Joint Verdict-only |
|---|---|---|---|
| Verdict accuracy | 78.82 0.37 | 78.84 0.15 | +0.02 0.26% |
| Line recall | 53.52 0.38 | 54.19 0.25 | +0.67 0.18% |
| Coverage hit | 77.10 0.47 | 77.82 0.50 | +0.72 0.08% |
| Joint F1 | 0.5419 0.0029 | 0.5458 0.0033 | +0.0038 0.0031 |
All three seeds improve on localization and the joint metric while verdict accuracy remains stable. The two controls answer complementary questions: verdict-only SFT compares single-label supervision with the full structured training target, while the matched Stage-II control isolates the effect of adding region reward from the same projected-SFT starting point. CodeJudge remains an independent end-to-end, published two-pass, training-free baseline.
Response to Reviewer 494m (Part 2)
W3 Multi-seed evidence for field-wise routing
Table 1 shows that Full RVPG exceeds Shared, routed in by 0.075, 0.086, and 0.072 at 2B, 4B, and 9B, respectively, with both and improving; Full RVPG is highest in 21/21 comparisons across the seven Stage-II ablations and three model scales. This ablation changes only how feedback is routed, so the absolute differences should be read together with training variation. The appendix section “Matched training control and seed stability” reports a joint-F1 seed SD of about 0.003, and the appendix section “Directional conflict between verdict and region feedback” provides the scalar-cancellation analysis. We additionally report a three-seed routing comparison on a fixed test pool.
Proposition 1 in the appendix gives the mechanism: when verdict and region advantages are merged into one scalar, components with opposite signs can cancel; in the observed training signal, 18.15 0.76% of candidates have opposite signs for the two feedback types.
We directly test this comparison on the frozen 1,435-state test set using 100-update Full RVPG and Shared-routed:
| Seed | Arm | Verdict accuracy | Correct / 1,435 | |
|---|---|---|---|---|
| 43 | Full RVPG | 0.785 | 1,126 | 0.597 |
| 43 | Shared-routed | 0.782 | 1,123 | 0.526 |
| 44 | Full RVPG | 0.794 | 1,140 | 0.608 |
| 44 | Shared-routed | 0.789 | 1,132 | 0.534 |
| 45 | Full RVPG | 0.788 | 1,131 | 0.604 |
| 45 | Shared-routed | 0.786 | 1,127 | 0.531 |
The mean is 0.603 versus 0.530 across the three seeds. On a fixed 9B checkpoint, the gradient-direction audit gives a region-token gradient cosine of 0.431, a 0.347 fraction of region advantages that are reversed or zeroed, a gradient-norm ratio of 0.684, and a 0.352 fraction of region advantages pointing opposite to the shared-scalar direction. These measurements correspond to the scalar-cancellation mechanism in Proposition 1. The controls, table, and explanation are marked in blue in the revised appendix.
Response to Reviewer 494m (Part 3)
We hope these additions make the contribution attribution easier to verify and that the evidence will be taken into account in your final assessment. Thank you again for the careful review of the experimental design. :)
Comments on the paper
1 comment
Overall response
We sincerely thank all reviewers for their careful reading of CodeVerifier. The paper defines a unified code-state interface, evidence projection, and field-wise optimization, and studies their role in judgment, editing, limited execution, and policy learning; the reviews also recognize the practical value of grounded region supervision and RVPG. CodeVerifier is positioned as an early, structured complement to execution feedback, providing reusable verdicts, repair regions, and explanations for candidate selection, editing decisions, and terminal rewards, while final correctness remains determined by the task evaluator. We have uploaded a revised version and consolidated the relevant clarifications, checks, and supplementary evidence in the main text and appendix. The main text retains only the necessary positioning and pointers, while new numbers and controls are placed in the appendix; all additions and revisions are marked in blue.
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
Response to Reviewer EVLG
Thank you for recognizing the motivation, experimental coverage, and ablation analysis. We provide a unified explanation of the notation, utilities, ablations, and reward-model comparison below.
Notation and ablation map
Sections 2--3 and the appendix sections “Evaluation metrics” and “Field utilities and the online objective” define the code states, structured outputs, utilities, token advantages, and evaluation metrics. The notation is dense because one interface spans multiple code states; for quick reference, the appendix groups the terms by output, target, utility, token advantage, and ablation:
In Stage II, the verdict advantage is applied to verdict tokens, the region advantage to the corresponding region-block tokens, and the KL term preserves Stage-I behavior for the rationale. The appendix expands every Table 1 ablation name and its corresponding utility term, so each symbol maps directly to an experimental comparison.
Reward-model comparison and scale convention
the appendix section “Operating point and direct reward-model comparison” already reports a direct reward-model comparison on the same 1,435-state test pool; the key values are:
Under the same BAcc convention, 9B CodeVerifier is 19.10% above CodeScaler and 12.41% above AceCodeRM. As a scale reference, CodeVerifier-4B reaches 84.32% overall binary accuracy on the same 1,435-state pool, while 9B reaches 87.67%; this accuracy reading is kept distinct from the BAcc reported in the table. CodeVerifier also supplies repair regions and reuses the structured interface across complete programs, editing states, and repository views; CodeRM-NT participates as a reward arm in Table 16.
We hope the unified notation and same-pool reward-model comparison make the method boundary and experimental contribution clearer, and we kindly ask that the new evidence and blue-marked revisions be considered in your final evaluation. Thank you for your attention to the paper's presentation and reproducibility.