Skip to main content

This is a preprint.

It has not yet been peer reviewed by a journal.

The National Library of Medicine is running a pilot to include preprints that result from research funded by NIH in PMC and PubMed.

bioRxiv logoLink to bioRxiv
[Preprint]. 2025 Jul 22:2024.10.29.620913. Originally published 2024 Nov 3. [Version 3] doi: 10.1101/2024.10.29.620913

Counterfactual Diffusion Models for Interpretable Morphology-based Explanations of Artificial Intelligence Models in Pathology

Laura Žigutytė, Tim Lenz, Tianyu Han, Katherine J Hewitt, Nic G Reitsam, Sebastian Foersch, Zunamys I Carrero, Michaela Unger, Alexander T Pearson, Daniel Truhn, Jakob Nikolas Kather
PMCID: PMC11565818  PMID: 39554184

Abstract

Background

Deep learning (DL) can extract predictive and prognostic biomarkers from histopathology whole slide images, but its interpretability remains elusive.

Methods

We introduce MoPaDi (Morphing histoPathology Diffusion), a framework for generating counterfactual explanations for histopathology that reveal which morphological features drive deep learning classifier predictions. MoPaDi combines self-supervised diffusion autoencoders with task-specific classifiers to manipulate images and flip predictions by altering visual features. To address weakly supervised scenarios common in pathology, it integrates multiple instance learning. We validate MoPaDi across four tasks: tissue type, cancer subtypes, slide origin, and a biomarker (microsatellite instability) classification. Counterfactuals are evaluated through pathologist studies and quantitative analysis.

Results

MoPaDi achieves high image reconstruction quality (MS-SSIM 0.966–0.992) and good classification performance (AUCs 0.76–0.98). In a blinded observer study, two pathologists misclassified between 26.7% and 63.3% of synthetic images as real across all tasks, indicating that MoPaDi-generated images often exhibit high perceptual realism. Furthermore, counterfactual images revealed interpretable, pathology-consistent morphological changes recognizable by experts.

Conclusion

MoPaDi is a practical and extensible framework for counterfactual explanations generation in computational pathology. It enables interpretable, model-specific insight into what morphological changes drive classification outcomes, improving interpretability in clinical deep learning models.

Full Text

The Full Text of this preprint is available as a PDF (29.9 MB). The Web version will be available soon.


Articles from bioRxiv are provided here courtesy of Cold Spring Harbor Laboratory Preprints

RESOURCES