Anthropic Claims Proof-Level Code Assurance
Claude generated massive formal proofs to verify software security, though strict limitations remain on the technology's current scope.
By Mei Lin ·

Anthropic has utilized its Claude model to generate formal mathematical proofs verifying the correctness of existing software code, a collaboration conducted with the partner organization Theorem. This initiative moves beyond merely generating code to a process of verifying safety through mathematical certification, addressing a significant concern regarding the reliability of artificial intelligence-generated software. By automating this rigorous validation, the company aims to facilitate a major leap in software automation, intending to make formal verification as routine as standard testing procedures.
The practical application of this technology has resulted in the generation of approximately 180 million lines of proof code across 123 open-source libraries within a span of just a few weeks. This effort utilized test programs derived from Google's OSS-Fuzz security project. Rather than developing new applications, the model analyzed compiled machine code and translated crash tests into mathematical problems to produce extensive proofs. These proofs are subsequently validated by an independent program known as Rocq, a process Anthropic characterizes as fully autonomous proof generation.
During this verification process, the model identified and resolved hundreds of bugs that had previously bypassed conventional testing methods. Many of these issues only manifested under very specific conditions, such as with unusually large input files or particular sequences of access. In one instance involving a PDF reader, the system discovered as many security bugs in a single week as are typically reported for that software over an entire year. Furthermore, the model identified a logical error that had remained undetected for over a decade, illustrating that even failed proof attempts can surface real vulnerabilities.
Despite these advancements, Anthropic acknowledges that the term formally verified does not equate to being error-free. The generated proofs are valid only under strict conditions, specifically requiring a particular processor architecture, single-threaded programs, and inputs under 64 MB. In actual deployment, these libraries operate on varying hardware and in diverse configurations. Additionally, the computational expense is substantial, with individual proofs requiring hundreds of millions of tokens, though Anthropic has not disclosed total project costs.
While the cost of proof generation is high, the ability for AI to verify its own output could reduce the time required for human review of AI-generated software, potentially lowering overall development expenses. A smaller test run indicated that proofs can be reused, and newer iterations of the model are becoming more efficient; for example, Opus 5.5 solves half the proofs with about 40 percent fewer tokens than Opus 5. If AI can successfully prove the code it writes is safe, the implications for software automation extend beyond current coding tools.
Anthropic anticipates that formal verification with AI will soon become as practical as standard testing, a capability that would significantly alter the development workflow for critical infrastructure components. The roadmap for Theorem already targets essential systems such as glibc, OpenSSL, and cURL for this type of verification. The project reinforces the argument for software automation by shifting the fundamental question from whether AI can program to whether it can prove the safety of the code it generates.
Source: The Decoder


