Analyzing Hierarchical Structure in Vision Models with Sparse Autoencoders

Matthew Lyle Olson, Musashi Hinck, Neale Ratzlaff, Changbai Li, Phillip Howard, Vasudev Lal, Shao-Yen Tseng

Abstract

Deep neural networks are often criticized as "black boxes" regarding their internal conceptual representations. This study utilizes Sparse Autoencoders (SAEs) to interpret the DINOv2 vision foundation model, revealing an internal organization of visual concepts that mirrors the ImageNet taxonomy. By introducing metrics such as Lowest Common Hypernym (LCH) Height and Ontological Coverage, we demonstrate that DINOv2 naturally learns hierarchical structures. Our findings show that while early layers are relatively "empty," later layers develop sophisticated, disentangled features representing broad categories like "whales" or "warships," aligning unsupervised visual learning with human-defined ontologies.

Introduction

Understanding how vision models represent the relationship between objects—such as recognizing that both a Corgi and a Golden Retriever are "Dogs"—is a central challenge in model interpretability. While Sparse Autoencoders (SAEs) have successfully identified "monosemantic" features in Large Language Models (LLMs), their application to vision models has been limited. This research investigates whether vision models naturally learn hierarchical structures (e.g., WordNet) and whether SAEs can extract this internal "ontology."

Methods

The researchers focused on DINOv2, a state-of-the-art unsupervised vision foundation model, training 40 ReLU-based SAEs—one for each layer—targeting the activations of the "class token." To quantify hierarchical capture, two novel metrics based on the WordNet hierarchy were introduced:

  1. Lowest Common Hypernym (LCH) Height: Measures the average taxonomic distance between active classes and their nearest shared ancestor.
  2. Ontological Coverage: Measures the proportion of a taxonomic branch (e.g., "all types of sharks") captured by a single SAE feature.

Visual grounding was further verified using Relevancy Maps to ensure features corresponded to actual visual objects rather than background noise.

Results

Information Pumping and the "Empty" Start

A surprising finding was that early layers of DINOv2’s class token contain almost no useful information, making them trivial for an SAE to reconstruct. Information is progressively "pumped" into the class token as processing continues. As shown in Figure 1, both classification accuracy and SAE feature complexity (measured by L0 and L1 metrics) spike significantly in the final third of the model.

Figure 1: Validation accuracy and SAE metrics (MSE, L0, L1) across DINOv2 layers, showing the late-stage spike in information density.

Emergent Taxonomy

In later layers, SAEs identify features for higher-order concepts rather than just specific objects. At Layer 24, the model utilizes only 209 active SAE heads. By Layer 36, this expands to 9,484 active heads. Figure 2 illustrates how these features evolve to cover broader taxonomic categories, with some neurons perfectly capturing entire branches of the ImageNet tree (e.g., elasmobranch or warships).

Figure 2: Distribution of SAE features by Ontological Coverage and LCH Height across layers 24, 28, 32, and 36, demonstrating the emergence of hierarchical concepts.

Discussion and Future Work

This study demonstrates that unsupervised models like DINOv2 naturally organize internal representations to respect hierarchical relationships found in human language and biology. However, limitations remain: the study is restricted to a single architecture and the ImageNet/WordNet taxonomy. Future research may explore model editing—such as "turning off" specific high-level features—to further validate the functional role of these emergent hierarchies.

Summary updated

BibTeX
@inproceedings{olson2025analyzing,
  author = {Matthew Lyle Olson and Musashi Hinck and Neale Ratzlaff and Changbai Li and Phillip Howard and Vasudev Lal and Shao-Yen Tseng},
  title = {{Analyzing Hierarchical Structure in Vision Models with Sparse Autoencoders}},
  booktitle = {Workshops @ CVPR},
  year = {2025},
}
Figure