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
