# CheXplaining in Style: Counterfactual Explanations for Chest X-rays using StyleGAN

arXiv: https://arxiv.org/abs/2207.07553 · HTML: https://mlsanity.com/paper/2207.07553/

## Key facts

- Cited by 25 papers in the map (data through 14 Oct 2026).
- Builds on 10 of its 10 references that are in the map.
- First posted on arXiv 15 Jul 2022.

## Builds on (most cited first, 10 of 10)

- [Analyzing and Improving the Image Quality of StyleGAN](https://mlsanity.com/paper/1912.04958/) (2019)
- [CheXpert: A Large Chest Radiograph Dataset with Uncertainty Labels and Expert Comparison](https://mlsanity.com/paper/1901.07031/) (2019)
- [ChestX-ray8: Hospital-scale Chest X-ray Database and Benchmarks on Weakly-Supervised Classification and Localization of Common Thorax Diseases](https://mlsanity.com/paper/1705.02315/) (2017)
- [CheXNet: Radiologist-Level Pneumonia Detection on Chest X-Rays with Deep Learning](https://mlsanity.com/paper/1711.05225/) (2017)
- [Closed-Form Factorization of Latent Semantics in GANs](https://mlsanity.com/paper/2007.06600/) (2020)
- [StyleSpace Analysis: Disentangled Controls for StyleGAN Image Generation](https://mlsanity.com/paper/2011.12799/) (2020)
- [Explaining in Style: Training a GAN to explain a classifier in StyleSpace](https://mlsanity.com/paper/2104.13369/) (2021)
- [DeepMiner: Discovering Interpretable Representations for Mammogram Classification and Explanation](https://mlsanity.com/paper/1805.12323/) (2018)
- [Explaining COVID-19 and Thoracic Pathology Model Predictions by Identifying Informative Input Features](https://mlsanity.com/paper/2104.00411/) (2021)
- [Towards Semantic Interpretation of Thoracic Disease and COVID-19 Diagnosis Models](https://mlsanity.com/paper/2104.02481/) (2021)

## Built on by (most cited first, 25 of 25)

- [BiomedJourney: Counterfactual Biomedical Image Generation by Instruction-Learning from Multimodal Patient Journeys](https://mlsanity.com/paper/2310.10765/) (2023)
- [DreaMR: Diffusion-driven Counterfactual Explanation for Functional MRI](https://mlsanity.com/paper/2307.09547/) (2023)
- [Robust image representations with counterfactual contrastive learning](https://mlsanity.com/paper/2409.10365/) (2024)
- [Counterfactual contrastive learning: robust representations via causal image synthesis](https://mlsanity.com/paper/2403.09605/) (2024)
- [Counterfactual Explanations for Medical Image Classification and Regression using Diffusion Autoencoder](https://mlsanity.com/paper/2408.01571/) (2024)
- [Generating Counterfactual Trajectories with Latent Diffusion Models for Concept Discovery](https://mlsanity.com/paper/2404.10356/) (2024)
- [MedEdit: Counterfactual Diffusion-based Image Editing on Brain MRI](https://mlsanity.com/paper/2407.15270/) (2024)
- [Accurate Explanation Model for Image Classifiers using Class Association Embedding](https://mlsanity.com/paper/2406.07961/) (2024)
- [ProjectedEx: Enhancing Generation in Explainable AI for Prostate Cancer](https://mlsanity.com/paper/2501.01392/) (2025)
- [Shortcut Detection with Variational Autoencoders](https://mlsanity.com/paper/2302.04246/) (2023)
- [DiffExplainer: Unveiling Black Box Models Via Counterfactual Generation](https://mlsanity.com/paper/2406.15182/) (2024)
- [Semantic Latent Space Regression of Diffusion Autoencoders for Vertebral Fracture Grading](https://mlsanity.com/paper/2303.12031/) (2023)
- [Density-based Feasibility Learning with Normalizing Flows for Introspective Robotic Assembly](https://mlsanity.com/paper/2307.01317/) (2023)
- [COIN: Counterfactual inpainting for weakly supervised semantic segmentation for medical images](https://mlsanity.com/paper/2404.12832/) (2024)
- [Decoding Decision Reasoning: A Counterfactual-Powered Model for Knowledge Discovery](https://mlsanity.com/paper/2406.18552/) (2024)
- [Cyclic Vision-Language Manipulator: Towards Reliable and Fine-Grained Image Interpretation for Automated Report Generation](https://mlsanity.com/paper/2411.05261/) (2024)
- [Autism Spectrum Disorder Classification with Interpretability in Children based on Structural MRI Features Extracted using Contrastive Variational Autoencoder](https://mlsanity.com/paper/2307.00976/) (2023)
- [Explaining Chest X-ray Pathology Models using Textual Concepts](https://mlsanity.com/paper/2407.00557/) (2024)
- [TACE: Tumor-Aware Counterfactual Explanations](https://mlsanity.com/paper/2409.13045/) (2024)
- [Discovering Concept Directions from Diffusion-based Counterfactuals via Latent Clustering](https://mlsanity.com/paper/2505.07073/) (2025)
- [Towards generating more interpretable counterfactuals via concept vectors: a preliminary study on chest X-rays](https://mlsanity.com/paper/2506.04058/) (2025)
- [Pixel Perfect MegaMed: A Megapixel-Scale Vision-Language Foundation Model for Generating High Resolution Medical Images](https://mlsanity.com/paper/2507.12698/) (2025)
- [Counterfactual Explanations in Medical Imaging: Exploring SPN-Guided Latent Space Manipulation](https://mlsanity.com/paper/2507.19368/) (2025)
- [Hide-and-Seek Attribution: Weakly Supervised Segmentation of Vertebral Metastases in CT](https://mlsanity.com/paper/2512.06849/) (2025)
- [Reliability, Faithfulness, and the Limits of Post-hoc Explanations of Opaque Scientific Models](https://mlsanity.com/paper/2606.29346/) (2026)

## Abstract (arXiv)

Deep learning models used in medical image analysis are prone to raising reliability concerns due to their black-box nature. To shed light on these black-box models, previous works predominantly focus on identifying the contribution of input features to the diagnosis, i.e., feature attribution. In this work, we explore counterfactual explanations to identify what patterns the models rely on for diagnosis. Specifically, we investigate the effect of changing features within chest X-rays on the classifier's output to understand its decision mechanism. We leverage a StyleGAN-based approach (StyleEx) to create counterfactual explanations for chest X-rays by manipulating specific latent directions in their latent space. In addition, we propose EigenFind to significantly reduce the computation time of generated explanations. We clinically evaluate the relevancy of our counterfactual explanations with the help of radiologists. Our code is publicly available.
