Lune

ICML2025Top-tier venue

Context Matters: Query-aware Dynamic Long Sequence Modeling of Gigapixel Images

Zhengrui Guo, Qichen Sun, Jiabo Ma, Lishuang Feng, Jinzhuo Wang, Hao Chen

Abstract

Whole slide image (WSI) analysis presents significant computational challenges due to the massive number of patches in gigapixel images. While transformer architectures excel at modeling longrange correlations through self-attention, their quadratic computational complexity makes them impractical for computational pathology applications. Existing solutions like local-global or linear self-attention reduce computational costs but compromise the strong modeling capabilities of full self-attention. In this work, we propose Querent, i.e., the query-aware long contextual dynamic modeling framework, which achieves a theoretically bounded approximation of full selfattention while delivering practical efficiency. Our method adaptively predicts which surrounding regions are most relevant for each patch, enabling focused yet unrestricted attention computation only with potentially important contexts. By using efficient region-wise metadata computation and importance estimation, our approach dramatically reduces computational overhead while preserving global perception to model fine-grained patch correlations. Through comprehensive experiments on biomarker prediction, gene mutation prediction, cancer subtyping, and survival analysis across over 10 WSI datasets, our method demonstrates superior performance compared to the state-of-the-art approaches. Codes are here.

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.

3 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

  • Scaling Vision Transformers to Gigapixel Images via Hierarchical Self-Supervised Learning cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Scaling Vision Transformers to Gigapixel Images via Hierarchical Self-Supervised Learning cites TransMIL: Transformer based Correlated Multiple Instance Learning for Whole Slide Image Classification
  • FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Mixture of Mini Experts: Overcoming the Linear Layer Bottleneck in Multiple Instance Learning cites TransMIL: Transformer based Correlated Multiple Instance Learning for Whole Slide Image Classification
  • Exploiting Low-Dimensional Manifold of Features for Few-Shot Whole Slide Image Classification cites TransMIL: Transformer based Correlated Multiple Instance Learning for Whole Slide Image Classification
  • Exploiting Low-Dimensional Manifold of Features for Few-Shot Whole Slide Image Classification cites FOCUS: Knowledge-enhanced Adaptive Visual Compression for Few-shot Whole Slide Image Classification
  • TransMIL: Transformer based Correlated Multiple Instance Learning for Whole Slide Image Classification cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • TransMIL: Transformer based Correlated Multiple Instance Learning for Whole Slide Image Classification cites Nyströmformer: A Nyström-based Algorithm for Approximating Self-Attention
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. Mixture of Mini Experts: Overcoming the Linear Layer Bottleneck in Multiple Instance LearningDaniel Shao, Joel Runevic, Richard J. Chen, Drew F. K. Williamson et al.ICLR 2026 · 3 citations
  2. Exploiting Low-Dimensional Manifold of Features for Few-Shot Whole Slide Image ClassificationConghao Xiong, Zhengrui Guo, Zhe Xu, Yifei Zhang et al.ICLR 2026 · 1 citation
  3. FOCUS: Knowledge-enhanced Adaptive Visual Compression for Few-shot Whole Slide Image ClassificationZhengrui Guo, Conghao Xiong, Jiabo Ma, Qichen Sun et al.CVPR 2025

Builds on20

  1. 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
  2. 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
  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. Nyströmformer: A Nyström-based Algorithm for Approximating Self-AttentionYunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan et al.AAAI 2021 · 675 citations
  5. 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

Related papers

  1. 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
  2. Learning Spatial-Preserving Hierarchical Representations for Digital PathologyWeiyi Wu, Xingjian Diao, Chunhui Zhang, Chongyang Gao, Xinwen Xu, Siting Li, Jiang GuiCVPR Findings 2026
  3. Rethinking Transformer for Long Contextual Histopathology Whole Slide Image AnalysisHonglin Li, Yunlong Zhang, Pingyi Chen, Zhongyi Shui et al.NeurIPS 2024 · 27 citations
  4. Thinking in Scales: Accelerating Gigapixel Pathology Image Analysis via Adaptive Continuous ReasoningJiusong Ge, Yingkang Zhan, Wenjie Zhao, Di Zhang et al.ICML 2026
  5. TICON: A Slide-Level Tile Contextualizer for Histopathology Representation LearningVarun Belagali, Saarthak Kapse, Pierre Marza, Srijan Das, Zilinghan Li, Sofiène Boutaj, Pushpak Pati, Srikar Yellapragada, Tarak Nath Nandi, Ravi K Madduri, Joel Saltz, Prateek Prasanna, Stergios Christodoulidis, Maria Vakalopoulou, Dimitris SamarasCVPR Findings 2026
Dusk over the sea between two cliffs drawn in fine vertical lines