AI That Writes Chip Safety Tests Fails When Code Gets a Makeover
A small code rewrite can make AI miss hidden flaws in your gadgets.
AI tools like Qwen and DeepSeek can now help engineers write safety checks for computer chips. These checks, called assertions, make sure a chip behaves the way it should — like making sure a phone processor doesn't overheat or send wrong signals. This study found a big problem: if you describe the exact same chip design using different variable names, a few extra parentheses, or a different order of operations, the AI's safety checks often break.
Across all tests, between 9.7% and 27% of behaviors the AI had checked correctly on the original code became incorrect after these harmless rewrites. So if you ask AI to verify one version of a design, it might pass; ask it to verify the same design written in another style, and it catches a different set of bugs — or misses ones it caught before. That is scary for hardware that goes into everyday devices.
Here's the trickiest part: average accuracy can hide this problem. In one case, the AI's overall score improved from 53.9% to 63.7% after renaming variables, yet nearly one in five of its originally correct checks still flipped to wrong. If engineers only look at the overall pass rate, they might think the AI is getting better when it is actually becoming less reliable in hidden ways.
The takeaway: testing AI on a single version of code isn't enough. If AI becomes a helper for designing chips in your phone, car, or medical device, engineers need to stress-test it the way real coding happens — full of stylistic changes and rewrites. A proofreader who stops catching typos when you use synonyms isn't helpful. Neither is an AI that only verifies hardware when the code looks exactly like its training examples.
- Up to 27% of AI-written chip safety checks broke when the code was cosmetically changed.
- AI models can show higher average accuracy while making more hidden mistakes on rewritten code.
- A warning for using AI in critical hardware verification like phones, cars, and medical devices.
Why It Matters
AI is entering chip design; small code changes shouldn't silently hide bugs in devices we rely on every day.