Soft Masked Mamba Diffusion Model for CT to MRI Conversion

Zhenbin Wang, Lei Zhang, Lituan Wang, Zhenwei ZhangarXiv 2024

Abstract

Magnetic Resonance Imaging (MRI) and Computed Tomography (CT) are the predominant modalities utilized in the field of medical imaging. Although MRI capture the complexity of anatomical structures with greater detail than CT, it entails a higher financial costs and requires longer image acquisition times. In this study, we aim to train latent diffusion model for CT to MRI conversion, replacing the commonly-used U-Net or Transformer backbone with a State-Space Model (SSM) called Mamba that operates on latent patches. First, we noted critical oversights in the scan scheme of most Mamba-based vision methods, including inadequate attention to the spatial continuity of patch tokens and the lack of consideration for their varying importance to the target task. Secondly, extending from this insight, we introduce Diffusion Mamba (DiffMa), employing soft masked to integrate Cross-Sequence Attention into Mamba and conducting selective scan in a spiral manner. Lastly, extensive experiments demonstrate impressive performance by DiffMa in medical image generation tasks, with notable advantages in input scaling efficiency over existing benchmark models.

Introduction

Medical imaging relies heavily on Computed Tomography (CT) and Magnetic Resonance Imaging (MRI). While CT is fast and effective for bone imaging, MRI offers superior soft-tissue contrast essential for detailed diagnosis. However, MRI's high cost and long acquisition times limit its accessibility. Generating synthetic MRI from CT data presents a promising solution to reduce costs and patient wait times.

Existing AI models for this task usually rely on Convolutional Neural Networks (CNNs), which have limited receptive fields, or Vision Transformers (ViTs), which offer a global view but suffer from quadratic computational overhead. As image resolution increases, the processing power required for Transformers grows exponentially. To address these limitations, researchers have introduced DiffMa (Diffusion Mamba), a Latent Diffusion Model (LDM) that utilizes a State-Space Model (SSM) backbone known for its linear scaling and global reach.

The DiffMa Architecture

DiffMa is built entirely on a Mamba backbone, optimized for 2D medical image generation. To adapt the 1D sequence processing of Mamba to 2D images, the architecture incorporates two primary innovations: a Spiral-Scan module and Soft Masked Cross-Sequence Attention.

The overall architecture of DiffMa, illustrating the integration of Mamba blocks, spiral scanning, and soft masking within the diffusion framework.

Spiral-Scan Module

Standard Mamba models process data as 1D sequences. Converting 2D images into 1D strings often breaks spatial relationships. DiffMa addresses this by using eight different spiral scanning patterns to traverse image patches. This ensures that the scanned sequence maintains spatial continuity, helping the model better understand complex anatomical structures.

Visualization of the spiral scan patterns used to preserve spatial continuity when processing 2D image patches as sequences.

Soft Masked Cross-Sequence Attention

Not all regions of a medical scan are equally important. DiffMa utilizes a pre-trained Vision Embedder to generate "soft masks" that guide the Mamba blocks. These masks act as a weight, prioritizing critical areas such as specific pathological tissues during the diffusion process. Additionally, the model incorporates BioMedCLIP to provide high-level semantic conditioning, ensuring anatomical accuracy.

Experimental Results

The model was evaluated using the SynthRAD2023 dataset, which includes paired CT and MRI scans of the brain and pelvis. DiffMa demonstrated significant improvements in image fidelity and efficiency:

  • Superior Fidelity: On the pelvis dataset, DiffMa achieved a Structural Similarity Index (SSIM) of 56.59%, significantly higher than the Transformer-based DiT (49.05%) and the CNN-based LDM (40.28%).
  • Efficiency and Convergence: DiffMa maintains a global receptive field without the massive memory footprint of a Transformer. Qualitative results show that the model produces high-quality MRI features in as few as 5k to 15k iterations.

Conclusion

DiffMa represents a significant advancement in efficient, high-fidelity medical image translation. By combining the linear complexity of Mamba with novel spatial scanning and attention mechanisms, it overcomes the scaling bottlenecks of traditional architectures. While Transformers still hold a slight edge in pixel-level noise handling (PSNR) in some datasets, DiffMa's superior structural capture makes it a powerful tool for cross-modality medical imaging. Future work will explore scaling to 3D volumes and other conversion tasks.

Summary updated

BibTeX
@misc{wang2024soft,
  author = {Zhenbin Wang and Lei Zhang and Lituan Wang and Zhenwei Zhang},
  title = {{Soft Masked Mamba Diffusion Model for CT to MRI Conversion}},
  year = {2024},
  eprint = {2406.15910},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.15910},
}
Figure