Abstract
In medical imaging, outliers can contain hypo/hyper-intensities, minor deformations, or completely altered anatomy. To detect these irregularities it is helpful to learn the features present in both normal and abnormal images. However this is difficult because of the wide range of possible abnormalities and also the number of ways that normal anatomy can vary naturally. As such, we leverage the natural variations in normal anatomy to create a range of synthetic abnormalities. Specifically, the same patch region is extracted from two independent samples and replaced with an interpolation between both patches. The interpolation factor, patch size, and patch location are randomly sampled from uniform distributions. A wide residual encoder decoder is trained to give a pixel-wise prediction of the patch and its interpolation factor. This encourages the network to learn what features to expect normally and to identify where foreign patterns have been introduced. The estimate of the interpolation factor lends itself nicely to the derivation of an outlier score. Meanwhile the pixel-wise output allows for pixel- and subject- level predictions using the same model.
Introduction
Detecting anomalies in medical imaging is a fundamental challenge in computer-aided diagnosis. Abnormalities can range from subtle lesions to significant structural deformations. A primary hurdle in this field is the scarcity of labeled pathological data; while healthy scans are abundant, the sheer variety of possible diseases makes it nearly impossible to curate a comprehensive dataset of all potential abnormalities.
Traditional approaches often rely on reconstruction-based methods, such as Variational Autoencoders (VAEs) or Generative Adversarial Networks (GANs). These models attempt to learn a compressed representation of "normal" anatomy and flag regions they cannot accurately reconstruct as anomalies. However, medical images possess high natural variance—two healthy brains can look significantly different. Reconstruction methods often struggle to distinguish this natural variation from actual pathology, leading to high false-positive rates. This paper introduces Foreign Patch Interpolation (FPI), a self-supervised task designed to move beyond simple reconstruction by teaching models to recognize contextual incongruity.
Methodology: Foreign Patch Interpolation (FPI)
The core innovation of this work is the FPI self-supervised task. Instead of training a model to reconstruct an entire image, the model is trained to detect "foreign" anatomical patterns blended into a healthy scan.
- Synthetic Anomaly Generation: Two independent healthy images (Sample A and Sample B) are selected. A random patch location and size are defined.
- Interpolation: The patch in Sample A is replaced with a linear interpolation of the corresponding patch from Sample B. This is governed by an interpolation factor $\alpha \in [0, 1]$. When $\alpha=0$, the patch is original; when $\alpha=1$, it is entirely replaced by the "foreign" patch from Sample B.
- The Learning Task: A Wide Residual Encoder-Decoder network is trained to predict the value of $\alpha$ for every pixel in the modified image.
By using a continuous range for $\alpha$ rather than a binary swap, the model is forced to learn subtle textural and structural cues. To succeed, the network must understand the local "logic" of the anatomy; if a patch's texture or edge alignment deviates from its surroundings because it originated from a different patient, the network learns to flag it as an outlier.
Datasets and Evaluation
The FPI method was evaluated across three distinct benchmarks to test its robustness and generalizability:
- MOOD (Medical Out-of-Distribution) Challenge: This dataset includes 800 brain MRI volumes and 550 abdominal CT volumes. It serves as a benchmark for detecting both sample-level and pixel-level out-of-distribution data.
- DeepLesion: To test performance on real-world clinical data, the authors used this large-scale dataset containing CT scans from over 4,400 patients. It features eight different types of actual medical lesions, including lung, liver, and bone abnormalities.
- Synthetic Benchmarks: The models were also tested against various simulated artifacts, such as noise addition, sink/source deformations, and uniform shifts, to ensure the model could detect a wide spectrum of irregularities.
Results and Discussion
FPI demonstrated state-of-the-art performance across multiple metrics. In the 2020 MICCAI MOOD challenge, the method ranked first in both sample-level and pixel-level detection tasks.
On synthetic brain MRI data, FPI achieved an Average Precision (AP) of 0.9723, significantly outperforming traditional methods like Deep SVDD (0.7695) and MMD-VAE (0.7572). More importantly, the model generalized well to real-world pathology. On the DeepLesion dataset, FPI achieved an image-level AUROC of 0.648, which notably outperformed more complex generative models like StyleGAN-based AnoGAN (0.501) and VQ-VAE2 (0.405).
Key insights from the results include:
- Interpolation vs. Replacement: The use of continuous interpolation ($\alpha$) is critical. It exposes the model to varying levels of subtlety, making it more sensitive to fine-grained irregularities than binary patch-swapping.
- Contextual Awareness: Unlike reconstruction models that act as "artists" trying to recreate pixels, FPI acts as a "detective." It ignores global anatomical variations that are still "normal" and focuses on local incongruities.
- Unified Scoring: Because the model outputs pixel-wise $\alpha$ predictions, it provides both a localized heat map of the anomaly and a global outlier score for the entire subject using the same inference pass.
Conclusion
Foreign Patch Interpolation offers a powerful, self-supervised framework for medical anomaly detection that bypasses the need for labeled pathological data. By leveraging the natural variation between healthy individuals as a source of synthetic anomalies, FPI trains models to become highly sensitive to contextual deviations. While the model performs exceptionally well in structured environments like the brain, future work will focus on improving performance in highly variable regions, such as the intestines, and integrating uncertainty estimation to further assist clinical decision-making.
Summary updated