AI Verification: Claude Proves Code Safety Autonomously
Anthropic’s model generated 180 million lines of mathematical proof for 123 libraries, uncovering hidden bugs that traditional testing missed.
By Amy Swan ·

Historically, mathematical proof of software correctness has been a resource-intensive task reserved for high-stakes industries. Now, a new approach has brought that level of rigor into the mainstream development cycle.
Anthropic has demonstrated that its Claude model can autonomously generate formal proofs to verify the safety of existing software code. By partnering with Theorem, the company utilized Claude to process test programs from 123 open-source libraries within Google’s OSS-Fuzz project. In a matter of weeks, the model produced approximately 180 million lines of proof code, a volume of work that would traditionally require years of specialized human labor.
The methodology involves translating crash tests into mathematical problems and analyzing compiled machine code. Rather than creating new software, Claude focused on validating existing systems. An independent verification program named Rocq checks these generated proofs. According to Anthropic, this workflow requires minimal human intervention, earning the label of "fully autonomous" proof generation, although the underlying formal foundations were built by human experts at Theorem.
A significant outcome of this process was the discovery of hundreds of bugs that had evaded conventional testing for years. These defects typically manifest only under specific conditions, such as unusually large input files or particular sequences of data access. In one notable instance, while verifying a widely used PDF reader, the team identified as many security vulnerabilities in a single week as are usually reported for that software in an entire year. In another case, Claude detected a logical error that had remained undetected for over a decade. Anthropic notes that even when a complete proof fails, the attempt often surfaces real bugs.
However, the term "formally verified" carries specific caveats. The proofs are valid only under strict conditions, including a specific processor architecture, single-threaded execution, and input sizes under 64 MB. Since these libraries often run on varied hardware and configurations in the real world, the verification does not guarantee error-free performance in every possible scenario.
The computational cost of this process remains high, with individual proofs consuming hundreds of millions of tokens. Anthropic has not disclosed the total project costs. Nevertheless, the potential to reduce the time developers spend on manual code review suggests significant savings across the coding process. Efficiency is also improving; a smaller test run showed that proofs are reusable, and newer models like Opus 5.5 solve half the proofs using about 40 percent fewer tokens than its predecessor.
This project shifts the industry conversation from whether AI can write code to whether it can prove that code is safe. If AI can guarantee correctness under defined conditions, the implications extend beyond current coding tools. Anthropic expects this type of formal verification to become as routine as standard testing. Theorem’s roadmap already targets critical infrastructure components, including glibc, OpenSSL, and cURL, signaling a push toward securing the backbone of modern software.
For now, the approach offers a powerful new tool for software automation, though practical limits regarding hardware and cost remain. The ability of AI to verify its own work could fundamentally change how developers trust and deploy software in the coming years.
Source: The Decoder


