TL;DR
The authors introduce SITH (Semantic Inspection of Transformer Heads), a fully data-free and training-free framework that interprets CLIP’s vision transformer directly in weight space using Singular Vector Decomposition (SVD). By pairing SVD with a novel concept-decomposition algorithm called COMP, SITH extracts fine-grained, human-interpretable concepts from attention heads, enabling precise model editing (e.g., removing biases or unsafe content) and revealing that fine-tuning primarily reweights a stable semantic basis rather than creating new features.
What Problem Does This Paper Address?
Most existing mechanistic interpretability methods rely on analyzing model activations. To figure out what a specific attention head or neuron does, researchers pass thousands of images through the network and observe what makes it fire.
However, activation-based methods suffer from three major flaws:
- Dataset Dependency: They require massive datasets to probe the model.
- Dataset Bias: The resulting explanations are inherently biased by the distribution of the probing dataset.
- Coarse Granularity: They typically explain behavior at the entire attention-head level (e.g., "Head X looks at colors"), missing the finer-grained sub-features packed inside.
SITH addresses these limitations by looking directly at the weights of the model, completely bypassing the need for input data or optimization.
Methods
SITH operates through a clean, two-step geometric pipeline:
- Weight Space Decomposition: The authors isolate the Value-Output ($W_{VO}$) matrix of an attention head, which dictates what information the head writes into the transformer's residual stream. They apply Singular Value Decomposition (SVD) to factorize this matrix into singular vectors. The right singular vectors ($v_i$) represent the dominant semantic "writing directions" of the head.
- Coherent Orthogonal Matching Pursuit (COMP): To translate these raw mathematical vectors into human concepts, the authors project them into CLIP's text-image embedding space and decompose them into a sparse combination of textual concepts from a dictionary.
Standard greedy matching pursuit algorithms (like NNOMP) select concepts purely to minimize reconstruction error, often yielding a disjointed, confusing bag of words. The authors introduce COMP, which adds a coherence regularizer to the selection step. COMP ensures that newly selected concepts are semantically close to already chosen ones, balancing reconstruction fidelity with human interpretability.
Datasets
The framework was evaluated using an OpenCLIP ViT-L/14 model pre-trained on LAION-2B.
- Concept Pool: ConceptNet 5.5 (containing ~1.35M concepts), chosen because it retains unsafe/NSFW terms necessary for safety filtering experiments.
- Image Grounding: CC12M (Conceptual 12M) was used to verify that the weight-extracted concepts actually align with real-world images.
- Downstream Tasks & Editing: Evaluated across ImageNet, Flowers 102, Oxford Pets, Stanford Cars, FGVC-Aircraft, Describing Textures in the Wild (DTD), Waterbirds (for spurious correlation testing), ViSU (for NSFW content retrieval), and CUB-200.
Key Insights and Ideas
- The Semantic Basis is Stable: When fine-tuning CLIP on a new downstream task, the model doesn't learn entirely new features from scratch. SITH reveals that fine-tuning simply reorients and reweights a remarkably stable pre-existing semantic basis toward the target domain.
- Coherence Trumps Pure Fidelity: Forcing an interpretability algorithm to choose semantically cohesive concepts makes the explanations significantly more useful for humans, without hurting the mathematical fidelity needed for downstream tasks.
- Surgical Model Editing is Possible: Because SITH operates at the vector level rather than the head level, you can zero-out or amplify highly specific concepts (like "background features") without destroying the other useful functions of an attention head.
Key Results
- Superior Interpretability-Fidelity Trade-off: COMP consistently achieves a better Pareto frontier than standard top-$k$ or NNOMP methods across multiple transformer layers.
- Mitigating Spurious Correlations: On the Waterbirds dataset (where birds appear on misleading backgrounds), surgically zeroing out background-related singular vectors boosted worst-group accuracy from 47.9% to 70.6%, outperforming activation-based head ablation.
- Removing NSFW Content: By suppressing singular vectors associated with unsafe concepts, SITH successfully reduced the retrieval of inappropriate content on the ViSU dataset, even outperforming SafeCLIP (a model explicitly trained with safety objectives) when handling safe queries.
- Data-Free Performance Tuning: By scaling up singular values that align with target class names, the authors improved zero-shot classification accuracy on Flowers 102, FGVC-Aircraft, and DTD by up to 1.0 percentage point completely training-free.
Limitations and Future Work
- Component Coverage: SITH currently focuses on the Value-Output matrices of attention heads. The authors note that future work must extend this weight-space analysis to Feed-Forward Network (FFN) layers and Query-Key (QK) matrices to achieve a truly comprehensive understanding of the transformer.
- Dictionary Dependency: The quality of the explanations is bound to the completeness of the concept pool (ConceptNet 5.5) and the alignment capabilities of the text encoder used to embed it.
Summary updated