Geometry-Adaptive Explainer for Faithful Dictionary-Based Interpretability under Distribution Shift

Sungjun Lim, Heedong Kim, Andrew Lee, Kyungwoo Song

TL;DR

When we feed AI models unexpected, out-of-distribution (OOD) data, the tools we use to inspect their internal "thoughts"—like Sparse Autoencoders—silently lose their accuracy because the model's active representational geometry rotates away from what the explainer learned. This paper formalizes that geometric drift and introduces the Geometry-Adaptive Explainer (GAE), a training-free, closed-form mathematical fix that realigns the explainer in seconds. Remarkably, this instant linear-algebraic adjustment matches or beats expensive retraining baselines that chew through millions of tokens over hours of GPU time.

What Problem Does This Paper Address?

To understand what a neural network is actually doing, researchers use mechanistic interpretability. A flagship tool here is the dictionary-based explainer—such as a Sparse Autoencoder (SAE) or transcoder—which acts like a prism, decomposing a model's tangled hidden activations into clean, sparse, human-interpretable "feature directions" (a dictionary). For these explanations to be useful, they must be faithful, meaning they reflect the true causal computations of the model.

Here is the catch: explainers are trained on standard, in-distribution (ID) text. When the model encounters OOD inputs—say, specialized financial legalese, adversarial prompts, or text from the future—the hidden subspace where the model concentrates its activation energy shifts and rotates. The static explainer dictionary is suddenly looking in the wrong geometric directions. Prior attempts to fix this relied on heuristics or brute-force retraining on millions of new tokens, without diagnosing why the explainer broke in the first place.

Figure 1: Faithfulness gap and GAE. Left: distribution shift (illustrated as a language change) rotates the OOD-active subspace ΠOOD away from the ID-trained explainer subspace Πdec ≈ΠID, opening a faithfulness gap ∆(Πdec). Right: GAE uses two steps. Step 1 rotates Πdec onto the estimated OOD-active subspace via orthogonal Procrustes. Step 2 refits feature directions under an alignment penalty to match OOD activations while preserving the original sparse feature activations.

Methods

First, the authors formalize the root cause: the faithfulness gap, defined as the geometric distance between the explainer’s learned subspace and the subspace the model actively uses under OOD shift. They prove mathematically that this gap grows proportionally with the shift in the activations' second-moment matrix, and that it tightly bounds how much extra reconstruction error the explainer suffers.

To close this gap without gradient descent, they propose the Geometry-Adaptive Explainer (GAE). Crucially, GAE freezes both the base language model and the explainer's encoder—meaning the exact same sparse features fire with the exact same strengths as before—and adapts only the decoder dictionary in two closed-form steps using roughly 2,048 unlabeled OOD activation vectors:

  1. Subspace Rotation (Step 1): Using an orthogonal Procrustes solution (via Singular Value Decomposition), GAE rotates the top-$r$ singular directions of the original ID dictionary so they land squarely on the estimated OOD-active subspace, picking the rotation that stays closest to the original dictionary.
  2. Decoder Refit (Step 2): Pure rotation aligns the overall subspace, but individual feature directions might still clash with the frozen feature activations. Step 2 solves a regularized linear least-squares (ridge regression) problem to fine-tune individual feature vectors for sample-level reconstruction, applying a stiffer penalty outside the OOD subspace so the dictionary doesn't drift back out of alignment.

Datasets

Rather than introducing new benchmarks, the authors evaluate GAE across a synthetic toy MLP setup and three distinct real-world OOD shifts for language models (GPT-2 Small, Pythia-1.4B, and Llama-3.1-8B):

  • FineWeb (Temporal shift): Web text collected after each model's pretraining cutoff date.
  • Edgar (Domain shift): U.S. SEC financial filings with specialized vocabulary and structure.
  • HaluEval (Adversarial shift): Hallucination-inducing prompts designed to trigger atypical internal states.

