InvBench: Can LLMs Accelerate Program Verification with Invariant Synthesis?

Anjiang Wei, Tarun Suresh, Tianran Sun, Haoze Wu, Ke Wang +1 more
9/25/2025
cs.PLcs.AIcs.CL

No confident code implementation found for this paper.

Abstract

Program verification relies on loop invariants, yet automatically discovering strong invariants remains a long-standing challenge. We introduce a principled framework for evaluating LLMs on invariant synthesis. Our approach uses a verifier-based decision procedure with a formal soundness guarantee and assesses not only correctness but also the speedup that invariants provide in verification. We evaluate 7 state-of-the-art LLMs, and existing LLM-based verifiers against the traditional solver UAutomizer. While LLM-based verifiers represent a promising direction, they do not yet offer a significant advantage over UAutomizer. Model capability also proves critical, as shown by sharp differences in speedups across models, and our benchmark remains an open challenge for current LLMs. Finally, we show that supervised fine-tuning and Best-of-N sampling can improve performance: fine-tuning on 3589 instances raises the percentage of speedup cases for Qwen3-Coder-480B from 8% to 29.2%, and Best-of-N sampling with N=16 improves Claude-sonnet-4 from 8.8% to 22.1%.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{wei2025invbench,
  title  = {InvBench: Can LLMs Accelerate Program Verification with Invariant Synthesis?},
  author = {Anjiang Wei and Tarun Suresh and Tianran Sun and Haoze Wu and Ke Wang and Alex Aiken},
  year   = {2025},
  eprint = {2509.21629},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2509.21629v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2509.21629.svg)](https://codeofpaper.com/paper/2509.21629)

Discussion