TL;DR
Interpreting large language models (LLMs) is notoriously difficult because features are mixed and duplicated across layers via the residual stream. This paper introduces CLVQ-VAE, a novel framework that maps activations across transformer layers through a discrete vector-quantization bottleneck, collapsing messy continuous representations into clean, human-interpretable concept vectors. CLVQ-VAE significantly outperforms continuous sparse autoencoders (SAEs) and clustering baselines, demonstrating both high functional faithfulness and superior semantic clarity.
What Problem Does This Paper Address?
To understand how LLMs make decisions, mechanistic interpretability researchers often look at internal activations. However, standard approaches face two major hurdles:
- Layer Mixing and Duplication: The transformer's residual stream acts as an additive highway, meaning features persist and blend across adjacent layers. Analyzing a single layer in isolation misses this cross-layer computational structure.
- The Continuous Space Dilemma: Recent cross-layer methods like Sparse Autoencoders (SAEs) operate in continuous spaces. This leads to "concept splitting," where a single semantic concept is smeared across a linear combination of many neurons without clear boundaries.
Because humans reason in discrete categories, continuous feature combinations are difficult to interpret. The authors tackle this by forcing cross-layer representations through a discrete bottleneck, grouping related features into distinct, identifiable concepts.
Methods
The authors propose CLVQ-VAE (Cross-Layer Vector Quantized-Variational Autoencoder), which acts as a cross-layer transcoder—mapping activations from a lower layer $l$ to a higher layer $h$.
The architecture consists of three core components:
- Adaptive Residual Encoder: Instead of completely transforming the input (which would destroy rich linguistic features), it uses a learnable interpolation mechanism ($\alpha$-controlled mixing) to subtly refine the lower-layer embeddings.
- Vector Quantizer: The continuous encoder outputs are mapped to the closest discrete vector in a learned codebook. To prevent "codebook collapse" (where only a few vectors are used), the authors introduce a stochastic top-$k$ temperature-based sampling mechanism combined with Exponential Moving Average (EMA) updates.
- Transformer Decoder: A 6-layer transformer decoder reconstructs the target higher-layer activations using both self-attention over the quantized sequence and cross-attention back to the unquantized lower-layer context.
Datasets
The framework was evaluated across both encoder-based (BERT, RoBERTa) and decoder-based (LLaMA-2-7B, Qwen2.5-3B-Instruct) models using three text classification benchmarks:
- ERASER-Movie: Movie reviews for sentiment classification.
- Jigsaw Toxicity: Comments labeled for toxicity classification.
- AGNEWS: Multi-class news categorization.
Key Insights and Ideas
- The Power of Discretization: Forcing the model to choose a single codebook vector rather than a linear combination of neurons naturally concentrates information. This prevents the concept-splitting problem inherent to SAEs.
- Curriculum Learning via Alpha: The learnable mixing coefficient $\alpha$ in the encoder acts as an implicit curriculum. Early in training, the model prefers a small $\alpha$ (preserving the original embedding), gradually increasing it to allow more expressive cross-layer transformations as the encoder parameters mature.
- The Initialization Trade-Off: The paper explores different codebook initializations and uncovers a fundamental trade-off: standard K-means favors quantitative functional faithfulness, while Spherical K-means (clustering by angular similarity) yields better semantic coherence and human interpretability.
Key Results
The authors evaluated CLVQ-VAE across three axes: faithfulness, specificity, and human interpretability.
1. Faithfulness (Concept Ablation)
To test if the discovered concepts actually drive model decisions, the authors ablated (removed) the identified concept directions from the sentence representations and measured the drop in downstream probe accuracy. CLVQ-VAE achieved the lowest perturbed accuracy in 5 out of 12 settings, consistently ranking first or second. Notably, SAE baselines struggled heavily on decoder models, showing near-zero accuracy drops, whereas CLVQ-VAE maintained strong functional effects.
2. Concept Specificity
The codebook vectors proved to be highly label-discriminative rather than generic sentence compressors. For example, in RoBERTa, same-label sentence pairs shared up to 7.56× more codebook vectors than different-label pairs with similar vocabularies.
3. Human and LLM Evaluation
- LLM-as-a-Judge: An ensemble of LLMs ranked CLVQ-VAE concepts first in 66.7% of pairwise comparisons against baselines.
- Human Study: Human annotators were shown word clouds of the discovered concepts and asked to infer the model's prediction. Annotators achieved a 78.2% model alignment rate with CLVQ-VAE, compared to just 54.14% for standard hierarchical clustering.
Limitations and Future Work
- Resource Demands: Extracting paired activations across multiple layers is memory-intensive, and K-means initialization scales poorly with very large datasets or high-dimensional embeddings. Optimization is required for models exceeding 70B parameters.
- Layer-Pair Specificity: The framework requires training a separate model for each specific layer combination, and the optimal layer pairs vary by architecture.
- Decoder Pooling: For decoder-only models, the authors relied on mean-pooled embeddings instead of a dedicated classification token (like
[CLS]), which may capture different informational dynamics.
Summary updated