AI
AI agents learn to catch silent compiler bugs using tensor algebra checks
A new testing framework harnesses LLMs to build mathematical verification oracles that catch deep learning compiler errors traditional methods miss.
Deep learning compilers transform tensor computation graphs to improve performance, but these transformations can inadvertently alter what a model actually computes—sometimes without raising any error. Propilot, a new agentic testing framework, tackles this silent failure problem by guiding LLM agents to construct semantic verification checks rooted in tensor algebra.
The Challenge: Silent Bugs in Compiler Optimization#
Existing approaches to testing DL compilers focus on generating well-formed computation graphs and tensor inputs, then typically detect problems through two mechanisms: program crashes or by running computations side-by-side and comparing outputs. These methods miss a whole class of bugs—cases where the compiler silently produces mathematically wrong results without any warning sign. Mathematical properties from tensor algebra, such as commutativity and decomposition rules, offer far more sensitive ways to catch these errors, but converting an abstract mathematical identity into a runnable verification check is complex.
How Propilot Works#
The system's key innovation is the property skeleton—an abstraction that pairs a mathematical relation with applicability conditions and a template that the agent fills in with specific operators, valid input choices, and precision-aware numerical comparisons. Propilot ships with sixteen property skeletons and twenty data generators that the system uses to create test cases.
The framework validates tests before running them and feeds rejection reasons, execution outcomes, and historical usage patterns back to steer the agent toward generating untested operator-property combinations. This feedback loop improves efficiency by cutting down on wasted invalid test generation.
Results on Production Compilers#
Researchers evaluated Propilot across six different LLM agents testing three major DL compilers. When compared to agents operating without the framework:
- 96 distinct compiler root causes detected, including 25 silent wrong outputs that conventional agent-only testing completely missed
- 85.34% fewer invalid tests generated, showing the framework's improved targeting
- At least 2.73× greater coverage of operator-property combinations on each compiler tested
- On 161 deliberately faulty TVM (a popular DL compiler) versions, Propilot caught 100 bugs versus only 53 for the agent-only baseline

