Pith. sign in

Ranking LLM-Generated Loop Invariants for Program Verification

1 Pith paper cite this work. Polarity classification is still indexing.

1 Pith paper citing it
abstract

Synthesizing inductive loop invariants is fundamental to automating program verification. In this work, we observe that Large Language Models (such as gpt-3.5 or gpt-4) are capable of synthesizing loop invariants for a class of programs in a 0-shot setting, yet require several samples to generate the correct invariants. This can lead to a large number of calls to a program verifier to establish an invariant. To address this issue, we propose a {\it re-ranking} approach for the generated results of LLMs. We have designed a ranker that can distinguish between correct inductive invariants and incorrect attempts based on the problem definition. The ranker is optimized as a contrastive ranker. Experimental results demonstrate that this re-ranking mechanism significantly improves the ranking of correct invariants among the generated candidates, leading to a notable reduction in the number of calls to a verifier. The source code and the experimental data for this paper are available in \url{https://github.com/microsoft/NeuralInvariantRanker}.

citation-role summary

background 1

citation-polarity summary

fields

cs.CR 1

years

2025 1

verdicts

CONDITIONAL 1

roles

background 1

polarities

unclear 1

representative citing papers

Locus: Agentic Predicate Synthesis for Directed Fuzzing

cs.CR · 2025-08-29 · conditional · novelty 6.0

Locus uses an LLM agent to synthesize and validate intermediate predicates that make directed fuzzing reach target bug states faster, reporting an average 41.6x speedup across eight fuzzers.

citing papers explorer

Showing 1 of 1 citing paper.

  • Locus: Agentic Predicate Synthesis for Directed Fuzzing cs.CR · 2025-08-29 · conditional · none · ref 9 · internal anchor

    Locus uses an LLM agent to synthesize and validate intermediate predicates that make directed fuzzing reach target bug states faster, reporting an average 41.6x speedup across eight fuzzers.