HookMIL: Revisiting Context Modeling in Multiple Instance Learning for Computational Pathology

Xitong Ling, Minxi Ouyang, Xiaoxiao Li, Jiawen Li, Ying Chen, Yuxuan Sun, Xinrui Chen, Tian Guan, Xiaoping Liu, Yonghong HearXiv 2025 · DOI

Introduction

In computational pathology, analyzing Whole-Slide Images (WSIs) presents a unique challenge due to their gigapixel scale. Multiple Instance Learning (MIL) has emerged as the standard approach, treating a slide as a collection of image patches. However, traditional MIL methods often fail to capture the complex spatial and morphological context essential for accurate diagnosis. While Transformer-based models address this by modeling inter-patch relationships, they suffer from quadratic computational complexity, making them impractical for very large slides.

The Challenge of Context in Computational Pathology

Pathologists rely on tissue architecture and spatial relationships—such as the arrangement of tumor cells relative to the stroma—to make diagnoses. Most MIL frameworks either ignore these relationships (Non-Interactive) or attempt to model every possible interaction (Self-Interactive), as shown in Figure 4. The latter approach, while powerful, is computationally expensive ($O(N^2)$) and often introduces noise.

Comparison of interaction mechanisms: (a) Non-Interactive, (b) Self-Interactive (e.g., Transformers), and (c) Hook-Interactive (HookMIL).

The HookMIL Framework

HookMIL introduces a lightweight "hook token" mechanism to bridge this gap. By using a small set of learnable latent anchors, or "hooks," the model achieves global context modeling with linear complexity ($O(NK)$). The framework operates through a structured pipeline:

  1. Feature Extraction: Patches are processed via a frozen vision encoder.
  2. Hook Initialization: Hooks can be initialized randomly or via multimodal priors (text or spatial transcriptomics).
  3. Hook Casting: Hooks interact with instances to gather morphological patterns and then communicate among themselves.
  4. Hook Aggregation: Refined hooks provide feedback to instances, and a final prediction is made via attention pooling.
The HookMIL architecture, illustrating the four main stages: Feature Extraction, Hook Initialization, Hook Casting, and Hook Aggregation.

A critical component is the Hook Diversity Loss, which ensures that different hooks specialize in distinct histopathological features, preventing redundant representation.

Theoretical and Practical Advantages

HookMIL acts as a structured low-rank approximation of global self-attention. This allows it to capture essential global structures while significantly reducing computational overhead—up to 1250x for typical slides. Furthermore, the use of multimodal initialization (e.g., using pathology-specific text embeddings) allows the model to leverage expert domain knowledge, accelerating convergence and improving diagnostic accuracy.

Experimental Performance

The model was evaluated on four major benchmarks: CAMELYON+ (metastasis), PANDA (prostate cancer), TISSUENET (cervical lesions), and BCNB (breast cancer biomarkers). HookMIL consistently outperformed state-of-the-art baselines:

  • PANDA: Achieved a top AUC of 94.42%, surpassing standard attention-based MIL.
  • BCNB-HER2: Reached an AUC of 66.42% using spatial transcriptomics initialization, a 3% improvement over the next best model.
  • Interpretability: Attention maps revealed that hooks successfully specialized in diagnostic anchors like tumor margins and glandular structures.

Conclusion and Future Directions

HookMIL provides an efficient and interpretable solution for context modeling in gigapixel images. By routing information through specialized hooks, it balances computational feasibility with high-fidelity morphological analysis. Future work will explore scaling HookMIL to slide-level foundation models and integrating broader clinical signals, such as molecular profiles, through its flexible hook interface.

Summary updated

BibTeX
@misc{ling2025hookmil,
  author = {Xitong Ling and Minxi Ouyang and Xiaoxiao Li and Jiawen Li and Ying Chen and Yuxuan Sun and Xinrui Chen and Tian Guan and Xiaoping Liu and Yonghong He},
  title = {{HookMIL: Revisiting Context Modeling in Multiple Instance Learning for Computational Pathology}},
  year = {2025},
  eprint = {2512.22188},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.22188},
}
Figure