IterMask3D: Unsupervised Anomaly Detection and Segmentation with Test-Time Iterative Mask Refinement in 3D Brain MR
Ziyun Liang, Xiaoqing Guo, Wentian Xu, Yasin Ibrahim, Natalie Voets, Pieter M Pretorius, J. Alison Noble, Konstantinos Kamnitsas
TL;DR
This work tackles unsupervised anomaly segmentation in 3D brain MRI by reframing reconstruction-based detection with IterMask3D, an iterative mask-refinement framework guided by high-frequency structural information. The method combines iterative mask shrinking, Fourier-based high-frequency conditioning, and a subject-specific thresholding strategy to balance sensitivity and precision without relying on anomaly priors. Empirical results across synthetic and real artifacts, plus 3D pathology datasets (BraTS, ISLES), show competitive or superior performance to strong baselines, especially in artifact detection and robust segmentation without validation-data thresholds. The approach offers practical value for scan quality control and incidental lesion screening, while revealing avenues for handling domain shifts and intensity variability in clinical MRI.
Abstract
Unsupervised anomaly detection and segmentation methods train a model to learn the training distribution as `normal'. In the testing phase, they identify patterns that deviate from this normal distribution as `anomalies'. To learn the `normal' distribution, prevailing methods corrupt the images and train a model to reconstruct them. During testing, the model attempts to reconstruct corrupted inputs based on the learned `normal' distribution. Deviations from this distribution lead to high reconstruction errors, which indicate potential anomalies. However, corrupting an input image inevitably causes information loss even in normal regions, leading to suboptimal reconstruction and an increased risk of false positives. To alleviate this, we propose $\rm{IterMask3D}$, an iterative spatial mask-refining strategy designed for 3D brain MRI. We iteratively spatially mask areas of the image as corruption and reconstruct them, then shrink the mask based on reconstruction error. This process iteratively unmasks `normal' areas to the model, whose information further guides reconstruction of `normal' patterns under the mask to be reconstructed accurately, reducing false positives. In addition, to achieve better reconstruction performance, we also propose using high-frequency image content as additional structural information to guide the reconstruction of the masked area. Extensive experiments on the detection of both synthetic and real-world imaging artifacts, as well as segmentation of various pathological lesions across multiple MRI sequences, consistently demonstrate the effectiveness of our proposed method. Code is available at https://github.com/ZiyunLiang/IterMask3D.
