Lune

NeurIPS2024Top-tier venue

Rethinking Transformer for Long Contextual Histopathology Whole Slide Image Analysis

Honglin Li, Yunlong Zhang, Pingyi Chen, Zhongyi Shui, Chenglu Zhu, Lin Yang

Abstract

Histopathology Whole Slide Image (WSI) analysis serves as the gold standard for clinical cancer diagnosis in the daily routines of doctors. To develop computer-aided diagnosis model for WSIs, previous methods typically employ Multi-Instance Learning to enable slide-level prediction given only slide-level labels. Among these models, vanilla attention mechanisms without pairwise interactions have traditionally been employed but are unable to model contextual information. More recently, self-attention models have been utilized to address this issue. To alleviate the computational complexity of long sequences in large WSIs, methods like HIPT use region-slicing, and TransMIL employs approximation of full self-attention. Both approaches suffer from suboptimal performance due to the loss of key information. Moreover, their use of absolute positional embedding struggles to effectively handle long contextual dependencies in shape-varying WSIs. In this paper, we first analyze how the low-rank nature of the long-sequence attention matrix constrains the representation ability of WSI modelling. Then, we demonstrate that the rank of attention matrix can be improved by focusing on local interactions via a local attention mask. Our analysis shows that the local mask aligns with the attention patterns in the lower layers of the Transformer. Furthermore, the local attention mask can be implemented during chunked attention calculation, reducing the quadratic computational complexity to linear with a small local bandwidth. Building on this, we propose a local-global hybrid Transformer for both computational acceleration and local-global information interactions modelling. Our method, Long-contextual MIL (LongMIL), is evaluated through extensive experiments on various WSI tasks to validate its superiority. Our code will be available at github.com/invoker-LL/Long-MIL.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

5 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Emerging Properties in Self-Supervised Vision Transformers cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Context Matters: Query-aware Dynamic Long Sequence Modeling of Gigapixel Images cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Context Matters: Query-aware Dynamic Long Sequence Modeling of Gigapixel Images cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • PathVQ: Reforming Computational Pathology Foundation Model for Whole Slide Image Analysis via Vector Quantization cites Emerging Properties in Self-Supervised Vision Transformers
  • PathVQ: Reforming Computational Pathology Foundation Model for Whole Slide Image Analysis via Vector Quantization cites Learning Transferable Visual Models From Natural Language Supervision
  • Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Swin Transformer: Hierarchical Vision Transformer using Shifted Windows cites Learning Transferable Visual Models From Natural Language Supervision
  • Content-aware Information Compression and Selection for Whole Slide Image Analysis cites Emerging Properties in Self-Supervised Vision Transformers
  • Learning Transferable Visual Models From Natural Language Supervision cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Revisiting End-to-End Learning with Slide-level Supervision in Computational Pathology cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Revisiting End-to-End Learning with Slide-level Supervision in Computational Pathology cites Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • Revisiting End-to-End Learning with Slide-level Supervision in Computational Pathology cites No Pains, More Gains: Recycling Sub-Salient Patches for Efficient High-Resolution Image Recognition
  • No Pains, More Gains: Recycling Sub-Salient Patches for Efficient High-Resolution Image Recognition cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers5

  1. 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
  2. PathVQ: Reforming Computational Pathology Foundation Model for Whole Slide Image Analysis via Vector QuantizationHonglin Li, Zhongyi Shui, Yunlong Zhang, Chenglu Zhu et al.NeurIPS 2025 · 6 citations
  3. Context Matters: Query-aware Dynamic Long Sequence Modeling of Gigapixel ImagesZhengrui Guo, Qichen Sun, Jiabo Ma, Lishuang Feng et al.ICML 2025
  4. Content-aware Information Compression and Selection for Whole Slide Image AnalysisTingting Zheng, Hongxun Yao, Sicheng Zhao, Yi XiaoAAAI 2026
  5. No Pains, More Gains: Recycling Sub-Salient Patches for Efficient High-Resolution Image RecognitionRong Qin, Xin Liu, Xingyu Liu, Jiaxuan Liu et al.CVPR 2025

Builds on48

  1. Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
  2. Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu et al.ICCV 2021 · 31,683 citations
  3. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
  4. Emerging Properties in Self-Supervised Vision TransformersMathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou et al.ICCV 2021 · 8,921 citations
  5. FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra et al.NeurIPS 2022 · 5,493 citations

Related papers

  1. Learning Spatial-Preserving Hierarchical Representations for Digital PathologyWeiyi Wu, Xingjian Diao, Chunhui Zhang, Chongyang Gao, Xinwen Xu, Siting Li, Jiang GuiCVPR Findings 2026
  2. HVTSurv: Hierarchical Vision Transformer for Patient-Level Survival Prediction from Whole Slide ImageZhuchen Shao, Yang Chen, Hao Bian, Jian Zhang et al.AAAI 2023 · 44 citations
  3. 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
  4. Multimodal Co-Attention Transformer for Survival Prediction in Gigapixel Whole Slide ImagesRichard J. Chen, Ming Y. Lu, Wei-Hung Weng, Tiffany Y. Chen et al.ICCV 2021 · 369 citations
  5. Transformer-Based Video-Structure Multi-Instance Learning for Whole Slide Image ClassificationYingfan Ma, Xiaoyuan Luo, Kexue Fu, Manning WangAAAI 2024 · 10 citations
Dusk over the sea between two cliffs drawn in fine vertical lines