acceptodds
Under review as a conference paper at ICLR 2027

Clause-Compositional Inference and Aligned Training for Target-Hidden Loop Verification

Abstract

Loop invariants reduce unbounded executions to finite proof obligations. For legacy programs with unknown verification goals, target-specific verifier feedback is unavailable, making invariant generation especially challenging. Meanwhile, LLM-generated invariants often fail as complete responses even when they contain useful clauses, and complementary clauses may be scattered across different responses. We introduce CRAFT, a framework that aligns invariant generation and training with clause composition under hidden verification targets. At inference, CRAFT decomposes responses into clauses, pools and jointly filters clauses across responses, and composes the survivors into an invariant. This recovers useful proof material without requiring any response to prove the hidden target independently. The same filtered compositions supply SFT labels and determine which clauses receive RL credit. Because target assertions and postconditions remain hidden throughout generation and training, CRAFT estimates invariant strength by measuring how many candidate negative traces constructed from executions an invariant rejects. Supervised fine-tuning (SFT) distills accepted compositions from multiple responses into labels for one response, while reinforcement learning (RL) credits coverage contributed by retained clauses even when their original responses fail as wholes. On 832 C programs, SFT raises Qwen3-8B's compose@1 (the verification rate after filtering and composing one response) from 37.86% to 63.94%, exceeding the untrained model's 57.81% compose@32. Subsequent RL raises compose@1 to 69.23%. Reward ablations show that whole-response credit can improve standalone success while degrading compositional verification, whereas clause-level credit preserves useful contributions from failed responses.

Primary area:
neurosymbolic & hybrid AI systems (physics-informed, logic & formal reasoning, etc.)
Keywords:
Formal Verification, Loop Invariant Generation, Large Language Models, Reinforcement Learning, Program Synthesis

Reviews

Among:
Shape:
1234this paper, Top 30%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.67 over 3 reviews, above 70% of the others.
Reviewer_yCpdOpenReview ↗
Rating
3
Confidence
3
Informativeness
3
Presentation
3
Soundness
2
Read review
Paper summary

This paper studies the generation of loop invariants without providing the target assertion to the model. CRAFT decomposes model responses into clauses, aggregates them and filters them through Houdini, then combines the surviving clauses to complete verification. Training is designed around this pipeline as well: SFT uses labels obtained by composing multiple responses, while RL assigns rewards based on the ability of surviving clauses to rule out candidate negative traces. Experiments show that this training improves the verification success rate after composition, even when the independent success rate of the model's full responses declines.

Critical strengths
  1. The paper identifies a meaningful problem: if the system ultimately uses only the valid fragments of a response, then assigning rewards based on whether the entire response is correct may discard useful training signal. The authors carry this idea through inference, SFT, and RL, making the overall approach fairly coherent.
  2. The main training gains are quite clear. For Qwen3-8B, compose@1 rises from 37.86% to 63.94% after SFT and further to 69.23% after RL. Multiple models show similar trends, so the results do not hinge on a single model.
  3. The reward ablation provides valuable observations. Removing the constraint that a reward is given only when all clauses pass leads to a marked improvement in compositional verification. At the same time, the authors report different trends for pass and compose, rather than cherry-picking only the metrics that favor their method.
Critical weaknesses
  1. The SFT comparison alone is not yet sufficient to isolate the effect of compositional labels. The paper only states explicitly that the two training sets have approximately the same number of samples, but the compositional labels result from multiple rounds of sampling and coverage filtering. It is currently unclear whether the single-response labels were produced with the same procedure, the same generation budget, and the same filtering criteria. As a result, the gap between 63.94% and 23.20% may reflect the combined influence of search budget and label quality.
  2. The comparison with Loopy is affected by parser issues. The appendix reports that 98.8% of its initial responses contain invariant annotations, yet only 1.75% are passed by the extractor to Houdini. Under these circumstances, a lower verification rate can hardly be taken as direct evidence that its reasoning method is inferior to CRAFT. At a minimum, a result obtained after fixing the parsing adapter would be needed to judge the actual gap between the two.
  3. The additional benefit of the Shapley term remains uncertain. After SFT, it raises compose@1 from 67.91% to 69.23%, a gain clearly smaller than that brought by the clause reward itself. In the absence of repeated training runs, I would be cautious about the conclusion that it reliably improves exploration. Moreover, the trained 8B model still reaches only 12% on the nonlinear subset, indicating that the overall improvement does not yet extend to such difficult tasks.