Key Insights and Ideas

  • Degradation is geometric, not mysterious: Explainer failure under distribution shift isn't an arbitrary collapse; it is governed by how far the top eigenvectors of the hidden activations' second moment rotate away from the ID dictionary.
  • Subspace alignment and sample-level refitting need each other: In ablations on HaluEval, doing only Step 1 (pure rotation) drops the geometric faithfulness gap to zero, yet causal faithfulness (nComp) actually falls from 0.74 to 0.44 because the rotated vectors aren't calibrated to the frozen encoder's firing strengths. Conversely, doing only Step 2 leaves a large geometric gap. Step 1 provides the right geometric anchor so Step 2 can safely refit.
  • Preserving feature IDs fixes broken circuits: Because the encoder never changes, feature indices keep their identities, allowing direct before-and-after comparisons. On a prompt predicting ' American', an unadapted explainer's top features actually pointed away from nationality tokens (specificity score of $-0.55$); after GAE realigned the decoder, those exact same firing features pointed cleanly toward nationalities ($+1.39$).

Key Results

GAE was tested against frozen baselines and heavy training-based methods (Finetune, Retrain, SAEBoost, FaithfulSAE) using causal ablation metrics (nAOPC, nComp) and reconstruction impact on cross-entropy (|∆CE|).

Table 1: Computational cost per method. We report token counts and wall-clock times. GAE takes under 3 s per model without training.
  • Massive Speedup: While full retraining baselines process 100M tokens and take ~39 minutes on GPT-2 Small and ~4 hours on Pythia-1.4B, GAE uses ~2,048 unlabeled vectors and finishes in 0.5 seconds (GPT-2), 2.9 seconds (Pythia-1.4B), and ~30 seconds on Llama-3.1-8B (with a 128K-feature SAE).
  • Superior Faithfulness: On GPT-2 Small, GAE sweeps all nine evaluation columns across all three OOD datasets for both Transcoders and Top-K SAEs. On adversarial shift (HaluEval, Transcoder), GAE beats the strongest training baseline (SAEBoost) on causal comprehensiveness by 4.6% while slashing |∆CE| error by 93% (0.0014 vs. 0.0212).
  • Scaling Up: Across Pythia-1.4B and Llama-3.1-8B, GAE consistently matches or outperforms gradient-trained baselines across nearly all metrics.
Figure 2: Controlled experiment on a toy MLP with OOD severity varied from 0 (ID) to 1 (maximum shift). (a) The Fixed explainer’s faithfulness gap ∆(Πdec) grows monotonically. (b) Its reconstruction error rises accordingly. GAE maintains near-zero gap and flat error throughout.

Limitations and Future Work

GAE relies on truncating the original dictionary to its top-$r$ singular directions during Step 1. Any subtle feature information living in the remaining $(d - r)$ residual directions is discarded prior to adaptation; similarly, on shifts with diffuse eigenvalue decay (like FineWeb on Pythia-1.4B), a fixed low-rank approximation is slightly less tight. Furthermore, GAE leaves the encoder frozen—if OOD inputs require entirely new sparse activation patterns rather than realigned readout directions, decoder adaptation alone won't capture them. The authors point to adaptive rank selection, lightweight encoder adaptation, and optimal transport on Grassmannian manifolds as natural next steps.

Summary updated

Abstract

Mechanistic interpretability aims to explain a model’s behavior by identifying causally responsible internal structures. Dictionary-based explainers such as sparse autoencoders and transcoders are a primary tool, but their faithfulness under out-of-distribution (OOD) shift has received little systematic attention. We show that distribution shift rotates the subspace that the model actively uses, misaligning the explainer’s dictionary trained on in-distribution (ID) activations. We formalize this misalignment as the faithfulness gap, a geometric distance between the ID dictionary and the OOD-active subspace, and show that it controls OOD faithfulness degradation. To reduce this gap, we propose the Geometry-Adaptive Explainer (GAE), which realigns the explainer's dictionary with the OOD-active subspace while preserving the original feature structure. This requires only unlabeled OOD activations and no gradient updates. We prove that GAE improves over the unadapted ID explainer, with excess loss bounded quadratically by the second-moment shift. Empirically, GAE even matches or surpasses all training-based baselines in causal faithfulness across multiple models and OOD settings.
BibTeX
@inproceedings{lim2026geometry,
  author = {Sungjun Lim and Heedong Kim and Andrew Lee and Kyungwoo Song},
  title = {{Geometry-Adaptive Explainer for Faithful Dictionary-Based Interpretability under Distribution Shift}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=hZQ6hH0lDD},
}
Figure