Beyond Scalars: Concept-Based Alignment Analysis in Vision Transformers

Johanna Vielhaben, Dilyara Bareeva, Jim Berend, Wojciech Samek, Nils Strodthoff

TL;DR

Traditional metrics for comparing neural network representations typically yield a single scalar value, hiding the fine-grained details of what the models actually learned. This paper introduces Concept-Based Alignment (CBA), a method that models learned features as non-linear manifolds to provide a concept-by-concept comparison between models. Applying this to Vision Transformers reveals a surprising insight: highly supervised models actually exhibit less semantically organized representations in their final layers compared to self-supervised ones.

The Problem: Beyond Scalar Similarities

We currently have a massive "zoo" of pre-trained Vision Transformers (ViTs) trained under entirely different paradigms—fully supervised, contrastive (CLIP), or self-supervised (DINO, MAE). Practitioners need to understand how the internal representations of these models differ to choose the right backbone for downstream tasks.

Historically, researchers have used tools like Centered Kernel Alignment (CKA) to measure representational similarity. However, CKA only provides a single scalar value (e.g., "Model A and Model B are 85% similar"). This obscures the finer details: Which specific concepts align? Which are unique? How are these concepts spatially organized? Furthermore, previous attempts to extract "concepts" from networks usually assume concepts are linear directions in the feature space—an assumption that is likely too rigid for the complex geometry of modern deep learning models.

Methods: Concept Discovery and Alignment

To look under the hood, the authors combine concept discovery with alignment analysis:

Concept-Based Alignment Pipeline
  1. Non-Linear Concept Discovery (NLMCD): Instead of assuming concepts are linear vectors, the authors define them as non-linear manifolds. They extract hidden layer activations and use UMAP to reduce dimensionality while preserving local and global structures. Then, they apply HDBSCAN (a density-based clustering algorithm) to find clusters. This results in a "fuzzy" clustering, where every feature vector has a probability score of belonging to various concept manifolds.
  2. Concept-Based Alignment (CBA): To compare two layers or two different models, the authors compare their fuzzy clusterings using a generalized Rand index (a metric for comparing partitions).
  3. Concept Atlases: Because CBA is built on individual clusters, the overall alignment score can be decomposed into pairwise distances between specific concepts (e.g., comparing a "dog" concept in Model A to a "fur" concept in Model B), which the authors visualize as 2D "concept atlases."

Experimental Setup

The authors evaluated four ViT-Base models (patch size 16, input 224) with different training objectives: FS (Fully Supervised classification), CLIP (image-text contrastive), DINO (self-supervised view consistency), and MAE (self-supervised masked autoencoding). They used a stratified 25% subset of the ImageNet-1k training set to extract feature activations.

Key Insights and Ideas

  • Non-linear concepts are more faithful: Treating concepts as non-linear manifolds captures the geometry of the feature space much better than linear baselines (like PCA) or simple spherical clustering (KMeans). It results in more coherent and semantically consistent concept groupings.
  • Supervision reduces semantic organization: Counterintuitively, the fully supervised model (FS) is less semantically organized in its final layers than self-supervised models. Self-supervised models naturally group semantically related concepts (like "canines" or "human body parts") close together. Supervised training, however, actively pushes similar concepts apart to avoid classification confusion, optimizing for task accuracy at the cost of broader semantic structure.
Semantic Organization Across Models
  • The "Nucleation" Process: The fully supervised model undergoes a sudden, sharp transformation in its representations between layers 9 and 10—a "nucleation" process where distinct class-specific concepts suddenly crystallize. In contrast, self-supervised models evolve their representations much more smoothly across layers.
  • Shared foundations, divergent specializations: Across all four models, the early layers are highly aligned, indicating that basic foundational visual features are learned similarly regardless of the training objective. The models only diverge in later layers as they specialize for their specific pre-training tasks.

Key Results

  • Sanity Check: The authors tested if their alignment metric correctly identifies that adjacent network layers are more similar than distant ones. NLMCD consistently outperformed linear methods, achieving weighted Kendall's Tau correlation scores up to 0.98.
  • Inter-model Alignment: DINO and MAE (both self-supervised) showed much higher alignment with each other than with CLIP or the fully supervised model.
  • Granular differences: When comparing MAE and DINO at layer 10, the concept-level breakdown revealed that 62% of MAE's concepts mapped to just 3 "singular" concepts in DINO. These singular concepts were characterized by a shared lack of activation, highlighting how models can handle "background" or inactive features very differently.

Limitations and Future Work

  • Computational Bottlenecks: HDBSCAN clustering and the CBA metric are computationally heavy. The authors had to heavily subsample the data (using only 25% of ImageNet and subsampling feature vectors) to make the experiments feasible.
  • Undersampling: Because of the computational limits on sampling, rare concepts might not have enough data points to form a dense cluster, causing HDBSCAN to mistakenly label them as noise.
  • Dataset Bias: The discovered concepts are inherently limited by ImageNet's variability. If a specific color only appears on a specific object in the dataset, the model (and the clustering algorithm) might conflate the color concept with the object concept.

Summary updated

BibTeX
@inproceedings{vielhaben2025beyond,
  author = {Johanna Vielhaben and Dilyara Bareeva and Jim Berend and Wojciech Samek and Nils Strodthoff},
  title = {{Beyond Scalars: Concept-Based Alignment Analysis in Vision Transformers}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=l1DDTSqFq7},
}
Figure