Robust prostate disease classification using transformers with discrete representations

Ainkaran Santhirasekaram, Mathias Winkler, Andrea G. Rockall, Ben GlockerInt. J. Comput. Assist. Radiol. Surg 2025 · DOI

Introduction

In medical imaging, "domain shift" remains a significant barrier to the clinical deployment of AI models. A deep learning system trained to detect prostate lesions on a 1.5 Tesla (T) MRI scanner often fails when applied to data from a 3T scanner. These performance drops are caused by "textural shifts"—variations in noise, contrast, and graininess inherent to different hardware and acquisition protocols. While human radiologists can easily look past these artifacts, standard Convolutional Neural Networks (CNNs) and Vision Transformers (ViTs) often overfit to this hardware-specific noise.

To address this, researchers have developed a framework focused on Single-Domain Generalizability (SDG). The goal is to learn the fundamental clinical features of a disease—its shape and category—while remaining invariant to the underlying textural noise of the scanner.

Methodology

The proposed architecture mimics human diagnostic reasoning by prioritizing categorical representations over raw pixel values. This is achieved through a two-stage process:

Stage 1: Discrete Representation Learning

The system utilizes a Vector Quantized Variational Autoencoder (VQ-VAE) to establish a "codebook" of discrete features for T2-weighted and Apparent Diffusion Coefficient (ADC) images. By forcing the continuous MRI data through a discrete bottleneck, the model is compelled to discard fine-grained textural noise that does not map to the established codebook vectors.

First stage of training: Learning discrete representations via a VQ-VAE codebook for T2-weighted and ADC MRI modalities.

Stage 2: Cross-Attention Transformer

The resulting discrete tokens are processed by a transformer model. Using a cross-attention mechanism, the model fuses information from both MRI modalities. It "queries" ADC tokens using T2 information (and vice versa), distilling the most relevant clinical indicators from both sources into a final classification.

Experimental Setup and Datasets

The study evaluated the framework using a combination of internal and external data:

  • Internal Dataset: 154 lesions from 100 patients, featuring both 1.5T and 3T scanner data from Imperial College London.
  • External Dataset: 330 lesions from the ProstateX challenge (all 3T).
  • Risk Stratification: Lesions were classified into Low, Medium, and High risk based on histological Gleason Grade Groups (GGG).

Key Insights: Discretization and Shape Bias

The core innovation lies in using discretization as a regularizer. Because the input is forced into a finite set of codebook vectors, the model becomes naturally invariant to small perturbations; if noise does not change the nearest codebook vector, the transformer never perceives it. This approach shifts the model's focus from "texture bias" (common in CNNs) to "shape bias," which is far more consistent across different MRI magnets.

Results and Robustness

The proposed model demonstrated state-of-the-art (SOTA) performance in cross-scanner scenarios:

  • Generalization: In cross-scanner testing (training on 1.5T and testing on 3T, or vice versa), the model achieved an AUC of 0.739, significantly outperforming standard ViTs (0.641) and other robust methods like BigAug (0.724).
  • Stress Testing: When subjected to synthetic Gaussian noise, the model's AUC dropped by only 1.2 points, compared to drops of 4.5 to 5.0 points seen in ResNet and ViT baselines.
  • Error Reduction: The relative corruption error was 34% to 57% lower than baseline architectures across all clinical risk groups.

Conclusion

By combining vector quantization with cross-attention transformers, this framework provides a more "rugged" solution for prostate cancer classification. While future work is needed to validate the approach on larger multi-center datasets and across different scanner manufacturers, these results mark a significant step toward AI tools that can reliably operate across the diverse hardware environments found in real-world clinical practice.

Summary updated

BibTeX
@article{santhirasekaram2025robust,
  author = {Ainkaran Santhirasekaram and Mathias Winkler and Andrea G. Rockall and Ben Glocker},
  title = {{Robust prostate disease classification using transformers with discrete representations}},
  journal = {Int. J. Comput. Assist. Radiol. Surg.},
  year = {2025},
  doi = {10.1007/s11548-024-03153-8},
}
Figure