Probabilistic Attention based on Gaussian Processes for Deep Multiple Instance Learning

Arne Schmidt, Pablo Morales-Álvarez, Rafael Molina · DOI

Introduction

In high-stakes domains like medical imaging, deep learning models often face the challenge of limited granular labeling. For instance, in Whole Slide Imaging (WSI) for cancer diagnosis, a pathologist may label an entire slide as malignant without annotating every individual cell or patch. This scenario is the core of Multiple Instance Learning (MIL), where data is organized into "bags" (the slide) containing multiple "instances" (the patches). While attention mechanisms have improved MIL by identifying key instances, standard models remain deterministic, offering predictions without a measure of confidence.

This paper introduces the Attention Gaussian Process (AGP), a probabilistic framework that replaces deterministic attention layers with Sparse Gaussian Processes (SGP). By doing so, the model provides not only state-of-the-art classification accuracy but also crucial uncertainty estimates that can signal when a human expert should intervene.

Methods: The AGP Architecture

The AGP model integrates a Bayesian component into the standard deep MIL pipeline to capture predictive uncertainty.

Architecture of the AGP-MIL model showing the integration of the Sparse Gaussian Process module.

The architecture consists of four primary stages:

  1. Feature Extraction: A convolutional neural network (CNN) processes raw instances (e.g., image patches) into high-dimensional feature vectors $h_{bi}$.
  2. The AGP Module: Instead of a deterministic fully connected layer, the model employs a Sparse Gaussian Process (SGP) to compute attention scores. To maintain computational efficiency with large datasets, the SGP utilizes "inducing points"—a small set of representative points that approximate the full GP.
  3. Probabilistic Attention: The attention weights $a_{bi}$ are treated as random variables. Through Variational Inference and Monte Carlo sampling, the model estimates the distribution (mean and variance) of these weights.
  4. Classification: The final bag prediction $T_b$ is derived from a weighted sum of features, where the weights themselves carry uncertainty information.

Experimental Evaluation

The authors evaluated AGP across synthetic benchmarks and large-scale medical datasets:

  • MNIST & CIFAR-10 Bags: Used to verify the model's ability to identify specific target instances within a noisy bag.
  • SICAPv2 & PANDA: Real-world prostate cancer biopsy datasets. PANDA contains over 10,000 WSIs, while SICAPv2 serves as a smaller, challenging benchmark for low-data regimes.
  • External Validation: Models trained on PANDA were tested on SICAPv2 to assess generalization across different clinical environments and scanning hardware.

Key Insights: Uncertainty as a Safety Mechanism

A primary contribution of this work is the correlation between predictive uncertainty and model error. The standard deviation of the bag prediction serves as a reliable proxy for confidence.

Probabilistic attention and bag predictions on MNIST, demonstrating mean and standard deviation for both instances and the overall bag.

As shown in the visualization above, the model provides a "Bag prediction" with an associated $\pm$ value. In clinical practice, a "reliability threshold" can be established: predictions with high standard deviations can be automatically flagged for manual review by a pathologist, significantly reducing the risk of false negatives or positives in ambiguous cases.

Furthermore, the model demonstrates superior robustness in small-data scenarios. Gaussian Processes are inherently suited for low-sample regimes, allowing AGP to outperform deterministic models on the SICAPv2 dataset, where training labels are scarce.

Results

The AGP model achieved state-of-the-art performance across several metrics:

  • Accuracy: On SICAPv2, AGP reached a Cohen’s quadratic kappa of 0.847, surpassing deterministic attention baselines (0.814).
  • Generalization: In external validation (PANDA to SICAPv2), AGP maintained a high kappa of 0.920, compared to 0.885 for deterministic models.
  • Risk Mitigation: By filtering out predictions with a standard deviation above 0.02 in the PANDA experiment, the model's kappa improved from 0.817 to 0.864, proving the utility of uncertainty-aware filtering.

Conclusion and Future Work

The Attention Gaussian Process represents a significant advancement in making Multiple Instance Learning safer and more interpretable for clinical use. While the AGP module is computationally efficient, the overall pipeline is still limited by the time required for CNN feature extraction on thousands of patches. Future research may explore "Deep GPs" or hybrid architectures combining AGP with Transformer-based self-attention to further enhance the modeling of complex inter-instance relationships.

Summary updated

BibTeX
@article{schmidt2024probabilistic,
  author = {Arne Schmidt and Pablo Morales-Álvarez and Rafael Molina},
  title = {{Probabilistic Attention based on Gaussian Processes for Deep Multiple Instance Learning}},
  journal = {IEEE Trans. Neural Networks Learn. Syst.},
  year = {2024},
  doi = {10.1109/tnnls.2023.3245329},
}
Figure