From Flat to Hierarchical: Extracting Sparse Representations with Matching Pursuit

Valérie Costa, Thomas Fel, Ekdeep Singh Lubana, Bahareh Tolooshams, Demba E. Ba · DOI

Introduction

Standard Sparse Autoencoders (SAEs) typically assume that neural network features are independent, linear directions. This paper argues that real-world representations are often hierarchical and non-linear. The authors introduce MP-SAE, an architecture that unrolls the classical Matching Pursuit algorithm into a sequential encoder to capture these complex structures, resulting in better reconstruction, adaptive sparsity, and the discovery of truly multimodal features.

The Challenge: Beyond the Linear Representation Hypothesis

In the field of mechanistic interpretability, researchers use SAEs to decompose the "black box" of neural network activations into human-understandable features. Most current SAEs are built on the Linear Representation Hypothesis (LRH), which posits that features are approximately orthogonal, independent directions.

Geometries of model representations: from flat linear structures to hierarchical and non-linear ones.

However, recent evidence suggests that neural networks often exhibit hierarchical (parent-child) relationships and non-linear structures. Standard SAEs struggle in these regimes, often suffering from "feature absorption"—where a child feature is merged into its parent—or failing to find features that are not linearly accessible. MP-SAE is designed to respect this complex phenomenology by moving beyond the "flat" dictionary assumption.

Methodology: Matching Pursuit Sparse Autoencoder

The authors propose the Matching Pursuit Sparse Autoencoder (MP-SAE). Unlike standard SAEs that use a one-shot linear encoder, MP-SAE unrolls the Matching Pursuit (MP) algorithm into a sequential process:

  1. Residual-Guided Encoding: The encoder identifies the single feature in its dictionary most correlated with the input, records its strength, and then subtracts that feature's contribution to create a "residual."
  2. Iterative Refinement: This process repeats for $T$ steps. Each step explains a new part of the signal that is orthogonal to what was previously found.
  3. Conditional Orthogonality: This sequential nature promotes "conditional orthogonality"—features only need to be orthogonal to their "parents" or previously explained components, rather than being globally orthogonal to every other feature.
  4. Non-linear Access: Because each step depends on the residual of the previous one, the final encoding is a non-linear function of the input, allowing the model to uncover higher-order features.

Key Results and Insights

The researchers evaluated MP-SAE across synthetic data, vision models (DINOv2, CLIP, SigLIP), and multimodal models.

Structural Fidelity and Expressivity

In synthetic tests, MP-SAE was the only model capable of perfectly recovering both hierarchical (parent-child) and flat (sibling) correlations. Across all tested vision models, MP-SAE achieved a higher $R^2$ (reconstruction accuracy) for the same level of sparsity compared to Vanilla, TopK, and BatchTopK SAEs.

Solving the Modality Gap

In vision-language models like CLIP, standard SAEs often learn "split" dictionaries—separate features for images and text even for the same concept. MP-SAE bridges this gap. By stripping away modality-specific noise in early steps, it uncovers shared, truly multimodal features in later steps, resulting in a significantly flatter distribution of modality scores.

Adaptive Sparsity and Rank Growth

Because MP-SAE is sequential, users can choose how many features to extract ($k$) at inference time without retraining. Unlike TopK SAEs, MP-SAE's reconstruction error decreases monotonically with every added feature. Furthermore, its "effective rank" (feature diversity) grows steadily as active features increase, whereas standard SAEs tend to saturate quickly.

Limitations and Future Work

Matching Pursuit is a greedy algorithm and does not guarantee a globally optimal sparse decomposition. Additionally, sequential encoding is inherently slower than one-shot linear encoders, which may limit its use in real-time applications. Future directions include exploring more sophisticated pursuit algorithms (like Orthogonal Matching Pursuit) and applying these methods to larger language models to investigate the prevalence of non-linearly accessible "dark matter" features.

Summary updated

BibTeX
@inproceedings{costa2025from,
  author = {Valérie Costa and Thomas Fel and Ekdeep Singh Lubana and Bahareh Tolooshams and Demba E. Ba},
  title = {{From Flat to Hierarchical: Extracting Sparse Representations with Matching Pursuit}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=Ll5miDx8KB},
}
Figure