The topics that matter today.
Saturday, October 24, 2026
Tech · AI

Automated Assurance: Anthropic and Theorem Deploy Claude to Mathematically Verify Code

A collaborative effort between Anthropic and Theorem has used Claude to generate formal proofs for 123 open-source libraries, uncovering hundreds of latent bugs and challenging the cost barriers of traditional software verification.

By Chinedu Okafor ·

For decades, the practice of formally verifying software to ensure it runs without errors under all possible conditions has been reserved for high-stakes environments like aviation, where the cost of a single bug is catastrophic. This rigorous approach was historically too expensive for general use, requiring vast human resources to mathematically prove the correctness of even small components. Now, a collaboration between Anthropic and the verification firm Theorem suggests that artificial intelligence can significantly lower this barrier, automating the proof generation process at a scale previously thought impossible.

The core of this initiative involves using Claude, Anthropic’s large language model, to generate formal proofs for existing open-source code rather than writing new software from scratch. Working with Theorem, the model analyzed compiled machine code and translated crash tests from 123 libraries within Google’s OSS-Fuzz security project into mathematical problems. In a matter of weeks, Claude produced approximately 180 million lines of proof code, a volume of work that would have taken human specialists years to complete. According to Anthropic, the process is nearly autonomous, requiring minimal human intervention once the formal foundations are established.

One of the most significant outcomes of this project was the discovery of hundreds of bugs that conventional testing methods had missed. Because these errors often only manifest under specific, unusual conditions—such as exceptionally large input files or particular sequences of memory access—they remained hidden in standard test suites. In one notable instance, while verifying a widely used PDF reader, the team identified as many security vulnerabilities in a single week as are typically reported for that software in an entire year. The model was also permitted to fix these issues independently, demonstrating a capability to not only detect but also resolve complex logical errors.

The efficiency of this AI-driven verification extends to long-standing issues in the codebase. Researchers noted that Claude identified a logical error in one application that had remained undetected for over a decade. Even in cases where the model failed to produce a complete proof, the attempt still surfaced genuine bugs, indicating that the verification process itself has diagnostic value. This suggests that formal verification, when paired with AI, can serve as a powerful tool for code hygiene, potentially catching issues before they reach production environments.

Despite these successes, Anthropic emphasizes that the term “formally verified” carries specific technical limitations. The proofs generated by Claude are valid only under strict conditions, including a specific processor architecture, single-threaded execution, and input sizes under 64 MB. In real-world scenarios, these libraries often run on diverse hardware configurations, meaning the verification does not guarantee error-free performance in every possible environment. Furthermore, the computational cost remains significant, with individual proofs requiring hundreds of millions of tokens to generate.

The financial implications of this technology are substantial, as the compute requirements are steep, though Anthropic has not disclosed the total project costs. However, the potential for cost savings is evident in the efficiency gains of newer models. A smaller test run indicated that proofs are reusable, and the latest iteration, Opus 5.5, solved half of the proofs using approximately 40 percent fewer tokens than its predecessor, Opus 5. This trend toward efficiency suggests that the cost of formal verification could become more accessible to a broader range of developers over time.

The broader implication of this work is a shift in the conversation around AI-generated software. If AI can not only write code but also prove its correctness under defined conditions, the trust deficit associated with automated coding tools may diminish. This could lead to a reduction in the time developers spend on manual code review, saving costs across the entire development lifecycle. The project strengthens the argument for software automation, moving the focus from whether AI can program to whether it can guarantee the safety of that code.

Looking ahead, Anthropic envisions formal verification with AI becoming as routine as standard testing. Theorem’s roadmap already targets critical infrastructure components, including glibc, OpenSSL, and cURL, which are foundational to much of the internet’s security. As the technology matures and costs decrease, the ability to mathematically assure software correctness could become a standard feature in the development toolkit, potentially transforming how critical systems are built and maintained.

Source: The Decoder

More from AI