Abstract
Digital pathology based on whole slide images (WSIs) plays a key role in cancer diagnosis and clinical practice. Due to the high resolution of the WSI and unavailability of patch-level annotations, WSI classification is usually formulated as a weakly supervised problem, which relies on multiple instance learning (MIL) based on patches of a WSI. In this paper, we aim to learn an optimal patch-level feature space by integrating prototype learning with MIL. To this end, we develop a Trainable Prototype enhanced deep MIL (TPMIL) framework for weakly supervised WSI classification. In contrast to conventional methods which rely on a certain number of selected patches for feature space refinement, we softly cluster all the instances by allocating them to their corresponding prototypes. Additionally, our method is able to reveal the correlations between different tumor subtypes through distances between corresponding trained prototypes. More importantly, TPMIL also enables more accurate interpretability based on the distance of the instances from the trained prototypes, which serves as an alternative to conventional attention score-based interpretability. We test our method on two WSI datasets and it achieves a new state-of-the-art (SOTA).
Introduction
In digital pathology, gigapixel Whole Slide Images (WSIs) are the gold standard for cancer diagnosis. Because annotating these massive images at the pixel or patch level is prohibitively expensive, researchers use weakly supervised learning—specifically Multiple Instance Learning (MIL). In MIL, a WSI is treated as a "bag" of thousands of small patches, and the model only has access to a single slide-level label (e.g., "Cancer" or "Normal").
Recent MIL models, such as CLAM, attempt to refine the feature space by identifying a few "extreme" patches (those with the highest and lowest attention scores) and clustering them. However, relying on a tiny fraction of patches (sometimes as few as 8 out of thousands) to shape the entire feature space can lead to bias, overfitting, and sub-optimal representations. TPMIL addresses this by asking: How can we leverage the features of every single patch in a slide to build a better, more representative latent space?
Methodology: The TPMIL Framework
The authors propose TPMIL (Trainable Prototype enhanced deep MIL), which builds upon the standard MIL foundation with a novel Prototype Learning Module.
- Standard MIL Foundation: Like existing methods, TPMIL uses a pre-trained CNN to extract features from WSI patches and an attention mechanism to assign an "importance score" to each patch, aggregating them to predict the slide-level label.
- Prototype Learning Module: Instead of just using extreme patches, TPMIL initializes $K+1$ trainable "prototype" vectors ($K$ tumor subtypes + 1 normal tissue prototype).
- Soft Pseudo-Labeling and Holistic Clustering: During training, the model calculates the Euclidean distance between every patch and these prototypes. It uses MIL attention scores to generate "soft pseudo-labels." For example, a patch with a high attention score in a "Tumor A" slide is pushed closer to the "Tumor A" prototype, while a low-attention patch is pushed toward the "Normal" prototype. By optimizing a Kullback-Leibler (KL) divergence loss, TPMIL softly clusters all instances in the feature space, ensuring a globally optimized distribution.
Results and Performance
TPMIL was evaluated on two public datasets from The Cancer Genome Atlas (TCGA):
- TCGA Brain Tumor Dataset: A multi-class dataset containing 1,148 slides across three glioma subtypes (Astrocytoma, Oligodendroglioma, and Glioblastoma).
- TCGA Lung Cancer Dataset: A binary dataset containing 1,046 slides comparing Lung Adenocarcinoma (LUAD) and Lung Squamous Cell Carcinoma (LUSC).
The framework achieved new SOTA results on both datasets. On the Brain Tumor dataset, it reached 0.9417 AUC and 83.16% Accuracy, outperforming the CLAM baseline. On the Lung Cancer dataset, it achieved 0.9799 AUC and 94.27% Accuracy, surpassing recent methods like DSMIL and DGMIL.
Interpretability and Biological Relevance
A significant contribution of TPMIL is its distance-based interpretability. Standard attention heatmaps are often sensitive to slide artifacts like overstaining or tissue folds. TPMIL allows for "distance heatmaps," visualizing how close a patch's features are to a specific tumor prototype.
As shown above, distance heatmaps are significantly more robust against artifacts while accurately highlighting true tumor morphology, such as necrosis. Furthermore, the learned latent space reflects biological reality: lower-grade gliomas (Astrocytoma and Oligodendroglioma) were found to cluster closer to each other than to the highly aggressive Glioblastoma prototype.
Conclusion
TPMIL demonstrates that every patch in a WSI contains valuable structural information. By clustering all instances rather than a selected few, the model learns a richer, less biased feature space. While the current implementation relies on frozen feature extractors and assumes mutually exclusive pathologies, the improved performance and robust interpretability mark a significant step forward for clinical diagnostic workflows.
Summary updated