Analyzing Hierarchical Structure in Vision Models with Sparse Autoencoders

Matthew L. Olson, Musashi Hinck, Neale Ratzlaff, Changbai Li, Phillip Howard, Vasudev Lal, Shao-Yen Tseng, vasudev.lal, shao-yen.tseng}@intel.com, [email protected] · 2025

Read Analyzing Hierarchical Structure in Vision Models with Sparse Autoencoders by Matthew L. Olson, Musashi Hinck, Neale Ratzlaff, Changbai Li, Phillip Howard, Vasudev Lal, Shao-Yen Tseng, vasudev.lal, shao-yen.tseng}@intel.com, [email protected] (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2505-15970.txt.

Introduction

Matthew Olson and six co-authors use sparse autoencoders to read how vision models store the ranked tree of object classes in a known image set. Their paper is from two thousand twenty-five.

Such tools have been used to read large language models, where they find traits with clear sense. Here the team turns them on vision models. They ask if the models' inner states line up with the tree of classes, from broad groups down to fine kinds. Their results show the tools do bare ranked links in the states. That means the models store the class tree in a quiet, built-in way. They test how firm these links are across the set.

Catalog record

CREATORMatthew L. Olson, Musashi Hinck, Neale Ratzlaff, Changbai Li, Phillip Howard, Vasudev Lal, Shao-Yen Tseng, vasudev.lal, shao-yen.tseng}@intel.com, [email protected]
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE17 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2505-15970

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Analyzing Hierarchical Structure in Vision Models with Sparse Autoencoders Matthew L. Olson, Musashi Hinck, Neale Ratzlaff, Changbai Li, Phillip Howard, Vasudev Lal, Shao-Yen Tseng, vasudev.lal, shao-yen.tseng}@intel.com, [email protected] Abstract The ImageNet hierarchy provides a structured taxonomy of object categories, offering a valuable lens through which to analyze the representations learned by deep vision models. In this work, we conduct a comprehensive analysis of how vision models encode the ImageNet hierarchy, leveraging Sparse Autoencoders (SAEs) to probe their internal representations. SAEs have been widely used as an explanation tool for large language models (LLMs), where they enable the discovery of semantically meaningful features. Here, we extend their use to vision models to investigate whether learned representations align with the ontological structure defined by the ImageNet taxonomy. Our results show that SAEs uncover hierarchical relationships in model activations, revealing an implicit encoding of taxonomic structure. We analyze the consistency of these representations across different layers of the popular vision foundation model DINOv2 and provide insights into how deep vision models internalize hierarchical category information by increasing information in the class token through each layer. Our study establishes a framework for systematic hierarchical analysis of vision model representations and highlights the potential of SAEs as a tool for probing semantic structure in deep networks. 1 Introduction The hierarchical structure of object categories plays an important role in human perception and cognition, influencing how we classify, recognize, and relate visual entities Peelen and Downing 2017 . In the context of computer vision, hierarchical taxonomies, such as those defined in ImageNet Russakovsky et al. 2015 , provide a structured organization of categories that can serve as a useful reference for analyzing how deep neural networks represent visual concepts. Understanding whether and how vision models internalize such hierarchical relationships is an open question in model explainability. Sparse Autoencoders (SAEs) have emerged as a powerful tool for probing high-dimensional representations, particularly in the study of large language models (LLMs) Cunningham et al. 2023 ; Rajamanoharan et al. 2024 ; Gao et al. 2024 . By enforcing sparsity in a learned bottleneck layer, SAEs extract disentangled features that correspond to meaningful latent factors in model activations. In this work, we apply SAEs to the analysis of vision models, using them to investigate whether model-internal representations reflect the hierarchical structure of ImageNet. Specifically, we aim to determine whether learned features naturally align with the taxonomy and how this alignment varies across different architectures and training methods. We perform a detailed case study evaluating the of hierarchical encoding in the popular unsupervised vision foundation model DINOv2 Oquab et al. 2023 , and leverage SAEs to extract and analyze sparse feature representations. Our study addresses the following key questions: • Do the internal representations of vision models align with the ImageNet hierarchy, and can SAEs reveal this structure? • How consistent is the hierarchical structure across different layers of the model? • Can SAE-derived representations quantify the degree to which a model respects taxonomic relationships? To answer these questions, we fit SAEs to every intermediate activation of DINOv2 model with respect to the ImageNet dataset and examine how the learned sparse features correspond to hierarchical category relationships. Our results indicate, 1) that DINOv2 does not encode information into the class token in early layers, and 2) SAEs recover a meaningful decomposition of representations in later layers, with extracted features reflecting ImageNet’s taxonomic structure. Our contributions are as follows: 1. We introduce SAEs as a tool for analyzing hierarchical structure in vision models. 2. We establish a framework and metrics for quantifying hierarchical consistency. 3. We present an empirical study on the extent to which deep vision models encode the ImageNet taxonomy, revealing hierarchical representation in later layers. 2 Background Sparse Autoencoders While there are many type of SAEs recently proposed Cunningham et al. 2023 ; Gao et al. 2024 ; Rajamanoharan et al. 2024 , in this work we focus on the simplest model: the ReLU SAE. The ReLU SAE follows a straight forward setup. Given an input vector x\in\mathbb{R}^{n} from the model representation space, the encoder and decoder are defined as: \displaystyle z \displaystyle=\text{ReLU}(W_{\text{enc}}x+b_{\text{enc}}) (1) \displaystyle\hat{x} \displaystyle=W_{\text{dec}}z+b_{\text{dec}} (2) where W_{\text{enc}}\in\mathbb{R}^{n\times d} , b_{\text{enc}}\in\mathbb{R}^{n} , W_{\text{dec}}\in\mathbb{R}^{d\times n} , and b_{\text{dec}}\in\mathbb{R}^{d} . The loss function consists of reconstruction error and an L_{1} sparsity penalty: L=\|x-\hat{x}\|^{2}_{2}+\lambda\|z\|_{1}. (3) Using both a large hidden size d and an L_{1} sparsity penalty, SAEs learn more monosemantic representations Olah et al. 2020 , where each neuron encodes a single concept. Related Work Bilal et al. 2017 developed an interface to probe if convolutional encoders learned the ImageNet class hierarchy. Prior work has even attempted to train vision models directly on class hierarchies ( Xia et al. 2023 ) . SAE’s have been used to probe for hierarchical features in language models ( Li et al. 2024 ) , but have not been explored for visual hierarchies. However, SAEs have been shown to localize salient features when trained on vision models Fry 2024 . SAEs have also been used to steer diffusion models Daujotas 2024 towards learned attributes. Finally, Stevens et al. 2025 studied SAEs trained on the patch embeddings of image encoder models. In this work, we are the first to apply SAEs to analyze the ontological fidelity of the learned features of a vision foundation model with respect to the ImageNet class hierarchy. 3 Methods Image encoders, also known as visual foundation models are typically trained with self-supervised objective, and used to extract dense representations of visual inputs for other downstream tasks such as zero-shot image classification, object detection and captioning. In our experiments we study the state-of-the-art unsupervised model DINOv2, which features a broad set of general visual capabilities without fine-tuning. In this work, we test whether SAEs capture ontological features in vision encoders by identifying SAE heads that map to higher-order concepts. The ImageNet classes are drawn from the WordNet ontology, which relates these classes as a hierarchical tree of synsets . We identify SAE heads that activate on groups of ImageNet classes that belong to the same higher-level WordNet concept. In this section, we first describe how we design metrics that capture the hierarchical learning via SAEs, then we discuss the results of our experiments showing SAEs capture complex semantic structures within image encoder models. 3.1 Datasets ImageNet Deng et al. 2009 is a large-scale visual dataset with over 1 million labeled images spanning thousands of object categories, widely used for training and evaluating image classification models. We leverage the hierarchical structure of the ImageNet classes. The ImageNet-1k dataset contains 1000 classes, which are synsets in the WordNet ontology. The parents of a synset are hypernyms , and its children are hyponyms . For example, Pembroke Corgi is an ImageNet class, which is an hyponym of Corgi , which is in turn a hyponym of Dog . Dog is a hypernym of Corgi and Pembroke Corgi , and Corgi is a hypernym of Pembroke Corgi . 3.2 Hierarchical Metrics We are interested not only in SAE heads that activate on the 1000 leaf-level classes, but also the extent to which SAE heads that activate on multiple classes are capturing higher levels in the ImageNet concept hierarchy. To measure this, we construct two metrics, which

Read the complete text