Abstract
Medical images are often more difficult to acquire than natural images due to the specialism of the equipment and technology, which leads to fewer medical image datasets. Consequently, training strong pretrained medical vision models from scratch is challenging. This paper explores how to best adapt natural-image pretrained models to the medical domain. While Linear Probing (LP) is popular, it only addresses the output feature extraction gap. We introduce MoVL (Mixture of Visual Prompting and Linear Probe) to bridge the input gap using visual prompting (VP). By employing a joint learning loss function that combines categorization and discrepancy loss, MoVL achieves performance comparable to full finetuning (FF) with significantly fewer parameters. Notably, on out-of-distribution (OOD) medical data, MoVL outperforms FF by an absolute 5.18%.
Introduction: The Data Scarcity Challenge
Deep learning's success in computer vision is largely driven by massive datasets like ImageNet. However, medical imaging remains a "data-scarce" domain. Specialized equipment, privacy concerns, and the need for expert annotation make it difficult to build large-scale medical foundation models.
Researchers typically adapt models pretrained on natural images to medical tasks. However, a significant domain gap exists between natural objects (e.g., animals, landscapes) and medical structures (e.g., histology slides, X-rays). Standard adaptation techniques like Linear Probing (LP) only adjust the output classification head, ignoring the "input gap." Visual Prompting (VP) attempts to fix this by adding learnable perturbations to the input image. MoVL investigates the optimal fusion of these two strategies.
Methods: Mixture of Visual Prompting and Linear Probe
The core of MoVL is the simultaneous optimization of an input prompt and an output classification head while keeping the backbone model entirely frozen.
Joint Training and Loss Function
Unlike sequential approaches, MoVL trains the VP and LP components together. This allows the input distribution shift and the classification logic to co-adapt. The authors introduce a Confidence-Driven Loss Function that combines:
- Categorization Loss: Standard cross-entropy for classification.
- Discrepancy Loss: This term measures the variance between predictions for prompted and plain images. It encourages the model to be more confident when the visual prompt is present, effectively rewarding the prompt's contribution to the final decision.
Experimental Evaluation
MoVL was tested across four diverse medical datasets:
- HAM10000: Skin lesion classification.
- PathMNIST: Colorectal cancer histology.
- BloodMNIST: Blood cell classification.
- Camelyon17: Used specifically to evaluate Out-of-Distribution (OOD) robustness across different hospital data sources.
The experiments utilized various backbones, including ResNet18, ResNet50, and CLIP-based Vision Transformers (ViT-B/32 and ViT-L/14).
Key Results and Discussion
MoVL demonstrates exceptional parameter efficiency and robustness. While Full Finetuning (FF) requires updating over 100 million parameters, MoVL achieves similar results by tuning only ~0.029 million parameters.
Performance Highlights
- In-Distribution Accuracy: MoVL reached an average accuracy of 90.91% across ID datasets, nearly matching the 91.13% of FF.
- OOD Superiority: On the Camelyon17 benchmark, MoVL (90.33%) significantly outperformed FF (85.15%). This suggests that freezing the backbone prevents the "feature distortion" that often occurs during full finetuning, preserving the model's generalizability.
- Synergy: The results confirm that LP and VP are complementary; LP handles label mapping while VP aligns the medical input with the pretrained encoder's expectations.
Conclusion
MoVL provides a robust, parameter-efficient framework for medical image adaptation. By bridging both input and output gaps through joint training and a novel discrepancy loss, it offers a viable alternative to full finetuning, especially in clinical settings where data distribution shifts are common. Future work will explore more sophisticated prompt designs and automated hyperparameter tuning for the discrepancy loss.
Summary updated