Causal Generative Explainers using Counterfactual Inference: A Case Study on the Morpho-MNIST Dataset
Will Taylor-Melanson, Zahra Sadeghi, Stan Matwin
TL;DR
This work tackles the challenge of explaining image classifiers by leveraging causal deep generative models to produce counterfactual explanations on Morpho-MNIST. It introduces three explainer modalities: pixel-level SHAP with counterfactual attribute interventions, Monte Carlo attribute explanations in the CGM latent space, and gradient-based and model-agnostic counterfactuals that operate in the CGM attribute space. Through quantitative metrics (e.g., IM1, IM2, oracle scores) and visual comparisons, the authors demonstrate that CGM-based counterfactual explanations achieve higher interpretability than OmnixAI, and that attributes like thickness and slant are key drivers of classifier decisions. The approach yields actionable, human-interpretable insights into how causal visual features affect predictions and holds promise for applications such as handwriting legibility feedback and broader XAI on causal data, while outlining directions for more advanced regularization and interpolation techniques. $E(oldsymbol{x},oldsymbol{a})$ and $\boldsymbol{x}'(\boldsymbol{a}')$ are used to formalize counterfactual generation on Morpho-MNIST, and the methods are compatible with pretrained CGMs like DeepSCM and ImageCFGen.
Abstract
In this paper, we propose leveraging causal generative learning as an interpretable tool for explaining image classifiers. Specifically, we present a generative counterfactual inference approach to study the influence of visual features (i.e., pixels) as well as causal factors through generative learning. To this end, we first uncover the most influential pixels on a classifier's decision by varying the value of a causal attribute via counterfactual inference and computing both Shapely and contrastive explanations for counterfactual images with these different attribute values. We then establish a Monte-Carlo mechanism using the generator of a causal generative model in order to adapt Shapley explainers to produce feature importances for the human-interpretable attributes of a causal dataset in the case where a classifier has been trained exclusively on the images of the dataset. Finally, we present optimization methods for creating counterfactual explanations of classifiers by means of counterfactual inference, proposing straightforward approaches for both differentiable and arbitrary classifiers. We exploit the Morpho-MNIST causal dataset as a case study for exploring our proposed methods for generating counterfacutl explantions. We employ visual explanation methods from OmnixAI open source toolkit to compare them with our proposed methods. By employing quantitative metrics to measure the interpretability of counterfactual explanations, we find that our proposed methods of counterfactual explanation offer more interpretable explanations compared to those generated from OmnixAI. This finding suggests that our methods are well-suited for generating highly interpretable counterfactual explanations on causal datasets.