Questions for authors
  1. Could you compare, on the same batch of training programs and with the same candidate generation budget, "selecting the single response with the highest coverage as the label" against "composing multiple responses as the label"? This would more directly show how much of the SFT improvement comes from composition itself.
  2. Why do most of Loopy's responses fail to reach Houdini? How much would the results change after fixing the format adapter or using a shared extractor? I do not think the baseline needs to be redesigned, but the pervasiveness of parsing failures undermines the persuasiveness of the current comparison.
  3. There are two reporting points I find somewhat confusing and would like clarified. First, does the SFT (single) in K.2 also use the same coverage threshold as the compositional labels? Does "approximately the same number of training samples" mean that both groups use the same batch of programs? Second, in Table 23, GPT-5-nano's pass@1 is 3.80% on Linear and 3.86% on Loopy, whereas in Table 25 it is 2.53% and 4.72%; both tables report an overall value of 3.61%, and the text states that the same sample pool is used. Is this a typo in one of the tables, or do the two evaluations differ in how they are processed?
6 comments
AuthorsOpenReview ↗

Response to Reviewer 3 (1/3): SFT label construction

Q1 — Could you compare, on the same batch of training programs and with the same candidate generation budget, "selecting the single response with the highest coverage as the label" against "composing multiple responses as the label"? This would more directly show how much of the SFT improvement comes from composition itself.

Thank you for suggesting this comparison. We first clarify the original SFT data construction, then present a supplementary controlled comparison.

Both SFT datasets use the same input-program pool, Qwen3-8B generator, and training settings, with approximately equal sizes. Over 93% of the distinct prompts in the composed-label dataset also occur in the single-response dataset.

In the original SFT ablation, construction budgets differ: SFT (single) generates one response per input loop, removes incorrect clauses, and uses the remaining valid clauses as the training label; inputs with no valid clauses remaining are skipped. Composed-label SFT jointly filters 16 responses per round for at most five rounds, accepting labels at negative coverage >= 0.5; SFT (single) has no such threshold. The 63.94% versus 23.20% compose@1 result compares these complete construction procedures.

In the supplementary experiment, we compare highest-coverage selection and composition on all 466 Loopy programs using the same first N GPT-5-nano/minimal responses. This matches model-call counts and generation token costs.

All three comparisons use the same N responses. Single-response selection filters each response separately and selects the one with the highest coverage on the same fixed negative traces; composition merges all clauses and filters them together. Filtering costs therefore differ with N and proof difficulty. Targets are used only for evaluation, not selection. “Any single succeeds” counts a program as solved if at least one independently filtered response proves its target.

Responses NHighest-coverage singleAny single succeedsComposition
147.85%47.85%47.85%
456.87%61.16%63.09%
860.30%65.88%69.10%
1664.16%71.46%74.89%

At N=16, composition verifies 50 more programs than highest-coverage selection (+10.73 percentage points), including 16 programs that no individual filtered response verified under the tested configuration (+3.43 points over "Any single succeeds"). At N=4/8/16, composition also retains every success achieved by an individual response.

Recorded cumulative filtering times are:

Responses NIndependent filtering (hours)Joint filtering (hours)
12.832.83
413.118.48
826.3713.55
1652.7622.55

At N=16, joint filtering reduces recorded cumulative time by 57.3% while producing higher-quality candidates. Appendix K.6 (Table 21) provides further evidence of lower filtering cost.

Paired SFT retraining was not feasible within the rebuttal period due to time and compute constraints. Under identical generation budgets, composition outperforms best-of-N single-response selection using the same coverage signal. The original SFT ablation further shows that training on labels produced by the complete composition-based procedure yields substantial downstream gains over the single-response filtering baseline.

AuthorsOpenReview ↗

Response to Reviewer 3 (2/3): Loopy and reporting clarifications

Q2 — Why do most of Loopy's responses fail to reach Houdini? How much would the results change after fixing the format adapter or using a shared extractor? I do not think the baseline needs to be redesigned, but the pervasiveness of parsing failures undermines the persuasiveness of the current comparison.

Thank you for highlighting the extraction issue. Loopy's extractor dropped ACSL annotations without paired Markdown fences before Houdini. Correcting this raises its verification rate from 18.75% to 68.03%.

To align the prompting setup with Loopy, we use Loopy's prompt in the supplementary GPT-5-nano/minimal evaluation on all 832 programs.

MethodRateTokens/program
CRAFT @137.86%928
CRAFT @454.69%1,812
CRAFT @863.10%3,610
CRAFT @1668.75%7,233
CRAFT trained @1 (Qwen3-8B + SFT + RL)69.23%1,348
Loopy, corrected initial composition (15 responses)66.47%6,904
Loopy, corrected initial + repairs (15 initial + up to 7 repair responses)68.03%10,016

At nearly equal recorded token usage, CRAFT@16 reaches 68.75% versus 66.47% for Loopy's initial composition. It also exceeds Loopy including repairs by 0.72 percentage points with 27.8% fewer recorded tokens. In this target-hidden evaluation, the existing repair responses add 13 programs (1.56 points) beyond initial composition; their incremental benefit is much smaller than that of composition.

Our core contribution is composition-aligned training to improve search efficiency. With composition-aligned training, Qwen3-8B reaches 63.94% compose@1 after SFT and 69.23% after RL, both exceeding its compose@32 of 57.81% before our SFT/RL training, using just one response.

