Seeing the Unseen: AI Spots Anomalies in Complex MRI Scans

Author: Denis Avetisyan


A new deep learning framework offers robust anomaly detection in multi-sequence MRI data, even when critical scan types are missing.

The AnyAD framework addresses data imputation by employing a pre-trained encoder to extract features, followed by an INPs extractor that calculates means and variances for both complete and missing data modalities, a bottleneck for dimensionality reduction, and an INPs-guided decoder-all working in concert to reconstruct data while maintaining consistency between modalities through a dedicated loss function and aligning feature distributions.
The AnyAD framework addresses data imputation by employing a pre-trained encoder to extract features, followed by an INPs extractor that calculates means and variances for both complete and missing data modalities, a bottleneck for dimensionality reduction, and an INPs-guided decoder-all working in concert to reconstruct data while maintaining consistency between modalities through a dedicated loss function and aligning feature distributions.

This research introduces AnyAD, a unified approach to multi-modal MRI anomaly detection utilizing feature alignment and prototype learning for improved performance and resilience to incomplete data.

Despite advances in medical imaging, robust anomaly detection in brain MRI is hindered by limited labeled data and the frequent absence of complete multi-modal scans in clinical practice. This work introduces AnyAD: Unified Any-Modality Anomaly Detection in Incomplete Multi-Sequence MRI, a novel framework designed to perform reliable anomaly detection and localization regardless of available imaging modalities. By aligning incomplete feature representations with full-modality data via dual-pathway encoding and prototype learning, AnyAD achieves superior generalization across diverse datasets without requiring re-training for different modality combinations. Could this approach unlock a new paradigm for scalable, real-world medical image analysis under imperfect data conditions?


Decoding Complexity: The Challenge of Incomplete Data in Medical Imaging

Traditional anomaly detection systems applied to multi-modal magnetic resonance imaging (MRI) frequently encounter diminished diagnostic accuracy when data is incomplete. These systems, often trained on the expectation of complete datasets encompassing various imaging sequences – such as T1-weighted, T2-weighted, and diffusion-weighted images – struggle to reliably identify subtle pathological indicators when one or more modalities are absent. The absence of a complete multi-modal view compromises the system’s ability to differentiate between normal anatomical variation and true anomalies, leading to both false positives and missed diagnoses. This susceptibility to missing data presents a significant challenge for clinical translation, as real-world MRI scans are often incomplete due to patient factors, scanner limitations, or time constraints.

The practical implementation of anomaly detection systems in magnetic resonance imaging (MRI) is frequently hampered by the inherent challenges of acquiring complete datasets. Clinical realities often dictate that certain MRI sequences are unavailable due to patient factors – such as intolerance to prolonged scanning, the presence of metallic implants, or emergent medical needs – or logistical constraints within a healthcare facility. Consequently, algorithms demanding complete multi-modal input struggle to generalize to real-world scenarios, limiting their utility in time-sensitive diagnostic workflows. This dependence on comprehensive data creates a significant bottleneck, as the absence of even a single modality can render otherwise sophisticated detection frameworks ineffective, and underscores the need for methods robust enough to function reliably with incomplete information.

Current anomaly detection techniques reliant on reconstructing complete multi-modal MRI scans often falter when faced with missing data. These methods typically attempt to fill in the gaps in incomplete scans before identifying anomalies, but this reconstruction process struggles to accurately infer missing information, particularly when significant portions of a modality are absent. The resulting reconstructed data can introduce artifacts or distort subtle but critical features, leading to both false positives and missed diagnoses. Consequently, the performance of these reconstruction-based approaches degrades substantially as the amount of missing data increases, hindering their practical application in clinical scenarios where incomplete scans are commonplace due to patient constraints or scanner limitations. This inability to effectively utilize available modalities when inputs are incomplete underscores a critical gap in current anomaly detection research.

The limitations of current anomaly detection systems in medical imaging necessitate the development of frameworks resilient to incomplete data. Traditional methods often demand complete multi-modal datasets – a rarity in clinical practice where certain MRI sequences are frequently absent due to patient constraints or technical limitations. Consequently, a critical gap exists for algorithms capable of effectively integrating available modalities, even when others are missing, without compromising diagnostic accuracy. Such robust frameworks would not only broaden the applicability of anomaly detection in real-world clinical settings, but also reduce the need for repeated scans to obtain complete datasets, ultimately improving patient care and reducing healthcare costs. The focus is shifting towards methods that intelligently infer missing information or adapt to varying data availability, paving the way for more reliable and practical diagnostic tools.

Anomaly score distributions reveal that modality combinations 1 through 7 exhibit varying performance across the BraTS2018 and MU-Glioma-Post datasets.
Anomaly score distributions reveal that modality combinations 1 through 7 exhibit varying performance across the BraTS2018 and MU-Glioma-Post datasets.

Any-AD: A Unified Framework for Robust Anomaly Detection

