Semantic Optimal Transport for Sparse Autoencoder Feature Matching and Circuit Compression
This paper introduces a unified distributional framework based on Wasserstein distance that represents Sparse Autoencoder features as activation-weighted distributions to enable robust semantic matching across layers and automatic compression of feature circuits into interpretable supernodes.
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: Decoding the "Brain" of AI
Imagine a Large Language Model (like the AI you chat with) as a massive, multi-story library. Inside this library, information isn't stored in neat books; it's scattered across millions of tiny, glowing dust motes called features. These features are the building blocks of the AI's thoughts.
To understand how the AI thinks, researchers use a tool called a Sparse Autoencoder (SAE). Think of the SAE as a high-powered microscope that lets us see these dust motes. However, two big problems make this difficult:
- The "Same Idea, Different Floor" Problem: The same concept (like "justice" or "adding numbers") might be represented by one dust mote on the 1st floor of the library and a completely different-looking dust mote on the 50th floor. Current tools struggle to realize these two are the same idea because they look different in their respective rooms.
- The "Too Many Rooms" Problem: When we trace a specific thought (a "circuit"), we often end up with a tangled web of hundreds of dust motes. It's impossible for a human to read every single one. We need to group them into "supernodes" (like grouping all the "kitchen" items together), but currently, this requires a human to manually label every single item, which doesn't scale.
The Old Way: Comparing Static Snapshots
Previously, researchers tried to solve this by taking a single "snapshot" of each feature. Imagine taking a photo of a dust mote and measuring its color and brightness. If the photo on the 1st floor looks similar to the photo on the 50th floor, they assume it's the same feature.
The Flaw: This is like trying to identify a person by only looking at a single, blurry photo of their shadow. It misses the context. A feature isn't just a static point; it's a pattern of when and how strongly it lights up across thousands of different sentences. The old method threw away this rich context, leading to mistakes, especially when comparing distant floors of the library.
The New Solution: The "Crowd Map" and the "Moving Truck"
The authors propose a new way to look at these features using Optimal Transport, a mathematical concept that sounds fancy but is actually quite intuitive.
1. From a Single Dot to a Crowd Map
Instead of taking a single photo of a feature, the new method creates a "Crowd Map."
- Imagine a feature is a celebrity.
- Old Method: You just measure the celebrity's height.
- New Method: You take a map of every single fan who showed up to see them, and you mark exactly where they stood and how excited they were (their "activation weight").
- This map captures the context of the feature. It knows that this feature lights up when people talk about "cats" but not "dogs."
2. The Shared Reference Space (The Neutral Ground)
Since the 1st floor and the 50th floor have different layouts (different "manifolds"), you can't directly compare their maps.
- The authors project all these fan maps onto a Shared Reference Space. Think of this as a giant, neutral city park.
- They take the fans from the 1st floor and the fans from the 50th floor and place them all on this same park map. Now, they are in the same neighborhood, making them comparable.
3. Optimal Transport (The Moving Truck)
Now, how do you measure how similar two features are?
- Imagine you have a pile of sand (the fans) representing Feature A and another pile representing Feature B.
- Optimal Transport is like hiring a moving truck to move the sand from Pile A to Pile B.
- The "cost" is the distance the sand has to travel.
- If the fans in Pile A are standing in the exact same spots as the fans in Pile B, the truck doesn't have to move them far. The cost is low. Low cost = High similarity.
- If the fans are in totally different parts of the park, the truck has to drive a long way. High cost = Different meanings.
This method is powerful because it looks at the entire distribution of activity, not just a single point. It can tell the difference between two features that look similar at a glance but have different "fan patterns."
What They Achieved
Using this "Crowd Map" and "Moving Truck" approach, the paper claims three major victories:
- Better Matching: They can now accurately match features across different layers of the AI, even if the layers are very far apart. It's like recognizing that a specific type of tree on the ground floor is the same species as a tree on the roof, even though they look different due to the wind and light.
- Automatic Compression: They can automatically group hundreds of tangled features into clean, understandable "supernodes." Instead of a human manually sorting 500 items, the algorithm groups them based on how similar their "fan maps" are.
- Finding Subtle Differences: They successfully identified features that do very specific things, like "adding two numbers." Other methods failed to distinguish between features that were just "doing math" generally, but this method spotted the specific "digit addition" patterns.
The "Why It Works" Guarantee
The paper also includes mathematical proofs (the "receipts") to show why this works:
- Scale Invariance: It doesn't matter if the feature is "loud" (very active) or "quiet" (less active) as long as the pattern of who is listening is the same. The method ignores volume and focuses on the shape of the crowd.
- Stability: If you add a little bit of noise (like a few extra fans showing up randomly), the "moving truck" cost doesn't change wildly. The method is robust.
- Recovery: If the difference between two features is big enough, the method is mathematically guaranteed to find the right match, even with imperfect data.
Summary
In short, this paper says: "Stop looking at AI features as single, static dots. Look at them as dynamic crowds of activity. By using a mathematical moving-truck system to compare these crowds on a neutral map, we can automatically understand how AI thoughts evolve across layers and simplify complex circuits into readable summaries."
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.