On Background Bias of Post-Hoc Concept Embeddings in Computer Vision DNNs

Gesina Schwalbe, Georgii Mikriukov, Edgar Heinert, Stavros Gerolymatos, Mert Keser, Alois Knoll, Matthias Rottmann, Annika Mütze · DOI

Abstract

Post-hoc concept embeddings (CEs) are popular tools for explaining the internal logic of deep neural networks (DNNs) by identifying vectors in latent space that correspond to human-understandable concepts. However, these explanations often suffer from a hidden flaw: they may rely on background shortcuts rather than the concepts themselves. This study demonstrates that standard Concept-based Explainable AI (C-XAI) methods, such as Net2Vec, are heavily biased by backgrounds—for instance, failing to recognize animals when they appear on urban roads. By introducing low-cost background randomization, the authors provide a method to audit and mitigate these biases, leading to more robust and honest model explanations.

Introduction

Concept-based Explainable AI (C-XAI) aims to bridge the gap between "black-box" neural networks and human logic. Instead of analyzing raw pixels, these methods identify "concept embeddings" (CEs)—vectors in the model's latent space that represent ideas like "furry," "wheel," or "water."

However, a significant challenge arises: these CEs are often trained using data-driven, post-hoc techniques. If training data consistently depicts "cows" on "green grass," the resulting CE might learn to identify the grass rather than the cow—a manifestation of the "Clever Hans" effect. Relying on such biased CEs to audit models can provide a false sense of security, potentially masking dangerous failure modes, such as an autonomous vehicle's "pedestrian" concept being tied to sidewalk textures rather than the person.

Methods

The authors investigate two primary post-hoc concept segmentation frameworks: Net2Vec, a global approach that trains a linear classifier across an entire concept dataset, and LoCE (Local Concept Embeddings), which trains embeddings on individual images and aggregates them (GloCE).

The post-hoc concept embedding (CE) training pipeline, illustrating how activations from a specific DNN layer are used to predict concept masks.

To uncover and mitigate bias, the study employs Background Randomization. Foreground objects (the concepts) are extracted and pasted onto three types of randomized backgrounds:

  1. Places205: Real-world scenes (e.g., forests, kitchens).
  2. Voronoi Patching: A high-variability mosaic of different scenes, forcing the model to ignore any single background texture.
  3. Synthetic Generation: Artificial backgrounds generated via the Würstchen diffusion model using text prompts.

By comparing CEs trained on original ("vanilla") data versus randomized data, the researchers isolated the extent to which background information "leaks" into the concept representation.

Experimental Setup

The study utilized several benchmarks to evaluate over 50 concepts across 7 different DNN architectures, including CNNs (VGG16, ResNet50) and Transformers (ViT, SWIN):

  • Foregrounds: Pascal VOC and ImageNetS50 (50 classes with high-quality segmentation masks).
  • Backgrounds: A subset of Places205, clustered into 10 supercategories (e.g., "road," "water," "indoors").

Key Results and Insights

The investigation yielded several critical findings regarding the reliability of C-XAI:

  • The "Road" Blind Spot: Concepts for wild animals (e.g., foxes, boars) showed significant performance drops in Intersection over Union (IoU) when placed on "road" or "architecture" backgrounds compared to natural vegetation. This suggests that current C-XAI tools may systematically underestimate model failure risks in urban environments.
  • XAI Auditing: The paper demonstrates that the explanation method itself can be biased by the data used to create it, independent of the underlying DNN's logic.
  • Intrinsic vs. Extrinsic Bias: Background randomization allowed the authors to distinguish between bias originating from training data (extrinsic) and bias inherent to the DNN’s internal representations (intrinsic).
  • Robustness Gains: CEs trained on randomized backgrounds outperformed vanilla CEs on mixed test sets, showing a higher focus on the foreground object and less distraction from surrounding context.
  • Layer Depth and Efficiency: Later DNN layers generally provided more robust concept embeddings. Furthermore, an ablation study showed that a single round of background replacement at a late layer provides most of the necessary insights for bias detection.

Conclusion and Future Work

While background randomization is effective, the authors note that Label Noise remains a limitation; real-world background images may accidentally contain the concept being trained (e.g., a "chair" in a "living room" background).

Future research will focus on using these insights to actively "fix" biased DNNs, comparing the full distribution of concept manifestations in latent space, and expanding testing to domains like medical imaging where background context is a known source of bias.

Summary updated

BibTeX
@inproceedings{schwalbe2025background,
  author = {Gesina Schwalbe and Georgii Mikriukov and Edgar Heinert and Stavros Gerolymatos and Mert Keser and Alois Knoll and Matthias Rottmann and Annika Mütze},
  title = {{On Background Bias of Post-Hoc Concept Embeddings in Computer Vision DNNs}},
  booktitle = {xAI},
  year = {2025},
  doi = {10.1007/978-3-032-08330-2\_3},
}
Figure