[Paper Review] Combining Counterfactuals With Shapley Values To Explain Image Models
This paper proposes a method that combines counterfactual image generation with Shapley values to produce contrastive, human-interpretable explanations for image classification models. By using a pretrained StyleGAN2 and a learned shift predictor to generate counterfactual images based on high-level attributes, the approach computes Shapley values that explain the prediction difference between original and counterfactual images, enabling axiomatic, contrastive explanations with strong theoretical guarantees.
With the widespread use of sophisticated machine learning models in sensitive applications, understanding their decision-making has become an essential task. Models trained on tabular data have witnessed significant progress in explanations of their underlying decision making processes by virtue of having a small number of discrete features. However, applying these methods to high-dimensional inputs such as images is not a trivial task. Images are composed of pixels at an atomic level and do not carry any interpretability by themselves. In this work, we seek to use annotated high-level interpretable features of images to provide explanations. We leverage the Shapley value framework from Game Theory, which has garnered wide acceptance in general XAI problems. By developing a pipeline to generate counterfactuals and subsequently using it to estimate Shapley values, we obtain contrastive and interpretable explanations with strong axiomatic guarantees.
Motivation & Objective
- To address the challenge of explaining high-dimensional image inputs in machine learning models, where pixel-level explanations lack human interpretability.
- To overcome the limitations of traditional Shapley value methods in image models, which suffer from high computational cost and lack contrastive context.
- To provide contrastive, human-understandable explanations by generating counterfactual images that modify specific high-level attributes.
- To leverage generative models and game-theoretic attribution to deliver axiomatic, fair, and interpretable explanations for image classifier decisions.
- To enable model-agnostic, scalable, and faithful explanation of image predictions using a minimal training setup with pretrained components.
Proposed method
- The method uses a pretrained StyleGAN2 generator to produce high-resolution, realistic counterfactual images by manipulating the latent space according to specified attribute changes.
- A shift predictor model is trained to map changes in interpretable attributes (e.g., baldness, youthfulness) to corresponding latent vector adjustments in the StyleGAN2 space.
- The pipeline generates counterfactual images by applying learned shifts to the latent code of original images, ensuring realistic and semantically meaningful modifications.
- Shapley values are computed to explain the difference in model prediction between the original and counterfactual images, using the modified attributes as features.
- The method avoids averaging over all possible coalitions by directly comparing two specific images—original and counterfactual—providing contrastive explanations with strong axiomatic foundations.
- The approach uses a multi-task classifier on a VGG backbone to extract interpretable attributes from images, which are then used as input to the shift predictor and Shapley value computation.
Experimental results
Research questions
- RQ1How can we generate meaningful, realistic counterfactual images that modify specific high-level attributes in image data?
- RQ2Can Shapley values computed on high-level interpretable features provide more interpretable and contrastive explanations than pixel-level attributions?
- RQ3How can we efficiently compute Shapley values for image models without incurring prohibitive computational costs?
- RQ4Can the combination of counterfactual generation and Shapley values yield explanations with strong theoretical guarantees while remaining faithful to human cognition?
- RQ5How can we make model explanations more intuitive by incorporating contrastive reasoning, as supported by cognitive science?
Key findings
- For image O₁, increasing baldness and maleness while decreasing youthfulness, heavy makeup, and blond hair reduced the attractiveness prediction from 0.73 to 0.12, a drop of 0.61.
- Baldness contributed -0.34 to the prediction drop, making it the largest single factor in the decrease, followed by youthfulness with -0.28.
- The counterfactual image C₄ was generated by increasing youthfulness, blond hair, heavy makeup, and decreasing maleness and baldness, resulting in a prediction shift explained by positive Shapley contributions to these attributes.
- The method successfully generated realistic counterfactual images using only a pretrained StyleGAN2 and a lightweight shift predictor, avoiding retraining or complex optimization.
- Shapley value attributions provided clear, contrastive explanations that aligned with human reasoning, showing that changes in specific attributes directly influenced model predictions.
- The approach achieved faithful and interpretable explanations with minimal training, using only a pretrained VGG backbone for attribute prediction and a single shift predictor model.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.