Neural Theorem Proving for Verification Conditions: A Real-World Benchmark
This paper introduces NTP4VC, the first real-world multi-language benchmark for neural theorem proving of verification conditions derived from industrial projects like Linux and Contiki-OS, revealing both the potential and current limitations of large language models in automating program verification.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
The Big Picture: The "Proof Bottleneck"
Imagine you are building a massive, complex machine (like a car engine or a computer operating system). You want to be 100% sure it won't explode or break when you turn the key. In the world of software, this is called Program Verification.
To do this, mathematicians and computer scientists turn the code into a giant, complex logic puzzle. They ask: "If I give this machine these inputs, will it always behave exactly as promised?"
The paper focuses on a specific, painful step in this process called generating Verification Conditions (VCs). Think of a VC as a specific, high-stakes math problem that the computer must solve to prove the code is safe.
The Problem:
Currently, computers are terrible at solving these specific math problems on their own. They are like a brilliant chess player who can solve a puzzle in 10 seconds, but if you give them a slightly different, real-world puzzle, they get stuck.
Because the computers get stuck, human experts have to step in and manually write the solution. This is slow, expensive, and stops companies from using these safety checks on everything.
The New Idea: Teaching AI to Solve the Puzzles
The authors ask: "Can we teach Artificial Intelligence (specifically Large Language Models or LLMs) to solve these logic puzzles automatically?"
This field is called Neural Theorem Proving (NTP). It's like training a robot to be a mathematician. While these robots have gotten really good at solving abstract math competition problems (like the Putnam competition), nobody knew if they could handle the messy, real-world logic puzzles that come from actual software code.
The Solution: Building a "Gym" for AI (The Benchmark)
To test if AI can do this, the researchers built a new "gym" (a benchmark dataset) called NTP4VC.
1. Where did the puzzles come from?
Instead of making up fake puzzles, they went to real-world industrial projects. They looked at the source code of famous systems like the Linux Kernel (the brain of your computer), Contiki-OS (used in tiny internet devices), and various C libraries.
2. How did they get the puzzles?
They used a "translator" pipeline.
- Step 1: They took the real code and ran it through industrial tools (like Frama-C and Why3) that automatically generate the logic puzzles (VCs).
- Step 2: Since the AI models speak different "languages" (Isabelle, Lean, Rocq), they built a massive library of 800+ expert-written rules to translate these puzzles from the industrial tools into the languages the AI understands.
- Crucial Detail: They didn't just copy the puzzles. The original puzzles were too easy because human engineers had already added "hints" (annotations) to help the computers solve them. The researchers removed these hints to make the puzzles harder, creating a true test of the AI's ability.
3. The Dataset:
They created a set of 600 challenging puzzles divided into two groups:
- "Pearls of Programs": Classic, difficult algorithmic puzzles (like sorting data or managing memory trees).
- "Real C Verification": Puzzles extracted from actual, messy industrial code (like a memory allocator or a linked list).
The Experiment: Who Won the Race?
The researchers pitted the best AI models against the best traditional computer solvers (called "Hammer" provers) on this new gym.
The Results:
- The AI Models (LLMs): They struggled mightily. Even the smartest models only solved about 2% to 5% of the puzzles on their first try.
- The Traditional Solvers (Hammer): These old-school, specialized tools did much better, solving about 18% to 27% of the puzzles.
- The Gap: The AI models were significantly worse than the traditional tools.
Why Did the AI Fail? (The Autopsy)
The researchers looked at why the AI failed and found three main reasons, using some great metaphors:
Syntactic Errors (The "Typo" Problem):
The logic puzzles are incredibly long and nested, like a sentence with 50 parentheses. The AI kept forgetting to close a parenthesis or adding an extra one. It was like a student who knows the math but keeps making typos in their handwriting, so the teacher can't read the answer.- Stat: Over 24% of AI attempts failed just because of these syntax errors.
Semantic Confusion (The "Imposter" Problem):
The AI would write code that looked like a proof but didn't actually do anything. It would repeat the same step over and over ("I have a fact, so I have a fact...") or use the wrong type of logic (like using a hammer to turn a screw). It was hallucinating a solution without understanding the rules of the game.- Stat: Over 64% of attempts by one top model degenerated into this repetitive nonsense.
Hallucinations (The "Fake Fact" Problem):
The AI would invent tools or facts that didn't exist. It might say, "I will use thewhy3tactic to solve this," but that tactic doesn't exist in the language it was speaking. It was like a student saying, "I used the magic wand of calculus," when no such thing exists.- Stat: About 9% of failures were due to inventing non-existent tools.
The Conclusion
The paper concludes that while AI has made huge strides in math competitions, it is not yet ready to replace human experts in verifying real-world software.
The "gym" they built (NTP4VC) shows that there is a massive gap between what AI can do today and what is needed to make software verification fully automatic. The AI needs to get much better at:
- Following strict syntax rules (no typos).
- Understanding the deep logic of industrial code (not just abstract math).
- Staying grounded in reality (not making up facts).
Until then, the "human-in-the-loop" (the expert writing the hints) remains essential for keeping our software safe.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.