Any-AD addresses limitations in existing anomaly detection systems by providing a unified framework capable of processing variable combinations of Magnetic Resonance Imaging (MRI) modalities. This flexibility extends to handling incomplete datasets, where data from certain modalities may be absent; the system is designed to function effectively even with missing input sequences without requiring imputation or modality-specific training. The framework’s architecture is not predicated on a fixed set of modalities, enabling it to adapt to diverse clinical protocols and research settings where the availability of MRI sequences can vary significantly between subjects or studies. This adaptability is achieved through a consistent feature extraction and alignment process, regardless of the specific combination of input modalities.

Any-AD’s foundational component is a DINOv2 Encoder, a self-supervised vision transformer pre-trained on a large dataset of natural images. This pre-training allows the encoder to generate robust and generalizable feature representations from input MRI sequences, even with limited labeled anomaly data. The DINOv2 architecture, specifically its ability to learn invariances to image distortions, is critical for handling variations in MRI acquisition parameters and image quality. The encoder transforms each MRI sequence into a high-dimensional feature vector, which serves as the input for subsequent anomaly detection modules. This approach avoids the need for task-specific training of the feature extractor, leveraging the knowledge already encoded within the pre-trained weights.

The Any-AD framework addresses inconsistencies in feature representations derived from different MRI modalities through a Feature Distribution Alignment technique. This process minimizes the statistical distance between feature distributions originating from each modality, effectively normalizing the feature space. Specifically, it employs a domain adaptation approach utilizing Maximum Mean Discrepancy (MMD) to reduce the divergence between modality-specific feature distributions and a target distribution. By aligning these distributions, the framework ensures that anomalies are detected based on deviations from established patterns, irrespective of the input modality or potential variations in image characteristics, thereby enhancing the robustness and generalizability of the anomaly detection process.

INP-Guided Reconstruction within Any-AD enhances anomaly detection by utilizing Intrinsic Normal Prototypes (INPs) to refine the reconstruction of input MRI sequences. INPs, derived from normal training data, represent characteristic features of healthy anatomy. During reconstruction, the system minimizes the difference not only between the input and reconstructed image but also between the reconstructed image and its corresponding INP. This INP-based regularization steers the reconstruction process towards plausible anatomical structures, effectively suppressing anomalous features that deviate from the established normal prototypes and thus improving the sensitivity and specificity of anomaly detection. The method effectively reduces false positives by ensuring reconstructed normal tissue closely aligns with the learned INP distribution.

Any-AD demonstrates consistent performance across both the BraTS2018 and MU-Glioma-Post datasets when evaluating different modality combinations (columns 1-7) using threshold curves and confusion matrices.
Any-AD demonstrates consistent performance across both the BraTS2018 and MU-Glioma-Post datasets when evaluating different modality combinations (columns 1-7) using threshold curves and confusion matrices.

Validating Any-AD Across Diverse Clinical Datasets

Any-AD was evaluated using three distinct datasets to assess its performance across a range of brain lesion types. The BraTS2018 dataset focuses on high-grade gliomas, while MU-Glioma-Post comprises post-operative glioma patients, and Pretreat-MetsToBrain-Masks contains data from patients with brain metastases prior to treatment. This selection ensures a comprehensive evaluation of Any-AD’s ability to detect anomalies in diverse clinical scenarios, including both primary brain tumors and metastatic lesions, and allows for assessment of its robustness to variations in image characteristics and patient populations.

Any-AD consistently achieves state-of-the-art performance in anomaly detection across multiple datasets. Specifically, under a full-modality setting utilizing Combination 7 of input data, the framework attained an image-level Area Under the Receiver Operating Characteristic curve (AUROC) of 0.9482. This result represents an improvement over the previously established best AUROC score of 0.9293, demonstrating the framework’s enhanced ability to accurately identify anomalous regions within medical imaging data, even when all imaging modalities are available.

Any-AD demonstrates effective zero-shot anomaly detection, indicating its capacity to generalize to new, previously unseen data. Specifically, when trained on the BraTS2018 dataset, the framework achieved an Area Under the Precision-Recall Curve (AUPRO) of 0.8381 on the Pretreat-MetsToBrain-Masks dataset. This performance on a distinct dataset validates the cross-domain robustness of Any-AD and its ability to identify anomalies without requiring retraining on the target domain.

Performance analysis indicates that the INP-Guided Reconstruction and Feature Distribution Alignment components of the framework are effective in processing incomplete multi-modal MRI data. Specifically, the framework achieves an average precision (AP) of 0.9438 at the image level when utilizing the Flair modality. This represents a 1.64 percentage point improvement over the performance of the RD4AD method, demonstrating the enhanced capabilities of the implemented reconstruction and alignment techniques in handling data with missing modalities and improving anomaly detection accuracy.

Anomaly localization visualizations for the top-5 models on the MU-Glioma-Post dataset demonstrate performance across seven modality combinations, comparing heatmaps and model predictions to ground truth segmentations.
Anomaly localization visualizations for the top-5 models on the MU-Glioma-Post dataset demonstrate performance across seven modality combinations, comparing heatmaps and model predictions to ground truth segmentations.

Expanding Diagnostic Horizons: Implications and Future Directions