Q3 — There are two reporting points I find somewhat confusing and would like clarified.

Q3.1 — Second, in Table 23, GPT-5-nano's pass@1 is 3.80% on Linear and 3.86% on Loopy, whereas in Table 25 it is 2.53% and 4.72%; both tables report an overall value of 3.61%, and the text states that the same sample pool is used. Is this a typo in one of the tables, or do the two evaluations differ in how they are processed?

Thank you for identifying this reporting error. The original GPT-5-nano pass@1 results in Tables 23 and 25 came from independent runs, contrary to the shared-pool description. We apologize for this inconsistency and the confusion it caused.

While reconciling the experimental records, we also found that the historical GPT-5-nano batch used an earlier prompt variant that lacked some ACSL syntax instructions and examples included in the paper’s reported prompt. Our checks confirmed that evaluations of the other API models and the trained models used the prompt reported in the paper. We have therefore reevaluated GPT-5-nano on the full 832-program benchmark using the reported prompt and updated the affected tables, figures, and accompanying text. Both tables now report results from the same corrected response pool. These corrections preserve the paper’s main conclusions.

Q3.2 — First, does the SFT (single) in K.2 also use the same coverage threshold as the compositional labels? Does "approximately the same number of training samples" mean that both groups use the same batch of programs?

Thank you for requesting this clarification. SFT (single) does not use the same coverage threshold. Both datasets start from exactly the same input-loop pool and use the same SFT settings. Composed labels use multi-round composition, filtering, and coverage-based acceptance; SFT (single) generates one response per loop, removes incorrect clauses, and skips examples with none remaining.

"Approximately the same number of training samples" refers to the resulting dataset sizes. The procedures retain slightly different inputs: over 93% of the distinct prompts in the composed-label dataset also appear in the single-response dataset. We will clarify this distinction between the original program pool and the retained training sets in K.2.

AuthorsOpenReview ↗

Response to Reviewer 3 (3/3): Nonlinear tasks and Shapley credit

Q4 — Moreover, the trained 8B model still reaches only 12% on the nonlinear subset, indicating that the overall improvement does not yet extend to such difficult tasks.

Thank you for highlighting the limited performance on the nonlinear subset. Qwen3-8B improves from 10% at compose@32 before our training to 12% at compose@1 afterward. On the same subset, CRAFT with GPT-5-nano/minimal reaches 18% at compose@1 and 44% at compose@16.

Our training relies on model-generated candidates, so missing nonlinear relations limit both composition and useful training supervision. The results support this explanation and show that CRAFT can solve more nonlinear tasks with stronger-model candidates, motivating models with better nonlinear reasoning.

Q5 — The additional benefit of the Shapley term remains uncertain. After SFT, it raises compose@1 from 67.91% to 69.23%, a gain clearly smaller than that brought by the clause reward itself. In the absence of repeated training runs, I would be cautious about the conclusion that it reliably improves exploration.

Thank you for asking about stability. Three independent training runs with different seeds and the same training and evaluation settings show small positive Shapley gains. Each compares Full with the corresponding clause-decomposed reward without Shapley:

RepetitionShapley gain in compose@1 (pp)Shapley gain in compose@32 (pp)
1+0.6+0.1
2+1.8+1.7
Reported in Table 27+1.3+1.7

The modest gains after SFT are consistent with our expectations and mechanism. Our SFT data construction collects multiple responses, jointly filters their clauses, and selects composed labels using negative-trace coverage. It substantially improves compositional verification with few responses: compose@1 reaches 63.94% after SFT, exceeding compose@32 before SFT (57.81%). Thus, SFT makes a fixed sampling budget more effective.

Our method for constructing discriminative negative traces also provides an informative signal for clause-level rewards. Effective SFT and this reward signal make a smaller marginal benefit from additional credit assignment plausible. At each fixed sampling budget, Table 27 shows that Shapley gains decrease after SFT: from 3.00 to 1.32 percentage points at compose@1 and from 4.32 to 1.68 points at compose@32, consistent with this explanation.

For context, Appendix K.10 (Figure 12) analyzes distribution sharpening under whole-response RL: pass@1 rises from 6.37% to 15.50%, while pass@32 falls from 25.96% to 18.39%. Our clause-decomposed training and compositional inference mitigate this coverage loss.

Reviewer_AjZFOpenReview ↗
Rating
3
Confidence
3
Informativeness
2
Presentation
2
Soundness
3
Read review
Paper summary

This paper studies loop-invariant generation without access to the target assertions or postconditions. It proposes CRAFT, a method that combines clauses from multiple LLM outputs and uses Houdini to remove those that cannot be proved inductive. The authors use the resulting invariants as SFT labels and train with RL rewards based on how many sampled negative traces the retained clauses exclude. Experiments on 832 C programs show that this approach improves verification success, particularly when only a few responses are sampled.

