NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

$\mathrm {IterMask^2}$: Iterative Unsupervised Anomaly Segmentation via Spatial and Frequency Masking for Brain Lesions in MRI

Ziyun Liang, Xiaoqing Guo, J. Alison Noble, Konstantinos Kamnitsas

TL;DR

IterMask² introduces a novel unsupervised anomaly segmentation method for brain lesions in MRI that elegantly solves the classic sensitivity-precision trade-off of "corrupt-and-reconstruct" models. By combining a progressive, iterative spatial mask-shrinking process with high-frequency structural guidance from the Fourier domain, it drastically minimizes false positives in healthy tissue while accurately isolating diverse pathologies.

What Problem Does This Paper Address?

Supervised machine learning models excel at segmenting brain lesions, but they suffer from two major bottlenecks: they require massive amounts of manually labeled data, and they are strictly limited to the specific pathologies they were trained to see.

Unsupervised anomaly segmentation offers a powerful alternative. By training a model exclusively on images of healthy brains, the model learns the distribution of "normal" anatomy. At inference time, any pathology is flagged as an "anomaly" simply because it deviates from this normal baseline.

A prevailing strategy for this is the "corrupt-and-reconstruct" paradigm: an input image is intentionally degraded (e.g., by adding noise or masking), and a model attempts to reconstruct a healthy version of it. The difference between the original image and the healthy reconstruction highlights the lesion. However, heavily corrupting an image inevitably damages the model's ability to reconstruct normal regions accurately, leading to high rates of false positives. This paper tackles this exact sensitivity-precision trade-off.

Methods

IterMask² introduces a two-pronged strategy to protect healthy tissue reconstruction while isolating anomalies: Iterative Spatial Mask Refinement and Frequency Masking.

Overview of the IterMask² training and inference pipeline, detailing frequency masking and the iterative refinement loop.
  1. Iterative Spatial Mask Refinement (Inference): Instead of a single-shot corruption and reconstruction, IterMask² starts with a spatial mask covering the entire brain. The masked area is filled with Gaussian noise, and a UNet reconstructs it. The system calculates the $L_2$ reconstruction error map; pixels with low error are deemed "confidently normal" and are permanently unmasked. In the next iteration, these newly exposed healthy regions guide the reconstruction of the remaining masked areas. The mask progressively shrinks, tightly converging onto the actual pathology.
  2. Frequency Masking (Structural Guidance): Reconstructing a highly complex brain structure from pure noise is incredibly difficult. To guide the UNet, the authors extract high-frequency components from the image using a Discrete Fourier Transform (DFT), filtering out low-frequency amplitudes while preserving phase information. This acts as an auxiliary structural blueprint (highlighting edges and tissue boundaries) that helps the network reconstruct healthy tissue accurately without accidentally reconstructing the anomalous lesion textures.

Datasets

The authors validated IterMask² across three prominent brain lesion datasets, training exclusively on healthy slices:

  • BraTS2021: 1,251 tumor cases evaluated across four MRI modalities (FLAIR, T1CE, T2, T1).
  • ATLAS v2.0: 655 stroke lesion cases (T1 modality).
  • ISLES 2015: 28 stroke lesion cases (FLAIR modality).

Key Insights and Ideas

  • Progressive Information Reintroduction: Allowing the model to dynamically "re-discover" healthy tissue throughout the inference iterations creates a highly effective contextual guide for neighboring pixels, preventing the error propagation typical of single-shot methods.
  • The Frequency Domain Advantage: High-frequency components provide structural context (like the outlines of sulci and ventricles) without leaking the anomalous intensity signatures of tumors or strokes. This ensures the model knows where structures should be, but forces it to fail at drawing the pathology.
  • Human-AI Collaboration: The mask-shrinking threshold ($\tau$) acts as an intuitive tuning knob. Clinicians can interactively adjust it, watching the mask converge in real-time. This capability yields substantial performance boosts, particularly for challenging, small anomalies.

Key Results

IterMask² demonstrated substantial improvements over established unsupervised baselines (including standard Autoencoders, DDPM, and Cyclic-UNet):

  • Segmentation Accuracy: On the BraTS dataset, IterMask² improved the Dice Similarity Coefficient (DSC) by 15.2% in FLAIR, 19.1% in T1CE, 21.7% in T2, and 21.5% in T1 compared to methods without prior training information.
  • Healthy Tissue Preservation: The method achieved exceptional structural similarity (SSIM) scores in normal brain regions (up to 0.997 on T1CE), proving that it successfully suppresses false positives.
  • Robustness: Sensitivity analysis showed that the model maintains stable performance across a broad spectrum of threshold ($\tau$) and frequency radius ($r$) values, indicating high fault tolerance.
Sensitivity analysis demonstrating the stability of the Dice score across various mask shrinking thresholds ($\tau$) and frequency mask radii ($r$).

Limitations and Future Work

The primary limitation of the current work is that it operates entirely on 2D image slices rather than full 3D MRI volumes. While computationally efficient, 2D processing discards valuable volumetric context across slices. The authors note that extending IterMask² to native 3D image processing is the most prominent direction for future research.

Summary updated

BibTeX
@inproceedings{liang2024mathrm,
  author = {Ziyun Liang and Xiaoqing Guo and J. Alison Noble and Konstantinos Kamnitsas},
  title = {{$\textbackslash\{\}mathrm \{IterMask^2\}$: Iterative Unsupervised Anomaly Segmentation via Spatial and Frequency Masking for Brain Lesions in MRI}},
  booktitle = {International Conference on Medical Image Computing and Computer-Assisted Intervention},
  year = {2024},
  doi = {10.1007/978-3-031-72111-3\_32},
}
Figure