Anthropic deploys AI to mathematically verify open-source software
A new partnership uses Claude to generate formal proofs for code, uncovering hidden bugs and reducing the reliance on manual testing.
By Kevin Sanders ·

Developers working with specific open-source libraries now have a new layer of assurance that their code behaves correctly under defined conditions. Anthropic and its partner Theorem have demonstrated a system where the AI model Claude automatically generates mathematical proofs for existing software. This shift means that for certain types of code, the validation process is no longer reliant solely on traditional testing, potentially altering how engineers trust and deploy AI-assisted development.
The initiative addresses a long-standing inefficiency in the software industry. Historically, formally verifying that software runs without errors required immense resources. For example, a team of specialists previously spent 20 person-years to verify the seL4 operating system kernel, a task so costly that it was generally reserved for high-stakes applications like aviation systems. By automating this process, the new approach makes rigorous verification accessible for a broader range of software projects.
The collaboration between Anthropic’s Frontier Red Team and Theorem focused on 123 open-source libraries from Google’s OSS-Fuzz security project. Over a period of a few weeks, Claude produced approximately 180 million lines of mathematical proof code. The model did not write new software but instead analyzed compiled machine code from existing test programs, translating crash tests into mathematical problems to generate extensive proofs.
An independent verification program named Rocq automatically checks the validity of these proofs. According to Anthropic, the process requires minimal human intervention, leading researchers to describe it as fully autonomous proof generation. However, the underlying tools and formal foundations were developed by human experts at Theorem, providing the structural framework for the AI’s work.
During the verification process, the system identified hundreds of bugs that conventional testing methods had missed. Many of these defects only manifest under specific circumstances, such as unusually large input files or particular access sequences. In one notable instance, the team found as many security bugs in a single week within a widely used PDF reader as are typically reported for that software in an entire year. In another case, Claude detected a logical error that had remained undetected for more than a decade.
Even when a complete proof is not achieved, the attempt often surfaces real issues. The researchers note that the effort to generate proofs helps expose latent vulnerabilities, providing value to developers even if the final certification is not granted. This capability suggests that AI-driven verification can complement existing testing suites by catching edge-case failures that standard procedures overlook.
Despite the progress, the method has strict limitations. Anthropic clarifies that formal verification does not guarantee that software is entirely error-free. The proofs are valid only under specific conditions, including a particular processor architecture, single-threaded execution, and input files under 64 MB. In real-world scenarios, these libraries often run on diverse hardware and configurations, meaning the verification covers a specific subset of operational environments.
The computational cost of the project is significant, with individual proofs requiring hundreds of millions of tokens. While Anthropic has not disclosed the total project costs, the efficiency gains are notable. A smaller test run indicated that proofs are reusable, and newer models like Opus 5.5 are more efficient, solving half the proofs with approximately 40 percent fewer tokens than the previous Opus 5 version.
Looking ahead, the project strengthens the case for broader software automation. If AI can both write code and prove its correctness under defined parameters, the focus shifts from basic coding capabilities to verification reliability. Anthropic expects this approach to become as routine as standard testing in the near future. Theorem’s roadmap already targets critical infrastructure components such as glibc, OpenSSL, and cURL, indicating a move toward verifying foundational software systems.
This development could reduce the time developers spend on manual reviews, lowering costs across the entire coding process. As the technology matures, the integration of formal verification into standard development workflows may become a standard practice, particularly for software where reliability is critical. The partnership suggests that the next phase of AI in software engineering will focus heavily on proving safety rather than just generating code.
Source: The Decoder · original report published





