Training-Free Retrieval-Augmented Medical Vision-Language Inference Across Multiple Imaging Domains
Background: Medical vision--language models enable zero-shot image classification without task-specific parameter optimization, but their predictions can be sensitive to visual variation and rely primarily on image--text similarity without using available domain-specific reference cases. We investigated whether inference-time visual stabilization and retrieval from labeled support examples could improve the performance of a frozen medical vision--language model across heterogeneous medical imaging tasks. Methods: We developed a training-free inference framework combining multi-scale test-time augmentation with retrieval-augmented prediction. Multiple centrally cropped views of each image were encoded using a frozen MedSigLIP model and averaged to obtain a robust visual representation. The same representation was used to retrieve visually similar examples from a labeled training-set gallery. A task-adaptive retrieval prior was constructed using temperature-scaled class voting for multi-class tasks and independent per-label evidence aggregation for multi-label tasks. Retrieval evidence was subsequently combined with prompt-based zero-shot logits using calibrated log-probability fusion. Fusion hyperparameters were selected using masked self-retrieval on the support set without access to the held-out test data. The framework was evaluated on NCT-CRC-HE-100K/CRC-VAL-HE-7K for histopathology, ISIC 2018 for dermoscopy, and NIH ChestX-ray14 for chest radiography. Results: Retrieval augmentation consistently improved performance across all three imaging domains. On NCT-CRC, accuracy increased from 50.46% with standard zero-shot inference to 94.57%. On ISIC 2018, accuracy increased from 15.25% to 54.24%. On NIH ChestX-ray14, macro-AUC increased from 68.97% to 77.55%. Improvements were statistically significant according to McNemar's test for the multi-class tasks and DeLong's test for the multi-label task. Ablation experiments showed that retrieval provided the dominant improvement, whereas the contribution of test-time augmentation varied across domains. Support-gallery experiments further demonstrated substantial differences in the amount of labeled reference data required across imaging modalities. Conclusion: Retrieval from domain-matched reference examples can substantially improve frozen medical vision--language inference without task-specific parameter updates. The results indicate that non-parametric support memories can provide an effective inference-time adaptation mechanism across both single-label and multi-label medical imaging tasks, although their effectiveness depends on the coverage and representativeness of the available support gallery.
Authors
- Mustafa Elattar (ORCID: https://orcid.org/0000-0001-7936-3522)
- Mohammad K. Yaqub (ORCID: https://orcid.org/0000-0001-6896-1105)
- Shahd M. Noman (ORCID: https://orcid.org/0009-0003-0606-4355)
- Mohammad Yaqub
Institutions
- Mohamed bin Zayed University of Artificial Intelligence (AE)
- Nile University (EG)
Publication Details
- Journal
- Research Square
- Published
- 2026-11-24
- DOI
- https://doi.org/10.21203/rs.3.rs-11118061/v1
- Primary Topic
- Multimodal Machine Learning Applications
- Type
- preprint