Anatomy-Aware Conditional Image-Text Retrieval

Meng Zheng, Jiajin Zhang, Benjamin Planche, Zhongpai Gao, Terrence Chen, Ziyan WuarXiv 2025 · OpenReview

Abstract

Image-Text Retrieval (ITR) finds broad applications in healthcare, aiding clinicians and radiologists by automatically retrieving relevant patient cases in the database given the query image and/or report, for more efficient clinical diagnosis and treatment, especially for rare diseases. However conventional ITR systems typically only rely on global image or text representations for measuring patient image/report similarities, which overlook local distinctiveness across patient cases. This often results in suboptimal retrieval performance. In this paper, we propose an Anatomical Location-Conditioned Image-Text Retrieval (ALC-ITR) framework, which, given a query image and the associated suspicious anatomical region(s), aims to retrieve similar patient cases exhibiting the same disease or symptoms in the same anatomical region. To perform location-conditioned multimodal retrieval, we learn a medical Relevance-Region-Aligned Vision Language (RRA-VL) model with semantic global-level and region-/word-level alignment to produce generalizable, well-aligned multi-modal representations. Additionally, we perform location-conditioned contrastive learning to further utilize cross-pair region-level contrastiveness for improved multi-modal retrieval. We show that our proposed RRA-VL achieves state-of-the-art localization performance in phase-grounding tasks, and satisfying multi-modal retrieval performance with or without location conditioning. Finally, we thoroughly investigate the generalizability and explainability of our proposed ALC-ITR system in providing explanations and preliminary diagnosis reports given retrieved patient cases (conditioned on anatomical regions), with proper off-the-shelf LLM prompts.

Introduction

In medical imaging, global similarity is often an insufficient proxy for clinical relevance. A chest X-ray might be globally similar to another, but if a lesion is located in the lung apex in one and near the hilum in the other, the clinical implications differ significantly. Existing Image-Text Retrieval (ITR) systems typically map entire images and reports into a shared embedding space, overlooking local distinctiveness—the specific anatomical context where a disease manifests. Furthermore, high-quality datasets with dense local annotations (like bounding boxes) are rare and expensive to produce, hindering the development of models that truly understand anatomical grounding.

Overview of the Anatomical Location-Conditioned Image-Text Retrieval (ALC-ITR) framework.

To address these challenges, we introduce ALC-ITR, a framework that moves beyond global retrieval by allowing clinicians to query specific anatomical regions (e.g., "right lung") to find relevant past cases. This approach ensures that retrieved cases are relevant not just in disease type, but in anatomical location.

Methodology

The ALC-ITR framework is built upon two primary innovations: a novel vision-language model and a location-conditioned training strategy.

Relevance-Region-Aligned Vision Language Model (RRA-VL)

The RRA-VL model utilizes a dual-encoder setup (ResNet-50 for images and BERT for text) enhanced by a Context-Aware Alignment (CAA) module. Unlike standard models that only align global embeddings, the CAA module uses cross-attention to align specific image patches with specific words in the radiology report. To ensure the model focuses on clinically relevant information, a Weighted Consistency mechanism is employed. By using the [CLS] token's attention weights, the model learns to prioritize informative medical terms such as "pneumothorax" or "pleural effusion" over common stop words.

Architecture of the RRA-VL model featuring the Context-aware Alignment Module.

Location-Conditioned Contrastive Learning

A significant hurdle in training region-aware models is the lack of bounding box annotations in large-scale datasets. We overcome this by using GPT-4o as a weak supervisor to process the MIMIC-III/CXR dataset. The LLM extracts (Anatomical Region, Disease/Symptom) pairs from raw text reports. These pairs facilitate location-conditioned contrastive learning via triplet mining. The model is trained to minimize the distance between cases with the same disease in the same anatomical region while maximizing the distance between cases with different diseases or locations.

Explainable Retrieval

The system provides more than just a list of images. Once the top-K similar cases for a specific region are retrieved, their metadata is processed by an off-the-shelf LLM (GPT-4o-mini) to generate a preliminary diagnosis and a natural language explanation for the query image, enhancing the system's clinical utility.

Evaluation and Results

The model was evaluated across several benchmarks to test its grounding and retrieval capabilities, including MIMIC-loc (a curated version of MIMIC-III with LLM-extracted region-level descriptions) and MS-CXR (for phase grounding evaluation against ground-truth bounding boxes).

  • Phase Grounding: RRA-VL achieved state-of-the-art results on MS-CXR with a mean IoU of 0.348 and a Contrast-to-Noise Ratio (CNR) of 1.276, significantly outperforming baselines like BioViL.
  • Retrieval Accuracy: On the MIMIC-loc test set, the model achieved a Rank@1 of 65.11% for region-level retrieval, a substantial improvement over the 11.58% achieved by BioViL.
  • Explainability: In a consistency evaluation, the system's generated diagnoses scored 3.22/5.0, closely approaching the "Pseudo-GT" score of 3.49 and far exceeding the global-retrieval baseline of 2.40.

Discussion and Conclusion

The ALC-ITR framework demonstrates the power of combining local alignment with LLM-based weak supervision. By enforcing a location-conditioned triplet loss, the model learns that "atelectasis in the left lung" is fundamentally different from "atelectasis in the right lung," even if visual features are similar. While the current system shows great promise, future work will explore extending this methodology to 3D modalities like CT or MRI and optimizing the iterative CAA module to reduce computational overhead.

Summary updated

BibTeX
@misc{zheng2025anatomy,
  author = {Meng Zheng and Jiajin Zhang and Benjamin Planche and Zhongpai Gao and Terrence Chen and Ziyan Wu},
  title = {{Anatomy-Aware Conditional Image-Text Retrieval}},
  year = {2025},
  eprint = {2503.07456},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.07456},
}
Figure