Introduction
In the field of digital pathology, Whole Slide Images (WSIs) represent a significant challenge for deep learning due to their gigapixel scale. The standard approach to processing these images is Multiple Instance Learning (MIL), where a slide is treated as a "bag" of smaller image patches. While MIL has shown great promise, it faces a critical hurdle in real-world clinical deployment: catastrophic forgetting.
When a model trained on data from one institution (e.g., Hospital A) is fine-tuned on data from another (e.g., Hospital B), it often loses its ability to accurately diagnose the original dataset. This is largely due to domain shifts caused by different scanners, staining protocols, and tissue preparation techniques. To address this, we present PaGMIL (Pathological Prior-Guided Multiple Instance Learning), a framework designed to maintain diagnostic performance across sequential, multi-institutional datasets by leveraging biological and imaging priors.
The Challenge: Catastrophic Forgetting in MIL
Medical data is rarely static. As new datasets become available from different hospitals, models must be updated. However, standard neural networks are prone to catastrophic forgetting—the abrupt loss of previously learned information upon learning new information. In the context of WSIs, traditional continual learning (CL) strategies like "experience replay" (storing and re-training on old samples) are often impractical because of the massive storage requirements of gigapixel images and the inherent noise within the patches.
Methodology: The PaGMIL Framework
PaGMIL introduces two innovative modules that incorporate pathological priors into the MIL pipeline to stabilize learning and improve generalization.
1. Patch Selector (PS): The Microscopic Prior
Standard MIL models typically select patches based on attention scores. However, these scores can be misleading, often highlighting staining artifacts or noise rather than actual pathology. The Patch Selector module is built on the biological prior that cancer cells do not exist in isolation; they typically grow in clusters.
By recording the spatial coordinates of each patch, the PS module filters out high-scoring but isolated patches that are likely noise. It then employs K-means clustering to select a diverse and representative set of patches across the entire slide. This ensures the model focuses on spatially coherent pathological features, leading to more robust feature extraction that is less sensitive to local artifacts.
2. Prompt Guide (PG): The Macroscopic Prior
To manage the varying visual "styles" of different institutions, PaGMIL utilizes a macroscopic prior. The framework treats the WSI thumbnail—a low-resolution version of the entire slide—as a global "prompt" that encapsulates the specific staining and scanning characteristics of a dataset.
- Training Phase: A ResNet-based generator converts the thumbnail into a feature vector. The model uses specific intra-class and inter-class losses to ensure that prompts from the same institution are clustered together, while prompts from different institutions remain distinct.
- Inference Phase: When presented with a new slide, the model generates a prompt from the thumbnail. This prompt acts as a router, directing the data to the classification head most appropriate for that specific data style, effectively allowing the model to "switch" between learned tasks.
Experimental Results
The framework was evaluated using a sequence of four major public breast cancer datasets: CAMELYON16 (Netherlands), BRACS (Italy), TCGA-BRCA (USA), and BACH (Portugal). These were ordered from most difficult to easiest to rigorously test the model's retention capabilities.
Performance and Retention
PaGMIL demonstrated a superior ability to retain knowledge compared to both baseline MIL models (like CLAM) and existing state-of-the-art continual learning methods (such as EWC and ConSlide).
- Retention Rate: After training on all four datasets, the baseline model's accuracy on the initial CAMELYON16 task dropped to a mere 37.98%. In contrast, PaGMIL maintained an accuracy of 62.40%, representing a significant mitigation of catastrophic forgetting.
- Overall Accuracy: PaGMIL consistently achieved the highest Area Under the Curve (AUC) across the board. For the TCGA-BRCA dataset, it reached a peak AUC of 93.74%.
- Qualitative Evidence: Score heatmaps revealed that while baseline models began to misidentify normal tissue as cancerous after being exposed to new datasets, PaGMIL's attention remained focused on the correct pathological regions throughout the continual learning process.
Conclusion and Future Work
PaGMIL demonstrates that incorporating domain-specific biological priors—such as the spatial clustering of cancer cells and the global style of slide thumbnails—can effectively combat catastrophic forgetting in digital pathology. By moving away from treating WSIs as unordered bags of patches and instead utilizing their inherent spatial and macroscopic context, PaGMIL provides a more stable and scalable path for AI in multi-institutional clinical environments.
Future research will focus on expanding this framework to other cancer types and refining the Prompt Guide to handle scenarios where different institutions share highly similar imaging characteristics, which can currently make task differentiation more challenging.
Summary updated