Skip to main content
QUICK REVIEW

[Paper Review] Diffusion Visual Counterfactual Explanations

Maximilian Augustin, Valentyn Boreiko|arXiv (Cornell University)|Oct 21, 2022
Adversarial Robustness in Machine LearningComputer Science15 citations
TL;DR

This paper proposes Diffusion Visual Counterfactual Explanations (DVCEs), a method to generate realistic, minimal, and semantically meaningful counterfactual images for any ImageNet classifier using a diffusion model. By combining adaptive reparameterization, distance regularization, and cone regularization via an adversarially robust model, DVCEs produce visually close, high-confidence counterfactuals that reveal model biases without requiring model-specific retraining or being limited to robust models.

ABSTRACT

Visual Counterfactual Explanations (VCEs) are an important tool to understand the decisions of an image classifier. They are 'small' but 'realistic' semantic changes of the image changing the classifier decision. Current approaches for the generation of VCEs are restricted to adversarially robust models and often contain non-realistic artefacts, or are limited to image classification problems with few classes. In this paper, we overcome this by generating Diffusion Visual Counterfactual Explanations (DVCEs) for arbitrary ImageNet classifiers via a diffusion process. Two modifications to the diffusion process are key for our DVCEs: first, an adaptive parameterization, whose hyperparameters generalize across images and models, together with distance regularization and late start of the diffusion process, allow us to generate images with minimal semantic changes to the original ones but different classification. Second, our cone regularization via an adversarially robust model ensures that the diffusion process does not converge to trivial non-semantic changes, but instead produces realistic images of the target class which achieve high confidence by the classifier.

Motivation & Objective

  • To address the lack of model-agnostic, realistic, and semantically meaningful counterfactual explanations for standard image classifiers.
  • To overcome limitations of existing methods that rely on adversarially robust models, generate non-realistic artifacts, or are restricted to few-class datasets.
  • To develop a general-purpose method for generating visual counterfactuals (VCEs) that are both minimally perturbed and semantically coherent.
  • To enable the discovery of spurious features in classifiers by generating high-confidence counterfactuals that reflect actual data distribution properties.

Proposed method

  • Utilizes a diffusion process guided by a classifier and distance regularization to ensure minimal, perceptually small changes from the original image.
  • Employs adaptive reparameterization of the diffusion process with fixed hyperparameters across images and models, enabling generalization.
  • Introduces a late start of the diffusion process to preserve original image semantics during early generation steps.
  • Applies cone regularization using an adversarially robust model to steer the diffusion toward realistic, target-class images and prevent trivial, non-semantic changes.
  • Uses classifier confidence as a key signal to ensure generated counterfactuals are correctly classified as the target class with high probability.
  • Generates counterfactuals without requiring retraining of the generative model per classifier, enabling broad applicability to arbitrary ImageNet classifiers.

Experimental results

Research questions

  • RQ1Can diffusion models generate realistic, minimal, and semantically meaningful visual counterfactuals for arbitrary ImageNet classifiers without requiring model-specific retraining?
  • RQ2How can the diffusion process be modified to ensure that counterfactuals are both visually close to the original image and achieve high classifier confidence for the target class?
  • RQ3To what extent can cone regularization via an adversarially robust model prevent the generation of non-semantic or trivial perturbations in counterfactuals?
  • RQ4How do DVCEs compare to prior methods in revealing spurious features learned by classifiers, especially in complex datasets like ImageNet?
  • RQ5Can the proposed method generalize across different architectures (e.g., ResNet, Swin, ConvNeXt) and detect both known and novel spurious features?

Key findings

  • DVCEs successfully generate realistic, minimal, and high-confidence counterfactual images for diverse ImageNet classifiers, including non-robust models.
  • The method reveals known spurious features such as human hands and cages in the 'tench' and 'white shark' classes, consistent with prior findings.
  • New spurious features are discovered, such as flowers increasing confidence for 'bee' and tiger faces for 'tiger cat', indicating model reliance on non-semantic attributes.
  • User studies show DVCEs are perceived as more meaningful, realistic, and subtle than baseline methods like $l_{1.5}$-SVCEs and BDVCEs.
  • The approach generalizes across models and maintains consistent performance with fixed hyperparameters, demonstrating robustness and scalability.
  • Failure cases include blurriness (due to diffusion model artifacts) and difficulty in generating plausible changes when original and target classes are semantically distant.

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.