Post-hoc Concept Disentanglement: From Correlated to Isolated Concept Representations

Eren Erogullari, Sebastian Lapuschkin, Wojciech Samek, Frederik Pahde

Abstract

Concept Activation Vectors (CAVs) are a popular tool for interpreting the internal representations of neural networks by mapping latent directions to human-understandable concepts. However, CAVs often suffer from "entanglement" when concepts co-occur in the training data, leading to overlapping vectors that fail to isolate specific features. This paper introduces a post-hoc method to disentangle these representations by incorporating an orthogonality penalty into the CAV training objective. By jointly optimizing concept vectors to be mutually orthogonal, the proposed method enables more precise model explanations, cleaner feature visualizations, and the ability to manipulate specific attributes in generative models without unintended side effects.

Introduction

Explainable AI (XAI) aims to bridge the gap between the mathematical operations of deep learning models and human reasoning. Concept Activation Vectors (CAVs) have emerged as a primary method for this, identifying directions in a model's latent space that correspond to semantic concepts like "color," "texture," or specific objects.

A significant hurdle in the practical application of CAVs is the presence of natural correlations within datasets. For example, in the CelebA dataset, the concepts of "beard" and "necktie" frequently co-occur. When CAVs are trained independently for each concept, the resulting vectors often point in similar directions. This entanglement prevents researchers from isolating the influence of a single concept, as "steering" a model toward one concept (e.g., adding a necktie) may inadvertently trigger another (e.g., adding a beard).

Methodology

To address this, the authors propose a novel post-hoc training objective that shifts from independent vector training to joint optimization with a focus on disentanglement.

The Orthogonality Loss

The core of the approach is the introduction of an orthogonality loss term ($L_{orth}$). This term is based on the squared Frobenius norm of the difference between the CAV cosine similarity matrix ($CC^\top$) and the identity matrix ($I_n$):

$$\|CC^\top - I_n\|_F^2$$

By minimizing this loss, the optimization process forces the concept vectors toward a 90-degree separation, ensuring they are as independent as possible within the latent space.

Balanced Optimization

The final objective function balances this new loss with the standard directional correctness objective (which ensures the vector actually represents the target concept) using a weighting parameter ($\alpha$). Additionally, a targeted version of the loss (using a parameter $\beta$) allows for the specific disentanglement of highly correlated pairs while leaving other concept relationships untouched.

Experimental Setup

The researchers evaluated the method across two distinct environments:

  1. CelebA: A real-world dataset containing over 200,000 celebrity images with 40 attribute annotations, characterized by natural correlations (e.g., "heavy makeup" and "lipstick").
  2. FunnyBirds: A synthetic dataset of bird classes where the authors could inject controlled, artificial correlations (e.g., a specific beak type appearing with a specific tail type 70% of the time) to rigorously test the method's limits.

Key Insights

Latent Space Capacity

A critical finding is that neural network latent spaces are typically high-dimensional ($m$) compared to the number of concepts being analyzed ($n$). Because $m \gg n$, there is sufficient "room" in the geometry of the latent space to find orthogonal directions that still accurately classify the intended concepts.

Joint Optimization vs. Independent Training

The research demonstrates that entanglement is not necessarily a flaw in the model's learned representations, but rather a limitation of how concepts are extracted. By training concepts together, the extraction process can account for correlations and actively push vectors apart, leading to more distinct representations.

Results

Disentanglement and Accuracy

The method achieved near-perfect orthogonality (scores approaching 1.0) across VGG16 and ResNet18 architectures. Interestingly, the authors observed an initial "boost" in concept classification accuracy (AUROC) when adding the orthogonality constraint, suggesting that forcing independence helps the optimizer find a more structured representation of the latent space.

Improved Interpretability and Steering

  • Cleaner Heatmaps: Using Layer-wise Relevance Propagation (LRP), the authors showed that disentangled CAVs produce heatmaps free of the "negative relevance" (bleeding) seen in baseline CAVs.
  • Precise Image Manipulation: In tasks using Diffusion Autoencoders, disentangled CAVs allowed for the insertion of specific attributes (like a "necktie") without the "collateral damage" of adding correlated features like eyeglasses or facial hair.
  • Shortcut Suppression: The method proved effective at identifying and removing "shortcuts" (e.g., digital timestamps) from a model's decision-making process without affecting other relevant features.

Conclusion and Future Work

While highly effective in high-dimensional layers, the method's performance may be constrained in narrower layers where space is limited. Future research directions include integrating this orthogonality loss directly into the initial training phase of neural networks to foster naturally interpretable latent spaces and developing semi-supervised versions to handle unlabeled concepts. This work represents a significant step toward more reliable and granular model explanations in complex, correlated environments.

Summary updated

BibTeX
@inproceedings{erogullari2025post,
  author = {Eren Erogullari and Sebastian Lapuschkin and Wojciech Samek and Frederik Pahde},
  title = {{Post-hoc Concept Disentanglement: From Correlated to Isolated Concept Representations}},
  booktitle = {xAI},
  year = {2025},
  doi = {10.1007/978-3-032-08317-3\_4},
}
Figure