Critical strengths
  1. The paper identifies a useful mismatch between whole-response training rewards and compositional inference. A response containing an incorrect clause can still contribute useful clauses after filtering and recomposing. CRAFT preserves these contributions during training, and the reward ablation supports this choice: clause-decomposed rewards improve compositional verification, whereas whole-response rewards can substantially degrade it.

  2. The experiments provide substantial evidence that composed supervision improves sampling efficiency. For Qwen3-8B, SFT raises compose@1 from 37.86% to 63.94%, exceeding the base model’s 57.81% compose@32. Subsequent RL raises compose@1 to 69.23%.

Critical weaknesses
  1. The motivation for reusable, target-independent invariants is not fully tested. Most experiments check the generated invariants against the original benchmark targets. Appendix B gives examples of reuse, but there is no systematic evaluation on additional goals. Showing that the method works without targets is useful, but does not establish that hiding targets produces more reusable summaries.
  2. The comparison with iterative refinement is difficult to interpret. Several baselines lose their target-dependent feedback, and the systems also differ in prompts, parsers, and stopping rules. In particular, Loopy’s extractor passes only 1.75% of initial responses to Houdini despite most responses containing annotations. These results do not clearly separate the benefit of composition from implementation differences. All comparisons also disable reasoning, we don't know how much the advantage persists with stronger reasoning configurations.
Questions for authors
  1. Can you compare composition and iterative repair using the same model, parser, verifier, and token or time budget? Does the advantage remain when both methods have access to targets and full verifier feedback?
  2. How much of Loopy’s poor performance is due to its extractor? What happens if its generated annotations are processed by CRAFT’s parser?
  3. Does composition still offer a substantial gain when reasoning is enabled under a comparable inference budget?
4 comments
AuthorsOpenReview ↗

Response to Reviewer 2 (1/2): Composition, repair, and reasoning

Q1 — Can you compare composition and iterative repair using the same model, parser, verifier, and token or time budget? Does the advantage remain when both methods have access to targets and full verifier feedback?

Thank you for suggesting this comparison. We compare composition and vanilla iterative repair on all 466 Loopy programs using GPT-5-nano/minimal, a shared simple initial prompt, and the same parser, verifier, and Houdini settings. Within each visibility setting, both methods share the initial response and make exactly n calls, one response per call, for n = 1, 4, 8.

Composition pools independent responses; repair makes sequential revisions using the previous candidate and full raw verifier feedback. Visible targets are supplied to both methods and included in repair feedback; hidden targets are restored only for evaluation.

We report cumulative success: a program is solved at budget n if any iteration from 1 through n succeeds. At each iteration, Houdini evaluates the current repair answer or the union of composition responses generated so far.

SettingStrategy@1@4@8Tokens/program @8
HiddenComposition46.57%59.44%65.24%2,464
HiddenIterative repair46.57%51.50%54.08%13,951
VisibleComposition53.22%68.03%74.03%2,657
VisibleIterative repair53.22%58.80%60.52%14,144

At eight calls, the composition-minus-repair verification differences are 11.16 percentage points with hidden targets and 13.52 points with visible targets. Repair consumes approximately 5.7 and 5.3 times as many tokens, respectively.

Reported token costs include all n calls.

Q2 — How much of Loopy’s poor performance is due to its extractor? What happens if its generated annotations are processed by CRAFT’s parser?

Thank you for highlighting the extraction issue. Loopy's extractor dropped ACSL annotations without paired Markdown fences before Houdini. Correcting this raises its verification rate from 18.75% to 68.03%.

To align the prompting setup with Loopy, we use Loopy's prompt in the supplementary GPT-5-nano/minimal evaluation on all 832 programs.

MethodRateTokens/program
CRAFT @137.86%928
CRAFT @454.69%1,812
CRAFT @863.10%3,610
CRAFT @1668.75%7,233
CRAFT trained @1 (Qwen3-8B + SFT + RL)69.23%1,348
Loopy, corrected initial composition (15 responses)66.47%6,904
Loopy, corrected initial + repairs (15 initial + up to 7 repair responses)68.03%10,016

At nearly equal recorded token usage, CRAFT@16 reaches 68.75% versus 66.47% for Loopy's initial composition. It also exceeds Loopy including repairs by 0.72 percentage points with 27.8% fewer recorded tokens. In this target-hidden evaluation, the existing repair responses add 13 programs (1.56 points) beyond initial composition; their incremental benefit is much smaller than that of composition.

Our core contribution is composition-aligned training to improve search efficiency. With composition-aligned training, Qwen3-8B reaches 63.94% compose@1 after SFT and 69.23% after RL, both exceeding its compose@32 of 57.81% before our SFT/RL training, using just one response.

Q3 — Does composition still offer a substantial gain when reasoning is enabled under a comparable inference budget?

Thank you for this question. We compare minimal and medium reasoning with GPT-5-nano on the same 832 target-hidden programs, using identical prompts and verification settings:

