Text-to-Image Models for Counterfactual Explanations: a Black-Box Approach

Guillaume Jeanneret, Loïc Simon, Frédéric Jurie
9/14/2023
37 citations
cs.CV

Official code: guillaumejs2403/TIME (9 stars, Python, MIT, last commit 2023-11-15).

Abstract

This paper addresses the challenge of generating Counterfactual Explanations (CEs), involving the identification and modification of the fewest necessary features to alter a classifier's prediction for a given image. Our proposed method, Text-to-Image Models for Counterfactual Explanations (TIME), is a black-box counterfactual technique based on distillation.

Show full abstract

Unlike previous methods, this approach requires solely the image and its prediction, omitting the need for the classifier's structure, parameters, or gradients. Before generating the counterfactuals, TIME introduces two distinct biases into Stable Diffusion in the form of textual embeddings: the context bias, associated with the image's structure, and the class bias, linked to class-specific features learned by the target classifier. After learning these biases, we find the optimal latent code applying the classifier's predicted class token and regenerate the image using the target embedding as conditioning, producing the counterfactual explanation. Extensive empirical studies validate that TIME can generate explanations of comparable effectiveness even when operating within a black-box setting.

View on arXivView PDF

Code Implementations(1)

MIT

Text-to-Image Models for Counterfactual Explanations: a black-box approach Official Code. WACV 2024

92PythonOct 25, 20233 years agoMIT
counterfactual-explanationsexplainable-aistable-diffusion

Similar Papers

Cite this paper

@article{jeanneret2023texttoimage,
  title  = {Text-to-Image Models for Counterfactual Explanations: a Black-Box Approach},
  author = {Guillaume Jeanneret and Loïc Simon and Frédéric Jurie},
  year   = {2023},
  eprint = {2309.07944},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2309.07944v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2309.07944.svg)](https://codeofpaper.com/paper/2309.07944)

Discussion