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

Disentangled Explanations of Neural Network Predictions by Finding Relevant Subspaces

Pattarawat Chormai, Jan Herrmann, Klaus-Robert Müller, Grégoire Montavon

Abstract

Explainable AI aims to overcome the black-box nature of complex ML models like neural networks by generating explanations for their predictions. Explanations often take the form of a heatmap identifying input features (e.g. pixels) that are relevant to the model's decision. These explanations, however, entangle the potentially multiple factors that enter into the overall complex decision strategy. We propose to disentangle explanations by extracting at some intermediate layer of a neural network, subspaces that capture the multiple and distinct activation patterns (e.g. visual concepts) that are relevant to the prediction. To automatically extract these subspaces, we propose two new analyses, extending principles found in PCA or ICA to explanations. These novel analyses, which we call principal relevant component analysis (PRCA) and disentangled relevant subspace analysis (DRSA), maximize relevance instead of e.g. variance or kurtosis. This allows for a much stronger focus of the analysis on what the ML model actually uses for predicting, ignoring activations or concepts to which the model is invariant. Our approach is general enough to work alongside common attribution techniques such as Shapley Value, Integrated Gradients, or LRP. Our proposed methods show to be practically useful and compare favorably to the state of the art as demonstrated on benchmarks and three use cases.

Introduction: The Challenge of Entangled Explanations

Standard Explainable AI (XAI) techniques, such as Layer-wise Relevance Propagation (LRP) or Integrated Gradients, typically produce a single heatmap highlighting input features that contribute to a model's prediction. While useful, these heatmaps often suffer from entanglement: they combine multiple, distinct visual concepts into a single image. For instance, a heatmap for a "basketball" prediction might simultaneously highlight the players, the ball, and the court, making it difficult to discern the model's underlying sub-strategies or detect reliance on spurious correlations.

Proposed Methods: PRCA and DRSA

To address this, we propose inserting a virtual layer at an intermediate point in the neural network to perform subspace analysis. Unlike traditional dimensionality reduction techniques that focus on data distribution, our methods prioritize the model's decision logic.

  1. Principal Relevant Component Analysis (PRCA): While standard PCA extracts subspaces that maximize variance, PRCA extracts subspaces that maximize relevance to the model's prediction. By incorporating a "context vector" from attribution methods, PRCA ignores high-variance features that the model is invariant to.
  2. Disentangled Relevant Subspace Analysis (DRSA): Analogous to Independent Component Analysis (ICA), DRSA partitions the activation space into multiple independent subspaces by maximizing higher-order statistics of relevance scores. This forces the explanation to split into distinct semantic components.
Comparison of PCA and PRCA directions relative to model response and data variance.

The core insight is that Relevance ≠ Variance. As shown above, standard PCA aligns with the direction of maximum data spread, which may not align with the direction the model actually uses for its prediction. PRCA correctly identifies the relevant subspace by focusing on the model's response.

Key Results and Applications

Our methods were evaluated on datasets like ImageNet and Places365 using architectures such as VGG16 and ResNet18.

Visual Disentanglement

Qualitatively, DRSA successfully decomposes complex heatmaps into interpretable sub-strategies. In basketball images, it separates the court, jerseys, faces, and the ball into distinct subspaces, providing a much clearer view of the model's internal logic.

Visual disentanglement of basketball predictions using PRCA and DRSA.

Quantitative Performance and "Clever Hans" Mitigation

Using the "Area Under the Patch-Flipping Curve" (AUPC) metric, PRCA (5.36) significantly outperformed standard PCA (7.92) on VGG16. Furthermore, our approach excels at isolating spurious correlations. In a model trained to detect "cartons" by looking for Hanzi watermarks, DRSA isolated the watermark into a single subspace. By subtracting this subspace's contribution, we improved model accuracy on poisoned data by 3.6% without retraining.

Discussion and Future Work

While powerful, these are "white-box" methods requiring access to intermediate layers and weights. Future work includes applying these techniques to scientific domains like histopathology to help experts discover new insights, and exploring their use in model compression by pruning irrelevant subspaces identified through this analysis.

Summary updated

BibTeX
@article{chormai2024disentangled,
  author = {Pattarawat Chormai and Jan Herrmann and Klaus-Robert Müller and Grégoire Montavon},
  title = {{Disentangled Explanations of Neural Network Predictions by Finding Relevant Subspaces}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2024},
  url = {https://openreview.net/forum?id=4IiuhouPUY},
}
Figure