ReasoningCRAFT budgetVerification rateTokens/program
minimalcompose@867.07%3,421
mediumcompose@157.93%6,652

Minimal compose@8 achieves 9.13 percentage points higher verification with approximately 48.6% fewer tokens than medium compose@1.

With medium reasoning, pass@N and compose@N use the same response pool and generation budget:

Responses N (medium reasoning)pass@Ncompose@NGain (pp)Tokens/program
151.32%57.93%+6.616,652
468.63%73.68%+5.0523,239
875.12%78.25%+3.1346,591

Composition improves verification by 6.61/5.05/3.13 percentage points at N=1/4/8. Increasing N from 1 to 8 further raises compose success by 20.31 points, showing continued gains with reasoning enabled.

AuthorsOpenReview ↗

Response to Reviewer 2 (2/2): Reusable invariants and additional goals

Q4 — The motivation for reusable, target-independent invariants is not fully tested. Most experiments check the generated invariants against the original benchmark targets. Appendix B gives examples of reuse, but there is no systematic evaluation on additional goals. Showing that the method works without targets is useful, but does not establish that hiding targets produces more reusable summaries.

Thank you for raising this question. We believe that generating invariants without access to a specific target, although it reduces verification success on that target, helps make them more general. Our motivation is to generate useful, reusable invariants when verification targets are not yet available. To examine this trade-off, we supplement Appendix B with a controlled target-visibility comparison, a semantic audit, and an additional-goal evaluation.

We compare target-hidden and target-visible GPT-5-nano/minimal on the same 832 programs, keeping all other settings fixed apart from target visibility. Each setting uses prefixes of its own fixed 16-response pool:

ResponsesTarget-hiddenTarget-visible
146.39%55.17%
461.66%70.31%
866.71%76.08%
1672.36%80.77%

We then audit the frozen @16 invariants using the same semantic checks and proof budgets:

Program subsetSettingProgramsCertified strictCertified exact
Verified in this settingHidden602395 (65.61%)301 (50.00%)
Verified in this settingVisible672444 (66.07%)288 (42.86%)
Verified in both settingsHidden578374 (64.71%)290 (50.17%)
Verified in both settingsVisible578380 (65.74%)279 (48.27%)

Percentages use the program count in each row. The shared rows compare exactly the same programs.

The audit combines generated clauses with entry conditions, facts about unchanged variables, and type bounds under the modeled, defined 32-bit scalar-integer semantics. For strictness, SMT checks establish that the invariant implies the original target translated to the loop head, while the reverse implication has a counterexample under the same satisfiable context. For exactness, we prove that the invariant describes exactly the set of reachable loop-head states. Appendix L provides the formal definitions, exactness theorem and proof, and semantic audit results.

Thus, the strict summaries retain information absent from the original target. For each exact summary, every property valid for all reachable loop-head states follows logically from that summary under the stated semantics and context.

Among the 578 programs whose original targets were verified in both settings, we successfully constructed and validated eight additional post-loop goals for each of 446 programs with assistance from GPT-6.1 Sol. We compared the existing invariants on the same eight goals per program. These goals came from fixed source-based templates covering bounds, input–output relations, parity, and other arithmetic properties. The additional goals include many properties that are not implied by the original targets.

MetricTarget-hiddenTarget-visible
Goals proved3,487/3,568 (97.73%)3,461/3,568 (97.00%)
Programs proving all eight goals424/446 (95.07%)411/446 (92.15%)

Providing targets improves verification of the original goals. Meanwhile, the semantic audit shows that target-hidden invariants retain substantial information beyond those goals, and the additional-goal evaluation demonstrates reuse of the same invariants for multiple post-loop properties. The two settings perform similarly on these additional goals, with target-hidden invariants proving all eight goals on 13 more programs. Together, these results support CRAFT’s ability to produce reusable summaries without access to verification targets.

Thanks for the detailed response. Most of my concerns have been cleared. I'm maintaining my positive score.

Thank you for your thoughtful review and continued support. We’re glad our response addressed most of your concerns.

Reviewer_nkRMOpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper proposes CRAFT for loop-invariant generation with hidden verification targets. It combines verified clauses across model responses and aligns SFT and RL with this compositional process, using negative-trace coverage as a target-independent strength signal. On 832 C programs, Qwen3-8B’s compose@1 improves from 37.86% to 69.23%, with ablations examining compositional labels and clause-based rewards.

Critical strengths
  1. CRAFT recovers useful invariant clauses from otherwise unsuccessful responses and aligns both supervision and reward with their use at inference. This addresses a meaningful limitation of treating each generated response as an indivisible candidate.
  2. The method demonstrates substantial verification gains across multiple model sizes. The ablations provide useful evidence that retaining and rewarding valid clause contributions is more effective than whole-response acceptance under the target-hidden setting.
