mlsanityData to 14 Oct 2026

Not All Invariants Are Equal: Curating Training Data to Accelerate Program Verification with SLMs

arXiv 2603.15510 ↗First posted 16 Mar 2026cs.LGcited by 0

Not on the map. Why?

Abstract (arXiv)

The synthesis of inductive loop invariants remains a critical bottleneck in automated program verification. While Large Language Models (LLMs) show promise in mitigating this issue, they often fail on complex programs, producing invariants that are invalid or computationally ineffective. Although fine-tuning is a natural strategy to address these limitations, obtaining high-quality training data remains an open challenge. We first formalize the properties required for a high-quality training invariant, and then present Wonda, a rigorous data curation pipeline that extracts such invariants from raw verifier output via AST-based normalization followed by LLM-driven semantic rewriting and augmentation with provable quality guarantees. Fine-tuning Small Language Models (SLMs) on Wonda-curated data yields consistent gains across the Qwen3, Llama-3.1, and Mistral families: the 4B and 8B Qwen3 models nearly double invariant correctness and double speedup rates, while Llama-3.1-8B triples both. On the challenging InvBench suite, the same 4B model outperforms an off-the-shelf model 20x its size and matches the end-to-end verification time of GPT-OSS-120B, while a 14B Qwen3 model matches that of the frontier model GPT-5.2, all without test-time compute overhead. Our code is publicly available on GitHub.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 6 of its 37 references that are in the map. First posted on arXiv 16 Mar 2026.

Builds on

6 of 37 references.

References · 6

  1. 2024The Llama 3 Herd of Modelscited by 14,715
  2. 2025gpt-oss-120b & gpt-oss-20b Model Cardcited by 1,386
  3. 2023Ranking LLM-Generated Loop Invariants for Program Verificationcited by 33
  4. 2017Horn-ICE Learning for Synthesizing Invariants and Contractscited by 11
  5. 2025ClassInvGen: Class Invariant Synthesis using Large Language Modelscited by 11
  6. 2024Enhancing Automated Loop Invariant Generation for Complex Programs with Large Language Modelscited by 7

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2025Loop Invariant Generation: A Hybrid Framework of Reasoning optimised LLMs and SMT Solvers
  2. 2025A Neurosymbolic Approach to Loop Invariant Generation via Weakest Precondition Reasoning
  3. 2026Neuro-Symbolic Software Verification: Hyper-charging Local Language Models with Symbolic Reasoning at Scale
  4. 2026Inferring Code Correctness from Specification
  5. 2025Understanding Formal Reasoning Failures in LLMs as Abstract Interpreters
  6. 2025Integrating Symbolic Execution with LLMs for Automated Generation of Program Specifications
  7. 2025VeriEquivBench: An Equivalence Score for Ground-Truth-Free Evaluation of Formally Verifiable Code
  8. 2025Towards Repository-Level Program Verification with Large Language Models