X-TRA: Improving Chest X-ray Tasks with Cross-Modal Retrieval Augmentation

Tom van Sonsbeek, Marcel Worring · DOI

Introduction

In clinical practice, human radiologists do not interpret medical images in a vacuum; they rely heavily on their memory of past cases and established medical knowledge to diagnose new ones. In contrast, standard deep learning models for medical imaging typically store this knowledge only implicitly within their weights. This paper introduces X-TRA, a framework designed to explicitly augment chest X-ray analysis by retrieving similar past images and radiology reports. By leveraging a fine-tuned CLIP model and a non-parametric memory bank, X-TRA provides a multi-modal "memory infusion" that significantly enhances performance on downstream tasks like disease classification and report generation.

The Challenge: Fine-Grained Medical Retrieval

Retrieval-Augmented Generation (RAG) has seen massive success in Natural Language Processing (NLP) by allowing models to access external, factual knowledge at inference time. However, applying RAG to medical imaging presents a unique roadblock. General-domain image retrieval often focuses on global visual features (e.g., identifying a dog). In medical imaging, global features are often nearly identical across different patients (e.g., the general structure of a chest), while the crucial indicators of disease are tiny, fine-grained, and easily overlooked.

X-TRA addresses this gap by building a cross-modal (vision and language) retrieval system specifically tuned to align these fine-grained details. By aligning chest X-rays with their corresponding radiology reports, the system allows models to use historical patient data as an explicit reference guide for new diagnoses.

The X-TRA Framework

The X-TRA framework operates in two distinct stages:

1. Multi-Modal Content Alignment and Indexing

The authors utilize a pre-trained vision-language model (CLIP) as a foundation. To overcome the limitations of standard contrastive learning—which often emphasizes global appearance—they introduce a novel supervised fine-tuning loss ($L_{ours}$). This loss incorporates global disease class labels, forcing the model to align images and text based on specific medical content rather than general visual similarity. Once the model is aligned, the entire training dataset is encoded into a non-parametric FAISS index, enabling high-speed nearest-neighbor searches for both images and reports.

2. Retrieval Augmentation and Fusion

When a new X-ray is processed, the system queries the FAISS index to retrieve the top-$k$ most similar historical X-rays and radiology reports. To integrate this information, X-TRA employs Multi-Head Attention (MHA) to fuse the features of the query image with the features of the retrieved data. This creates an enriched, context-aware representation that is then passed to downstream task heads.

Experimental Results

The framework was evaluated primarily on the MIMIC-CXR dataset (approx. 200,000 pairs), with additional testing on OpenI and CheXpert to assess cross-domain versatility.

  • Cross-Modal Retrieval: X-TRA achieved state-of-the-art results on MIMIC-CXR. For image-to-report retrieval, the fine-tuned CLIP model reached a mean Average Precision (mAP) of 0.793, a significant improvement over previous baselines which averaged around 0.498.
  • Disease Classification: The retrieval augmentation provided a measurable boost in diagnostic accuracy. Using the CLIP backbone, the Area Under the Curve (AUC) increased from 0.80 (without augmentation) to 0.85 (with X-TRA).
  • Report Generation via Retrieval: Interestingly, simply retrieving the best-matching historical report from the database proved highly effective. The system outperformed several dedicated report generation models on standard NLP metrics, achieving a METEOR score of 0.296 and a ROUGE-L of 0.339.

Key Insights

  • General CLIP vs. Medical CLIP: Surprisingly, standard CLIP outperformed PubMedCLIP (fine-tuned on medical data) within this framework. The authors attribute this to standard CLIP’s superior out-of-domain generalization, whereas PubMedCLIP may suffer from domain shifts between its training data and specific chest X-ray datasets.
  • Real Data vs. Synthetic Data: The performance gains from retrieving real historical data are comparable to recent methods that use synthetic, diffusion-generated X-rays for training augmentation. X-TRA achieves these results without the clinical risks of "hallucinated" medical features inherent in synthetic imagery.
  • Robustness to Irrelevant Data: The MHA fusion mechanism is remarkably robust. If the retrieved information is not relevant—such as when testing on a completely different dataset without fine-tuning—the model learns to ignore the retrieved features rather than allowing them to degrade performance.

Conclusion and Future Work

X-TRA demonstrates that explicit retrieval-augmentation is a powerful tool for medical imaging, bridging the gap between raw visual data and historical clinical knowledge. While cross-dataset transferability remains a challenge due to domain shifts between hospital systems, the framework provides a strong foundation for more reliable medical AI.

Future research may explore fine-tuning the entire CLIP model to domain-specific data while maintaining its generalization capabilities. Additionally, the authors suggest using retrieved reports as direct templates for dedicated report generation decoders to further improve the quality of automated clinical documentation.

Summary updated

BibTeX
@inproceedings{sonsbeek2023x,
  author = {Tom van Sonsbeek and Marcel Worring},
  title = {{X-TRA: Improving Chest X-ray Tasks with Cross-Modal Retrieval Augmentation}},
  booktitle = {IPMI},
  year = {2023},
  doi = {10.1007/978-3-031-34048-2\_36},
}
Figure