Critical weaknesses
  • The SFT ablation does not clearly isolate the contribution of composition from the search and selection effort used to construct its labels. Section 3.5 matches the approximate number of training examples, but does not establish matched candidate-generation and verification budgets or a common candidate pool. A budget-matched comparison against selecting the best independently filtered response would better support attributing the gains specifically to composition.

  • The comparison with Loopy is difficult to interpret as evidence of algorithmic superiority. Appendix K.8.2 reports that 98.8% of its initial responses contain invariant annotations, yet only 1.75% reach Houdini through its native extractor. This suggests a substantial interface bottleneck. An extraction-corrected evaluation, with the remaining algorithm and budget unchanged, is needed to establish how much of the observed gap persists. This concern is specific to the Loopy comparison rather than the entire evaluation.

Questions for authors
  1. Can you clarify the candidate-generation, selection and verification budgets for SFT (single) and composed-label SFT? Under a common candidate pool and matched budgets, do composed labels still outperform selecting a single independently filtered response?
  2. How does Loopy perform after correcting the invariant-extraction bottleneck while keeping its remaining procedure and budget unchanged?
  3. What practical circumstances motivate withholding targets during training as well as inference? A multi-goal verification reward would introduce additional supervision and therefore change the setting, but a comparison or discussion could help clarify the practical trade-off of fully target-independent training.
  4. Appendix B provides useful examples of additional-goal verification and downstream summary reuse. Beyond these cases, is there systematic evidence that the same inferred invariants support multiple independently specified held-out goals per program? Such evidence would strengthen the motivation based on reuse for future analyses.
  5. Are the post-SFT gains from Shapley credit consistent across training seeds? Table 27 reports improvements of 1.32 percentage points in compose@1 and 1.68 points in compose@32, but the stability of these incremental gains is not established by the reported experiments.
5 comments
AuthorsOpenReview ↗

Response to Reviewer 1 (1/3): SFT labels and Loopy

Q1 — Can you clarify the candidate-generation, selection and verification budgets for SFT (single) and composed-label SFT? Under a common candidate pool and matched budgets, do composed labels still outperform selecting a single independently filtered response?

Thank you for suggesting this comparison. We first clarify the original SFT data construction, then present a supplementary controlled comparison.

Both SFT datasets use the same input-program pool, Qwen3-8B generator, and training settings, with approximately equal sizes. Over 93% of the distinct prompts in the composed-label dataset also occur in the single-response dataset.

In the original SFT ablation, construction budgets differ: SFT (single) generates one response per input loop, removes incorrect clauses, and uses the remaining valid clauses as the training label; inputs with no valid clauses remaining are skipped. Composed-label SFT jointly filters 16 responses per round for at most five rounds, accepting labels at negative coverage >= 0.5; SFT (single) has no such threshold. The 63.94% versus 23.20% compose@1 result compares these complete construction procedures.

In the supplementary experiment, we compare highest-coverage selection and composition on all 466 Loopy programs using the same first N GPT-5-nano/minimal responses. This matches model-call counts and generation token costs.

All three comparisons use the same N responses. Single-response selection filters each response separately and selects the one with the highest coverage on the same fixed negative traces; composition merges all clauses and filters them together. Filtering costs therefore differ with N and proof difficulty. Targets are used only for evaluation, not selection. “Any single succeeds” counts a program as solved if at least one independently filtered response proves its target.

Responses NHighest-coverage singleAny single succeedsComposition
147.85%47.85%47.85%
456.87%61.16%63.09%
860.30%65.88%69.10%
1664.16%71.46%74.89%

At N=16, composition verifies 50 more programs than highest-coverage selection (+10.73 percentage points), including 16 programs that no individual filtered response verified under the tested configuration (+3.43 points over "Any single succeeds"). At N=4/8/16, composition also retains every success achieved by an individual response.

Recorded cumulative filtering times are:

Responses NIndependent filtering (hours)Joint filtering (hours)
12.832.83
413.118.48
826.3713.55
1652.7622.55

At N=16, joint filtering reduces recorded cumulative time by 57.3% while producing higher-quality candidates. Appendix K.6 (Table 21) provides further evidence of lower filtering cost.

Paired SFT retraining was not feasible within the rebuttal period due to time and compute constraints. Under identical generation budgets, composition outperforms best-of-N single-response selection using the same coverage signal. The original SFT ablation further shows that training on labels produced by the complete composition-based procedure yields substantial downstream gains over the single-response filtering baseline.

Q2 — How does Loopy perform after correcting the invariant-extraction bottleneck while keeping its remaining procedure and budget unchanged?

Thank you for highlighting the extraction issue. Loopy's extractor dropped ACSL annotations without paired Markdown fences before Houdini. Correcting this raises its verification rate from 18.75% to 68.03%.

To align the prompting setup with Loopy, we use Loopy's prompt in the supplementary GPT-5-nano/minimal evaluation on all 832 programs.

