Generating Interpretable Counterfactual Explanations By Implicit Minimisation of Epistemic and Aleatoric Uncertainties

Lisa Schut, Oscar Key, Rory McGrath, Luca Costabello, Bogdan Sacaleanu, Medb Corcoran, Yarin Gal

Abstract

Counterfactual explanations (CEs) are a practical tool for demonstrating why machine learning classifiers make particular decisions. For CEs to be useful, it is important that they are easy for users to interpret. Existing methods for generating interpretable CEs rely on auxiliary generative models, which may not be suitable for complex datasets, and incur engineering overhead. We introduce a simple and fast method for generating interpretable CEs in a white-box setting without an auxiliary model, by using the predictive uncertainty of the classifier. Our experiments show that our proposed algorithm generates more interpretable CEs, according to IM1 scores (Van Looveren et al., 2019), than existing methods. Additionally, our approach allows us to estimate the uncertainty of a CE, which may be important in safety-critical applications, such as those in the medical domain.

Introduction

Counterfactual explanations (CEs) answer the fundamental question: "What is the smallest change I could make to my input to get a different result from the model?" For example, in a financial context, a CE might explain that a loan was denied because the applicant's income was too low, suggesting that an increase of $5,000 would have led to approval.

Comparison of counterfactual explanation quality: from unrealistic and ambiguous to realistic and unambiguous.

A major challenge in generating these explanations is ensuring they are interpretable and realistic. Many standard algorithms produce "adversarial-like" counterfactuals—mathematically valid perturbations that are nonsensical or physically impossible in the real world. Current state-of-the-art solutions often require training separate generative models (like VAEs or GANs) to guide the explanation toward the real data distribution. However, these auxiliary models are computationally expensive and difficult to scale. This paper proposes a way to generate realistic CEs using only the classifier itself.

Methodology

The authors propose that predictive uncertainty is a powerful proxy for interpretability. By leveraging the classifier's own internal state, they identify two key types of uncertainty to minimize:

  1. Epistemic Uncertainty (Realism): This measures what the model doesn't know because it hasn't seen similar data. By moving toward areas of low epistemic uncertainty, the algorithm naturally finds "realistic" explanations that align with the training data distribution.
  2. Aleatoric Uncertainty (Unambiguity): This measures inherent noise or overlap between classes. Minimizing this ensures the explanation isn't an ambiguous "borderline" case (e.g., a digit that looks like both a 9 and a 4).

The Algorithm

The method employs Implicit Minimization, proving that minimizing the standard cross-entropy loss of a target class implicitly reduces predictive entropy. This eliminates the need for complex, multi-term objective functions. The authors adapt the Jacobian-based Saliency Map Attack (JSMA) to greedily perturb the most "salient" features—those the model is most sensitive to—until a high-confidence prediction for the target class is reached. Additionally, training the classifier with adversarial examples (like FGSM) is shown to align the model's gradients more closely with human-interpretable features.

Experiments and Results

The method was evaluated on MNIST (handwritten digits), the Breast Cancer Wisconsin Diagnostic dataset, and the Boston Housing dataset. The researchers compared their approach against VLK (a state-of-the-art method using autoencoders) and standard JSMA.

Key Findings

  • Superior Realism: The proposed method achieved significantly lower IM1 scores (a metric where lower values indicate better autoencoder reconstruction/realism) than competing methods. On the Breast Cancer dataset, the method achieved an IM1 of 0.89, compared to VLK’s 2.81.
  • Efficiency: By removing the need for auxiliary generative models, the method reduces engineering overhead and offers faster run-times.
  • Interpretability Trade-off: While the method often produces larger perturbations ($L_1$ distance) than pure adversarial attacks, this is a deliberate trade-off to ensure the changes are human-recognizable rather than just mathematically minimal.

Discussion and Conclusion

The core insight of this research is that a well-calibrated classifier already "knows" what realistic data looks like through its uncertainty estimates. We do not necessarily need a second model to define the data manifold.

While the current method requires white-box access to gradients, it provides a robust framework for generating CEs that are both realistic and unambiguous. This is particularly valuable in safety-critical domains like medicine, where understanding the uncertainty of an explanation is as important as the explanation itself. Future work will focus on improving visual smoothness in image datasets and better handling non-actionable features during the optimization process.

Summary updated

BibTeX
@inproceedings{schut2021generating,
  author = {Lisa Schut and Oscar Key and Rory McGrath and Luca Costabello and Bogdan Sacaleanu and Medb Corcoran and Yarin Gal},
  title = {{Generating Interpretable Counterfactual Explanations By Implicit Minimisation of Epistemic and Aleatoric Uncertainties}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2021},
  url = {https://openreview.net/forum?id=Bmcei0KLhs},
}
Figure