[Paper Review] Unsupervised Brain Anomaly Detection and Segmentation with Transformers
This paper proposes an unsupervised anomaly detection and segmentation method for brain MRI leveraging a VQ-VAE to obtain discrete latent codes and an ensemble of autoregressive Transformers (Performer) to model healthy brain distributions, enabling anomaly in-painting and residual-based segmentation with state-of-the-art results across synthetic and real datasets.
Pathological brain appearances may be so heterogeneous as to be intelligible only as anomalies, defined by their deviation from normality rather than any specific pathological characteristic. Amongst the hardest tasks in medical imaging, detecting such anomalies requires models of the normal brain that combine compactness with the expressivity of the complex, long-range interactions that characterise its structural organisation. These are requirements transformers have arguably greater potential to satisfy than other current candidate architectures, but their application has been inhibited by their demands on data and computational resource. Here we combine the latent representation of vector quantised variational autoencoders with an ensemble of autoregressive transformers to enable unsupervised anomaly detection and segmentation defined by deviation from healthy brain imaging data, achievable at low computational cost, within relative modest data regimes. We compare our method to current state-of-the-art approaches across a series of experiments involving synthetic and real pathological lesions. On real lesions, we train our models on 15,000 radiologically normal participants from UK Biobank, and evaluate performance on four different brain MR datasets with small vessel disease, demyelinating lesions, and tumours. We demonstrate superior anomaly detection performance both image-wise and pixel-wise, achievable without post-processing. These results draw attention to the potential of transformers in this most challenging of imaging tasks.
Motivation & Objective
- Develop a fully unsupervised framework to detect and segment brain anomalies by learning the healthy-brain distribution.
- Leverage a discrete latent space (VQ-VAE) to enable efficient transformer modeling of brain images.
- Improve anomaly segmentation and detection with an ensemble of transformers using multiple latent-space orderings.
Proposed method
- Compress brain MRIs into a discrete latent space via a VQ-VAE to obtain z_q with a compact 2D-to-sequence representation.
- Train an autoregressive Transformer (Performer) ensemble on the latent codes to learn p(s_i|s_<i) and model the distribution of healthy data.
- Identify anomalies by thresholding low-likelihood latent codes and in-painting them with transformer-sampled values to produce a healed image.
- Compute pixel-wise residuals |x - x_hat'| between the original and healed images and threshold to obtain anomaly segmentation.
- Incorporate spatial information by masking residuals with a resampling mask derived from the latent-space anomaly locations, upscaled to image resolution.
- Enhance robustness with an ensemble of transformers using eight different latent-space orderings (raster, flips, rotations) and aggregate residuals via mean.
Experimental results
Research questions
- RQ1Can unsupervised transformers, when applied to a discrete latent space learned by a VQ-VAE, accurately detect and segment brain anomalies without labeled pathology data?
- RQ2Does an ensemble of autoregressive transformers with diverse latent-space orderings improve anomaly detection and segmentation over a single ordering?
- RQ3How does incorporating latent-space resampling masks affect the specificity of anomaly residuals in high-frequency brain regions?
- RQ4How does the method perform on real pathology data (WMH, MS lesions, BRATS) compared with state-of-the-art autoencoders?
Key findings
- On synthetic data, the full method with latent-space masking and multiple orderings achieves the highest segmentation Dice (best achievable) of 0.895 with raster orderings and 0.768 without ordering ensemble ablations.
- Image-wise anomaly detection on synthetic data shows strong OOD detection with near OOD AUROC of 0.921 (and 0.932 with a general-purpose VQ-VAE) and far OOD AUROC of 1.000.
- On real UK Biobank and other datasets, the proposed method outperformed state-of-the-art autoencoders in anomaly segmentation (e.g., UKB: 0.232, MSLUB: 0.378, BRATS: 0.759, WMH: 0.429).
- Using an ensemble of eight orderings yields a notable improvement over single-order baselines, with the raster ensemble achieving the best reported synthetic segmentation Dice.
- Masking residuals with the resampling mask reduces mislabeling of high-frequency regions, improving segmentation reliability.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.