Decoding Decision Reasoning: A Counterfactual-Powered Model for Knowledge Discovery

Yingying Fang, Zihao Jin, Xiaodan Xing, Simon Walsh, Guang Yang

Abstract

Deep learning models in medical imaging often lack transparency, providing high accuracy without explaining the underlying rationale. We present PrognosisEx, an intrinsically explainable framework that utilizes diffusion-based autoencoders to generate counterfactual medical images. By manipulating latent features associated with specific clinical outcomes, the model provides visually grounded explanations for its prognostic decisions. Validated on COVID-19 CT scans, PrognosisEx matches the performance of state-of-the-art black-box models while offering superior interpretability.

Introduction

In medical imaging, deep learning models often act as "black boxes." While they can predict disease progression or mortality with high accuracy, they rarely explain why. Traditional Explainable AI (XAI) methods, such as Grad-CAM, produce "attribution maps" (heatmaps) that show where a model is looking. However, in complex medical cases, these heatmaps are often insufficient. Discriminative features—like subtle changes in lung texture—can be tiny or overlap significantly between different diagnostic classes. Clinicians need to know exactly which features (e.g., a specific type of lesion or vessel enlargement) are driving a decision. This work introduces PrognosisEx to bridge this gap by moving beyond heatmaps toward "counterfactual explanations"—generating synthetic images that demonstrate how changing specific features would change the model's prediction.

Methodology

The PrognosisEx framework consists of three main components designed for both high performance and intrinsic explainability.

Workflow and training procedure of PrognosisEx
  1. Diffusion-based Autoencoder (DDIM): The model first compresses a high-dimensional CT slice into a semantically meaningful, low-dimensional latent representation ($z$). Because it uses a diffusion-based decoder, it can reconstruct the original image with high fidelity or generate realistic variations of it.
  2. Two-Layer Prognostic Model: Instead of a deep, opaque CNN, the framework uses a simpler two-layer linear model operating on latent representations. The first layer extracts features per slice, and the second aggregates them for a final score. This simplicity makes the relationship between input features and the final decision mathematically traceable.
  3. Counterfactual Generation: To explain a decision, the model identifies the most influential features in the latent space. It then "nudges" these features—either amplifying or diminishing them—and passes the modified latent vector back through the diffusion decoder. This produces a "counterfactual" image highlighting clinical changes (like increased opacity or vessel density) that would lead to a different prognosis.

The model was validated using an in-house dataset from the University Hospital of Parma, comprising 45,302 CT slices from 566 COVID-19 inpatients. The task was to predict 10-day mortality.

Results and Knowledge Discovery

PrognosisEx achieved an AUC of 0.79 and an accuracy of 0.71, matching the performance of popular black-box models like DenseNet-121 and exceeding ResNet50 and EfficientNet (both AUC 0.71).

Counterfactual image generation showing clinical feature manipulation

Qualitative validation through counterfactual images clearly showed that the model associated increased mortality with specific patterns: increased vascularization, more ground-glass opacities (GGO), and reduced lung area in the upper-middle lung. Conversely, survival was associated with fewer vessel textures and clearer lung fields in the lower regions. By comparing original slices to counterfactuals, the authors found the model was picking up on medically recognized biomarkers without explicit supervision, suggesting its utility for "knowledge discovery" in diseases that are not yet fully understood.

Discussion and Limitations

PrognosisEx demonstrates that intrinsic explainability does not require a trade-off in predictive performance. By operating in a defined "reasoning space," the model can isolate class-specific features and provide clinicians with visual evidence for its predictions.

However, limitations remain. The current model randomly selects four slices from different lung regions to manage computational costs, which might miss localized features. Future work will focus on validating the method across different imaging modalities (MRI, X-ray) and disease types, as well as optimizing the computational power required for diffusion-based image generation.

Summary updated

Abstract

In medical imaging, particularly in early disease detection and prognosis tasks, discerning the rationale behind an AI model’s predictions is crucial for evaluating the reliability of its decisions. Conventional explanation methods face challenges in identifying discernible decisive features in medical image classifications, where discriminative features are subtle or not immediately apparent. To bridge this gap, we propose an explainable model that is equipped with both decision reasoning and feature identification capabilities. Our approach not only detects influential image patterns but also uncovers the decisive features that drive the model’s final predictions. By implementing our method, we can efficiently identify and visualise class-specific features leveraged by the data-driven model, providing insights into the decision-making processes of deep learning models. We validated our model in the demanding realm of medical prognosis task, demonstrating its efficacy and potential in enhancing the reliability of AI in healthcare and in discovering new knowledge in diseases where prognostic understanding is limited.
BibTeX
@inproceedings{fang2024decoding,
  author = {Yingying Fang and Zihao Jin and Xiaodan Xing and Simon Walsh and Guang Yang},
  title = {{Decoding Decision Reasoning: A Counterfactual-Powered Model for Knowledge Discovery}},
  booktitle = {ISBI},
  year = {2024},
  url = {https://openreview.net/forum?id=g5R83MvnQ7},
}

Loading related content...

Figure