Abstract
An integrated approach is proposed across visual and textual data to both determine and justify a medical diagnosis by a neural network. As deep learning techniques improve, interest grows to apply them in medical applications. To enable a transition to workflows in a medical context that are aided by machine learning, the need exists for such algorithms to help justify the obtained outcome so human clinicians can judge their validity. In this work, deep learning methods are used to map a frontal X-Ray image to a continuous textual representation. This textual representation is decoded into a diagnosis and the associated textual justification that will help a clinician evaluate the outcome. Additionally, more explanatory data is provided for the diagnosis by generating a realistic X-Ray that belongs to the nearest alternative diagnosis. With a clinical expert opinion study on a subset of the X-Ray data set from the Indiana University hospital network, we demonstrate that our justification mechanism significantly outperforms existing methods that use saliency maps. While performing multi-task training with multiple loss functions, our method achieves excellent diagnosis accuracy and captioning quality when compared to current state-of-the-art single-task methods.
Introduction
Deep learning models are increasingly accurate at diagnosing diseases from medical images, but they often remain "black boxes." In clinical settings, a physician cannot simply trust a probability score without understanding the underlying reasoning. The current standard for explainable AI in medical imaging relies on saliency maps (heatmaps), which highlight pixels the model prioritized. However, these maps are often noisy and fail to explain what features were identified or how they relate to the pathology.
This paper presents a novel framework that justifies medical diagnoses through two distinct methods: generating descriptive textual justifications and creating "counterfactual" X-ray images. By showing clinicians what the "nearest alternative" diagnosis would look like for a specific patient, the system provides more intuitive evidence than traditional heatmaps.
Methodology
The proposed system integrates visual and textual data through a multi-task learning approach. The architecture is divided into training and inference phases, as shown in the overview below.
The framework utilizes several key components to bridge the gap between images and text:
- Textual Embedding (ARAE): An Adversarially Regularized Autoencoder (ARAE) maps medical reports into a smooth, continuous latent space.
- Text-to-Image GAN: A modified StackGAN architecture generates realistic X-ray images from these textual embeddings.
- Inverse Mapping ($I$): A convolutional network maps real X-rays back into the latent space.
The justification mechanism operates during inference. The model decodes a latent vector $r$ into a diagnosis $d$ and a caption $c$. To provide visual justification, a mapping $M$ modifies $r$ to find the nearest representation $r'$ corresponding to an alternative diagnosis $d'$. A GAN then generates an X-ray from $r'$, allowing for a direct visual comparison. The notation used in these processes is detailed in the table below.
Experimental Setup
The study used the Indiana University hospital network dataset (Open-I), containing 3,955 radiology reports and 7,470 chest X-rays. The evaluation focused on two primary categories: "Normal" and "Cardiomegaly" (enlarged heart). The final preprocessed dataset included 2,446 X-rays and 4,725 textual descriptions.
Results and Discussion
The model achieved a diagnostic accuracy of approximately 91%, matching state-of-the-art single-task models like ResNet-18. In terms of captioning quality, it outperformed baseline models across metrics such as BLEU, ROUGE, and CIDEr.
A critical component of the study was the expert validation. Three trained clinicians evaluated the system in a blind study. They found that the proposed justification method significantly outperformed saliency maps in explaining the diagnosis, scoring 2.39/4 compared to 1.31/4 for heatmaps. Clinicians noted that the counterfactual images provided a clearer understanding of the network's reasoning by showing what a "healthy" version of the specific patient's heart would look like.
Conclusion
This work demonstrates that smooth latent spaces and counterfactual generation can significantly improve the interpretability of medical AI. While current limitations include image resolution (256x256) and a binary classification focus, the approach offers a promising path toward transparent AI in healthcare. Future work will explore higher-resolution generation and scaling to more complex, multi-pathology datasets.
Summary updated