MethodRateTokens/program
CRAFT @137.86%928
CRAFT @454.69%1,812
CRAFT @863.10%3,610
CRAFT @1668.75%7,233
CRAFT trained @1 (Qwen3-8B + SFT + RL)69.23%1,348
Loopy, corrected initial composition (15 responses)66.47%6,904
Loopy, corrected initial + repairs (15 initial + up to 7 repair responses)68.03%10,016

At nearly equal recorded token usage, CRAFT@16 reaches 68.75% versus 66.47% for Loopy's initial composition. It also exceeds Loopy including repairs by 0.72 percentage points with 27.8% fewer recorded tokens. In this target-hidden evaluation, the existing repair responses add 13 programs (1.56 points) beyond initial composition; their incremental benefit is much smaller than that of composition.

Our core contribution is composition-aligned training to improve search efficiency. With composition-aligned training, Qwen3-8B reaches 63.94% compose@1 after SFT and 69.23% after RL, both exceeding its compose@32 of 57.81% before our SFT/RL training, using just one response.

AuthorsOpenReview ↗

Response to Reviewer 1 (2/3): Target-hidden training and Shapley credit

Q3 — What practical circumstances motivate withholding targets during training as well as inference? A multi-goal verification reward would introduce additional supervision and therefore change the setting, but a comparison or discussion could help clarify the practical trade-off of fully target-independent training.

Thank you for this suggestion. A practical example is legacy code without accompanying formal specifications, such as assertions or postconditions. Here, a useful task is property discovery: finding and verifying properties of the code before a particular verification goal has been supplied. CRAFT produces verified loop summaries that, together with exit conditions and program context, can help establish properties after the loop terminates. These summaries can support later analyses and specification writing.

The reason for withholding targets during training is the difficulty and cost of preparing them for a large training corpus. This requires understanding programs, writing suitable specifications, and checking that those specifications are correct and meaningful. Our training procedure can use code without first adding these goals. In our experiments, we withhold existing targets to test whether the method can learn and generate useful invariants without relying on them; the targets are used for evaluation.

Beyond the preparation cost discussed above, goal quality also determines the usefulness of target-based supervision. Suitable existing goals can naturally provide additional direct supervision, but deriving correct, informative goals from source code requires discovering useful program properties and validating them. This difficulty is central to the problem we study and motivates our target-hidden setting.

We train on code without prewritten verification specifications using inductiveness checks to verify that the retained clauses jointly form a valid loop invariant, and negative-trace coverage as a target-independent strength signal for SFT-label construction and RL rewards.

Our supplementary inference comparison illustrates the benefit of available goals: with GPT-5-nano/minimal and 16 responses on the same 832 programs, target-visible generation verifies 80.77%, versus 72.36% with targets hidden. However, target-visible invariants may be more specific to the given goal. We examine their reuse in Q4 through semantic audits and additional-goal verification.

Q5 — Are the post-SFT gains from Shapley credit consistent across training seeds? Table 27 reports improvements of 1.32 percentage points in compose@1 and 1.68 points in compose@32, but the stability of these incremental gains is not established by the reported experiments.

Thank you for asking about stability. Three independent training runs with different seeds and the same training and evaluation settings show small positive Shapley gains. Each compares Full with the corresponding clause-decomposed reward without Shapley:

RepetitionShapley gain in compose@1 (pp)Shapley gain in compose@32 (pp)
1+0.6+0.1
2+1.8+1.7
Reported in Table 27+1.3+1.7

The modest gains after SFT are consistent with our expectations and mechanism. Our SFT data construction collects multiple responses, jointly filters their clauses, and selects composed labels using negative-trace coverage. It substantially improves compositional verification with few responses: compose@1 reaches 63.94% after SFT, exceeding compose@32 before SFT (57.81%). Thus, SFT makes a fixed sampling budget more effective.

Our method for constructing discriminative negative traces also provides an informative signal for clause-level rewards. Effective SFT and this reward signal make a smaller marginal benefit from additional credit assignment plausible. At each fixed sampling budget, Table 27 shows that Shapley gains decrease after SFT: from 3.00 to 1.32 percentage points at compose@1 and from 4.32 to 1.68 points at compose@32, consistent with this explanation.

For context, Appendix K.10 (Figure 12) analyzes distribution sharpening under whole-response RL: pass@1 rises from 6.37% to 15.50%, while pass@32 falls from 25.96% to 18.39%. Our clause-decomposed training and compositional inference mitigate this coverage loss.

AuthorsOpenReview ↗

Response to Reviewer 1 (3/3): Reusable invariants and additional goals

Q4 — Appendix B provides useful examples of additional-goal verification and downstream summary reuse. Beyond these cases, is there systematic evidence that the same inferred invariants support multiple independently specified held-out goals per program? Such evidence would strengthen the motivation based on reuse for future analyses.

Thank you for raising this question. We have added a systematic evaluation showing that the same inferred invariants can support multiple additional post-loop goals per program. We present the target-visibility comparison, semantic audit, and additional-goal evaluation below.

