Beyond Trivial Counterfactual Explanations with Diverse Valuable Explanations

Pau Rodríguez, Massimo Caccia, Alexandre Lacoste, Lee Zamparo, Issam H. Laradji, Laurent Charlin, David Vázquez

Introduction

Counterfactual explanations are a cornerstone of explainable AI (XAI), providing answers to "what-if" scenarios: “What would have to change about this input to change the model’s decision?” However, many existing methods produce "trivial" explanations. For instance, if a model fails to detect a smile, a trivial counterfactual might simply exaggerate the mouth area. Such explanations offer little insight into underlying model biases or spurious correlations. This paper introduces DiVE (Diverse Valuable Explanations), a method designed to uncover non-trivial, valuable explanations that help engineers debug and improve their models.

Problem Statement

Current counterfactual generation methods face two primary challenges:

  1. Triviality: Explanations often focus on the target attribute itself. If a "not smiling" classification is questioned, adding a smile is a trivial fix that doesn't explain why the original image was misclassified (e.g., due to occlusions like sunglasses).
  2. Lack of Diversity: Many methods yield single or nearly identical explanations. Effective model debugging requires seeing multiple distinct ways a prediction can be altered.

A "valuable" explanation must be valid, proximal to the original input, sparse, and non-trivial.

Methodology: The DiVE Framework

DiVE employs a two-stage approach to generate diverse and meaningful counterfactuals.

1. Learning a Disentangled Latent Space

The framework utilizes a $\beta$-TCVAE (Total Correlation Variational Autoencoder) to map inputs into a latent space where different dimensions represent independent semantic concepts (e.g., hair color, presence of glasses). This disentanglement is crucial for achieving sparse explanations that change only specific attributes.

2. Optimizing for Diverse Perturbations

DiVE searches for perturbations ($\epsilon$) in the latent space that flip the classifier's output. To avoid triviality, the method uses Fisher Information Masking. By calculating the Fisher Information Matrix (FIM) of the latent space with respect to the classifier, DiVE identifies dimensions the model is most sensitive to—typically the trivial ones. These dimensions are masked, forcing the optimizer to find alternative latent factors that influence the decision.

DiVE architecture and the effect of Fisher Information masking to avoid trivial counterfactuals.

To ensure diversity, a diversity-enforcing loss encourages the generated counterfactuals to point in orthogonal directions within the latent space.

Experimental Setup

The authors evaluated DiVE on several datasets:

  • CelebA: A large-scale face dataset used to test attribute-based explanations.
  • Synbols: A synthetic dataset used to evaluate performance on out-of-distribution (OOD) data and controlled biases.
  • Valuable Explanation Benchmark: A new benchmark using a VGGFace2-based oracle to verify if counterfactuals successfully identify confounding attributes.

Key Results

DiVE demonstrates significant improvements over baseline methods like Progressive Exaggeration (PE) and xGEM.

  • Success and Quality: On CelebA, DiVE achieved higher rates of valuable explanations and superior image realism (FID of 33.8 vs. 53.4 for PE).
  • Identity Preservation: DiVE maintained subject identity with 97.3% accuracy, compared to 85.3% for PE.
  • Bias Detection: In a controlled experiment where a model was biased to associate "Male" with "Not Smiling," DiVE successfully uncovered this bias by generating counterfactuals that changed gender to alter the smile prediction.
Quantitative comparison of DiVE variants against xGEM+ on the CelebA dataset, showing embedding similarity vs. success rate.

Conclusion and Future Work

DiVE provides a robust framework for generating non-trivial counterfactuals by leveraging disentangled representations and Fisher Information masking. While highly effective for image data, its performance is tied to the quality of latent disentanglement. Future research could explore extending this framework to tabular or discrete data types.

Summary updated

BibTeX
@inproceedings{rodriguez2021beyond,
  author = {Pau Rodríguez and Massimo Caccia and Alexandre Lacoste and Lee Zamparo and Issam H. Laradji and Laurent Charlin and David Vázquez},
  title = {{Beyond Trivial Counterfactual Explanations with Diverse Valuable Explanations}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2021},
  doi = {10.1109/iccv48922.2021.00109},
}
Figure