RAMM: Retrieval-augmented Biomedical Visual Question Answering with Multi-modal Pre-training

Zheng Yuan, Qiao Jin, Chuanqi Tan, Zhengyun Zhao, Hongyi Yuan, Fei Huang, Songfang Huang

TL;DR

RAMM introduces a retrieval-augmented multi-modal paradigm for biomedical Visual Question Answering (VQA) that mimics how doctors consult past case literature to solve complex patient cases. By leveraging a massive new dataset (PMCPM) and a novel retrieval-attention mechanism, RAMM overcomes the severe data limitations of medical VQA and achieves state-of-the-art results across multiple benchmarks.

What Problem Does This Paper Address?

While general-domain Visual Question Answering (VQA) models thrive on millions of labeled training examples, biomedical VQA suffers from a chronic shortage of data. Expert medical annotation is expensive and time-consuming, leaving benchmarks small and models highly prone to overfitting.

Conversely, the biomedical literature contains an absolute goldmine of high-quality, diverse image-text pairs (such as radiology scans paired with detailed captions in case reports). The authors of this paper address a key question: How can we effectively retrieve and leverage this vast repository of medical literature to help a model answer specific clinical questions?

Methods

RAMM (Retrieval-Augmented bioMedical Multi-modal paradigm) operates in two main phases: pre-training and retrieval-augmented fine-tuning.

  1. Multi-modal Pre-training: The model uses PubMedBERT for text encoding and a Swin Transformer for image encoding. It is trained on three standard tasks: Masked Language Modeling (MLM), Image-Text Matching (ITM), and Image-Text Contrastive learning (ITC). The ITC task is crucial because it aligns visual and textual features into the same embedding space.
  2. Image-Based Retrieval: During fine-tuning, RAMM acts as a dense retriever. Because biomedical VQA questions are often generic (e.g., "What modality is shown here?"), the model uses only the input image to query the pre-training database via ITC similarity scores, fetching the top-$r$ most similar image-text pairs.
  3. Retrieval-Attention Fusion: To integrate this external knowledge, the authors introduce a novel Retrieval-Attention Module inside the multi-modal transformer layers. After the standard self-attention and cross-attention steps, this module uses the input image/question features as queries to attend over the keys and values of the retrieved reference cases, seamlessly injecting relevant clinical context before making a final prediction.
Figure 2. The workflow of our proposed retrieval-augmented paradigm RAMM for biomedical VQA. The origin image is from VQA datasets, and the other images are retrieved. Blue lines represent retrieving image-text pairs (PMCID:4061445, 2278144, 4725742, and 3616602) from PMCPM, ROCO, and MIMIC-CXR datasets based on image-text contrastive similarities. Retrieval-augmented samples are sent into uni-modal and multi-modal encoders. Multi-modal encoders contain retrieval-attention to fuse retrieved information. Repre- sentations obtained by multi-modal encoders are used for VQA classification.

Datasets

Pre-training & Retrieval Sources

  • PMCPM (PubMed Central Patients Multi-modal): A new dataset introduced in this paper. It contains 398,109 high-quality, patient-based image-text pairs filtered specifically from PubMed Central case reports to ensure diverse clinical conditions and rich descriptions.
  • ROCO & MIMIC-CXR: Existing large-scale biomedical datasets used alongside PMCPM to broaden the pre-training and retrieval pool.

Evaluation Benchmarks

The model was evaluated on four popular biomedical VQA datasets: Med-VQA2019, Med-VQA2021, VQARAD, and SLAKE (English version).

Key Insights and Ideas

  • The "Doctor's Workflow" Analogy: Instead of forcing the model to memorize all medical knowledge implicitly within its weights, RAMM simulates how human clinicians work—looking up similar historical cases to confirm a diagnosis or clarify ambiguous image features.
  • Why Image-Only Retrieval Works: In medical VQA, text queries can be misleadingly homogeneous across different images (e.g., multiple different cases asking "Is this normal?"). Relying strictly on image-to-image and image-to-text contrastive similarity ensures the retrieved literature is relevant to the specific anatomy and modality at hand.
  • The Diminishing Returns of Context: The authors found that retrieving 2 to 4 reference pairs yielded the best performance. Bumping the retrieval count up to 8 actually degraded accuracy, proving that too much external context introduces harmful noise into the multi-modal fusion layer.
Figure 4. The architecture of retrieval-attention for text modality.

Key Results

RAMM achieved state-of-the-art (SOTA) performance across all four evaluation datasets, outperforming both non-pretrained and heavily pretrained baseline models:

  • VQA-Med 2019: Achieved 82.13% accuracy (outperforming the previous SOTA, M3AE, by 1.86%).
  • VQARAD: Achieved 78.27% accuracy (+1.26% over SOTA).
  • SLAKE: Achieved 86.05% accuracy (+2.80% over SOTA).
  • VQA-Med 2021: Scored 39.20%, notably outperforming the top ensemble methods from the original official challenge.

Ablation studies highlighted that even without the retrieval mechanism, pre-training on the new PMCPM dataset provided a substantial performance boost, confirming the high quality of the newly curated data.

Limitations and Future Work

While highly effective, RAMM's performance is sensitive to the number of retrieved samples ($r$). Because the model currently uses a fixed retrieval count, it risks incorporating irrelevant or noisy data if the retrieval pool lacks close matches for a rare condition.

The authors suggest that future work could explore more dynamic retrieval thresholds or advanced filtering mechanisms to ensure that only highly reliable, context-enhancing literature pairs are fused into the network.

Summary updated

BibTeX
@inproceedings{yuan2023ramm,
  author = {Zheng Yuan and Qiao Jin and Chuanqi Tan and Zhengyun Zhao and Hongyi Yuan and Fei Huang and Songfang Huang},
  title = {{RAMM: Retrieval-augmented Biomedical Visual Question Answering with Multi-modal Pre-training}},
  booktitle = {ACM Multimedia},
  year = {2023},
  doi = {10.1145/3581783.3611830},
}
Figure