Table of Contents
Fetching ...

Local Concept Embeddings for Analysis of Concept Distributions in Vision DNN Feature Spaces

Georgii Mikriukov, Gesina Schwalbe, Korinna Bade

TL;DR

This work introduces Local Concept Embeddings (LoCEs) to capture the distribution of concept representations in vision DNN latent spaces, moving beyond traditional single-vector concept embeddings. By computing per-image LoCEs and analyzing their multi-modal distributions with hierarchical clustering and UMAP-GMM, the authors unveil sub-concepts, concept confusion, and concept-level outliers. LoCEs enable new debugging and retrieval applications, including sub-concept discovery, quantifying concept separation, and context-aware image retrieval, while maintaining competitive concept segmentation performance. Across MS COCO, PASCAL VOC, and Capybara, LoCEs reveal that concept representations are complex and context-dependent, highlighting limitations of global C-XAI baselines and offering a principled framework for distribution-focused explainability. The work lays a foundation for using LoCEs to diagnose model behavior, guide data improvements, and inform architectural design, with future directions including multi-layer analyses and backbone diversification.

Abstract

Insights into the learned latent representations are imperative for verifying deep neural networks (DNNs) in critical computer vision (CV) tasks. Therefore, state-of-the-art supervised Concept-based eXplainable Artificial Intelligence (C-XAI) methods associate user-defined concepts like ``car'' each with a single vector in the DNN latent space (concept embedding vector). In the case of concept segmentation, these linearly separate between activation map pixels belonging to a concept and those belonging to background. Existing methods for concept segmentation, however, fall short of capturing implicitly learned sub-concepts (e.g., the DNN might split car into ``proximate car'' and ``distant car''), and overlap of user-defined concepts (e.g., between ``bus'' and ``truck''). In other words, they do not capture the full distribution of concept representatives in latent space. For the first time, this work shows that these simplifications are frequently broken and that distribution information can be particularly useful for understanding DNN-learned notions of sub-concepts, concept confusion, and concept outliers. To allow exploration of learned concept distributions, we propose a novel local concept analysis framework. Instead of optimizing a single global concept vector on the complete dataset, it generates a local concept embedding (LoCE) vector for each individual sample. We use the distribution formed by LoCEs to explore the latent concept distribution by fitting Gaussian mixture models (GMMs), hierarchical clustering, and concept-level information retrieval and outlier detection. Despite its context sensitivity, our method's concept segmentation performance is competitive to global baselines. Analysis results are obtained on three datasets and six diverse vision DNN architectures, including vision transformers (ViTs).

Local Concept Embeddings for Analysis of Concept Distributions in Vision DNN Feature Spaces

TL;DR

This work introduces Local Concept Embeddings (LoCEs) to capture the distribution of concept representations in vision DNN latent spaces, moving beyond traditional single-vector concept embeddings. By computing per-image LoCEs and analyzing their multi-modal distributions with hierarchical clustering and UMAP-GMM, the authors unveil sub-concepts, concept confusion, and concept-level outliers. LoCEs enable new debugging and retrieval applications, including sub-concept discovery, quantifying concept separation, and context-aware image retrieval, while maintaining competitive concept segmentation performance. Across MS COCO, PASCAL VOC, and Capybara, LoCEs reveal that concept representations are complex and context-dependent, highlighting limitations of global C-XAI baselines and offering a principled framework for distribution-focused explainability. The work lays a foundation for using LoCEs to diagnose model behavior, guide data improvements, and inform architectural design, with future directions including multi-layer analyses and backbone diversification.

Abstract

