AWS uses AI and mathematical proof to track down rare software bugs
AWS is opening Project C2 to a limited group of customers. The service combines language models with mathematical proof and found more than 800 rare bugs in 22 open-source projects during testing. This could make software that millions of people rely on more dependable.
Amazon Web Services (AWS), the part of Amazon that rents out cloud services, presented Project Code Confidence, Project C2 for short, . The announcement came around re:Invent, the annual AWS conference in Las Vegas. A limited group of customers now has access, and AWS plans to expand that group step by step.
Rare bugs that happen very often
Project C2 looks for bugs that rarely occur but can have serious consequences. It focuses mainly on software in which many tasks run at the same time. There, the outcome sometimes depends on which task finishes just a little earlier. If something goes wrong once in a million times, that sounds like very little. But at AWS, such a rare bug already happened a few times per second in 2015. Now it happens thousands of times per second, because the systems have grown so much larger.
Ordinary testing struggles to find such bugs. There are too many possible orders of events to try them all. According to AWS, even the strongest language models often miss them for that reason.
From code to proof
Project C2 reads the code and the documentation and works out from them what the system is supposed to do. It then tries to prove mathematically that the code always does that, for every possible order of events. To do so, it uses tools such as Lean, a program that checks whether a mathematical proof is correct. It works like Pythagoras' theorem, which is proved once for all right-angled triangles, without measuring every single triangle.
If the proof fails, either Project C2 misunderstood what the code is meant to do, or there really is a bug in the code. In the first case, it adjusts its picture of what is intended. In the second case, it builds a test that makes the bug appear. It then estimates how serious the bug is and proposes a tested fix.
More than 800 bugs in public software
In tests, Project C2 found more than 800 bugs in 22 popular open-source projects: software whose code is public. Each time, the maintainers received a test that showed the bug and a tested fix. In a widely used database that keeps data in fast working memory, it found a bug that can cause data to be lost after a restart. In a program that measures where software loses time, it found nine bugs that arise when tasks run at the same time. AWS also uses the technique for its own services, such as the databases Aurora and DynamoDB.
Developers give Project C2 a link to their code and describe in one or two sentences which bugs they are looking for. The service works as an add-on inside their own coding assistant, so the code stays where it is. AWS is admitting a small group of customers first because the service is so powerful, said chief marketing officer Julia White.
What does this mean for the road to the singularity?
More and more code is written by AI. Amazon earlier had thousands of AI agents build an entire test program for its cloud, while people did not review the code themselves. The more code an AI writes, the fewer people can still go through it line by line. A check that proves mathematically that software does what it is meant to do fits well with that. One AI writes the code, another checks it, and a computer can always recheck the proof.
If this approach becomes more widely available and cheaper, development teams will no longer need their own specialists in mathematical proof. Other cloud companies and makers of coding assistants will then find it hard to stay behind. Customers prefer a service whose software demonstrably crashes less often. In this way, proven reliable software could turn from an expensive speciality into a normal requirement. That makes it easier to use software written by AI in places where a failure must not happen, such as payment systems and the power supply.
What is the technological singularity? Read the explanation →