When Are Two Networks the Same? Tensor Similarity for Mechanistic Interpretability
This paper introduces "tensor similarity," a weight-based metric invariant to weight-space symmetries that efficiently verifies global functional equivalence between tensor-based neural networks, thereby transforming mechanistic interpretability from empirical approximation into a solved algebraic problem.
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 have two identical-looking robots. They both walk, talk, and solve math problems the same way. But if you open up their chests, you find their internal gears are arranged completely differently. One has gears stacked vertically; the other has them spread out horizontally.
The Problem:
In the world of AI, scientists want to understand how these robots (neural networks) think. This is called "mechanistic interpretability." But there's a big headache: How do you prove that two different internal arrangements are actually doing the exact same thing?
Current methods are like comparing the robots by watching them walk.
- The "Behavior" Test: If they walk the same way on a specific path, we assume they are the same. But what if one robot has a secret trick that only works on a path we haven't walked yet? We'd miss it.
- The "Blueprint" Test: If we just compare the blueprints (the numbers inside the robot), we might say they are different because the gears are flipped, even if they do the exact same job. It's like saying two houses are different because one has the kitchen on the left and the other on the right, even if the rooms function identically.
The Solution: "Tensor Similarity"
The authors of this paper invented a new way to compare these robots. They call it Tensor Similarity.
Think of it like this: Instead of looking at the blueprints or watching the robot walk, they use a special "magic mirror" that looks at the essence of the robot's math.
The "Magic Mirror" (Symmetry Invariance):
Imagine you have a sculpture made of clay. You can squish it, stretch it, or rotate it, but if it's still the same shape, it's the same sculpture. Current methods get confused if you rotate the sculpture. The authors' new method ignores the rotation. It only cares about the shape of the function. If two robots do the same math, this method gives them a perfect score, even if their internal numbers look totally different.The "X-Ray" (Data-Free):
Most tests need to feed the robot thousands of questions to see how it answers. This new method doesn't need any questions. It looks at the robot's internal "brain" (the weights) and calculates the answer mathematically. It's like an X-ray that tells you if a bone is broken without asking the patient to walk.The "Special Robot" (Tensor-Based Models):
To make this magic mirror work, the authors had to build their robots using a slightly different kind of clay called "tensors" (specifically, multilinear models). These robots work just like normal AI, but their internal math is structured in a way that allows this special comparison. It's a trade-off: you have to build the robot a specific way to get this super-accurate comparison tool.
What They Found (The Experiments):
The team tested this new tool on four different scenarios:
- The "Amnesia" Test: They taught a robot to recognize numbers 0–4, then added 5–9. Later, they tried to make it forget 9. The old tools couldn't tell which part of the robot was forgetting. The new tool pointed a laser directly at the specific "gear" responsible for the number 9, showing exactly where the memory loss happened.
- The "Aha!" Moment (Grokking): Sometimes AI suddenly gets really good at a task after struggling for a long time. The new tool showed that this isn't just a sudden jump; it's a slow, continuous rearrangement of the robot's internal gears that the old tools missed.
- The "Secret Handshake" (Backdoors): They planted a secret trigger in the robot: "If you see a black diamond, call it a 9." The robot still worked perfectly on normal pictures, so standard tests said it was fine. But the new tool, looking at the internal math, immediately spotted the secret handshake, even without seeing the black diamond.
- The "Language" Test: They applied this to a language model (a robot that writes text). The new tool showed clear, sharp changes as the robot learned new patterns, while other tools just saw a blurry mess.
The Bottom Line:
The paper argues that to truly understand AI, we need a way to compare their internal logic that isn't fooled by how the numbers are arranged or what data we feed them. Their new "Tensor Similarity" metric does exactly that, but it currently only works on a specific type of AI architecture (tensor-based models). It turns the messy problem of "are these two brains the same?" into a clean, solvable math problem.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.