Claude Model Generates 180 Million Lines of Code to Verify Software Safety
Anthropic utilized its AI to mathematically prove the correctness of existing code, drastically reducing the time required for formal verification while uncovering numerous hidden security flaws.
By Christopher Reed ·

Anthropic has announced that its Claude model successfully generated approximately 180 million lines of mathematical proof code in a matter of weeks. This massive output represents a significant shift in how software reliability is established. The model was tasked with verifying that existing software behaves correctly, a job that has traditionally required immense specialized labor. The company frames this achievement as a critical step toward increasing trust in AI-generated software, even as it outlines specific limitations regarding what these proofs guarantee.
Historically, formal verification has been prohibitively expensive for most organizations. This process involves proving that software runs without error in all possible circumstances. Specialists once spent 20 person-years to verify seL4, a small operating system kernel. Because of this high cost, the technique was largely restricted to extreme cases, such as avionics software for Airbus aircraft. The new approach aims to bring this level of assurance to a broader range of applications by leveraging artificial intelligence to handle the heavy lifting.
The Frontier Red Team at Anthropic collaborated with a partner named Theorem to execute this project. They handed the proof generation tasks to Claude, which drew upon test programs from 123 open-source libraries within Google's OSS-Fuzz security project. It is important to note that Claude did not write new software. Instead, it verified existing code by converting crash tests into mathematical problems. The model analyzed compiled machine code and constructed extensive proofs to demonstrate correct behavior.
A separate verification program called Rocq automatically checks these generated proofs. Anthropic states that the process requires almost no human reviewers. The researchers describe the proof generation as fully autonomous. However, they clarify that the underlying tools and formal foundations were built by humans at Theorem. This division of labor allows the AI to handle the complex logic while relying on established human-designed infrastructure for accuracy.
During the verification process, Claude encountered hundreds of bugs and was permitted to fix them. The researchers believe many of these issues would likely have escaped conventional testing. These bugs often appear only under narrow conditions, such as when the software processes unusually large input files or follows a specific sequence of accesses. In one notable instance, the team verified a widely used PDF reader. They found as many security bugs in a single week as are typically reported for that software in an entire year.
In another application, Claude identified a logical error that had gone unnoticed for more than a decade. Anthropic adds that even when a complete proof fails, the attempt can still reveal real bugs. This suggests that the verification process has value beyond just confirming correctness. It acts as a deep diagnostic tool that can surface subtle errors in code that has been in use for many years without detection.
The company is careful to distinguish between formally verified and error-free. The proofs hold only under defined conditions, including a particular processor architecture and single-threaded programs with inputs smaller than 64 MB. Real-world deployments of these libraries often run on different hardware and configurations. Therefore, the verification does not guarantee that the software will never fail in every possible environment, but it does provide strong assurance within specific parameters.
Cost remains a significant constraint for this technology. Individual proofs consume hundreds of millions of tokens, and Anthropic has not published the total project costs. Despite this, the company argues that if AI can verify its own code, developers could trust AI-generated software more. This would allow them to spend less time on manual review, potentially cutting costs across the coding process. A smaller test run indicated that proofs can be reused, and efficiency is improving. Opus 5.5 solves half the proofs using about 40 percent fewer tokens than the previous version, Opus 5.
In the framing of the researchers, this project shifts the central question from whether AI can program to whether it can prove that the code it writes is safe. Anthropic expects formal verification with AI to become as practical as standard testing. The roadmap for Theorem already targets critical infrastructure, including glibc, OpenSSL, and cURL. If successful, this approach could fundamentally change how developers ensure the reliability of the software that supports modern digital infrastructure.
Source: The Decoder





