NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Attention-Challenging Multiple Instance Learning for Whole Slide Image Classification

Yunlong Zhang, Honglin Li, Yunxuan Sun, Sunyi Zheng, Chenglu Zhu, Lin Yang

Abstract

In digital pathology, Whole Slide Image (WSI) classification typically relies on Multiple Instance Learning (MIL) with attention mechanisms. However, these models often exhibit "shortcut learning," where they over-focus on a few highly discriminative patches, leading to poor generalization and low attention entropy. We propose Attention-Challenging Multiple Instance Learning (ACMIL), a framework designed to encourage the exploration of diverse diagnostic patterns. ACMIL introduces Multiple Branch Attention (MBA) to capture varied morphological features and Stochastic Top-K Instance Masking (STKIM) to prevent over-reliance on dominant instances during training. Evaluations on CAMELYON16, BRACS, and LBC datasets demonstrate that ACMIL consistently outperforms state-of-the-art methods, achieving superior classification accuracy and more robust feature localization.

Introduction: The Problem of "Lazy" Attention

The processing of Whole Slide Images (WSIs) presents a significant challenge due to their gigapixel scale. Multiple Instance Learning (MIL) addresses this by treating a slide as a "bag" of small image patches ("instances"). While attention-based MIL has become the standard, it frequently suffers from a "laziness" problem: the model minimizes training loss by fixating on a tiny fraction of patches, ignoring the broader diagnostic context. This behavior correlates with low attention entropy—a measure of how spread out the model's focus is—and results in overfitting, where the model fails to generalize to variations in tissue preparation or staining.

Methods

To address these limitations, ACMIL introduces two primary components designed to "challenge" the attention mechanism and force it to explore the full diagnostic landscape of the slide:

  1. Multiple Branch Attention (MBA): Instead of a single attention head, MBA employs multiple branches. A diversity regularization loss is applied to ensure each branch specializes in distinct visual patterns, preventing them from converging on the same "obvious" features.
  2. Stochastic Top-K Instance Masking (STKIM): This technique identifies the top-K instances with the highest attention scores during training and randomly masks them with a specific probability. This forces the model to identify and utilize the "long tail" of other discriminative patches, effectively acting as a targeted dropout mechanism for the most influential features.
The ACMIL framework architecture, featuring Multiple Branch Learning and Stochastic Top-K Instance Masking.

Importantly, STKIM is only active during training; at inference time, the model utilizes all available information to make its final prediction.

Key Results and Insights

ACMIL was evaluated against state-of-the-art (SOTA) methods like TransMIL and DTFD-MIL across three diverse datasets: CAMELYON16 (breast cancer metastasis), BRACS (breast carcinoma subtyping), and LBC (cervical cancer screening).

The results demonstrate that ACMIL consistently outperforms existing models, securing the top performance in 10 out of 12 experimental categories. Notably, on the BRACS dataset using ViT features, ACMIL achieved a 4.2% improvement in F1-score over previous benchmarks. Furthermore, the model showed improved localization capabilities, as evidenced by a higher FROC score (0.4233 vs. 0.3987 for the ABMIL baseline), proving that the model looks at the right things more comprehensively.

Correlation between attention entropy and AUC, showing that ACMIL maintains higher entropy and achieves better performance than ABMIL.

The core contribution of this work is the empirical link between attention entropy and generalization. By explicitly designing the model to spread its attention across more patches, ACMIL mitigates shortcut learning. The diversity loss in MBA is crucial; without it, multiple branches tend to collapse into redundant representations, failing to capture the morphological variety present in complex pathology slides.

Conclusion

ACMIL provides a robust framework for WSI classification by addressing the inherent "laziness" of attention-based MIL. By forcing the model to look beyond the most obvious patches, it achieves superior accuracy and more comprehensive diagnostic coverage. Future work may explore applying this "attention-challenging" approach to other complex tasks such as survival analysis and multi-modal data integration.

Summary updated

BibTeX
@inproceedings{zhang2024attention,
  author = {Yunlong Zhang and Honglin Li and Yunxuan Sun and Sunyi Zheng and Chenglu Zhu and Lin Yang},
  title = {{Attention-Challenging Multiple Instance Learning for Whole Slide Image Classification}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-73668-1\_8},
}
Figure