← Latest papers
💻 computer science

TENSURE: Fuzzing Sparse Tensor Compilers (Registered Report)

This paper introduces TENSURE, the first black-box fuzzing framework for Sparse Tensor Compilers that utilizes Einstein Summation notation and a novel constraint-based generation algorithm to produce semantically valid test cases, effectively uncovering widespread correctness defects in systems like TACO and Finch that existing testing methods fail to detect.

Original authors: Kabilan Mahathevan, Yining Zhang, Muhammad Ali Gulzar, Kirshanthan Sundararajah

Published 2026-03-20
📖 5 min read🧠 Deep dive

Original authors: Kabilan Mahathevan, Yining Zhang, Muhammad Ali Gulzar, Kirshanthan Sundararajah

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

The Big Picture: The "Sparse" Problem

Imagine you have a massive spreadsheet representing a social network. Most people don't know each other, so 99.9% of the cells in that spreadsheet are empty (zero). If you try to process this spreadsheet like a normal one, you waste a huge amount of time and energy checking empty boxes.

To fix this, computer scientists use Sparse Tensor Compilers (STCs). Think of these compilers as super-smart chefs. Instead of cooking every single ingredient in a giant pot, they look at the recipe, realize most ingredients are missing, and create a custom, highly efficient cooking plan that only touches the ingredients that actually exist.

The Problem: These "chefs" are incredibly complex. They have to invent new ways to cook on the fly for every different type of missing data. Because they are so complex, they often make subtle mistakes. Sometimes they crash the kitchen; other times, they silently serve you a dish that looks right but tastes wrong (a "silent miscompilation").

The Missing Tool: Why We Needed TENSURE

Until now, there was no good way to test these chefs.

  • Old Testers: Previous testing tools were like menu checkers. They only tested standard dishes (like "Matrix Multiplication" or "Convolution") using a fixed list of ingredients. They couldn't handle the weird, custom recipes these compilers were supposed to invent.
  • Grammar Fuzzers: Other tools tried to throw random words at the compiler to see if it broke. But because the rules for these recipes are so strict (like a complex math puzzle), 97% of the random attempts were nonsense that the compiler immediately rejected. It was like trying to teach a dog to speak by shouting random letters; it just doesn't work.

The Solution: Introducing TENSURE

The researchers built TENSURE, a new testing robot designed specifically to break these "sparse chefs."

Here is how it works, using three main tricks:

1. The "Universal Recipe Book" (Einsum)

Instead of trying to speak every specific language the chefs use (C++, Julia, etc.), TENSURE speaks a universal math language called Einsum.

  • Analogy: Imagine you want to test a bunch of different car engines. Instead of trying to write a manual for every specific brand, you write a generic instruction: "Turn the key, press the gas, and see if it moves." TENSURE writes these generic math instructions, which it then translates into whatever specific language the target compiler understands.

2. The "Smart Generator" (Constraint-Based)

This is TENSURE's superpower. Instead of throwing random letters at the compiler, it uses a logic puzzle solver.

  • Analogy: If you ask a random person to write a sentence, they might say, "The blue apple flew." That's grammatically okay but nonsense. TENSURE is like a strict editor that ensures every sentence it writes is not just grammatically correct, but logically sound.
  • The Result: While old tools wasted 97% of their time making nonsense, TENSURE generates 100% valid recipes. This means it spends all its time actually testing the cooking process, not just checking if the ingredients list makes sense.

3. The "Magic Mirror" (Metamorphic Testing)

How do you know if the chef made a mistake if you don't have the "correct" answer to compare it to? TENSURE uses Metamorphic Testing.

  • Analogy: Imagine you order a sandwich.
    1. You ask the chef to make a sandwich with ham and cheese.
    2. Then, you ask the chef to make the exact same sandwich, but with the order of ingredients swapped (cheese and ham) or with the bread sliced differently.
    3. The Rule: Mathematically, the sandwich should taste exactly the same.
    4. The Test: If the two sandwiches taste different, the chef is lying or making a mistake.
  • TENSURE does this by swapping the order of math operations or changing how data is stored (e.g., from "row-by-row" to "column-by-column"). If the computer gives two different answers for the same math problem, it has found a bug.

What Did They Find?

The researchers tested TENSURE on two real-world "chefs": TACO and Finch.

  • The Results: It was a disaster for the compilers (in a good way for the researchers).
    • TACO: The fuzzer found that 65% of the time, the compiler either crashed or gave the wrong answer. It was like finding out the chef burned the kitchen or served raw chicken in 6 out of 10 attempts.
    • Finch: It also found many crashes, proving that even newer systems are fragile.

Why This Matters

This paper shows that the tools we rely on to run AI and big data are currently very fragile. They are full of hidden traps that only appear when you try to do complex, weird math.

TENSURE is the first tool that can systematically hunt for these traps. By using smart logic to generate valid tests and "magic mirror" tricks to spot errors, it helps ensure that the next generation of AI and scientific computing tools won't silently fail when we need them most.

In short: TENSURE is a specialized "bug hunter" that speaks the language of math, creates perfect test cases, and tricks compilers into revealing their mistakes before they cause real-world problems.

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 →