Explaining in Style: Training a GAN to explain a classifier in StyleSpace

Oran Lang, Yossi Gandelsman, Michal Yarom, Yoav Wald, Gal Elidan +6 more
4/27/2021
191 citations
cs.CVcs.LGcs.NE

Official code: google/explaining-in-style (221 stars, Jupyter Notebook, Apache-2.0, last commit 2021-08-25).

Abstract

Image classification models can depend on multiple different semantic attributes of the image. An explanation of the decision of the classifier needs to both discover and visualize these properties.

Show full abstract

Here we present StylEx, a method for doing this, by training a generative model to specifically explain multiple attributes that underlie classifier decisions. A natural source for such attributes is the StyleSpace of StyleGAN, which is known to generate semantically meaningful dimensions in the image. However, because standard GAN training is not dependent on the classifier, it may not represent these attributes which are important for the classifier decision, and the dimensions of StyleSpace may represent irrelevant attributes. To overcome this, we propose a training procedure for a StyleGAN, which incorporates the classifier model, in order to learn a classifier-specific StyleSpace. Explanatory attributes are then selected from this space. These can be used to visualize the effect of changing multiple attributes per image, thus providing image-specific explanations. We apply StylEx to multiple domains, including animals, leaves, faces and retinal images. For these, we show how an image can be modified in different ways to change its classifier output. Our results show that the method finds attributes that align well with semantic ones, generate meaningful image-specific explanations, and are human-interpretable as measured in user-studies.

View on arXivView PDF

Code Implementations(1)

Apache-2.0
22125Jupyter NotebookAug 25, 20215 years agoApache-2.0

Similar Papers

Cite this paper

@article{lang2021explaining,
  title  = {Explaining in Style: Training a GAN to explain a classifier in StyleSpace},
  author = {Oran Lang and Yossi Gandelsman and Michal Yarom and Yoav Wald and Gal Elidan and Avinatan Hassidim and William T. Freeman and Phillip Isola and Amir Globerson and Michal Irani and Inbar Mosseri},
  year   = {2021},
  eprint = {2104.13369},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2104.13369}
}

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/2104.13369.svg)](https://codeofpaper.com/paper/2104.13369)

Discussion