BiomedCoOp: Learning to Prompt for Biomedical Vision-Language Models

Taha Koleilat, Hojat Asgariandehkordi, Hassan Rivaz, Yiming Xiao

Abstract

Adapting large vision-language models (VLMs) to the biomedical domain is challenging due to the scarcity of annotated data and the complexity of medical imagery. We present BiomedCoOp, a novel prompt-learning framework that leverages expert-level textual knowledge from Large Language Models (LLMs) and a statistical pruning strategy to achieve state-of-the-art performance in few-shot medical image classification.

Introduction

Vision-Language Models (VLMs) like CLIP have transformed computer vision by aligning visual and textual representations. However, their application in medicine is hindered by the significant domain gap between natural images and medical scans (e.g., MRI, CT, Ultrasound). While domain-specific models like BiomedCLIP exist, they often require labor-intensive manual prompt engineering to perform specific tasks. Full fine-tuning is frequently impractical due to data scarcity. Existing automated prompt-learning techniques often overfit to small training sets, failing to generalize to novel diseases. BiomedCoOp addresses these challenges by efficiently teaching VLMs to understand nuanced medical features using only a few examples.

Methodology

BiomedCoOp builds upon the BiomedCLIP backbone and introduces two key innovations to enhance prompt learning:

Semantic Consistency by Contextual Mapping (SCCM)

Instead of simple class labels or generic prompts, BiomedCoOp utilizes GPT-4 to generate diverse, expert-level descriptions of medical conditions. The framework then "anchors" learnable prompts to the average of these LLM-generated descriptions. This ensures that the learnable context remains grounded in established medical knowledge, preventing the model from drifting into non-semantic regions of the embedding space.

Knowledge Distillation with Selective Prompting (KDSP)

Recognizing that not all LLM-generated prompts are equally relevant to a specific image, BiomedCoOp employs a statistics-based pruning strategy. Using Median Absolute Deviation (MAD), the model identifies and excludes "outlier" prompts that do not align well with the visual evidence. The knowledge from the most relevant prompts is then distilled into the model's learnable context vectors, creating a robust "student" prompt that mimics a high-quality "teacher" ensemble.

The BiomedCoOp architecture featuring SCCM and KDSP modules.

Experimental Setup

The framework was evaluated across 11 diverse medical datasets, encompassing 10 organs and 9 imaging modalities, including MRI (BTMRI), CT (CTKidney), Ultrasound (BUSI), X-ray, and Histopathology (DermaMNIST). This rigorous testing ensures the model's versatility across different clinical scenarios.

Key Results and Discussion

BiomedCoOp consistently outperformed state-of-the-art methods across multiple benchmarks:

  • Few-Shot Performance: In 1-shot and 2-shot scenarios, BiomedCoOp achieved a ~5% accuracy improvement over the next best method, ProGrad.
  • Generalization: In "base-to-novel" generalization tests, the model showed a 5-10% improvement on challenging datasets like CTKidney and Kvasir, demonstrating its ability to handle unseen diseases.
  • Interpretability: Saliency map visualizations confirm that BiomedCoOp accurately focuses on relevant pathological regions (e.g., the tumor mass) rather than background noise or general scan characteristics.
Saliency maps comparing BiomedCoOp with other prompt learning methods across different medical imaging modalities.

Conclusion

BiomedCoOp demonstrates the power of using LLMs as "virtual consultants" to provide synthetic expertise for VLM adaptation. By combining semantic anchoring with statistical pruning, the framework achieves superior accuracy and interpretability in medical image classification. Future work will explore extending this approach to more complex tasks such as image segmentation and object detection, as well as integrating smaller, open-source medical LLMs.

Summary updated

BibTeX
@inproceedings{koleilat2025biomedcoop,
  author = {Taha Koleilat and Hojat Asgariandehkordi and Hassan Rivaz and Yiming Xiao},
  title = {{BiomedCoOp: Learning to Prompt for Biomedical Vision-Language Models}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.01376},
}
Figure