SAM-MIL: A Spatial Contextual Aware Multiple Instance Learning Approach for Whole Slide Image Classification
Heng Fang, Sheng Huang, Wenhao Tang, Luwen Huangfu, Bo Liu
Abstract
Multiple Instance Learning (MIL) represents the predominant framework in Whole Slide Image (WSI) classification, covering aspects such as sub-typing, diagnosis, and beyond. Current MIL models predominantly rely on instance-level features derived from pretrained models such as ResNet. These models segment each WSI into independent patches and extract features from these local patches, leading to a significant loss of global spatial context and restricting the model's focus to merely local features. To address this issue, we propose a novel MIL framework, named SAM-MIL, that emphasizes spatial contextual awareness and explicitly incorporates spatial context by extracting comprehensive, image-level information. The Segment Anything Model (SAM) represents a pioneering visual segmentation foundational model that can capture segmentation features without the need for additional fine-tuning, rendering it an outstanding tool for extracting spatial context directly from raw WSIs. Our approach includes the design of group feature extraction based on spatial context and a SAM-Guided Group Masking strategy to mitigate class imbalance issues. We implement a dynamic mask ratio for different segmentation categories and supplement these with representative group features of categories. Moreover, SAM-MIL divides instances to generate additional pseudo-bags, thereby augmenting the training set, and introduces consistency of spatial context across pseudo-bags to further enhance the model's performance. Experimental results on the CAMELYON-16 and TCGA Lung Cancer datasets demonstrate that our proposed SAM-MIL model outperforms existing mainstream methods in WSIs classification. Our open-source implementation code is is available at https://github.com/FangHeng/SAM-MIL.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 95419434-7be9-41b1-9357-b95e2b923c20Cited by top-tier papers3
- Revisiting End-to-End Learning with Slide-level Supervision in Computational PathologyWenhao Tang, Rong Qin, Heng Fang, Fengtao Zhou et al.NeurIPS 2025 · 10 citations
- MUSE: Harnessing Precise and Diverse Semantics for Few-Shot Whole Slide Image ClassificationJiahao Xu, Sheng Huang, Xin Zhang, Zhixiong Nan et al.CVPR 2026 · 2 citations
- Efficient Multi-Slide Visual-Language Feature Fusion for Placental Disease ClassificationHang Guo, Qing Zhang, Zixuan Gao, Siyuan Yang et al.ACM MM 2025 · 2 citations
Builds on12
- Segment AnythingAlexander Kirillov, Eric Mintun, Nikhila Ravi, Hanzi Mao et al.ICCV 2023 · 13,211 citations
- TransMIL: Transformer based Correlated Multiple Instance Learning for Whole Slide Image ClassificationZhuchen Shao, Hao Bian, Yang Chen, Yifeng Wang et al.NeurIPS 2021 · 1,163 citations
- Scaling Vision Transformers to Gigapixel Images via Hierarchical Self-Supervised LearningRichard J. Chen, Chengkuan Chen, Yicong Li, Tiffany Y. Chen et al.CVPR 2022 · 490 citations
- DTFD-MIL: Double-Tier Feature Distillation Multiple Instance Learning for Histopathology Whole Slide Image ClassificationHongrun Zhang, Yanda Meng, Yitian Zhao, Yihong Qiao et al.CVPR 2022 · 402 citations
- CAMEL: A Weakly Supervised Learning Framework for Histopathology Image SegmentationGang Xu, Zhigang Song, Zhuo Sun, Calvin Ku et al.ICCV 2019 · 187 citations
Related papers
- CAMIL: Context-Aware Multiple Instance Learning for Cancer Detection and Subtyping in Whole Slide ImagesOlga Fourkioti, Matt De Vries, Chris BakalICLR 2024 · 25 citations
- Multiple Instance Learning Framework with Masked Hard Instance Mining for Whole Slide Image ClassificationWenhao Tang, Sheng Huang, Xiaoxian Zhang, Fengtao Zhou et al.ICCV 2023 · 84 citations
- Boosting Multiple Instance Learning Models for Whole Slide Image Classification: A Model-Agnostic Framework Based on Counterfactual InferenceWeiping Lin, Zhenfeng Zhuang, Lequan Yu, Liansheng WangAAAI 2024 · 19 citations
- CaMIL: Causal Multiple Instance Learning for Whole Slide Image ClassificationKaitao Chen, Shiliang Sun, Jing ZhaoAAAI 2024 · 30 citations
- Dynamic Policy-Driven Adaptive Multi-Instance Learning for Whole Slide Image ClassificationTingting Zheng, Kui Jiang, Hongxun YaoCVPR 2024 · 16 citations