We compare target-hidden and target-visible GPT-5-nano/minimal on the same 832 programs, keeping all other settings fixed apart from target visibility. Each setting uses prefixes of its own fixed 16-response pool:

ResponsesTarget-hiddenTarget-visible
146.39%55.17%
461.66%70.31%
866.71%76.08%
1672.36%80.77%

We then audit the frozen @16 invariants using the same semantic checks and proof budgets:

Program subsetSettingProgramsCertified strictCertified exact
Verified in this settingHidden602395 (65.61%)301 (50.00%)
Verified in this settingVisible672444 (66.07%)288 (42.86%)
Verified in both settingsHidden578374 (64.71%)290 (50.17%)
Verified in both settingsVisible578380 (65.74%)279 (48.27%)

Percentages use the program count in each row. The shared rows compare exactly the same programs.

The audit combines generated clauses with entry conditions, facts about unchanged variables, and type bounds under the modeled, defined 32-bit scalar-integer semantics. For strictness, SMT checks establish that the invariant implies the original target translated to the loop head, while the reverse implication has a counterexample under the same satisfiable context. For exactness, we prove that the invariant describes exactly the set of reachable loop-head states. Appendix L provides the formal definitions, exactness theorem and proof, and semantic audit results.

Thus, the strict summaries retain information absent from the original target. For each exact summary, every property valid for all reachable loop-head states follows logically from that summary under the stated semantics and context.

Among the 578 programs whose original targets were verified in both settings, we successfully constructed and validated eight additional post-loop goals for each of 446 programs with assistance from GPT-6.1 Sol. We compared the existing invariants on the same eight goals per program. These goals came from fixed source-based templates covering bounds, input–output relations, parity, and other arithmetic properties. The additional goals include many properties that are not implied by the original targets.

MetricTarget-hiddenTarget-visible
Goals proved3,487/3,568 (97.73%)3,461/3,568 (97.00%)
Programs proving all eight goals424/446 (95.07%)411/446 (92.15%)

Providing targets improves verification of the original goals. Meanwhile, the semantic audit shows that target-hidden invariants retain substantial information beyond those goals, and the additional-goal evaluation demonstrates reuse of the same invariants for multiple post-loop properties. The two settings perform similarly on these additional goals, with target-hidden invariants proving all eight goals on 13 more programs. Together, these results support CRAFT’s ability to produce reusable summaries without access to verification targets.

Comments on the paper

1 comment
AuthorsOpenReview ↗

General Response

We thank all three reviewers for their careful feedback. CRAFT’s central contribution is to align training with how invariants are constructed at inference. With the target hidden, CRAFT combines clauses from multiple responses and jointly filters them to obtain a verified loop invariant. SFT distills this inference procedure into single-response generation by training on its verified outputs. RL rewards clauses that help strengthen the invariant, even if the model gets other clauses in the same response wrong. On 832 programs, Qwen3-8B verifies 69.23% with one response after SFT and RL, exceeding the 57.81% it achieves by combining 32 responses before training. Our additional experiments address the main questions raised across the reviews and leave this central finding unchanged. We summarize the results below.

  1. Compositional labels. On 466 Loopy programs, composition and single-response selection used the same 16 responses per program. With identical generation costs, composition verified 50 more programs than selecting the single response with the highest negative-trace coverage (74.89% vs. 64.16%) and reduced cumulative filtering time by 57.3% (22.55 vs. 52.76 hours). On 16 programs, no individually filtered response proved the target, yet combining their clauses succeeded. Separately, the original SFT ablation compares two complete label-construction procedures. Training on labels obtained by combining and jointly filtering clauses across multiple responses yields 63.94% compose@1, compared with 23.20% when training on labels obtained by filtering a single response per program.

  2. Loopy comparison. Loopy’s extractor dropped ACSL annotations outside paired Markdown fences. Correcting this raised its verification rate from 18.75% to 68.03%. Using Loopy’s prompt on the same 832 programs, GPT-5-nano with CRAFT@16 reached 68.75%. In this target-hidden setting, CRAFT achieved a verification rate comparable to corrected Loopy with iterative repair while using 27.8% fewer recorded tokens per program (7,233 vs. 10,016).

  3. Invariant reuse. Revealing the original target increased its verification rate from 72.36% to 80.77%. Among the 578 programs verified in both settings, we certified that the inferred invariants captured the reachable loop-head states exactly on 290 programs (50.17%) with targets hidden and 279 (48.27%) with targets visible, under the modeled semantics and program context. For 446 of these programs, we kept the invariants fixed and tested eight additional post-loop goals per program. Target-hidden invariants proved 3,487 of the 3,568 additional goals. A single invariant proved all eight goals on 424 of 446 programs (95.07%) with targets hidden and 411 of 446 (92.15%) with targets visible. Thus, a summary generated before a verification goal is supplied can be reused to prove multiple later goals.

We would appreciate hearing whether these results address your questions and would be happy to clarify any points that remain open.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.