Skip to main content
QUICK REVIEW

[Paper Review] On Generating Plausible Counterfactual and Semi-Factual Explanations for Deep Learning

Eoin M. Kenny, Mark T. Keane|arXiv (Cornell University)|Sep 10, 2020
Explainable Artificial Intelligence (XAI)Computer Science6 citations
TL;DR

This paper introduces PIECE, a novel method for generating plausible counterfactual and semi-factual explanations for deep learning models in computer vision. By modifying only 'exceptional' features in an image to align with the counterfactual class, PIECE produces highly plausible, minimally altered explanations that outperform existing methods in both counterfactual and semi-factual plausibility across multiple metrics, including L1 distance and model confidence scores.

ABSTRACT

There is a growing concern that the recent progress made in AI, especially regarding the predictive competence of deep learning models, will be undermined by a failure to properly explain their operation and outputs. In response to this disquiet counterfactual explanations have become massively popular in eXplainable AI (XAI) due to their proposed computational psychological, and legal benefits. In contrast however, semifactuals, which are a similar way humans commonly explain their reasoning, have surprisingly received no attention. Most counterfactual methods address tabular rather than image data, partly due to the nondiscrete nature of the latter making good counterfactuals difficult to define. Additionally generating plausible looking explanations which lie on the data manifold is another issue which hampers progress. This paper advances a novel method for generating plausible counterfactuals (and semifactuals) for black box CNN classifiers doing computer vision. The present method, called PlausIble Exceptionality-based Contrastive Explanations (PIECE), modifies all exceptional features in a test image to be normal from the perspective of the counterfactual class (hence concretely defining a counterfactual). Two controlled experiments compare this method to others in the literature, showing that PIECE not only generates the most plausible counterfactuals on several measures, but also the best semifactuals.

Motivation & Objective

  • Address the lack of attention to semi-factual explanations in XAI, despite their psychological and practical benefits in human reasoning.
  • Overcome the challenge of generating plausible counterfactuals for image data, which is difficult due to the non-discrete, high-dimensional nature of pixels.
  • Develop a method that generates contrastive explanations (counterfactual and semi-factual) that lie on the data manifold and require minimal, meaningful feature changes.
  • Provide post-hoc explanations for black-box CNN classifiers without requiring model introspection or access to internal weights.
  • Demonstrate that semi-factual explanations—using 'even if' reasoning—can be as effective as counterfactuals in enhancing interpretability and reducing negative emotional responses.

Proposed method

  • Identify 'exceptional' features in a test image using statistical significance (α = 0.05) based on activation differences between the true class and the counterfactual class.
  • Modify only the exceptional features to make them 'normal' from the perspective of the counterfactual class, thereby generating a counterfactual instance.
  • Use a latent-space optimization process to ensure the generated counterfactual lies close to the original image in L2 distance, preserving plausibility.
  • Generate semi-factuals by applying the same modification process but preserving the original class, thus showing what features could be changed without altering the prediction.
  • Leverage deep neural network feature representations (via latent space) to guide the generation process, ensuring the output remains within the data manifold.
  • Apply multiple plausibility metrics—including L1 distance, model confidence (MC-Dropout), nearest neighbor distance, and image quality scores (IM1/IM2)—to evaluate the generated explanations.

Experimental results

Research questions

  • RQ1Can a method be developed to generate plausible counterfactual explanations for image-based deep learning models, particularly when data is non-discrete?
  • RQ2Do semi-factual explanations—generated by modifying exceptional features without changing the predicted class—yield more interpretable and psychologically natural explanations than counterfactuals?
  • RQ3How do different explanation generation methods compare in terms of plausibility, measured by L1 distance, model confidence, and nearest neighbor distance?
  • RQ4Is there a trade-off between plausibility and the number of feature changes in semi-factual explanations, and how does PIECE manage this trade-off?
  • RQ5Can the same framework generate both counterfactual and semi-factual explanations using a unified, exceptionality-based mechanism?

Key findings

  • PIECE generated counterfactuals that were significantly more plausible than baseline methods, with higher L1 distance scores and better model confidence (MC-Dropout) and nearest neighbor distance (NN-Dist) metrics.
  • In semi-factual generation, PIECE outperformed min-edit methods with significantly higher L1 distance (AD > 2.5, p < .029), indicating more meaningful and distinct feature changes.
  • All methods produced better semi-factuals at greater distances, but PIECE consistently achieved the best results across all tested distances (AD > 3.3, p < .015).
  • The MC-Dropout and NN-Dist metrics showed a clear trade-off: as semi-factuals became more distinct (higher L1), their model confidence and plausibility scores decreased, suggesting a balance between distinctiveness and faithfulness.
  • Metrics like IM1 and IM2 showed no significant change across incremental feature modifications, indicating they may be less sensitive to changes in explanation quality than MC-Mean, MC-STD, and NN-Dist.
  • The method successfully generated both counterfactual and semi-factual explanations using the same framework, demonstrating its versatility and potential for broader application in XAI.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.