New AI Rewrites Software Code — With a Built-In Fact Checker
Faster apps without new bugs — researchers built an AI that must prove its work.
Every app you use runs on code that a 'compiler' translates into instructions your computer can actually execute. A big part of that job is optimization: rewriting the code to run faster and use less power without changing what it does. Today those rewrites come from hand-written rules that engineers craft over years, and they often don't work well on unusual programs or new chips.
The new idea: let an AI suggest the rewrites, but never trust it blindly. The team fine-tuned a code-focused AI model, then wired it into a checker called Alive2 that mathematically proves each proposed change means exactly the same thing as the original. If a rewrite can't be proven safe, it's thrown out and the AI tries again. Crucially, that safety rule lives outside the AI — a strict gate, not something the model is merely hoped to have learned.
On a standard test suite of programs used across the industry, the AI reproduced the core optimizations while making fewer changes overall. It matched or beat the traditional tool's speed on 9.8% of cases — roughly one in ten — and, importantly, no broken code got through. The extra checking stayed affordable and the process didn't spiral or stall. The catch: an existing specialized tool called Wyvern is still faster on most tests, so this isn't a replacement yet.
So what does it mean for you? Mostly a preview. The big obstacle to letting AI near the software that runs banks, hospitals, and phones is trust — one silent error can be catastrophic. This paper offers a working recipe: pair a creative AI with a strict, non-negotiable proof step. Expect that pattern to show up in developer tools first, and eventually in faster, cheaper, more energy-efficient apps. It's research, not a product you can download today.
- A compiler is the software that turns human-written code into instructions your devices run; optimizing it makes apps faster and battery-friendly.
- The AI suggests speed-ups, but a separate mathematical checker must approve each one — nothing unproven is allowed through.
- In tests it matched the old method on about 1 in 10 programs with zero errors, though the existing specialized tool is still faster most of the time.
Why It Matters
AI could soon make the software you use faster and cheaper — if it can prove every change is safe first.