Insights into the learned latent representations are imperative for verifying deep neural networks (DNNs) in critical computer vision (CV) tasks. Therefore, state-of-the-art supervised Concept-based eXplainable Artificial Intelligence (C-XAI) methods associate user-defined concepts like ``car'' each with a single vector in the DNN latent space (concept embedding vector). In the case of concept segmentation, these linearly separate between activation map pixels belonging to a concept and those belonging to background. Existing methods for concept segmentation, however, fall short of capturing implicitly learned sub-concepts (e.g., the DNN might split car into ``proximate car'' and ``distant car''), and overlap of user-defined concepts (e.g., between ``bus'' and ``truck''). In other words, they do not capture the full distribution of concept representatives in latent space. For the first time, this work shows that these simplifications are frequently broken and that distribution information can be particularly useful for understanding DNN-learned notions of sub-concepts, concept confusion, and concept outliers. To allow exploration of learned concept distributions, we propose a novel local concept analysis framework. Instead of optimizing a single global concept vector on the complete dataset, it generates a local concept embedding (LoCE) vector for each individual sample. We use the distribution formed by LoCEs to explore the latent concept distribution by fitting Gaussian mixture models (GMMs), hierarchical clustering, and concept-level information retrieval and outlier detection. Despite its context sensitivity, our method's concept segmentation performance is competitive to global baselines. Analysis results are obtained on three datasets and six diverse vision DNN architectures, including vision transformers (ViTs).
Paper Structure (70 sections, 18 equations, 30 figures, 11 tables, 1 algorithm)

This paper contains 70 sections, 18 equations, 30 figures, 11 tables, 1 algorithm.

Figures (30)

  • Figure 1: (left) LoCE optimization for an image-concept pair: LoCE $v$ represents the optimal convolutional filter weights that "project" Sample's $x$ Activations $f_{\to L}(x)$ from layer $L$ into the Concept Projection Mask $P(v;x)$, aiming to reconstruct the target Concept Segmentation $\mathbf{c}$ with minimal loss $\mathcal{L}(P(v;x), \mathbf{c})$. (right) Distribution of 2D UMAP-reduced LoCEs demonstrating the confusion of $\text{\small car}$, $\text{\small bus}$, and $\text{\small truck}$ concepts in model.encoder.layers.1 of DETR. Gaussian Multinomial Mixture (GMM) is fitted to LoCEs to highlight the structure. Additionally, some samples from GMM components 2 and 5 are demonstrated.
  • Figure 2: MS COCO & Capybara Dataset: Exemplary concept segmentation masks predicted by optimized image-local concept models for different trained DNNs and layers (columns), and different original input image and target concept segmentation mask (rows). Examples chosen randomly. Find more results in \ref{['fig:gcpv-optimization-results-2']}.
  • Figure 3: MS COCO & Capybara Dataset: Generalization of all tested concepts LoCEs in model.encoder.layers.1 of DETR: 2D UMAP-reduced LoCEs of every tested category (top-left), GMMs fitted for samples with regard to their labels (top-middle), GMMs fitted for all samples regardless of their labels (top-right), and LoCEs dendrogram with clusters identified with \ref{['alg:adaptive-clustering']} (bottom). Find similar visualizations for further models in \ref{['fig:gmm-dendrogram-efficientnet-f7', 'fig:gmm-dendrogram-swin-f7']} (MS COCO & Capybara Dataset) and \ref{['fig:gmm-dendrogram-detr-e1-voc', 'fig:gmm-dendrogram-efficientnet-f7-voc', 'fig:gmm-dendrogram-swin-f7-voc']} (PASCAL VOC).
  • Figure 4: MS COCO & Capybara Dataset: Top 10 retrieval results according to $L_2$-distance (columns) for random LoCE queries (black frame, leftmost column) of different categories in best model DETR (top) and worst model EfficientNet (bottom). Green frame - relevant sample. Red frame - irrelevant sample. Unique concepts are color-coded. Find similar visualizations for further models in \ref{['fig:retrieval-qualitative-extra1', 'fig:retrieval-qualitative-extra2']}.
  • Figure 5: MS COCO: Detected distance sub-concepts of $\text{\small car}$ (columns) in different networks (rows). Sub-concept segmentations were obtained by projecting activations with sub-concept cluster centroids ($\text{SGloCEs}$, \ref{['eq:generalization-centroid']}). Sub-concept clusters were discovered in LoCE dendrograms using manual thresholding in bold layers of \ref{['tab:layers']}. Find more results in \ref{['fig:subconcepts-extra']}
  • ...and 25 more figures

Theorems & Definitions (6)

  • Definition 2: Global and Sub-global LoCEs
  • Definition 3: Cluster Purity
  • Definition 4: Purity
  • Definition 5: Absolute Separation
  • Definition 6: Pairwise Separation
  • Definition 7: Cumulative $L_2$ Distance