NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

From colors to classes: Emergence of concepts in vision transformers

Teresa Dorszewski, Lenka Tětková, Robert Jenssen, Lars Kai Hansen, Kristoffer Knutsen Wickstrøm · DOI

Abstract

Vision Transformers (ViTs) possess the architectural capacity for global image processing from their initial layers. This study investigates whether ViTs utilize this freedom or adhere to a hierarchical feature extraction process similar to Convolutional Neural Networks (CNNs). By employing neuron labeling and semantic categorization, we demonstrate that ViTs evolve from detecting simple colors and textures in early layers to identifying complex objects in later stages. This hierarchical emergence is a consistent feature across various pretraining regimes and is significantly reshaped during task-specific finetuning.

Introduction

For years, the "black box" of Convolutional Neural Networks (CNNs) has been understood through their physical constraints: because they process small image patches, they naturally learn simple edges before complex shapes. Vision Transformers (ViTs), however, utilize self-attention mechanisms that can process global dependencies from the very first layer. Theoretically, a ViT could learn to recognize a complex object like a "dog" in Layer 1.

This research investigates whether ViTs actually utilize this architectural freedom or if they follow a hierarchical path regardless. Understanding this layer-wise emergence of concepts is critical for identifying model biases, spotting "shortcuts" where a model relies on spurious features, and improving transfer learning strategies.

Methods

The study employs a multi-step interpretability pipeline to analyze neurons within several state-of-the-art ViTs:

  • Neuron Labeling (CLIP-Dissect): This core technique uses a pre-trained CLIP model to identify the best text-based description (e.g., "striped," "blue," "water") for the visual stimuli that activate specific neurons.
  • Adaptive Thresholding: To filter out "noisy" neurons, a mean-thresholding strategy was used, focusing only on neurons with high similarity scores to their assigned labels.
  • Complexity Scoring (ICNet): Visual complexity was mathematically quantified using ICNet to move beyond subjective labeling.
  • Semantic Categorization: Over 1,400 unique neuron labels were mapped into broad categories (Colors, Textures, Objects, Activities, etc.) using Large Language Models (GPT-4 and Copilot) followed by manual verification.

The analysis utilized the ImageNet validation set and Broden (~113k images) for probing. Models were also finetuned on specialized datasets like CUB-200-2011 (birds) and bloodMNIST (microscopic cells) to observe concept shifts.

Key Insights and Results

The analysis reveals that hierarchy in ViTs is a functional choice rather than a structural constraint. Despite their global receptive fields, ViTs consistently dedicate early layers to low-level features.

Layer-wise Evolution

In the first layer, nearly 50% of neurons are dedicated to color concepts. As information flows through the network, the proportion of color-detecting neurons drops to near zero, while "Objects and Machines" and "Natural Elements" become dominant. This transition is accompanied by a steady, linear increase in image complexity as measured by ICNet scores.

Proportion of semantic concepts across the layers of a Vision Transformer, illustrating the transition from low-level features like colors to high-level objects.

Specialization and Pretraining

Early layers exhibit high redundancy, with many neurons mapping to basic color concepts. Deeper layers show an increase in unique concepts, reflecting a more diverse and specialized internal vocabulary. Furthermore, pretraining objectives leave a distinct "fingerprint" on the model's internal representations. For instance, CLIP-based ViTs dedicate more neurons to "activities" due to their training on natural language captions, while DINOv2 (self-supervised) tends to develop more "mono-semantic" neurons with clearer, more specific functions.

The Impact of Finetuning

Finetuning for specific tasks acts as a form of "concept pruning." When a model is specialized (e.g., for blood cell classification), it reallocates neurons from irrelevant concepts like "buildings" or "animals" toward task-relevant features. This process generally reduces the total number of unique concepts in later layers as the model focuses its representational capacity.

Discussion and Limitations

While the mean-thresholding approach is robust, it may suppress interpretable neurons in layers where the model is less certain. Additionally, semantic categorization remains partially subjective, as labels can be context-dependent. Future work should explore automated concept discovery without predefined lists and investigate "polysemantic" neurons that encode multiple concepts simultaneously. This research provides a foundation for more concept-aware model debugging and editing in the field of computer vision.

Summary updated

BibTeX
@inproceedings{dorszewski2025from,
  author = {Teresa Dorszewski and Lenka Tětková and Robert Jenssen and Lars Kai Hansen and Kristoffer Knutsen Wickstrøm},
  title = {{From colors to classes: Emergence of concepts in vision transformers}},
  booktitle = {xAI},
  year = {2025},
  doi = {10.1007/978-3-032-08317-3\_2},
}
Figure