Few-Shot, Now for Real: Medical VLMs Adaptation without Balanced Sets or Validation

Julio Silva-Rodríguez, Fereshteh Shakeri, Houda Bahig, Jose Dolz, Ismail Ben Ayed · DOI

Abstract

Adapting Vision-Language Models (VLMs) to medical tasks typically relies on few-shot learning benchmarks that assume perfectly balanced data and the availability of validation sets for hyperparameter tuning. In clinical practice, these assumptions rarely hold, as datasets are often characterized by extreme class imbalance and missing categories. We present SS-Text+, a training-free adaptation method that thrives in these "validation-free" and imbalanced environments. By utilizing a closed-form mathematical solver and adaptive regularization that balances visual evidence with textual priors, SS-Text+ provides a robust safety net for rare diseases. Our evaluation across histology, ophthalmology, and radiology datasets demonstrates that SS-Text+ consistently outperforms state-of-the-art methods while being over 15x faster.

The Realistic Gap in Medical AI

Vision-Language Models (VLMs) like CLIP have demonstrated significant potential in medical imaging by bridging the gap between pixel data and clinical reports. However, the standard "few-shot" adaptation paradigm used to specialize these models is often overoptimistic. Academic benchmarks typically assume:

  1. Balanced Support Sets: An equal number of examples ($K$) for every disease stage.
  2. The Validation Set Tax: The presence of a separate validation set to tune learning rates or epochs.

In reality, healthy cases are abundant while severe pathologies are rare or entirely absent in small clinical samples. Furthermore, requiring a validation set effectively doubles the data requirement in a few-shot scenario, which is highly inefficient. When these ideal conditions are removed, existing state-of-the-art (SoTA) adapters often degrade significantly, sometimes performing worse than the original zero-shot model.

Figure 1: Illustration of realistic few-shot sets with imbalanced categories and the corresponding performance drop observed in traditional methods.

Methodology: The SS-Text+ Adapter

SS-Text+ is a "black-box" adapter that operates on pre-computed features without retraining the underlying VLM. It introduces three key technical innovations:

  • Training-Free Solver: Instead of iterative gradient descent, SS-Text+ uses a closed-form solution. This eliminates the need for hyperparameter tuning, making it "validation-free" by design.
  • Adaptive Regularization ($\lambda_c$): The model calculates category-specific weights. For common categories with ample visual examples, the model trusts the images; for rare or missing categories, it relies on the "textual knowledge" (class descriptions) inherited from the VLM.
  • Prototype Repelling: To improve class separation when data is scarce, a post-processing step mathematically "pushes" different class representations (prototypes) away from each other in the embedding space.

Experimental Evaluation

The study evaluated SS-Text+ across three major medical modalities and nine datasets:

  • Histology: CONCH VLM on NCT-CRC, SICAPv2, and SkinCancer.
  • Ophthalmology: FLAIR VLM on MESSIDOR, MMAC, and FIVES.
  • Chest X-ray (CXR): CONVIRT VLM on CheXpert, NIH-LT, and pneumonia datasets.

Performance was tested across three regimes: Standard (balanced), Relaxed (imbalanced but all classes present), and Realistic (imbalanced with potentially missing classes).

Results and Key Insights

SS-Text+ consistently matched or exceeded the performance of existing methods like CLAP and LP++ across all modalities.

  • Robustness to Imbalance: In the "Realistic" scenario, where traditional linear probes can drop nearly 5 points in accuracy, SS-Text+ maintained high performance by using its adaptive blending of text and vision as a safety net.
  • Efficiency: Because it is training-free, SS-Text+ is over 15x faster than gradient-based adapters, making it ideal for on-the-fly clinical adaptation.
  • The Value of Data: A key finding was that it is almost always better to use available "validation data" as extra training data rather than for hyperparameter tuning. A fixed, robust configuration like SS-Text+ consistently beats a tuned configuration that had access to less training data.
Figure 2: Performance comparison (ACA) of SS-Text+ against baseline methods in (a) standard balanced settings and (b) realistic imbalanced scenarios across varying support sample sizes.

Conclusion

SS-Text+ addresses the critical disconnect between academic few-shot learning and clinical reality. By removing the need for balanced sets and validation data, it provides a practical path for deploying medical VLMs. Future work will explore "white-box" fine-tuning for higher absolute accuracy and automated medical prompt engineering to further refine the initial textual prototypes.

Summary updated

BibTeX
@inproceedings{silvarodriguez2025few,
  author = {Julio Silva-Rodríguez and Fereshteh Shakeri and Houda Bahig and Jose Dolz and Ismail Ben Ayed},
  title = {{Few-Shot, Now for Real: Medical VLMs Adaptation without Balanced Sets or Validation}},
  booktitle = {International Conference on Medical Image Computing and Computer-Assisted Intervention},
  year = {2025},
  doi = {10.1007/978-3-032-04981-0\_23},
}
Figure