Whole slide images, with their gigapixel-scale panoramas of tissue samples, are pivotal for precise disease diagnosis. However, their analysis is hindered by immense data size and scarce annotations. Existing MIL methods face challenges due to the fundamental imbalance where a single bag-level label must guide the learning of numerous patch-level features. This sparse supervision makes it difficult to reliably identify discriminative patches during training, leading to unstable optimization and suboptimal solutions. We propose a spatially regularized MIL framework that leverages inherent spatial relationships among patch features as label-independent regularization signals. Our approach learns a shared representation space by jointly optimizing feature-induced spatial reconstruction and label-guided classification objectives, enforcing consistency between intrinsic structural patterns and supervisory signals. Experimental results on multiple public datasets demonstrate significant improvements over state-of-the-art methods, offering a promising direction.
Figures & tables
Figure 1: Illustration of regularization fashions in MIL. In attention maps, orange represents high-attention instances. In the classification diagrams, red and green represent the target and non-target classes, respectively. The dense dashed lines represent the decision boundary. Circles indicate bag features, squares denote instance features, and dashed circles represent bag features after dropout. (1) Enforces label consistency between high-attention instances and bags. (2) Stochastically drops instances based on attention scores. Both methods are label-driven and iteratively update the model based on classification, with the updated model generating new attention maps for the next iteration. (3) Regularizes feature spaces through masked feature reconstruction, offering a label-independent and noise-free regularization.
Figure 2: Overview of the SRMIL framework. The model employs dual learning streams: a feature-induced stream with self-supervised reconstruction and a label-guided classification stream. The encoder-decoder architecture processes WSI patch embeddings through graph attention networks, where random masked patch features reconstruction serves as noise-free regularization, complementing the supervised learning objective. Black lines indicate information flow from input patches through both learning streams.
Figure 3: Behavior Analysis of the ABMIL Model on the training set during training. (a) Training accuracy curve. (b) Ratio of WSIs containing highly attended instances (attention weights ≥ 0.5). (c) Instance-bag label alignment ratios for positive slides, categorizing instances as top-1 attended, top-5 attended, and highly attended. An instance is labeled positive if over 20% of its area contains annotated positive regions. Negative slides are excluded as they contain only negative instances. (d) Distribution of maximum attention weights. ABMIL exhibits a highly skewed attention pattern with maximum weights up to 1, whereas SRMIL’s weights are concentrated below 0.1, indicating a more uniform attention distribution.
ResNet as Feature Extractor
ViT as Feature Extractor
Method
CAMELYON-16
TCGA-Lung
BRACS
CAMELYON-16
TCGA-Lung
BRACS
Acc
AUC
Acc
AUC
Acc
AUC
Acc
AUC
Acc
AUC
Acc
AUC
ABMIL based
ABMIL
0.867
0.880
0.843
0.928
0.639
0.790
0.879
0.887
0.877
0.944
0.586
0.796
CLAM-SB
0.881
0.875
0.857
0.925
0.616
0.770
0.874
0.874
0.874
0.952
0.614
0.798
CLAM-MB
0.870
0.884
0.842
0.935
0.623
0.794
0.887
0.906
0.879
0.952
0.605
0.783
Table 1: Comparison of methods across datasets using different feature extractors. Values are means over 5 runs; best in bold , second best underlined . For BRACS dataset, AUC refers to Macro AUC.
Representation
Accuracy
Recall
F1 Score
Original
0.972
0.393
0.555
After ABMIL
0.973
0.432
0.593
After SRMIL
0.979
0.569
0.707
Table 2: Metrics for instance classification using a KNN classifier
Lcomp
Lrecon
Lcorr
Accuracy
AUC
✓
✗
✗
0.865 (0.845,0.899)
0.832 (0.760,0.897)
✓
✗
✓
0.874 (0.860,0.884)
0.856 (0.821,0.886)
✓
✓
✗
0.896 (0.876,0.922)
0.900 (0.875,0.920)
✗
✓
✓
0.888 (0.860,0.907)
0.903 (0.866,0.926)
✓
✓
✓
0.912 (0.884,0.938)
0.913 (0.889,0.929)
Table 3: Ablation study results showcasing the impact of graph reconstruction and corrupted graph prediction components on model performance.
Figure 4: Visualization of ABMIL attention for a negative bag.
Method
Training (s/WSI)
Inference (s/WSI)
ATTMIL
0.0148
0.0035
RRTMIL
0.0548
0.0098
TransMIL
0.1210
0.0198
SRMIL (Ours)
0.0785
0.0232
Table 4: Computational efficiency analysis. We report the average time per WSI on the Camelyon16 dataset. All experiments were conducted on a single NVIDIA A6000 GPU.
Figure 5: Visualization of the effect of different mask ratios.
USTC, Anhui, China · Anhui Province Key Laboratory of Biomedical Imaging and Intelligent Processing, Institute of Artificial Intelligence, Hefei Comprehensive National Science Center, Anhui, China · SCNU, Guangdong, China +2
Department of Computer Science and Software Engineering (CSSE), Concordia University, Montreal, Canada · McGill University, Montreal, Canada · Mila – Quebec AI Institute, Montreal, Canada