Test Time Transform Prediction for Open Set Histopathological Image Recognition

Adrian Galdran, Katherine Jane Hewitt, Narmin Ghaffari Laleh, Jakob Nikolas Kather, Gustavo Carneiro, Miguel Ángel González Ballester

Introduction

In the field of computational pathology, deep learning models are typically developed under a "Closed Set" assumption, where the model is trained and evaluated on a predefined list of tissue categories, such as tumor and stroma. However, clinical practice presents a much more complex reality. Real-world digital pathology slides often contain "Open Set" samples—rare diseases, artifacts, or uninformative regions—that the model has never encountered during training.

Standard neural networks are notoriously overconfident, frequently misclassifying these unknown tissues into known categories with high certainty. This phenomenon, known as the Open Set Recognition (OSR) challenge, poses a significant risk of misdiagnosis. Manually annotating every possible non-target tissue to create a "reject" class is practically impossible. This paper introduces T3PO (Test Time Transform Prediction), a novel framework designed to automatically flag unknown regions by leveraging self-supervised uncertainty proxies.

Methodology: The T3PO Framework

The core innovation of T3PO is the use of self-supervised pretext tasks to gauge model uncertainty. Unlike traditional methods that rely solely on the primary classification output, T3PO trains the model to understand the underlying distribution of known data through transformation prediction.

Training Phase

During training, the model is presented with known tissue samples. A random "appearance transform" (e.g., adjustments to brightness, contrast, saturation, or hue) is applied to each image. The architecture features two distinct heads:

  1. Classification Head: Predicts the standard tissue category.
  2. Transform Prediction Head: Predicts which specific transformation was applied to the input.
Original histopathological tissue patch representing the 'Identity' transform.

The "Identity" Trick and OSR Scoring

A critical component of this method is the inclusion of the "Identity" operation (no change) as one of the possible transforms. To correctly identify an untransformed image, the model must develop a robust internal representation of what "normal" known tissue looks like.

A transformed version of the tissue patch used to train the Transform Prediction Head.

At test time, the model is shown an image with no transformation applied. If the tissue is familiar, the model should be highly confident that the transform is "Identity." If the model encounters a completely new tissue type, its internal representations become "confused," resulting in low confidence in the transform prediction. This confidence score serves as a robust "uncertainty sensor" to detect and reject Open Set samples.

Experimental Evaluation

The researchers evaluated T3PO using two benchmark colorectal cancer (CRC) datasets: Kather-5k and Kather-100k. These datasets were split into various Open/Closed Set configurations to simulate clinical hurdles, such as distinguishing between clinically relevant tissues and uninformative debris.

Key Results

  • Superior Detection: On the Kather-5k dataset, T3PO achieved an Area Under the Curve (AUC) of 93.55 for Open Set detection, significantly outperforming strong baselines like CE+ (91.66).
  • Resilience to Confounders: T3PO demonstrated high performance even when Open Set tissues were visually similar to training data (e.g., muscle vs. stroma). In the Kather-100k benchmarks, T3PO improved AUC by over 9 points compared to existing state-of-the-art methods like ARPL.
  • Computational Efficiency: Unlike methods such as MC-Dropout, which require dozens of forward passes, T3PO requires only a single forward pass at test time, making it suitable for high-throughput clinical workflows.

Conclusion

T3PO offers a simple yet powerful approach to Open Set Recognition in pathology by recycling standard data augmentation processes into a self-supervised pretext task. By focusing on appearance-based transformations—which are more informative for stained tissue than geometric ones—the model effectively identifies out-of-distribution samples. While currently focused on low-level image characteristics, future iterations of T3PO aim to incorporate higher-level semantic and morphological cues to further refine its diagnostic reliability.

Summary updated

BibTeX
@inproceedings{galdran2022test,
  author = {Adrian Galdran and Katherine Jane Hewitt and Narmin Ghaffari Laleh and Jakob Nikolas Kather and Gustavo Carneiro and Miguel Ángel González Ballester},
  title = {{Test Time Transform Prediction for Open Set Histopathological Image Recognition}},
  booktitle = {International Conference on Medical Image Computing and Computer-Assisted Intervention},
  year = {2022},
  doi = {10.1007/978-3-031-16434-7\_26},
}
Figure