# Using Variational Autoencoders for Out of Distribution Detection in Histological Multiple Instance Learning

**Authors:** FRANCISCO JAVIER SÁEZ-MALDONADO, LUZ GARCÍA, LEE A. D. COOPER, JEFFERY A. GOLDSTEIN, RAFAEL MOLINA, AGGELOS K. KATSAGGELOS

PMC · DOI: 10.1109/access.2025.3593420 · IEEE access : practical innovations, open solutions · 2025-10-15

## TL;DR

This paper introduces a deep learning model that can classify histological images and detect out-of-distribution samples, improving diagnostic reliability.

## Contribution

The novel contribution is an ood-aware probabilistic deep mil model combining variational autoencoders and attention mechanisms for histological image analysis.

## Key findings

- The model achieves competitive classification performance on prostate and lymph node tissue datasets.
- The model detects out-of-distribution samples with 100% AUC on contaminated prostate tissue and lymph node datasets.
- The deterministic version using reconstruction error also shows strong ood detection capabilities.

## Abstract

In the context of histological image classification, Multiple Instance Learning (mil) methods only require labels at Whole Slide Image (wsi) level, effectively reducing the annotation bottleneck. However, for their deployment in real scenarios, they must be able to detect the presence of previously unseen tissues or artifacts, the so-called Out-of-Distribution (ood) samples. This would allow Computer Assisted Diagnosis systems to flag samples for additional quality or content control. In this work, we propose an ood-aware probabilistic deep mil model that combines the latent representation from a variational autoencoder and an attention mechanism. At test time, the latent representations of the instances are used in the classification and ood detection tasks. We also propose a deterministic version of the model that uses the reconstruction error as ood score. Panda (prostate tissue) and Camelyon16 (lymph node tissue) are used as train/test in-distribution datasets, obtaining bag classification results competitive with current state-of-the-art models. ood detection is evaluated performing two experiments for each in-distribution dataset. For Panda, Camelyon16 and artif (prostate tissue contaminated with artifacts) are used as ood datasets, obtaining 100% auc in both cases. For Camelyon16, Panda and bcell (lymph node tissue diagnosed with diffuse large B-cell lymphoma) are used as ood datasets, obtaining aucs of 100% and 97%, respectively. Experimental validation demonstrates the models’ strong classification performance and effective ood slide detection, highlighting their clinical potential.

## Linked entities

- **Diseases:** diffuse large B-cell lymphoma (MONDO:0018905)

## Full-text entities

- **Diseases:** diffuse large B-cell lymphoma (MESH:D016403)

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12520607/full.md

## Figures

15 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12520607/full.md

## References

56 references — full list in the complete paper: https://tomesphere.com/paper/PMC12520607/full.md

---
Source: https://tomesphere.com/paper/PMC12520607