TL;DR
This paper proposes a new way to generate counterfactual explanations by treating counterfactuals and their references as jointly sampled from the underlying data distribution, rather than independent draws. This novel framing leads to a distance metric that produces more semantically meaningful and in-distribution counterfactuals, addressing a key limitation of existing methods.
What Problem Does This Paper Address?
Counterfactual explanations are a popular tool for explaining machine learning model decisions. They work by finding a slightly modified input (the counterfactual) that would lead to a different, desired outcome. However, many existing methods generate counterfactuals that are essentially adversarial perturbations, meaning they are far from the original data distribution and may not be truly representative or actionable. This can happen because these methods often treat the counterfactual as an independent sample from a region around the reference point, ignoring the underlying data distribution. The authors aim to bridge this gap by developing a method that generates counterfactuals that are more faithful to the true data distribution, leading to more plausible and useful explanations.
Methods
The core contribution of this paper is a new probabilistic graphical model (PGM) for counterfactual generation. Instead of assuming counterfactuals are independent draws from a region around a reference point, they propose a joint distribution over the reference ($x$) and the counterfactual ($x'$). This joint distribution is parameterized by a covariance matrix that allows for explicit control over the similarity between the reference and the counterfactual, and importantly, ensures that counterfactuals are sampled from the underlying data distribution.
This new framing leads to a specialized distance metric that can be incorporated into existing counterfactual generation frameworks. The authors also extend their approach to handle actionability constraints, such as immutable features, by adjusting the covariance matrix. For complex models like neural networks, they propose placing the prior on a latent space and using a decoder to map back to the input space.
Datasets
The authors evaluate their approach on several datasets:
- Fashion MNIST: Used for generating counterfactual images of clothing items.
- MNIST: Used for generating counterfactual handwritten digits.
- Adult: A tabular dataset used for evaluating explanations in a social context.
- German Credit: A tabular dataset used for evaluating explanations in a financial context.
- LUCAS: A synthetic binary dataset used for investigating causal dependencies.
- Kaggle Dogs vs Cats: A subset used for generating counterfactual images of animals.
They also utilize the CARLA benchmarking tool for quantitative evaluations.
Key Insights and Ideas
- Counterfactuals as Joint Samples: The most significant insight is reframing counterfactual generation as sampling from a joint distribution of the reference and counterfactual, rather than independent draws. This inherently ties counterfactuals to the underlying data distribution.
- In-Distribution Counterfactuals: By modeling the joint distribution, the authors ensure that generated counterfactuals are more likely to reside within the regions of the data distribution that are representative of the desired class.
- Controlling Similarity: The proposed framework allows for explicit control over the similarity between the reference and the counterfactual through a parameter ($\alpha$), enabling a trade-off between fidelity to the reference and adherence to the desired outcome.
- Semantically Meaningful Changes: In image generation tasks, their approach leads to counterfactuals that exhibit more semantically meaningful changes, following the contours and structure of the object, rather than introducing adversarial noise.
- Human Preferences: A user study revealed that participants often prefer explanations that are more detailed and provide a wider range of actionable changes, sometimes even favoring explanations that are further from the reference if they are perceived as more informative.
Key Results
- Quantitative Evaluation: Their approach, when integrated with existing methods, consistently increased the "yNN" metric (proportion of nearest neighbors with the desired label), indicating that counterfactuals are more representative of the ground truth data. While this sometimes came at the cost of increased Euclidean distance to the reference, the trade-off was deemed acceptable.
- Image Generation: In qualitative evaluations on MNIST and Dog/Cat datasets, their method produced counterfactual images that were more semantically coherent and visually plausible compared to L2 distance-based methods, avoiding class mixing and adversarial noise.
- User Study: While no single method was universally preferred, participants showed a tendency to favor explanations that were more detailed and actionable, with a slight preference for their method in some contexts.
Limitations and Future Work
- Gaussian Assumption: The paper primarily focuses on Gaussian distributions for tractability. While they discuss extensions to complex models, the core framework relies on Gaussian assumptions, which may not always hold for real-world data.
- Laplace Approximation for Complex Models: For complex models, the use of Laplace approximation to obtain Gaussian posteriors can lead to local optima, potentially affecting the quality of counterfactuals.
- Subjective Preferences: The user study highlighted that human preferences for explanations are subjective and can depend on individual cost perceptions and understanding of causal relationships. Future work could explore more fine-grained hypotheses on usability conditions and account for explainees' subjective mental models.
- Application-Specific Evaluations: The authors emphasize the need for contextualized, application-specific evaluations to fully understand human perception of explanations.
Summary updated