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

Probabilistic smooth attention for deep multiple instance learning in medical imaging

Francisco M. Castro-Macías, Pablo Morales-Álvarez, Yunan Wu, Rafael Molina, Aggelos K. Katsaggelos

Introduction

In medical imaging, diagnostic labels are often provided at the "bag level" (e.g., a complete CT scan or a whole slide image), while the specific evidence resides at the "instance level" (e.g., a single slice or a tissue patch). Multiple Instance Learning (MIL) has emerged as a powerful framework for these weakly supervised tasks. However, conventional MIL methods typically rely on two restrictive assumptions: that instances are independent and that attention scores are deterministic. This paper introduces Probabilistic Smooth Attention (ProbSA), a Bayesian framework that addresses these limitations by modeling attention as a probability distribution and enforcing spatial smoothness.

Methodology

ProbSA reformulates the attention mechanism within a Bayesian context. Instead of assigning a fixed scalar weight to each instance, the model estimates a full probability distribution—typically a Gaussian—representing the instance's importance. This approach allows the model to quantify uncertainty, distinguishing between instances it is sure about and those that are merely noisy guesses.

Spatial Smoothness and Dirichlet Energy

A key innovation of ProbSA is the incorporation of a spatial smoothness prior. In medical contexts, biological lesions are rarely isolated; they tend to span multiple adjacent patches or slices. To capture this, the authors introduce a regularization term based on Dirichlet energy. This term penalizes sharp transitions in attention values between neighboring instances, encouraging the model to identify continuous regions of interest rather than isolated, noisy patches.

Spatial dependencies in Whole Slide Image (WSI) patches and CT slices.

Variational Inference and Architecture

The model is trained using variational inference, specifically by maximizing the Evidence Lower Bound (ELBO). This objective function balances the predictive accuracy of the bag-level label with the spatial constraints imposed by the smoothness prior. ProbSA is architecture-agnostic and can be integrated with various backbones, including standard Multi-Layer Perceptrons (ABMIL) and Transformer encoders (T-ABMIL), allowing it to capture both long-range global dependencies and local spatial constraints.

Experiments and Datasets

The effectiveness of ProbSA was evaluated across three diverse large-scale medical datasets:

  • RSNA: 1,150 CT scans for acute intracranial hemorrhage detection.
  • PANDA: 10,616 Whole Slide Images (WSIs) for prostate cancer grading.
  • CAMELYON16: 400 WSIs for breast cancer metastasis detection.

Results and Interpretability

ProbSA consistently outperformed eleven state-of-the-art baselines, including TransMIL, CLAM, and DSMIL. The Transformer-based variant, T-ABMIL+ProbSA, achieved top-tier performance with an AUROC of 91.78% on RSNA and 98.42% on CAMELYON16.

Beyond raw performance, ProbSA offers significant interpretability advantages. By modeling uncertainty (variance), the framework provides clinicians with a built-in "check your work" mechanism. Regions with high attention variance often correspond to ambiguous tissue or areas where the model is uncertain, providing better clinical utility than deterministic scores. Furthermore, the smoothness prior effectively filters out isolated false positives, resulting in cleaner and more biologically plausible attention maps.

Conclusion and Future Work

ProbSA represents a significant step forward in MIL for medical imaging by treating attention as a probabilistic and spatially dependent process. While the current implementation primarily uses Gaussian distributions, future research may explore more complex multi-modal distributions to capture even more nuanced uncertainty. Additionally, addressing the computational overhead associated with local interactions in extremely large images remains a persistent challenge for optimization.

Summary updated

BibTeX
@article{castromacias2025probabilistic,
  author = {Francisco M. Castro-Macías and Pablo Morales-Álvarez and Yunan Wu and Rafael Molina and Aggelos K. Katsaggelos},
  title = {{Probabilistic smooth attention for deep multiple instance learning in medical imaging}},
  journal = {Pattern Recognition},
  year = {2025},
}
Figure