Explaining Classifiers with Causal Concept Effect (CaCE)

Yash Goyal, Uri Shalit, Been KimarXiv 2019

Introduction

Deep neural networks are often criticized as "black boxes" because their internal logic is difficult to interpret. Traditional explainable AI (XAI) tools, such as Testing with Concept Activation Vectors (TCAV), identify high-level concepts that are correlated with a model's prediction. However, correlation can be misleading. If a dataset frequently pairs "bicycles" with "cars," a standard XAI tool might incorrectly suggest the model requires the presence of a car to identify a bicycle. To address this, we introduce the Causal Concept Effect (CaCE), a framework designed to measure the true causal impact of specific concepts on classifier decisions.

The CaCE Framework

CaCE moves beyond observational data by applying Judea Pearl’s do-operator to model explanations. The goal is to perform "what-if" experiments: if we keep all other factors constant but intervene on a single concept $X$, how does the classifier's output change?

Causal graph representing the relationship between concepts, images, and classifier output.

The framework assumes a causal structure where latent factors generate both high-level concepts and the final image. By intervening on these concepts, CaCE isolates their individual effects, distinguishing them from confounded features that are merely "along for the ride" due to dataset bias.

Counterfactual Generation via VAEs

Since performing physical interventions on real-world scenes is often impossible, CaCE leverages Conditional Variational AutoEncoders (CVAEs) to "imagine" counterfactual scenarios. The authors propose two primary methods for generating these image pairs:

  1. Dec-CaCE: This method samples a latent representation ($z$) and uses the VAE's decoder to generate a pair of images—one with the target concept and one without—while keeping $z$ identical.
  2. EncDec-CaCE: This approach takes a real image, encodes it into a latent space, and then uses the decoder to "flip" the specific concept bit. This allows for the analysis of how a classifier reacts to a counterfactual version of a specific, existing instance.
The EncDec-CaCE pipeline using a VAE to generate counterfactual images by intervening on concept bits.

The final CaCE metric is calculated as the average difference in classifier prediction scores across these generated counterfactual pairs.

Experimental Evaluation

The effectiveness of CaCE was tested across several datasets, ranging from synthetic tests to real-world images:

  • BARS & Colored-MNIST: In these synthetic environments where concepts (like color) were artificially confounded with labels, CaCE accurately identified zero causal effect for irrelevant features. In contrast, correlation-based methods like TCAV overestimated importance by 3-5x.
  • COCO-Miniplaces: CaCE correctly determined that irrelevant objects (e.g., a dog in a bathroom) did not drive the scene classification, despite high training-set correlation.
  • CelebA: Real-world facial images were used to evaluate naturally occurring confounders, such as the relationship between gender and eyeglasses. CaCE matched results from more complex image-to-image translation models like StarGAN.

To ensure reliability, the authors introduced diagnostic "sanity checks": a Positive Effect test (intervening on the actual class label should yield high CaCE) and a Null Effect test (intervening on a dummy concept should yield zero CaCE).

Conclusion

CaCE provides a robust alternative to correlation-based XAI by enabling causal interventions through generative modeling. While its performance is tied to the quality and disentanglement capabilities of the underlying VAE, it offers a significant step toward more reliable and diagnostic AI explanations. Future work may involve utilizing more advanced architectures, such as Diffusion Models, to further improve the quality and realism of counterfactual generations.

Summary updated

BibTeX
@misc{goyal2019explaining,
  author = {Yash Goyal and Uri Shalit and Been Kim},
  title = {{Explaining Classifiers with Causal Concept Effect (CaCE)}},
  year = {2019},
  eprint = {1907.07165},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1907.07165},
}
Figure