Mamba-AE: pixel-wise anomaly detection auto-encoder in chemical exchange saturation transfer magnetic resonance imaging

Quant Imaging Med Surg. 2026 Mar 1;16(3):218. doi: 10.21037/qims-2025-1952. Epub 2026 Feb 11.

Abstract

Background: Chemical exchange saturation transfer (CEST) magnetic resonance imaging (MRI) demonstrates significant potential for early disease detection, yet encounters challenges in lesion analysis due to interference from concomitant effects during imaging. Although machine learning-based unsupervised anomaly detection (UAD) methods offer feasible solutions for identifying subtle lesions in contaminated images, current UAD approaches primarily dependent on convolutional neural network (CNN) or Transformer architectures to process image-level data from conventional imaging modalities, exhibit limitations when applied to CEST data characterized by spectral information. This study aimed to propose a novel UAD framework tailored for CEST spectral data to overcome these limitations, enabling precise pixel-wise anomaly detection for early-stage lesions.

Methods: The proposed framework named Mamba-AE employs a multi-layers encoder-decoder architecture with stacked Mamba blocks as the core component. Each Mamba block integrates three key modules: selective state-space models (SSMs) to dynamically adjust parameters based on input sequences, enabling adaptive long-range dependency modeling of CEST spectral data; Gated Multi-Layer Perceptron with Sigmoid Linear Unit (SiLU) activation and residual connections to enhance non-linear feature learning and stability; Multi-Scale Feature Alignment that aligns hierarchical encoder-decoder features via cosine similarity, preserving physiological semantics across scales. The framework adopts a dual-domain reconstruction strategy: data-space reconstruction minimizes pixel-wise spectral errors through Huber loss, while feature-space reconstruction enforces consistency between paired encoder-decoder layer features via cosine similarity loss. Anomaly scores are generated by combining normalized residuals from data-space errors and discrepancies in feature-space alignment, enabling precise pixel-level lesion localization in early-stage CEST data. For quantitative evaluation of lesion detection performance, the area under the curve (AUC) and Dice similarity coefficient are employed as core metrics. The framework was trained exclusively on CEST spectra from healthy rat brain tissue and validated on an independent dataset from a rat model of transient focal cerebral ischemia induced by middle cerebral artery occlusion (MCAO) with reperfusion.

Results: The proposed method has been validated on ischemic stroke rat datasets at 2, 6, and 24 hours post-occlusion. Mamba-AE demonstrated superior performance across all stages. At the critical 2-hour time point, it achieved the highest performance among all methods, with an AUC of 95.91% and a Dice score of 88.43% (sensitivity >89%, specificity >92%). The advantage remained substantial at 6 hours (AUC: 92.19%, Dice: 85.23%) and 24 hours (AUC: 94.64%, Dice: 87.79%), consistently outperforming other approaches. Furthermore, anomaly heatmaps revealed precise lesion localization capabilities, with spatial accuracy correlating strongly with histopathological ground truth measurements.

Conclusions: Mamba-AE provides a computationally efficient and robust solution for early disease detection in CEST MRI. Its integration of spectral feature learning and structural preservation highlights its potential for clinical applications requiring high sensitivity to subtle pathological changes.

Keywords: Chemical exchange saturation transfer imaging (CEST imaging); Mamba; dual-domain reconstruction; ischemic stroke; unsupervised anomaly detection (UAD).