The Any-AD framework demonstrates a significant advancement in the clinical utility of multi-modal magnetic resonance imaging (MRI) by effectively addressing the common challenge of missing data. Traditional multi-modal approaches often falter when certain scans are unavailable due to patient constraints or technical limitations; however, Any-AD is engineered to maintain diagnostic accuracy even with incomplete data sets. This capability expands the accessibility of comprehensive MRI-based diagnoses, as clinicians can now leverage the information available from present modalities without being hindered by the absence of others. The system’s inherent robustness allows for reliable anomaly detection regardless of which modalities are included, ultimately improving diagnostic workflows and potentially accelerating patient care by enabling diagnoses even with limited scan availability.

The development of Any-AD signifies a considerable step towards automated and dependable anomaly detection across a spectrum of clinical environments. Existing methods often struggle with variations in data acquisition and patient demographics, limiting their real-world applicability; however, this framework demonstrates a remarkable capacity to generalize beyond the specific datasets used during training. This robustness stems from its ability to learn underlying patterns independent of modality-specific characteristics, enabling consistent and accurate identification of anomalies even in previously unseen clinical scenarios. Consequently, Any-AD holds the potential to reduce the burden on radiologists, accelerate diagnostic workflows, and ultimately improve patient outcomes by providing a consistently reliable initial assessment of medical images, regardless of the clinical setting or imaging protocol employed.

The development of Any-AD represents a significant step forward in automated diagnostic tools, demonstrably improving upon existing anomaly detection methods. Specifically, the framework achieves a pixel-level Average Precision (AP) of 0.7898 when applied to FLAIR MRI scans – a substantial gain over baseline performance attained without the need for distribution alignment loss. This heightened accuracy translates directly to more reliable identification of subtle indicators of disease, potentially enabling earlier and more effective interventions for patients. By minimizing reliance on perfectly aligned data and maximizing sensitivity in image analysis, Any-AD promises to refine diagnostic workflows and contribute to improved patient outcomes across a range of neurological conditions.

Further research endeavors are directed toward expanding the capabilities of Any-AD by incorporating data from a wider range of advanced imaging modalities, such as PET and SPECT scans, to create a more holistic diagnostic picture. This integration aims not only to enhance the accuracy of anomaly detection but also to unlock the potential for personalized medicine approaches. By combining multi-modal data with patient-specific information, the framework could be tailored to predict individual disease trajectories, optimize treatment strategies, and ultimately improve patient outcomes through precision diagnostics and interventions. The long-term vision encompasses a system capable of providing clinicians with comprehensive, individualized insights for proactive and effective healthcare management.

Anomaly localization visualizations across seven modality combinations on the BraTS2018 dataset reveal performance differences between models using heatmaps and predicted segmentation masks to highlight anomalous regions.
Anomaly localization visualizations across seven modality combinations on the BraTS2018 dataset reveal performance differences between models using heatmaps and predicted segmentation masks to highlight anomalous regions.

The presented framework demonstrates a compelling approach to anomaly detection, prioritizing robust feature alignment across incomplete multi-sequence MRI data. Each image inherently hides structural dependencies that must be uncovered to accurately identify deviations from the norm. This pursuit aligns with Andrew Ng’s assertion: “Machine learning is about learning the underlying structure of the data.” By focusing on prototype learning and accommodating missing modalities, the research effectively constructs a model capable of discerning subtle anomalies – not simply producing a visually appealing result, but establishing a foundation for reliable diagnostic support. The ability to function despite data incompleteness speaks to a system designed for real-world applicability, where perfect data is rarely available.

Where Do We Go From Here?

The pursuit of anomaly detection, even within the relatively constrained domain of multi-modal MRI, reveals itself to be less a problem solved and more a series of shifting focal points. This work establishes a robust foundation for handling incomplete data – a pragmatic necessity given the realities of clinical acquisition – yet simultaneously highlights the inherent ambiguity in defining ‘normality’ itself. The alignment of features across modalities, while demonstrably effective, presumes an underlying correspondence that may not always exist, or may manifest in non-linear, context-dependent ways. Future iterations might productively explore methods for adaptive alignment, allowing the network to learn which modalities are truly informative for a given anatomical region and diagnostic question.

Furthermore, the current paradigm largely treats anomaly detection as a classification problem – is this scan ‘normal’ or ‘abnormal’? A more nuanced approach could frame it as a problem of degrees of difference, quantifying the deviation from established prototypes not as a binary judgment, but as a continuous spectrum. This would necessitate a shift in evaluation metrics, moving beyond simple accuracy to encompass measures of uncertainty and clinical relevance.

Ultimately, the success of any anomaly detection system will be judged not by its performance on benchmark datasets, but by its ability to augment – not replace – the expertise of the radiologist. The challenge, then, is not simply to build a more accurate algorithm, but to create a system that facilitates a more informed, efficient, and ultimately, human diagnostic process. The data itself offers no inherent meaning; it is the patterns discerned, and the questions asked of them, that truly matter.


Original article: https://arxiv.org/pdf/2512.21264.pdf

Contact the author: https://www.linkedin.com/in/avetisyan/

See also:

2025-12-26 18:58