← Latest papers
💬 NLP

Axon: A Synthesizing Superoptimizer for Tensor Programs

Axon is a synthesizing superoptimizer that automatically generates high-performance tensor programs for AI accelerators by using program synthesis and SMT-based semantic verification to discover algebraic transformations, optimize tiling and instruction selection, and fuse operators without relying on hand-crafted rewrite rules.

Original authors: Akash Kothari, Shaowei Zhu, Daniel Kroening, Chungha Sung

Published 2026-06-26
📖 5 min read🧠 Deep dive

Original authors: Akash Kothari, Shaowei Zhu, Daniel Kroening, Chungha Sung

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to bake the perfect cake, but you are working in a high-tech kitchen with very specific, finicky ovens and mixers. You know what you want to bake (the recipe), but getting the machine to do it as fast as possible requires you to know exactly how to load the ingredients, when to stir, and which specific buttons to press on the oven.

For a long time, writing code for AI chips (the "ovens") has been like trying to bake that cake by hand, one tiny crumb at a time. You need to be a master chef who understands the exact mechanics of the oven to get a good result. If you make a small mistake in how you load the ingredients, the cake comes out slow and dry.

Axon is a new tool that acts like an automated, super-smart sous-chef that doesn't just follow your recipe—it invents better ways to bake it.

Here is how Axon works, broken down into simple steps:

1. The "What" vs. The "How"

Usually, a programmer writes a recipe saying, "Mix flour and eggs, then bake." They don't worry about how the oven mixes them.

  • The Problem: The oven (the AI chip) is picky. It has different compartments (like a big mixing bowl, a small whisk, and a heating element). If you tell it to mix everything in the big bowl when it could have used the whisk, it wastes time.
  • Axon's Job: Axon takes your simple recipe and says, "Wait, I can do this faster." It doesn't just follow the recipe; it rewrites the instructions to match the oven's specific strengths.

2. The "Magic Rearranging" (Algebraic Transformations)

Imagine your recipe says: "First, chop all the carrots, then mix them into the soup, then add salt."

  • The Old Way: You chop, then mix, then add salt. You have to carry the bowl back and forth between the cutting board and the stove.
  • Axon's Way: Axon looks at the math and realizes, "Hey, I can add the salt while the carrots are being chopped, or I can mix the carrots into the soup before I chop them, and it will taste exactly the same!"
  • The Result: By rearranging the order of operations, Axon lets the oven do two things at the same time (like chopping and heating simultaneously) instead of one after the other. It proves mathematically that the cake will still taste the same, even though the steps are different.

3. The "Packing Puzzle" (Tiling)

Imagine you have a huge pile of ingredients, but your mixing bowl is small. You have to move ingredients from the pantry (slow) to the bowl (fast), mix a little, move them back, and repeat.

  • The Problem: If you move too much at once, the bowl overflows. If you move too little, you spend all your time walking back and forth to the pantry.
  • Axon's Way: Axon is a master packer. It tries millions of different ways to group the ingredients into "batches" (tiles). It asks, "What if I move 100 carrots at a time? What if I move 50?" It tests these different groupings to find the perfect size that keeps the bowl full without overflowing, minimizing the trips to the pantry.

4. The "Instruction Manual" (ISA Synthesis)

The oven has a specific control panel with buttons like "High Heat," "Whisk," and "Fold."

  • The Problem: Sometimes the recipe says "Mix," but the oven doesn't have a "Mix" button. It only has "Whisk" and "Fold."
  • Axon's Way: Axon translates "Mix" into the exact sequence of "Whisk then Fold" that the oven understands. It even finds shortcuts, like realizing that "Fold while moving to the stove" is a single button press on this specific oven, saving time.

5. The "Taste Test" (Empirical Selection)

This is the most important part. Axon doesn't just guess which way is best.

  • The Process: It generates thousands of different versions of the recipe (some with different orders, some with different batch sizes, some with different button presses).
  • The Test: It actually runs all these versions on the real oven (the AI chip) and times them. It picks the one that finishes the fastest. It's like baking 1,000 tiny cakes to see which one comes out of the oven in 5 minutes instead of 10.

The Results: How Much Faster?

The paper tested Axon on Amazon's Trainium chips (a type of AI oven) with 20 different types of "cakes" (AI tasks).

  • Vs. The Standard Oven: Compared to the standard way of baking (Amazon's Neuron compiler), Axon made single tasks up to 3.7 times faster and complex tasks up to 19 times faster.
  • Vs. Expert Chefs: Even when compared to recipes written by human experts who know the oven inside and out, Axon was sometimes 1.35 times faster.
  • Vs. Other Robots: It beat another automated tool called "Mirage" by about 10% on average, and it could bake 16 types of cakes that the other tool couldn't handle at all.

Summary

Axon is a tool that takes a simple description of what an AI needs to do and automatically figures out the absolute fastest way to do it on a specific computer chip. It does this by mathematically proving it can rearrange steps, testing millions of ways to pack data, and then actually running the code to pick the winner. It removes the need for humans to be experts in the tiny, boring details of the hardware, letting them just write the recipe while Axon handles the baking.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →