Introduction
3D medical imaging, encompassing modalities such as CT and MRI, presents a unique challenge for deep learning architectures. Accurately segmenting anatomical structures requires a model to balance fine-grained local details with a broad global context. Traditionally, Convolutional Neural Networks (CNNs) have excelled at capturing local features but struggle with long-range dependencies. Conversely, Transformers have emerged as the gold standard for global context modeling through self-attention mechanisms. However, Transformers suffer from a significant drawback: their computational complexity grows quadratically ($O(N^2)$) relative to the sequence length.
In the context of 3D imaging, where a single high-resolution volume can generate over 260,000 tokens, Transformers frequently encounter "Out of Memory" (OOM) errors or become computationally impractical. To address this "Goldilocks" problem, we introduce SegMamba, a novel framework that utilizes the Mamba architecture—a State Space Model (SSM) with linear complexity—to achieve state-of-the-art 3D medical image segmentation without the prohibitive costs of self-attention.
Methodology
SegMamba is designed as a U-Net-style architecture, replacing traditional transformer blocks with specialized Mamba-based modules. The framework introduces three core innovations to adapt the 1D nature of Mamba to 3D spatial data:
1. Tri-orientated Spatial Mamba (TSMamba) Block
Standard Mamba models are designed for sequential 1D data. To effectively process 3D volumes, SegMamba employs a Tri-orientated Mamba (ToM) module. This module scans the data across three distinct orientations: forward, reverse, and inter-slice. By processing the volume from multiple perspectives, the model ensures it captures spatial dependencies across all three dimensions, preventing the loss of information that occurs with simple 1D flattening.
2. Gated Spatial Convolution (GSC)
While Mamba excels at long-range modeling, the process of flattening 3D data into sequences can disrupt local spatial relationships. The Gated Spatial Convolution (GSC) module is integrated to inject local spatial awareness back into the features. Using 3D convolutions paired with a gating mechanism, GSC reinforces the geometric neighborhood information before the features are processed by the Mamba layers.
3. Feature-level Uncertainty Estimation (FUE)
To improve the reliability of the decoding process, SegMamba incorporates Feature-level Uncertainty Estimation within its skip connections. This module calculates the uncertainty associated with features extracted by the encoder. By filtering out "noisy" or unreliable information, FUE ensures that the decoder only utilizes high-quality, multi-scale features for the final segmentation mask.
Experimental Evaluation
The performance of SegMamba was evaluated across three diverse and challenging 3D segmentation tasks:
- BraTS2023: A benchmark for brain tumor segmentation using MRI scans.
- AIIB2023: A dataset focused on the complex structure of the airway tree in CT scans.
- CRC-500: A new, large-scale dataset introduced by the authors, containing 500 annotated CT scans for colorectal cancer segmentation. This dataset addresses the scarcity of large-scale, publicly available colorectal imaging data.
Key Results and Insights
SegMamba demonstrates superior performance compared to existing state-of-the-art (SOTA) models, including UNETR, SwinUNETR, and UX-Net.
Accuracy and Efficiency
On the BraTS2023 dataset, SegMamba achieved a Dice score of 93.61% for Whole Tumor segmentation, outperforming all Transformer-based and CNN-based competitors. More importantly, SegMamba proved its efficiency at high resolutions. At a $128^3$ resolution, SegMamba required only 18GB of training memory, whereas standard self-attention models failed due to OOM errors.
Inference Speed
In addition to memory efficiency, SegMamba offers competitive inference speeds. It processed cases at an average of 1.51 seconds, faster than SwinTransformer-based models (1.68s) and large-kernel CNN architectures (1.92s). This speed-to-accuracy ratio makes it a viable candidate for clinical applications where rapid processing is essential.
Discussion and Future Work
The success of SegMamba highlights the potential of State Space Models to replace Transformers in high-dimensional medical imaging tasks. By combining the local geometric strengths of convolutions with the linear-complexity global modeling of Mamba, the framework breaks the "resolution ceiling" that has previously limited 3D deep learning.
Despite these gains, the model still benefits from high-end hardware like NVIDIA A100 GPUs. Future research will focus on further optimizing scanning patterns to reduce redundancy and exploring self-supervised pre-training strategies to enhance Mamba's generalization across a broader range of organs and pathologies. SegMamba represents a significant step toward efficient, high-resolution 3D medical image analysis, providing a scalable alternative to the quadratic complexity of the Transformer era.
Summary updated