Boosting Multiple Instance Learning Models for Whole Slide Image Classification: A Model-Agnostic Framework Based on Counterfactual Inference

Weiping Lin, Zhenfeng Zhuang, Lequan Yu, Liansheng Wang

Abstract

Multiple Instance Learning (MIL) is the standard approach for classifying gigapixel Whole Slide Images (WSIs) in digital pathology, where only slide-level labels are typically available. However, existing MIL models often struggle with precise instance-level localization and architectural flexibility. We present CIMIL (Counterfactual Inference-based MIL), a model-agnostic framework that enhances MIL performance by identifying causal tissue patches through counterfactual reasoning. Evaluated on CAMELYON16, AGGC22, and TCGA-NSCLC datasets, CIMIL significantly improves both classification accuracy and tumor localization across various base architectures, including simple pooling and advanced transformer models.

Introduction

Digital pathology relies on Whole Slide Images (WSIs) that can exceed 80,000 x 80,000 pixels. Labeling individual cells or regions at this scale is economically and logistically unfeasible for pathologists. Consequently, researchers employ Multiple Instance Learning (MIL), treating a slide as a "bag" of small image "instances" (patches). While MIL models excel at slide-level classification, they often lack interpretability—struggling to pinpoint the specific patches that triggered a diagnosis—and lack a universal method to boost performance across different model architectures.

Methodology

The CIMIL framework introduces a three-stage pipeline to refine instance-level signals:

  1. Sub-bag Assessment via Counterfactual Inference: Instead of relying on simple correlations, the model evaluates causality. It asks: "If a group of patches were replaced with healthy tissue, how would the cancer probability change?" A significant drop indicates high causal importance.
  2. Hierarchical Instance Searching (HIS): To manage the computational load of gigapixel images, CIMIL uses a recursive "zoom-in" strategy. Patches are clustered into sub-bags; the most causal clusters are then subdivided and searched further to isolate reliable positive instances.
  3. Feature Refinement: Identified positive instances train a dedicated classifier. These embeddings serve as "prompts" concatenated with original features, providing a clearer signal for the primary MIL model.
The CIMIL framework overview, illustrating the flow from WSI instances to counterfactual assessment and feature refinement.

Results

CIMIL was validated on three major datasets: CAMELYON16 (breast cancer), AGGC22 (prostate cancer), and TCGA-NSCLC (lung cancer). The framework demonstrated consistent improvements across diverse architectures. Notably, on CAMELYON16, a basic MaxPooling model's instance-level AUC rose from 0.6643 to 0.9180. When integrated with TransMIL, the framework achieved a state-of-the-art bag-level AUC of 0.9284.

Qualitative analysis reveals that CIMIL-boosted models produce heatmaps that align more closely with ground-truth tumor boundaries compared to traditional attention-based methods.

Comparison of tumor localization heatmaps across different MIL models. The addition of the CIMIL framework ("Ours") significantly improves AUC and boundary precision.

Discussion and Conclusion

The core innovation of CIMIL lies in prioritizing causality over correlation. While standard attention mechanisms highlight features the model "looks at," counterfactual inference identifies features that actually drive the outcome. This model-agnostic approach allows it to enhance a wide range of MIL architectures. Future work will focus on further refining tumor boundaries for weakly supervised segmentation and reducing the computational overhead associated with the multi-pass hierarchical search.

Summary updated

BibTeX
@inproceedings{lin2024boosting,
  author = {Weiping Lin and Zhenfeng Zhuang and Lequan Yu and Liansheng Wang},
  title = {{Boosting Multiple Instance Learning Models for Whole Slide Image Classification: A Model-Agnostic Framework Based on Counterfactual Inference}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i4.28135},
}
Figure