[Paper Review] Explaining in Style: Training a GAN to explain a classifier in StyleSpace
StylEx trains a StyleGAN to generate classifier-specific, disentangled attributes in StyleSpace that explain image classifier decisions through controllable, human-interpretable counterfactuals. By conditioning GAN training on classifier gradients, it discovers semantically meaningful attributes (e.g., eye shape, ear posture) that directly influence predictions, achieving up to 93.9% flip rate on age and gender classifiers with top-10 attributes.
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. 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.
Motivation & Objective
- To address the lack of human-interpretable, multi-attribute counterfactual explanations for deep image classifiers.
- To discover disentangled, semantically meaningful attributes in the latent space of a generative model that directly influence classifier decisions.
- To enable image-specific explanations by generating counterfactual examples that modify one attribute at a time.
- To improve model interpretability in high-stakes domains like medical imaging and autonomous systems through disentangled, classifier-aware generation.
Proposed method
- Train a StyleGAN with a conditional loss that incorporates gradients from a pre-trained classifier, aligning the generator’s StyleSpace with classifier-relevant attributes.
- Use gradient-based saliency to identify the most influential StyleSpace coordinates that affect classifier output for a given input image.
- Generate counterfactual images by perturbing individual StyleSpace coordinates while keeping others fixed, enabling controlled visualization of attribute effects.
- Apply a two-part user study to evaluate attribute distinctness and coherence: (1) attribute identification from image pairs, (2) description of animated attribute changes.
- Measure attribute sufficiency by testing how often modifying top-k attributes flips the classifier’s prediction.
- Introduce a classifier-specific training component (CST) that prevents mode collapse and ensures attributes are relevant to the classifier, especially in subtle domains like retinal imaging.
Experimental results
Research questions
- RQ1Can a generative model be trained to discover disentangled, semantically meaningful attributes in its latent space that directly influence a classifier’s decision?
- RQ2Can these attributes be used to generate counterfactual examples that are both visually coherent and human-interpretable?
- RQ3How do classifier-specific training components improve attribute relevance and model performance in low-visibility domains?
- RQ4To what extent do the discovered attributes explain classifier decisions across diverse image domains, including medical and fine-grained visual categories?
Key findings
- StylEx discovers attributes that are highly coherent and distinct: users correctly identified the top-6 attributes in 96% of cases for perceived gender and 98.3% for perceived age.
- The method significantly outperforms baseline methods like Wu et al. in attribute coherence, with 93.3% and 98.3% accuracy on cats/dogs and perceived age, respectively.
- StylEx achieves a 93.9% flip rate on the perceived age classifier using only the top 10 attributes, compared to 16.9% for Wu et al., demonstrating superior attribute sufficiency.
- On the retina domain, StylEx achieves 100% flip rate with top-10 attributes, while the baseline without classifier-specific training (CST) fails entirely (0% flip rate), proving CST’s necessity.
- In the plants domain, StylEx achieves 91.2% flip rate, significantly outperforming Wu et al. (14.6%), and user studies confirm that StylEx attributes are more consistently described and perceptually distinct.
- User studies confirm that StylEx attributes are not only distinct but also perceptually salient: 93.3% of users correctly identified the top attribute in cats/dogs, and 100% used 'glasses' when describing the top coordinate for perceived age.
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.