Table of Contents
Fetching ...

MambaMIL+: Modeling Long-Term Contextual Patterns for Gigapixel Whole Slide Image

Qian Zeng, Yihui Wang, Shu Yang, Yingxue Xu, Fengtao Zhou, Jiabo Ma, Dejia Cai, Zhengyu Zhang, Lijuan Qu, Yu Wang, Li Liang, Hao Chen

TL;DR

The paper tackles gigapixel WSI analysis under weak supervision by addressing long-range sequence modeling and spatial context. It introduces MambaMIL+, a MIL framework that augments a state-space backbone (Mamba) with overlapping scanning, a Selective Stripe Position Encoder, and Contextual Token Selection to preserve spatial cues and extend memory over ultra-long sequences. Across 20 benchmarks spanning diagnostic, molecular, and survival tasks, and using three feature extractors, MambaMIL+ achieves state-of-the-art performance with robust generalization and favorable efficiency compared to Transformer-based MIL methods. The work reinforces the viability of a spatially aware, memory-efficient MIL backbone for large-scale computational pathology and sets a practical direction for scalable WSI analysis.

Abstract

Whole-slide images (WSIs) are an important data modality in computational pathology, yet their gigapixel resolution and lack of fine-grained annotations challenge conventional deep learning models. Multiple instance learning (MIL) offers a solution by treating each WSI as a bag of patch-level instances, but effectively modeling ultra-long sequences with rich spatial context remains difficult. Recently, Mamba has emerged as a promising alternative for long sequence learning, scaling linearly to thousands of tokens. However, despite its efficiency, it still suffers from limited spatial context modeling and memory decay, constraining its effectiveness to WSI analysis. To address these limitations, we propose MambaMIL+, a new MIL framework that explicitly integrates spatial context while maintaining long-range dependency modeling without memory forgetting. Specifically, MambaMIL+ introduces 1) overlapping scanning, which restructures the patch sequence to embed spatial continuity and instance correlations; 2) a selective stripe position encoder (S2PE) that encodes positional information while mitigating the biases of fixed scanning orders; and 3) a contextual token selection (CTS) mechanism, which leverages supervisory knowledge to dynamically enlarge the contextual memory for stable long-range modeling. Extensive experiments on 20 benchmarks across diagnostic classification, molecular prediction, and survival analysis demonstrate that MambaMIL+ consistently achieves state-of-the-art performance under three feature extractors (ResNet-50, PLIP, and CONCH), highlighting its effectiveness and robustness for large-scale computational pathology

MambaMIL+: Modeling Long-Term Contextual Patterns for Gigapixel Whole Slide Image

TL;DR

The paper tackles gigapixel WSI analysis under weak supervision by addressing long-range sequence modeling and spatial context. It introduces MambaMIL+, a MIL framework that augments a state-space backbone (Mamba) with overlapping scanning, a Selective Stripe Position Encoder, and Contextual Token Selection to preserve spatial cues and extend memory over ultra-long sequences. Across 20 benchmarks spanning diagnostic, molecular, and survival tasks, and using three feature extractors, MambaMIL+ achieves state-of-the-art performance with robust generalization and favorable efficiency compared to Transformer-based MIL methods. The work reinforces the viability of a spatially aware, memory-efficient MIL backbone for large-scale computational pathology and sets a practical direction for scalable WSI analysis.

Abstract

Whole-slide images (WSIs) are an important data modality in computational pathology, yet their gigapixel resolution and lack of fine-grained annotations challenge conventional deep learning models. Multiple instance learning (MIL) offers a solution by treating each WSI as a bag of patch-level instances, but effectively modeling ultra-long sequences with rich spatial context remains difficult. Recently, Mamba has emerged as a promising alternative for long sequence learning, scaling linearly to thousands of tokens. However, despite its efficiency, it still suffers from limited spatial context modeling and memory decay, constraining its effectiveness to WSI analysis. To address these limitations, we propose MambaMIL+, a new MIL framework that explicitly integrates spatial context while maintaining long-range dependency modeling without memory forgetting. Specifically, MambaMIL+ introduces 1) overlapping scanning, which restructures the patch sequence to embed spatial continuity and instance correlations; 2) a selective stripe position encoder (S2PE) that encodes positional information while mitigating the biases of fixed scanning orders; and 3) a contextual token selection (CTS) mechanism, which leverages supervisory knowledge to dynamically enlarge the contextual memory for stable long-range modeling. Extensive experiments on 20 benchmarks across diagnostic classification, molecular prediction, and survival analysis demonstrate that MambaMIL+ consistently achieves state-of-the-art performance under three feature extractors (ResNet-50, PLIP, and CONCH), highlighting its effectiveness and robustness for large-scale computational pathology

Paper Structure

This paper contains 25 sections, 18 equations, 11 figures, 10 tables.

Figures (11)

  • Figure 1: Overview of the proposed MambaMIL+. Overlapping patches are first processed by an offline feature extractor. The resulting overlapping features are reordered and sent to the instance learner to generate instance-level masks. A selective stripe position encoder and contextual token selection are then applied to enhance spatial context modeling and mitigate memory decay in the state space duality model.
  • Figure 2: Visualization of the attention map corresponding to randomly selected anchor patches.
  • Figure 3: Comparison of different designs: (1) Vanilla SSM flattening images into 1D sequences; (2) SSM with overlapping scanning preserving spatial continuity across patches.
  • Figure 4: Tissue ratio distributions in the reconstructed two-dimensional map across different datasets.
  • Figure 5: Overview of the selective stripe position encoder.
  • ...and 6 more figures