Evaluating Robustness of Counterfactual Explanations

André Artelt, Valerie Vaquet, Riza Velioglu, Fabian Hinder, Johannes Brinkrolf, Malte Schilling, Barbara Hammer

TL;DR

This paper investigates the "robustness" of counterfactual explanations, a popular method for explaining AI decisions by suggesting input changes to achieve a different outcome. They find that standard "closest" counterfactuals are surprisingly unstable, leading to potentially unfair explanations. The authors propose using "plausible" counterfactuals as a more robust alternative, demonstrating this empirically.

What Problem Does This Paper Address?

As AI systems are increasingly used in critical decision-making scenarios (like loan applications or criminal justice), transparency and trustworthiness are paramount. Counterfactual explanations offer a user-friendly way to understand AI behavior by answering "What needs to change for a different outcome?". However, a significant problem is their instability: even tiny changes to the input can lead to drastically different, and potentially complex, counterfactual recommendations. This instability raises concerns about fairness, as similar individuals might receive very different, and perhaps inequitable, advice. The paper aims to formally define and empirically study this robustness issue and propose a solution.

Methods

The authors introduce a formal definition of local instability for counterfactual explanations, measuring how much a counterfactual changes when the original input is slightly perturbed. They then analyze this instability under three types of perturbations: Gaussian noise, bounded uniform noise, and feature masking. A key contribution is the proposal to use "plausible" counterfactuals instead of "closest" counterfactuals. Closest counterfactuals aim for the minimal change to flip the prediction, while plausible ones also consider adherence to the data manifold (i.e., are they realistic?). They hypothesize and empirically test that plausible counterfactuals are more robust.

Datasets

The paper uses a combination of synthetic and real-world datasets:

  • Toy data set: A synthetic binary classification problem with varying dimensions, used to study the "curse of dimensionality."
  • Wine data set: A standard benchmark dataset.
  • Breast Cancer Wisconsin (Diagnostic) Data Set: Used after PCA dimensionality reduction to 5 dimensions.
  • Optical Recognition of Handwritten Digits Data Set: Used after PCA dimensionality reduction to 40 dimensions.

Key Insights and Ideas

  • "Closest" counterfactuals are fragile: Standard counterfactual explanations, which aim for the minimal change to alter a prediction, are highly sensitive to small input perturbations. This means a slight change in data can lead to a completely different recommended action.
  • Instability equals unfairness: The paper argues that this instability is directly linked to individual fairness. If similar individuals receive vastly different counterfactual recommendations due to minor input variations, it can be considered unfair.
  • "Plausible" is more robust: The core proposal is that counterfactuals that are not just "closest" but also "plausible" (i.e., lie on the data manifold) offer significantly better robustness against perturbations.
  • Curse of dimensionality: The study empirically confirms that as the dimensionality of the input space increases, the instability of counterfactual explanations also tends to increase, even for non-linear models.

Key Results

  • Empirical evidence for instability: Across various models (Softmax regression, Decision Tree, GLVQ) and datasets, plausible counterfactuals consistently showed lower median $l_1$ distances between original and perturbed explanations compared to closest counterfactuals. For example, on the Wine dataset with Gaussian noise, plausible counterfactuals achieved a median distance of 1.87 compared to 10.16 for closest counterfactuals using Softmax regression.
  • Feature masking impact: Even when masking up to 50% of features, plausible counterfactuals remained more robust than closest ones.
  • Curse of dimensionality confirmed: Experiments on the toy dataset showed that increasing the number of features led to higher instability for both closest and plausible counterfactuals, but the gap in robustness between the two methods persisted.

Limitations and Future Work

  • Model-agnostic focus: While the formalization is model-agnostic, the empirical evaluation focuses on specific models (linear classifiers, GLVQ, decision trees). Future work could extend this to deep neural networks.
  • Perturbation types: The study considers Gaussian noise, uniform noise, and feature masking. Other types of perturbations, especially those mimicking real-world data drift or adversarial attacks, could be explored.
  • Psychological perspective: The authors express interest in studying how humans actually experience individual fairness of explanations and whether their proposed formalization captures this experience.
  • Alternative plausible counterfactual methods: The paper uses one approach for generating plausible counterfactuals; exploring other methods could yield further insights.

Summary updated

BibTeX
@inproceedings{artelt2021evaluating,
  author = {André Artelt and Valerie Vaquet and Riza Velioglu and Fabian Hinder and Johannes Brinkrolf and Malte Schilling and Barbara Hammer},
  title = {{Evaluating Robustness of Counterfactual Explanations}},
  booktitle = {SSCI},
  year = {2021},
  url = {https://openreview.net/forum?id=z2wyDvn9cN0},
}
Figure