Anthropic's Claude Verifies Existing Code with Math

The AI model generated massive proofs to check software safety, finding hidden bugs in major libraries.

By Thabo Mokoena ·

Software verification has always been a slow and costly process for engineers. Anthropic announced this week that its Claude model successfully mathematically proved that existing software code behaves correctly. This achievement marks a significant shift in how developers might trust code generated by artificial intelligence.

The technique is known as formal verification. It ensures that software runs without error under all possible conditions. Historically, this method required immense human effort. For example, verifying the seL4 operating system kernel took specialists twenty person-years. Because of this cost, the practice was mostly reserved for critical systems like avionics. Anthropic’s Frontier Red Team partnered with Theorem to change this dynamic. They used Claude to handle the proof work for code in 123 open-source libraries from Google’s OSS-Fuzz project.

Claude did not write new software for this task. Instead, it analyzed compiled machine code from existing programs. The model turned crash tests into mathematical problems and built extensive proofs. A separate program called Rocq automatically checks these proofs. The researchers described the process as fully autonomous. They noted that human reviewers were barely needed, although humans built the underlying tools at Theorem. In just a few weeks, Claude generated about 180 million lines of proof code.

The project uncovered hundreds of bugs that Claude was allowed to fix. Many of these errors likely escaped traditional testing because they only appear under specific conditions. These conditions include unusually large input files or specific access sequences. One notable finding involved a widely used PDF reader. The team discovered as many security bugs in one week as are usually reported in a full year. Claude also identified a logical error that had gone unnoticed for more than a decade.

Anthropic is careful to define the limits of this success. Formal verification does not mean the software is error-free. The proofs only hold under specific conditions. These include a particular processor architecture, single-threaded programs, and inputs smaller than 64 MB. Many real-world deployments use different hardware and configurations. Cost is also a factor. Individual proofs use hundreds of millions of tokens, and total project costs have not been published.

Despite these constraints, the company sees a path toward efficiency. A smaller test run showed that proofs can be reused. The newer Opus 5.5 model solves half the proofs using about 40 percent fewer tokens than its predecessor. Anthropic argues that if AI can verify its own code, developers can trust it more. This could reduce the time spent on manual reviews.

The project shifts the focus from whether AI can program to whether it can prove its work is safe. Anthropic expects this method to become as practical as standard testing. Theorem’s roadmap already includes critical infrastructure such as glibc, OpenSSL, and cURL.

Source: The Decoder

More Tech · Report a business

Get True Media Live in your inboxBig-city news, all in one place. Free, a few times a week, unsubscribe any time.

Related stories

Get True Media Live in your inboxBig-city news, all in one place. Free, a few times a week, unsubscribe any time.