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

Rethinking Attention-Based Multiple Instance Learning for Whole-Slide Pathological Image Classification: An Instance Attribute Viewpoint

Linghan Cai, Shenjin Huang, Ye Zhang, Jinpeng Lu, Yongbing Zhang · DOI

Abstract

Multiple instance learning (MIL) is a robust paradigm for whole-slide pathological image (WSI) analysis, processing gigapixel-resolution images with slide-level labels. As pioneering efforts, attention-based MIL (ABMIL) and its variants are increasingly becoming popular due to the characteristics of simultaneously handling clinical diagnosis and tumor localization. However, the attention mechanism exhibits limitations in discriminating between instances, which often misclassifies tissues and potentially impairs MIL performance. This paper proposes an Attribute-Driven MIL (AttriMIL) framework to address these issues. Concretely, we dissect the calculation process of ABMIL and present an attribute scoring mechanism that measures the contribution of each instance to bag prediction effectively, quantifying instance attributes. Based on attribute quantification, we develop a spatial attribute constraint and an attribute ranking constraint to model instance correlations within and across slides, respectively. These constraints encourage the network to capture the spatial correlation and semantic similarity of instances, improving the ability of AttriMIL to distinguish tissue types and identify challenging instances. Additionally, AttriMIL employs a histopathology adaptive backbone that maximizes the pre-trained model's feature extraction capability for collecting pathological features. Extensive experiments on three public benchmarks demonstrate that our AttriMIL outperforms existing state-of-the-art frameworks across multiple evaluation metrics.

Introduction: The Challenge of Gigapixel Pathology

In the world of digital pathology, Whole-Slide Images (WSIs) are the giants of the data world. These gigapixel-resolution scans of tissue samples are far too large for standard deep learning models to process all at once. To handle them, researchers use Multiple Instance Learning (MIL), treating a slide as a "bag" of small image "instances" (patches).

While Attention-Based MIL (ABMIL) has become a standard for identifying which patches are most important for a diagnosis, a new approach argues that we’ve been looking at "importance" the wrong way. The authors introduce AttriMIL, a framework that shifts the focus from simple attention to a more precise "Instance Attribute" viewpoint.

The Limitations of Attention-Based MIL

In standard ABMIL, the model assigns an "attention score" to each patch, effectively telling the network which areas to focus on. However, the authors identify two major flaws in this approach:

  1. Attention $\neq$ Contribution: A high attention score doesn't necessarily mean a patch is "positive" (e.g., contains a tumor). A model might pay high attention to a normal tissue patch simply to gain high confidence that the slide is negative.
  2. Independence Assumption: Most MIL models treat patches as independent entities. In reality, pathology is spatial—cancer cells cluster together (intra-slide correlation), and similar cancer subtypes should look consistent across different patients (inter-slide correlation).
Standard Attention-Based Multiple Instance Learning (ABMIL) architecture, illustrating the process of aggregating instance features into a bag prediction.

The AttriMIL Solution

AttriMIL introduces three core innovations to solve these issues:

Attribute Scoring Mechanism

Instead of relying on the attention mechanism in isolation, AttriMIL "dissects" the calculation. It combines the attention weight with the weights of the final classification head to produce an attribute score. This score has a sign: positive scores indicate a contribution toward a "positive" diagnosis, while negative scores indicate the opposite.

Spatial and Ranking Constraints

  • Spatial Attribute Constraint: This forces neighboring patches to have similar attribute scores, reflecting the biological reality that tumor cells cluster.
  • Attribute Ranking Constraint: This looks across different slides during training. It ensures that the most "positive" patches in a cancer slide are ranked higher than any patches found in a healthy slide, helping the model distinguish "hard" negative instances that might look suspicious but are benign.

Histopathology Adaptive Backbone

Rather than using a frozen ImageNet-trained model, AttriMIL uses adapters—small, trainable modules inserted into a pre-trained ResNet—to progressively fine-tune the feature extractor for medical imagery without the massive cost of full retraining.

Experimental Evaluation

The authors evaluated AttriMIL on three diverse public benchmarks: Camelyon16 (breast cancer), TCGA-NSCLC (lung cancer), and UniToPatho (colon cancer).

Key Results

AttriMIL consistently outperformed existing state-of-the-art methods (like CLAM and TransMIL) across all datasets:

  • Classification Accuracy: On Camelyon16, AttriMIL achieved an AUC of 93.90%, a significant jump from ABMIL’s 88.75%.
  • Localization: Qualitatively, AttriMIL's heatmaps align much more closely with ground-truth tumor boundaries provided by pathologists, successfully ignoring "hard negatives" (like inflammation) that often trip up other models.
  • OOD Detection: Interestingly, the authors found that if a slide's aggregate attribute scores are all near zero or negative across all branches, it can serve as a signal for Out-of-Distribution (OOD) detection—flagging slides that the model doesn't recognize.

Conclusion

By mathematically demonstrating that the final bag prediction is the sum of instance attributes rather than just a weighted average of features, AttriMIL provides a more robust framework for clinical diagnosis. The inclusion of spatial constraints acts as a regularizer, producing clean, biologically plausible clusters of tumor regions and bridging the domain gap between general computer vision and specialized pathology.

Summary updated

BibTeX
@misc{cai2024rethinking,
  author = {Linghan Cai and Shenjin Huang and Ye Zhang and Jinpeng Lu and Yongbing Zhang},
  title = {{Rethinking Attention-Based Multiple Instance Learning for Whole-Slide Pathological Image Classification: An Instance Attribute Viewpoint}},
  year = {2024},
  eprint = {2404.00351},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.00351},
}
Figure