Research map / Learning theory and algorithms / Optimal transport
Semantic Optimal Transport for Sparse Autoencoder Feature Matching and Circuit Compression
Tue M Cao, Nguyen Do, My T. Thai
University of Florida
Read the paperPlace an idea next to itCheck your own paper ↗
Frames SAE feature matching across layers and circuit compression as cross-manifold semantic distance, representing each feature as an activation-weighted distribution over hidden states compared with Wasserstein distance in a shared reference space.
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Problem
Matching semantically similar SAE features across layers and compressing large feature circuits into interpretable supernodes are hard to scale; existing decoder-vector matching fails across dissimilar layer distributions and manual supernode grouping does not scale.
Approach
Represent each SAE feature as an activation-weighted empirical distribution over the hidden states that activate it, project these into a shared reference space (target layer hidden states for matching; concatenated all-layer hidden states for circuits), and use optimal transport (Wasserstein distance) as the semantic distance for nearest-neighbor matching and clustering.</multi_core_idea>
Key results
- On GPT2 layer 5 to layer 6 matching, the method reaches LLM Eval 2.53 and Acc 68.2%, versus 2.46 and 66.2% for FeatFlow.
- On Gemma-2-2B layer 12 to layer 13 matching, Acc is 58.6% versus 20.4% for FeatFlow.
- Theory provides activation-rescaling invariance, Wasserstein stability under measure perturbation, and margin-based recovery guarantees.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| represent each feature as a full activation-weighted distribution with Wasserstein distance instead of a single centroid (ablation) | Our (GPT2) · Feature matching, layer 5 vs 6 | accuracy (%): 66.4 -> 68.2 | Improved |
| represent each feature as a full distribution instead of a single centroid (ablation) | Our (Gemma-2-2B) · Feature matching, layer 12 vs 13 | accuracy (%): 55.2 -> 58.6 | Improved |
| represent each feature as a full distribution instead of a single centroid (ablation) | Our (Gemma-2-2B) · Feature matching, layer 12 vs 13 | LLM Eval: 2.22 -> 2.32 | Improved |
| represent each feature as a full distribution instead of a single centroid (ablation) | Our (GPT2) · Feature matching, layer 5 vs 6 | LLM Eval: 2.51 -> 2.53 | No clear effect |
| use shared reference-space distributions instead of decoder-vector cosine similarity | FeatFlow · Feature matching, layer 12 vs 13 | accuracy (%): 20.4 -> 58.6 | Improved |
| use shared reference-space distributions instead of decoder-vector L2 | Match · Feature matching, layer 12 vs 25 | accuracy (%): 6.6 -> 33.6 | Improved |
| use shared reference-space distributions instead of decoder-vector cosine similarity | FeatFlow · Feature matching, layer 0 vs 25 | accuracy (%): 8.4 -> 34.8 | Improved |
| use shared reference-space distributions instead of decoder-vector L2 | Match · Feature matching, layer 5 vs 6 | accuracy (%): 55.6 -> 68.2 | Improved |
| match through composition of consecutive layers (ML) instead of direct matching | Match · Feature matching, layer 5 vs 11 | accuracy (%): 22.2 -> 6.8 | Hurt |
| match through composition of consecutive layers (ML) instead of direct matching | Match · Feature matching, layer 12 vs 25 | accuracy (%): 6.6 -> 11.2 | Improved |
| use shared reference-space distributions instead of decoder vectors | FeatFlow · Feature matching, layer 5 vs 6 | CE loss: 3.774 -> 3.775 | No clear effect |
| use shared reference-space distributions instead of attribution patching | Attrib · Feature matching, layer 5 vs 6 | accuracy (%): 8.6 -> 68.2 | Improved |
Surprising findings
- Naive single-centroid projection onto the same reference space is competitive with the full Wasserstein method on several matching setups.
Limitations
- Uses plain L2 ground cost, assuming flat Euclidean geometry.
- Relies on LLM judges and small evaluation sets (100 pairs per setup, 200 circuits).
Open problems this paper states
- “Uses plain L2 ground cost, assuming flat Euclidean geometry.” → The ground cost or metric space is fixed in advance, not learned. (an open problem in neural optimal transport)
Open problems in neural optimal transport
How can optimal transport be made cheap and flexible enough for large data, learned metrics and real tasks?
- Transport solvers do not scale to large samples or high dimensions. · 11 papers state it
- Results depend on hyperparameters tuned for each dataset. · 9 papers state it
- Experiments stay on small, synthetic or narrow benchmarks. · 8 papers state it
Experimental setup
Datasets: The Pile
Benchmarks: feature matching (GPT2, Gemma-2-2B) circuit compression digit addition subtle-feature matching
Metrics: LLM Eval Accuracy CE loss Variance Explained human blind-ranking preference
Baselines: Match Match ML FeatFlow FeatFlow ML Attrib LLM Sel Naive
Builds on: SAE Match Feature Flow Attribution Patching Sinkhorn algorithm
Closest papers by meaning
- Scaling and evaluating sparse autoencoders (ICLR 2025 · similarity 0.91)
- SAEBench: A Comprehensive Benchmark for Sparse Autoencoders in Language Model Interpretability (ICML 2025 · similarity 0.91)
- Compute Optimal Inference and Provable Amortisation Gap in Sparse Autoencoders (ICML 2025 · similarity 0.90)
- Sparse Autoencoders, Again? (ICML 2025 · similarity 0.90)
- Improving Sparse Decomposition of Language Model Activations with Gated Sparse Autoencoders (NeurIPS 2024 · similarity 0.90)
- Universal Sparse Autoencoders: Interpretable Cross-Model Concept Alignment (ICML 2025 · similarity 0.90)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.