← All papers
First page of claimcheck: Measuring and Improving Specification Faithfulness

claimcheck: Measuring and Improving Specification Faithfulness

Martin Amster, One An, Holly Baker, Fernanda Graciolli, Simon Henniger, Nada Amin

cs.CL Oct 12, 2026 · v1 cs.AI cs.PL
Builds a spec-faithfulness benchmark including 1,296 Lean 4 PutnamBench rows, using Lean tactics to prove meaning-preserving control rewrites equivalent.
Formal verification proves that a program satisfies its specification, but says nothing about whether the specification captures what the author meant. As LLMs increasingly write both code and specifications, a gap between the author's natural-language requirement and the specification becomes a live risk. A machine-checked proof of a property narrower than the one requested is worthless but passes every check. Closing this gap is solving the spec formalization problem: given a natural-language requirement, produce a formal artifact whose meaning matches it. To measure the gap, we curate an end-to-end benchmark for spec formalization spanning four formal languages: Dafny contracts and Lean 4, Isabelle and Rocq theorem statements. Each of its 3,234 rows pairs a natural-language requirement with a formal artifact and a label established by execution, by proof, or by the benchmark it is drawn from. A third of the rows are meaning-preserving rewrites of the artifact that keep the faithful label, so a judge cannot score by detecting that a row was edited. We introduce claimcheck, a tool that detects incorrect formalizations: the formal artifact is translated back into plain English by a model that never sees the requirement, and a separate model, the judge, decides whether the informalization and the requirement express the same guarantee. On all four languages it gains 8.2 to 9.8 points of macro recall over a single call shown the requirement and the artifact, and 4.2 to 6.0 over that call handed the same list of meaning-preserving rewrites. Showing the judge the artifact as well costs 1.4 to 4.5 points. Across four judges that also see the artifact, the gain shrinks as the judge gets stronger, to within a point of the informed single call for the strongest.

Formal verification shows that code meets its specification, but not that the specification matches the natural-language requirement it was written from. As LLMs increasingly write both code and specifications, an unfaithful specification can pass every check while proving a narrower property than the one requested.

The authors curate a 3,234-row benchmark pairing requirements with formal artifacts across Dafny (from CloverBench) and Lean 4, Isabelle and Rocq (from PutnamBench). It includes semantic mutations and meaning-preserving control rewrites; in Lean, each control's equivalence to the original is proved with a fixed tactic list. claimcheck first has one model informalize the artifact without seeing the requirement. A separate judge model then compares that informalization with the requirement.

claimcheck gains 8.2-9.8 points of macro recall over a zero-shot single-call judge and 4.2-6.0 points over a judge given the rewrite list. On Lean, macro recall rises from 79.7 to 87.9. The gain shrinks for stronger judges, and showing the judge the artifact as well lowers the score.

MethodLeanIsabelleRocqDafny
zero-shot baseline79.781.579.684.0
baseline + list83.285.383.088.9
claimcheck, judge sees artifact84.887.283.591.7
claimcheck87.991.388.093.1
Macro recall (%) by language (informalizer claude-haiku-4.5; judge and baseline claude-sonnet-4.6)