Slide-Level Prompt Learning with Vision Language Models for Few-Shot Multiple Instance Learning in Histopathology

Devavrat Tomar, Guillaume Vray, Dwarikanath Mahapatra, Sudipta Roy, Jean-Philippe Thiran, Behzad Bozorgtabar

Introduction

In computational pathology, the diagnostic gold standard involves analyzing Whole Slide Images (WSIs)—gigapixel-scale scans of tissue samples. Due to their immense size, these images cannot be processed by standard neural networks in their entirety. Instead, they are typically decomposed into thousands of small patches. The standard framework for analyzing these images is Multiple Instance Learning (MIL), where a collection (or "bag") of patches is assigned a single slide-level label.

While effective, traditional MIL models are notoriously data-hungry, requiring thousands of annotated slides to learn meaningful feature aggregations. Recently, Vision-Language Models (VLMs) like CLIP have emerged as a potential solution for few-shot learning by aligning visual features with natural language. However, general-purpose VLMs often lack the specialized pathological knowledge required to distinguish between subtle tissue phenotypes. This paper introduces SLIP (Slide-Level Integration for Prompt learning), a framework designed to bridge this gap by injecting expert domain knowledge into VLMs for high-performance, few-shot WSI classification.

Methodology: The SLIP Framework

SLIP addresses the limitations of standard VLMs through a three-pronged approach: linguistic priors, a novel pooling strategy, and supervised prompt learning.

1. LLM-Generated Linguistic Priors

To move beyond simple class labels (e.g., "cancer" vs. "normal"), the authors utilize Large Language Models (LLMs) like ChatGPT to generate detailed descriptions of specific tissue phenotypes. For instance, instead of just "gastric adenocarcinoma," the model is provided with descriptions of "cancerous epithelial cells forming tubular structures." These descriptions act as a zero-cost repository of expert knowledge, providing the VLM with the semantic context necessary to recognize complex pathological patterns.

2. Dual-Similarity Pooling

The core technical novelty of SLIP is its Dual-Similarity Pooling strategy. This mechanism aggregates patch-level information into a slide-level representation by calculating two distinct similarity matrices:

  • Slide-to-Tissue Similarity: Measures how well the overall slide-level class names align with the LLM-generated tissue descriptions.
  • Patch-to-Tissue Similarity: Measures the alignment between the visual embeddings of individual patches (extracted via encoders like CLIP or BiomedCLIP) and the textual tissue descriptions.

By computing the product of these similarities, SLIP identifies which specific patches are most representative of the diagnostic category, effectively filtering out irrelevant background tissue or artifacts.

3. Supervised Prompt Learning

Rather than fine-tuning the entire heavy VLM, SLIP employs prompt learning. This involves appending learnable text vectors to the class names, which are then optimized using a supervised InfoNCE loss. This approach allows the model to adapt to the specific nuances of a dataset using only a handful of labeled examples (e.g., 2-shot, 4-shot, or 16-shot scenarios).

Experimental Setup and Results

The authors evaluated SLIP on two challenging Hematoxylin and Eosin (H&E)-stained WSI datasets:

  1. DHMC (Dartmouth Lung Cancer): Focused on classifying lung adenocarcinoma into subtypes (Lepidic, Acinar, and Solid).
  2. PatchGastric: Focused on classifying gastric adenocarcinoma by differentiation stages (Well, Moderately, and Poorly differentiated).

Quantitative Performance

SLIP demonstrated significant improvements over state-of-the-art MIL baselines (such as CLAM and TransMIL) and existing VLM adaptation methods (such as CoOp and CITE). On the PatchGastric dataset using a CLIP ViT-B/16 encoder, SLIP achieved an average accuracy gain of +14.1% across various few-shot settings compared to the CoOp baseline. When utilizing the domain-specific BiomedCLIP encoder in a 16-shot setting, SLIP reached 68.3% accuracy, outperforming the top MIL baseline, TransMIL, which achieved 66.1%.

Interpretability and Validation

Beyond raw accuracy, SLIP offers inherent interpretability. The similarity scores generated during the pooling process can be visualized as heatmaps. In qualitative evaluations, these heatmaps accurately highlighted dense, cohesive tumor regions. These findings were validated by an expert pathologist, confirming that the model's attention aligns with clinically relevant morphological features.

Discussion and Conclusion

SLIP represents a significant step forward in making deep learning more accessible for pathology by reducing the reliance on massive labeled datasets. By leveraging LLMs as "medical dictionaries" and employing a dual-similarity mechanism, the framework successfully adapts general vision-language knowledge to specialized medical tasks.

However, challenges remain. The computational cost of processing gigapixel images through VLM encoders is substantial, and the authors note that future work should focus on optimizing efficiency. Additionally, as with all few-shot systems, there is a risk of patient-level bias when training on very small cohorts. Despite these limitations, SLIP provides a robust foundation for the next generation of interpretable, data-efficient diagnostic tools in digital pathology.

Summary updated

BibTeX
@inproceedings{tomar2025slide,
  author = {Devavrat Tomar and Guillaume Vray and Dwarikanath Mahapatra and Sudipta Roy and Jean-Philippe Thiran and Behzad Bozorgtabar},
  title = {{Slide-Level Prompt Learning with Vision Language Models for Few-Shot Multiple Instance Learning in Histopathology}},
  booktitle = {ISBI},
  year = {2025},
  doi = {10.1109/isbi60581.2025.10980748},
}
Figure