WorksComputer Science
A Cascaded Framework with a Cross-Attention-Guided Mamba-CNN Model for Pre- and Post-Treatment Glioma Segmentation
Abstract
Accurate glioma segmentation is vital for diagnosis and follow-up, but manual segmentation is time-consuming, subjective, and variable across interpreters. Gliomas are heterogeneous in size, shape, and location. Deep learning has therefore emerged as a potential solution. CNNs excel at local features but may struggle with long-range dependencies, whereas Vision Transformers capture global context efficiently but incur higher computational complexity. Most previous studies focused on pre-treatment gliomas; post-treatment cases with resection cavities (RCs) remain less explored. This study proposes a Cross-Attention-Guided Mamba-CNN (CMC-Seg) model within a cascaded framework for pre- and post-treatment diffuse glioma segmentation, aiming to balance accuracy and computational cost. Experiments used BraTS 2025 mpMRI of diffuse glioma patients. After preprocessing, a coarse segmentation model extracted tumor-centered patches, which were fed to CMC-Seg for fine-grained segmentation. CMC-Seg was compared with 3D U-Net, SegResNet, SwinUNETR, UNETR, nnFormer, and SegMamba. On the test set, CMC-Seg achieved the highest mean Dice (81.20%) and non-enhancing tumor core (NETC) Dice (77.09%). It also achieved an RC Dice of 78.63% and the lowest 95% Hausdorff distance (HD95; 4.39 mm). Results were comparable to CNN and Mamba baselines and significantly better than Transformer-based baselines (P < 0.05). CMC-Seg required the fewest inference GFLOPs (381.49). Ablation experiments indicated that multi-direction scanning and cross-attention improved performance, particularly for RC (P < 0.05). Grad-CAM explainability experiments showed that CMC-Seg focuses on diagnostically relevant tumor regions.
Introduction
Gliomas are intra-axial tumors of the central nervous system (CNS) that arise from glial cells and represent the most common primary CNS tumor. In the United States, glioma incidence is approximately 5.83 per 100,000 people annually [1]. Also, gliomas represent approximately 30% of all primary brain tumors and account for around 80% of malignant brain tumors, making them the leading cause of death among patients with primary brain tumors [2]. Early detection of glioma, accurate delineation of tumor burden before surgery, and assessment of tumor response during and after treatment are essential. Magnetic resonance imaging (MRI) is the diagnostic gold standard for detecting brain tumors and for patient follow-up, typically including T1-weighted (T1w) sequences before and after gadolinium contrast enhancement (T1c), T2-weighted (T2w), and T2-weighted fluid-attenuated inversion recovery (FLAIR) sequences. Each modality offers distinct yet complementary information. For example, T2w and FLAIR highlight the edematous region surrounding the tumor, while T1w and T1c emphasize the tumor itself. By integrating these MRI sequences, radiologists and clinicians can develop a comprehensive view of a brain tumor, including its location, size, morphology, vascularity, and relationship to surrounding structures [3, 4].
Tumor segmentation is a crucial step in medical image analysis, assisting early diagnosis, treatment planning, and disease monitoring. The main imaging technique for segmenting glioma is MRI, which enables notable soft tissue clarity and provides a combination of several imaging sequences that emphasize various tissue properties [5]. However, the complex nature of glioma, such as variations in size, shape, and location across various MRI sequences, causes significant challenges. Manually delineating each slice on MRI sequences by radiologists poses several limitations, such as being time-intensive, subjectivity, and variability in results among different interpreters [6]. Computer-aided diagnosis (CAD) systems aim to reduce these limitations by improving both diagnostic precision and workflow efficiency. However, classical CAD for segmentation, such as thresholding, region-based, edge-based, clustering-based, and traditional machine learning models, are usually not well suited for heterogeneous tumor structures and modality-specific variations [7, 8].
In recent years, with the development of deep learning models, particularly Convolutional Neural Networks (CNNs), Artificial Intelligence (AI)-based methods have gained significant attention for medical image segmentation[9]. Most segmentation models rely on encoder-decoder architectures, with the U-Net model as a prime example. In the U-Net [10] model design, the encoder progressively extracts hierarchical, low-dimensional feature representations from the input images, and the decoder converts these learned features back into pixel-wise segmentation maps, using skip connections to preserve spatial information. UNet++ [11] uses nested and dense skip connections to reduce the semantic gap between encoder and decoder feature maps, guided by deep supervision.
Although CNNs improve segmentation accuracy compared to traditional machine learning models and capture local spatial features well, they still struggle to capture long-range dependencies and global context [12]. Consequently, CNNs often perform poorly, especially for target structures that show significant inter-patient variation in size, shape, and texture [13]. With the introduction of Transformers and their strong performance in NLP tasks, researchers have begun applying them to vision tasks. Vision Transformers (ViTs) excel in capturing global context and understanding long-range dependencies [14]. However, ViTs lack the local perception and inductive bias of convolutions to handle positional variations in images [15].
Thus, growing interest in incorporating CNN inductive biases into ViT architectures has led to the emergence of CNN-Transformers. TransUNet [16] was an early influential approach that attempted to combine a Transformer with a U-Net for medical image segmentation, capturing global features while relying on the CNN for precise localization. Subsequently, UNETR [17] advanced this idea by proposing a fully Transformer-based encoder for 3D medical image segmentation. Extending this line of work, SwinUNETR [18] incorporated efficient shifted-window attention from the Swin Transformer, achieving strong performance with reduced computational complexity. However, the self-attention mechanism in Transformers is computationally expensive for high-resolution 3D medical images because its complexity scales quadratically with input sequence length. In addition, ViTs’ performance may depend on the amount of training data, as they commonly require large amounts of data to learn [19].
In recent years, with the development of selective State Space Models (SSMs) [20], Mamba has emerged as a viable alternative for capturing long-range dependencies in image segmentation. Mamba is more computationally efficient than Transformers because it delivers higher inference throughput and scales linearly with sequence length. Because of its efficiency, Mamba is ideal for the demands of 3D medical image volumes, where processing large-scale structures efficiently requires both speed and precision for high-resolution volumetric data [21]. Among the first attempts to apply Mamba architectures were Vision Mamba [22] for general vision tasks and VM-UNet (Ruan et al. [2024]) for medical image segmentation. Despite all these advancements in deep learning model design, there are several challenges in glioma segmentation that even state-of-the-art (SOTA) models struggle with [2023].
First, the nature of glioma tumors, including severe class imbalance and uncertainty in location, size, and shape, causes difficulty in accurate segmentation. Also, boundaries are often ambiguous due to the simultaneous presence of multiple tumor subregions, such as edema, necrosis, and enhancing core [2025], [2026].
Second, most of the papers used pre-treatment glioma datasets for model training, but limited previous research has assessed segmentation of post-treatment gliomas, which is essential for disease monitoring, evaluating treatment efficacy, and planning additional treatments [2025], [2022]. Post-treatment brain alterations, such as resection cavities (RCs), gliosis, and radiation changes, further complicate the design of a clinically useful segmentation model. Accurate delineation of resection cavities is crucial for patients receiving adjuvant radiotherapy upon surgical resection. Additionally, given the imaging similarity between necrotic cores and resection cavities, distinguishing them would be essential for evaluating total tumor volumes [2024]. An AI tool that could accurately segment both pre- and post-treatment glioma tumor subregions, including resection cavities, would be beneficial in daily clinical radiology practice for evaluating treatment response, clinical trials, and adjuvant radiation therapy planning, which is a laborious and time-consuming manual process.
Finally, deep learning models are still under development for clinical use. The main cause is the “black box” nature of deep models, defined by the difficulty of explaining their internal decision process to humans. This is mainly because these models include millions of extracted feature maps and parameters in each internal layer, which are assumed to contain meaningful information about the input problem and its possible solution [2017]. The inherent opacity of deep learning methods makes their full comprehension highly challenging, even for domain experts, thus substantially restricting the deployment of such “black box” models in sensitive medical contexts.
In response, explainable AI (XAI) has gained increasing research attention as a means of justifying the decision-making processes underlying DL models. Although XAI does not enhance model performance, it plays a vital role in ensuring clinical safety and fostering trust among end users, including surgeons and radiologists, by enabling deep learning models to articulate their internal reasoning in human-interpretable terms [2024]. However, most studies have explored XAI methods for brain tumor detection and classification rather than 3D segmentation [2025], [2024].
To address these challenges, we propose a cascaded framework with a hybrid Mamba-CNN model (CMC-Seg) for segmenting pre- and post-treatment diffuse gliomas. The CMC-Seg incorporates multi-direction Mamba and convolutional blocks in the encoder, with a CNN-based decoder linked to the encoder through skip connections at various resolutions. Combining Mamba and convolutional blocks allows the model to capture both local and global features. Moreover, we use cross-attention so the model can selectively focus on relevant features across different representation spaces. Finally, we use Gradient-weighted Class Activation Mapping (Grad-CAM) to provide qualitative, class-specific saliency maps of the model’s predictions for multimodal MRI datasets.
In summary, our work’s main contributions are:
A cascaded multi-step framework in which a coarse segmentation model extracts tumor-centered image patches, which are then fed to CMC-Seg for fine-grained segmentation, to maximize accuracy while keeping the computational budget low.
Utilization of a multi-direction 3D Mamba (MDM) block tailored for volumetric data, capturing long-range spatial dependencies along the axial, coronal, and sagittal axes simultaneously.
Cross-attention-guided skip connection. At each decoder stage, we replace plain skip concatenation with a cross-attention mechanism that enables high-level global context from the deepest encoder stage to selectively guide feature reuse at every resolution.
Training and evaluation on both pre- and post-treatment glioma cases. We train and evaluate CMC-Seg against six baselines on BraTS 2025 (Aboian et al. [2025]) glioma cases to see their segmentation performance in the presence of the RC class.
Explainability via gradient-based saliency. We apply Grad-CAM to the network’s convolutional blocks, producing voxel-wise saliency maps, to assess whether CMC-Seg predictions rely on clinically reasonable anatomical evidence rather than spurious correlations.
Related work
In recent years, researchers have investigated a range of deep learning models for glioma segmentation. These efforts range from architecture optimization to adding XAI methods. The 3D U-Net extended the encoder-decoder paradigm with skip connections to volumetric data, and remains a standard baseline for dense biomedical prediction tasks [34].
SegResNet won the BraTS 2018 challenge as a semantic segmentation network for brain tumor segmentation from multimodal 3D MRIs. In limited-data settings, the extra VAE branch helped regularize the shared encoder, boosting performance and enabling consistently high training accuracy [35]. In 2022, SwinUNETR was presented as a new architecture for multi-modal MRI semantic segmentation of brain tumors. This model employs a CNN-based decoder that links to the encoder via skip connections at various levels, with a Swin Transformer as the encoder in a U-shaped network architecture. This model performed competitively in the testing phase of the BraTS 2021 challenge and ranks among the top-performing techniques in the validation phase [18].
Xing et al. proposed SegMamba, the first general 3D medical image segmentation model based on Mamba. To improve the sequential mapping for 3D features, they developed a tri-oriented Mamba (ToM) module. They also developed a gated spatial convolution (GSC) module to model spatial relations before the ToM module. Additionally, they develop a feature-level uncertainty estimation (FUE) module to improve the skip connections of multi-scale features. SegMamba demonstrates its segmentation performance on BraTS 2023 by achieving the highest Dice score and 95% Hausdorff distance (HD95) on whole tumor (WT), tumor core (TC), and enhancing tumor (ET) [36]. Lotan et al. designed an autoencoder regularization–cascaded anisotropic model for pre-operative and post-operative glioma segmentation. The autoencoder regularization–cascaded anisotropic model achieved mean Dice scores of 0.83, 0.84, and 0.72 for WT, TC/RC, and ET subregions, respectively, across both preoperative and postoperative follow-up cases [28]. Zeineldin et al. presented a new hybrid ViT-CNN for reliable and precise glioma segmentation in brain MRI data. Their proposed approach, TransXAI, makes neural networks transparent by producing heatmaps that are understandable by surgeons. After localizing brain tumors, TransXAI uses a post-hoc explanation method that provides visual interpretation without changing the network design or affecting accuracy [37]. Lamrani et al. introduced an explainable deep learning framework to detect, localize automatically, and segment sub-regions of brain tumors. The proposed architecture merges U-Net with dense blocks as its backbone, intended to strengthen feature reuse, enhance gradient flow, and improve overall segmentation accuracy. Visual explanations generated via Grad-CAM highlight the effectiveness of the proposed XAI approach, contributing to greater trust in and understanding of the model’s behavior [38].
Tehsin et al. recently developed an attention-guided segmentation model to improve the accuracy and interpretability of brain tumor segmentation across the Kaggle Brain MRI, Figshare Brain Tumor, and BraTS 2020 datasets. Their pipeline integrates standardized MRI preprocessing, a hybrid Mamba encoder, a dual-branch decoder incorporating attention mechanisms, cross-scale gated fusion, and boundary-aware segmentation. This unified architecture was designed to achieve precise volumetric delineation while producing clinically interpretable results. Evaluation of the proposed model demonstrated greater overlap with anatomical regions, more clearly defined tumor boundaries, statistically significant improvements over established baselines, and superior performance and computational efficiency under domain shifts across multiple MRI datasets [39]. Despite these advances, notable gaps still exist in ensuring model robustness, interpretability, and real-world clinical applicability. Another common limitation across most related studies is the lack of post-treatment glioma datasets. Table 1 summarizes related works and their advantages and disadvantages.
| Study | Model backbone | Dataset | Pros | Cons |
| [35] | CNNs (SegResNet) | BraTS 2018 | Additional VAE branch Improved generalization under limited data | No explicit long-range dependency modeling Absence of post-treatment data Absence of XAI |
| [49] | Hybrid Transformer-CNN (DTASUnet) | BraTS 2018, BraTS 2020 | Capturing both local features and global context Interpretability | Computational cost Absence of post-treatment data |
| [18] | Hybrid Transformer-CNN (Swin UNETR) | BraTS 2021 | Hierarchical shifted-window attention Capturing both local features and global context | Data-hungry without pretraining Absence of post-treatment data Absence of XAI |
| [41] | CNN (AMMGS) | BraTS2020, BraTS2019 | Focus on small-intensity dissimilarity | Absence of post-treatment data Absence of XAI |
| [36] | Hybrid Mamba-CNN (SegMamba) | BraTS 2023 | Capturing both local features and global context Global receptive field at linear complexity | Absence of post-treatment data Absence of XAI |
| [42] | Hybrid Mamba-CNN (DM-UNet) | BraTS 2023 | Low computational cost Capturing both local features and global context Global receptive field at linear complexity | Limitations in handling small lesions, low-contrast regions, and intricate boundary structures Absence of post-treatment data Absence of XAI |
| [37] | Hybrid Transformer-CNN (TransXAI) | BraTS 2019 | Capturing both local features and global context Interpretability | Evaluated only on 2D data Absence of post-treatment data |
| [28] | CNN (AR-CA) | BraTS 2019, private data | Evaluation on both pre- and post-treatment data Autoencoder regularization | No explicit long-range dependency modeling Absence of XAI |
| [38] | CNN (Dense-U-Net) | BraTS 2020, Kaggle Brain MRI | Adaptive loss weighting Spatially focused preprocessing Use of Dense blocks Interpretability | No explicit long-range dependency modeling Absence of post-treatment data |
| [39] | CNN–Transformer–Mamba | Kaggle Brain MRI, Figshare Brain Tumor, and BraTS2020 | Capture local texture, long-range context, and spatial boundary cues Multi-dataset validation Interpretability | Evaluated only on 2D data Absence of post-treatment data |
Table 1. Summary of some related works.
Materials and methods
In this section, we present the technical framework of our proposed method for diffuse glioma segmentation. We first describe the dataset characteristics, splitting, and preprocessing steps. Second, we define the overall architecture and present the mathematical formulation of our two main components: the MDM block and cross-attention. Finally, we explain the training process, evaluation metrics, and statistical analysis. Figure 1 shows the overall workflow.

Figure 1. The overall workflow of proposed framework. A) Training and utilization of a coarse segmentation model to approximately detect the ROI. B) Patch extraction from the original input image according to the ROI. C) Training and utilization of CMC-Seg to predict mask patches. D) Merging the predicted mask patches to reconstruct the full-size masks and evaluate the segmentation performance. E) Conducting explainability experiments.
Dataset
We used BraTS 2025 Task one data that includes 2872 patients with diffuse glioma, which was acquired over multiple institutions and includes routine pre- and post-treatment multi-parametric MRI (mpMRI) [33]. Since gliomas are heterogeneous, no single sequence captures all tumor components; therefore, four MRI modalities, including skull-stripped native T1w, T1c, T2w, and FLAIR, were used as input images. The original isotropic voxel spacing was 1 mm, and the image size was 182×218×182. Tumor masks included four classes: non-enhancing tumor core (NETC), Note. XAI, explainable AI; CNN, convolutional neural network; VAE, variational autoencoder; MRI, magnetic resonance imaging.
surrounding non-enhancing FLAIR hyperintensity (SNFH), ET, and RC. Because of clinical importance, two regions, including TC and WT, are also considered for evaluation. The TC consists of NETC and ET, representing the lesion that is usually removed during surgical resection. The WT consists of NETC, SNFH, and ET, representing the whole extent of the tumor.
Preprocessing
Before preprocessing, we randomly partitioned the dataset at the subject level into a development set (90%) and a held-out test set (10%), stratified by treatment status to preserve the original cohort distribution in the test set. The development set was then split into training (80% of the total) and validation (10% of the total) subsets.
The volumetric data and distribution of each tumor class are provided in Table 2. Before training, the images underwent a series of preprocessing steps. First, data integrity was assessed, and patients were excluded if they exhibited corrupted or missing image or mask data. All 2,872 patients passed this quality-control assessment; thus, no patients were excluded on the basis of data integrity. All input images (T1w, T2w, FLAIR, T1c) were normalized using -score standardization to improve training stability and convergence. In -score standardization, we used only statistics from each volume; no information was shared between the training, validation, and test sets.
| Tumor class | Subgroup | Development dataset | Test dataset | Total dataset |
| Prevalence (%) | ||||
| NETC | Pre-treatment | 96.54 | 96.75 | 96.56 |
| Post-treatment | 43.45 | 44.51 | 43.55 | |
| Total | 66.62 | 66.9 | 66.64 | |
| SNFH | Pre-treatment | 99.91 | 100 | 99.92 |
| Post-treatment | 99.79 | 100 | 99.81 | |
| Total | 99.85 | 100 | 99.86 | |
| ET | Pre-treatment | 97.43 | 96.75 | 97.36 |
| Post-treatment | 74.95 | 79.88 | 75.45 | |
| Total | 84.76 | 87.11 | 84.99 | |
| RC | Pre-treatment | - | - | - |
| Post-treatment | 84.76 | 84.76 | 84.76 | |
| Total | 47.78 | 48.43 | 47.84 | |
| Mean volume (cm³) | ||||
| NETC | Pre-treatment | |||
| Post-treatment | ||||
| Total | ||||
| SNFH | Pre-treatment | |||
| Post-treatment | ||||
| Total | ||||
| ET | Pre-treatment | |||
| Post-treatment | ||||
| Total | ||||
| RC | Pre-treatment | - | - | - |
| Post-treatment | ||||
| Total |
Table 2. Prevalence and mean volume ± standard deviation of each tumor class.
NETC, non-enhancing tumor core; SNFH, surrounding non-enhancing FLAIR hyperintensity; ET, enhancing tumor; RC, resection cavity.
where represents the -score, represents input data, represents the mean, and represents the standard deviation. To balance computational efficiency with preservation of relevant anatomical context, a coarse segmentation model was first employed to localize the tumor region. Our coarse segmentation model is a CNN architecture that receives input images (T1w, T2w, FLAIR, T1c), which were resized to with linear interpolation. The original multiclass segmentation masks were converted into binary masks by assigning all non-background voxels to the foreground class. The coarse CNN was trained using the training subset and the corresponding binary segmentation targets. The predicted binary masks were resized to using nearest-neighbor interpolation and used for region-of-interest (ROI) detection. After detection of the ROI, a 15 mm safe margin was added in each direction of each axis then image patches with a size of from the final ROI were extracted. This approach reduces computational requirements while retaining sufficient anatomical context for subsequent segmentation. Finally, to improve model generalization, address limited data diversity, and class imbalance, on-the-fly 3D data augmentation during training was utilized. Augmentations included random flipping along one of the three spatial axes, gamma transformations, additive Gaussian noise, and intensity scaling and shifting.
Network Architecture
CMC-Seg is a U-Net–style encoder–decoder for volumetric semantic segmentation that utilizes a hybrid Mamba-CNN design. After downsampling the image at each level of the encoder, the image is fed to an MDM block followed by a residual convolutional block. The decoder part is a pure CNN, which consists of an upsampling layer followed by a concatenation layer and residual blocks, respectively. The encoder features are propagated to the decoder through a set of cross-attention skip-fusion modules that inject global context from the deepest encoder stage into each decoder-side skip feature before concatenation (Algorithm 1). Figure 2 shows a detailed view of the CMC-Seg architecture.

Figure 2. Detailed architecture of CMC-Seg. , , correspond to the spatial dimensions; is the channel size of the input image, and is the base feature size. An input 3D MRI volume is processed through an initial patch embedding and four encoder stages. Each stage consists of an MDM and a residual block, followed by a convolution layer with a stride of 2. The MDM block scans the flattened image along three different axes plus their reverse directions. The decoder symmetrically upsamples the features, fuses them with filtered encoder features via cross-attention, and then the fused features go through the residual block.
Algorithm 1 CMC-Seg model forward pass.
Input: MRI volumes including T1w, T1c, T2w and FLAIR, Output: Tumor mask,
, channels
, channels
for to do
, stride , channels
end for
for to do
, stride , channels
, channels
, channels
, channels
, channels
end for
, stride , channels
, stride , channels
return
Forward pass of the CMC-Seg model. The input image is MRI volumes including T1w, T1c, T2w, and FLAIR (). The encoder combines residual blocks with MDM blocks across four resolution levels. The decoder fuses upsampled features with cross-attention-refined encoder skip features. A final convolutional head outputs a -class tumor mask.
Patch Embedding and Positional Encoding
The input volume has the shape of where and are the batch size and channel size, respectively, as well as , , correspond to the spatial dimensions. The input is first projected into a feature grid using a 3D convolutional patch-embedding layer with kernel size and stride of 2. Rather than a single flattened positional embedding, axis-factorized positional encodings were used, including three independent learnable embedding tables , , and (one per spatial axis, truncated-normal initialized) are broadcast-summed onto the projected feature grid:
This factorization reduces the parameter count relative to a full 3D positional embedding table form while still providing axis-resolved positional information.
MDM Block
The core sequence-mixing unit at every encoder stage is the MDM block, which extends a standard SSM layer (Mamba) with a multi-direction scan to address the lack of a canonical 1D traversal order in volumetric data. Given a feature map , the module flattens the spatial grid into token sequences along three orderings, including depth-major (), height-major (), and width-major () — obtained by axis permutation before flattening.
Each ordering exposes a different spatial adjacency structure to the Mamba scan, allowing the model to capture dependencies along all three principal axes rather than only the one implied by a fixed order. For each of the three orderings, the sequence and its reverse are passed through a shared Mamba block (pre-norm Mamba layer + pre-norm Multi-Layer Perceptron (MLP) with residual connections) where , , and denote the input, intermediate, and output feature representations, respectively; LN and Mamba Layer denote layer normalization and the Mamba sequence-modeling layer, respectively. and represent learnable weights and biases:
The reverse branch’s output is flipped back to the original token order and added to the forward branch, yielding a direction-invariant representation for that axis where denotes the input feature map, represents the sequence obtained using the spatial scanning order, and indexes the three scanning directions:
This is repeated independently for all three axis orderings (six total scan directions: 3 axes 2 directions), and each of the three resulting feature maps is reshaped back to , where is the base feature size. The three axis-wise outputs are then combined via a learned, softmax-normalized, per-channel convex combination:
where is a learnable parameter initialized to zero. An instance normalization layer is applied to the fused output to stabilize training. This design allows the network to weight each spatial scan direction adaptively and per-channel, rather than assuming a fixed traversal order is optimal for all feature channels.
Encoder
The encoder consists of four stages with increasing channel width (, , , ) and decreasing spatial resolution. At each stage:
MDM block (with state scaled per stage: 16, 32, 64, 128) models the global context.
A residual convolutional block (Residual block: GroupNorm → GELU → Conv3D → GroupNorm → GELU → Conv3D, with an identity or -convolution residual path) refines local features.
A convolution layer with a stride of that downsamples to the next resolution while doubling the channel count.
A parallel shallow residual stem operates on the input at full resolution to preserve a fine-grained skip connection ( channels) that bypasses the patch-embedding downsampling entirely. The output of the fourth encoder stage (resolution , channels) serves as the shared global-context source for all cross-attention skip-fusion operations in the decoder.
Cross-Attention Skip Fusion
Conventional U-Net skip connections copy encoder features directly to the decoder at matching resolutions, limiting their receptive field to that stage’s local context. To address this, each of the four skip levels is additionally refined by a cross-attention operation (MONAI’s CrossAttentionBlock) [43] before concatenation with the corresponding decoder feature map:
Queries are formed by patch embedding, where denotes the skip feature at level .
Keys/values are formed by patch embedding, where denotes the bottleneck feature map, each is projected to a channel dimension matching the corresponding query.
This injects deep, semantically rich bottleneck context directly into shallow/mid-level skip features, letting the decoder access long-range information at every resolution rather than only through the sequential upsampling path. We use four such cross-attention modules (4, 4, 2, and 2 attention heads, respectively, with decreasing channel widths of , , , and ), each followed by a residual add and GroupNorm before concatenation with the transposed-convolution decoder output and a residual block.
Decoder
The decoder mirrors the encoder with four stages of transposed convolutions with a stride of for upsampling, each followed by concatenation with the corresponding cross-attention–refined skip feature and a residual convolutional block. The final decoder stage produces an channels feature map, refined by an additional Conv3D–GELU–GroupNorm block, before a convolutional output head produces the final per-voxel class logits.
Training
The models were trained on Kaggle (Python 3.12) with 2× NVIDIA T4 GPUs (15 GB each), 30 GB of system RAM (PyTorch 2.10), using a batch size of 2 to balance GPU memory constraints and stable gradient updates. The segmentation models were trained for 100 epochs using the AdamW optimizer with an initial learning rate of , , , and a weight decay of 0.05. To improve optimization stability, the learning rate was linearly warmed up during the initial 8% of the total training steps, followed by cosine annealing to a minimum learning rate of . Mixed-precision training with automatic loss scaling was employed to reduce GPU memory consumption and improve computational efficiency, while gradient norms were clipped to 1.0 to improve training stability. We employed a combined loss function, integrating Tversky loss [44] and categorical focal cross-entropy (CFCE) loss [45], where denotes the total number of segmentation classes and equal weight is given to each loss (). In Tversky loss, , , and denote the numbers of true-positive, false-positive, and false-negative voxels for class , respectively. The coefficients and control the relative penalties assigned to false-positive and false-negative predictions, respectively. The Tversky loss was configured with and , assigning a higher penalty to false negatives than false positives. This configuration is useful for glioma segmentation because it emphasizes detecting tumor voxels and helps reduce the risk of under-segmentation of small or difficult tumor regions. In CFCE loss, denotes the total number of voxels, is the one-hot encoded ground-truth label for voxel and class , is the predicted probability of class for voxel , is the weighting factor, and is the focusing parameter. The categorical focal cross-entropy loss was configured with and to place greater emphasis on hard-to-classify voxels and reduce the influence of easily classified examples.
Evaluation metrics
To comprehensively evaluate the model’s performance, we used metrics including Dice score, HD95, precision, and recall. We computed each metric for WT, TC, ET, NETC, SNFH, RC, and the mean across individual tumor classes. During training, we monitored and compared model performance using Intersection-over-Union (IoU) as the primary evaluation metric. In metrics and correspond to predicted and ground truth masks for class , respectively. The , , and denote the numbers of true-positive, false-positive, and false-negative voxels for class , respectively. Dice score: measures the volumetric overlap between predicted and ground-truth segmentation masks.
IoU: measures the intersection relative to the union of the predicted and ground-truth segmentation regions.
HD95: quantifies boundary accuracy by measuring the distance between the surfaces of the predicted and ground-truth masks, using the 95th percentile rather than the maximum to reduce sensitivity to single-voxel outliers. The and denote the predicted and ground-truth segmentation surfaces, respectively; represents the minimum distance between point in and surface , and is defined analogously.
Precision: measures the proportion of predicted foreground voxels that are true positives.
Recall: measures the proportion of ground-truth foreground voxels that were correctly identified.
When a class was absent in both the ground truth and the prediction for a patient ( and ), Dice, precision, and recall were assigned 100%, and HD95 was assigned 0, reflecting perfect agreement on a true negative. When a class was present in only one of the two ( or ), Dice, precision, and recall were assigned 0, and HD95 was assigned a fixed penalty of 337.3 mm, corresponding to the maximum possible distance within the evaluated volume. We retained these cases in the metric aggregation rather than excluding them or treating them as undefined. Since tumor class RC does not occur in pre-treatment cases, we computed RC metrics only for post-treatment cases.
Experiment and Analysis
We benchmarked CMC-Seg against six segmentation models spanning convolutional, Transformer, and SSM paradigms, including 3D U-Net Çiçek et al. [ [46], SegResNet Myronenko [ [35], SwinUNETR Hatamizadeh et al. [ [18], UN-ETR Hatamizadeh et al. [ [17], nnFormer Zhou et al. [ [47], and SegMamba Xing et al. [ [36]. All baselines underwent the same preprocessing, data splits, training, and postprocessing protocols to isolate architectural contribution from confounding pipeline differences. Model outputs were converted to discrete label maps via voxel-wise argmax over predicted class probabilities. Then we merged the predicted mask patches of each patient to reconstruct the original mask size of . To suppress spurious small predictions arising from noise or partial-volume effects, we applied per-class connected-component filtering: for each foreground class, 3D connected components were identified using 6-connectivity (scipy.ndimage.label, default structuring element), and components below a class-specific minimum voxel threshold were discarded. Minimum component sizes were set empirically per class (30 voxels for classes 1 and 3, 20 voxels for class 2, 80 voxels for class 4), reflecting differences in typical lesion sub-region size.
For each architecture, we calculate the mean standard deviation of per-class Dice score, HD95, precision, and recall for NETC, SNFH, ET, and RC, together with WT and TC composite scores. Statistical significance between our model and each baseline was assessed using paired Wilcoxon signed-rank tests at the patient level, with Benjamini-Hochberg false discovery rate correction applied across the resulting family of comparisons. To isolate the contribution of key architectural components, we conducted a component-wise ablation study in which each component was independently removed or modified while holding all other architectural elements, hyperparameters, and training schedule fixed. Three ablations were performed: (i) removal of the cross-attention skip fusion block, replaced with a standard skip connection, to assess the contribution of attention-based feature fusion between encoder and decoder; (ii) removal of the multi-directional Mamba scanning scheme and utilizing a one-directional Mamba block instead to assess the contribution of multi-directional scanning; and (iii) removal of both the cross-attention skip fusion block and multi-directional Mamba to assess the synergistic effect of employing them together. Each ablation variant was trained from the same initialization and data ordering as the full model, and evaluated using the identical metric suite and statistical protocol. Apart from segmentation accuracy, computational efficiency is crucial for deploying deep learning models in clinical settings. Here, we present experimental analyses of CMC-Seg complexity, comparing it with CMC-Seg variants and representative benchmark models from different architecture families. In the computational complexity analysis, we assess the parameters, Giga floating-point operations (GFLOPs), peak VRAM usage, and average inference time.
Interpretability
To assess whether the model’s segmentation decisions are based on clinically plausible image regions, we applied Grad-CAM, adapted for 3D volumetric test data. For a given input patch and target class, we computed the gradient of the target-class summed pre-softmax logit map with respect to the activations of a chosen target convolutional layer. We obtained channel-wise importance weights by global average pooling these gradients over the spatial dimensions, and produced a class-discriminative localization map as a ReLU-thresholded weighted combination of the layer’s activation maps. If the resulting map dimensions were lower than the input patch resolution, we upsampled it (trilinear interpolation) to and min–max normalized it to . For the explainability experiment, we selected several layers, including the bottleneck layer and the decoder’s third and final residual block. We produced per-patch Grad-CAM maps independently and reassembled them into a full-volume heatmap () using the same spatial metadata used for patch reconstruction during inference.
Results
Comparison with state-of-the-art models
To evaluate CMC-Seg comprehensively, we benchmarked it against an array of SOTA models. The competing models were categorized into three groups: CNN-based, Transformer-based, and Mamba-based. All baselines (CNN-, Transformer-, and Mamba-based) were trained and evaluated under the same conditions to ensure a thorough and fair comparison.
Figure 3 shows the validation IoU and validation loss for each of the seven models over 100 training epochs. Compared to SegMamba (peak 77.9%, final 77.8%), 3D U-Net (peak 77.9%, final 77.8%), SegResNet (peak 77.6%, final 77.5%), Swin-UNETR (peak 75.4%, final 75.4%), UNETR (peak 74.6%, final 74.4%), and nnFormer (peak 71.9%, final 71.5%), CMC-Seg achieved the highest validation IoU (peak 78.8%, final 78.7%). CMC-Seg also had the lowest loss among the benchmark baselines (final 0.231, minimum 0.229 at epoch 81) and reached 90% of its maximum IoU by epoch 21, faster than the Transformer baselines (nnFormer: epoch 24; UNETR: epoch 34) and comparable to the CNN baselines (3D U-Net: epoch 20; SegResNet: epoch 29).

Figure 3. Validation IoU and validation loss plot of CMC-Seg and benchmark models. CMC-Seg achieves the best validation IoU and loss compared to benchmark models.
Table 3 provides the entire test-dataset Dice score results. In both mean Dice score and NETC Dice score, CMC-Seg achieves the highest reported overall mean Dice and NETC Dice scores, although its performance advantage varies across tumor regions and treatment subgroups. Specifically, CMC-Seg achieved a mean Dice score of 81.20% ± 14.37% and an NETC Dice score of 77.09% ± 31.79%, with the improvement over Transformer-based baselines (SwinUNETR, UNETR, nnFormer) reaching statistical significance (FDR-adjusted ). CMC-Seg also achieved RC and TC Dice scores of 78.63% ± 29.91% and 82.39% ± 24.49%, comparable to 3D U-Net, SegResNet, and SegMamba, and statistically significant over Transformer-based baselines (FDR-adjusted ).
| Model | WT | TC | ET | NETC | SNFH | RC | Mean |
| 3D U-Net (Çiçek et al. [ [46]) | 91.44 ± 9.17 | 81.58 ± 26.08 | 79.93 ± 26.40 | 76.49 ± 32.06 | 87.82 ± 11.57 | 79.83 ± 28.90 | 81.10 ± 14.62 |
| SegResNet (Myronenko [ [35]) | 91.48 ± 9.14 | 82.16 ± 24.91 | 81.27 ± 24.63 | 75.28 ± 33.95 | 87.78 ± 11.43 | 78.30 ± 29.37 | 80.89 ± 14.23 |
| Swin-UNETR (Hatamizadeh et al. [ [18]) | 90.98 ± 9.33 | 81.26 ± 25.85 | 80.56 ± 25.41 | 73.93 ± 33.88 | 87.23 ± 11.75 | 76.45 ± 30.56 | 79.98 ± 15.50 |
| UNETR (Hatamizadeh et al. [ [17]) | 90.04 ± 9.98 | 79.14 ± 27.39 | 77.78 ± 27.78 | 71.93 ± 34.87 | 85.93 ± 12.59 | 70.60 ± 34.76 | 77.37 ± 16.05 |
| nnFormer (Zhou et al. [ [47]) | 89.44 ± 9.80 | 79.27 ± 27.21 | 77.40 ± 26.48 | 73.85 ± 32.59 | 85.15 ± 12.20 | 73.84 ± 31.30 | 78.07 ± 14.64 |
| SegMamba (Xing et al. [ [36]) | 91.44 ± 9.47 | 82.64 ± 24.55 | 81.34 ± 24.75 | 74.94 ± 33.27 | 87.99 ± 11.98 | 77.57 ± 30.16 | 80.82 ± 15.02 |
| CMC-Seg | 91.31 ± 9.27 | 82.39 ± 24.49 | 80.73 ± 25.28 | 77.09 ± 31.79 | 87.53 ± 12.04 | 78.63 ± 29.91 | 81.20 ± 14.37 |
Table 3. Dice score ( standard deviation) of tumor classes and subregions on the test data.
Table 4 stratifies Dice score by treatment status. In the pre-treatment subgroup, CMC-Seg showed a mean Dice score of 80.5% ± 15.5%, not significantly different from 3D U-Net, SegResNet, and SwinUNETR, and marginally below SegMamba (80.9% ± 15.0%), while remaining significantly ahead of nnFormer and UNETR (FDR-adjusted ). In the post-treatment subgroup, CMC-Seg demonstrated the highest mean Dice score (81.7% ± 13.4%) among benchmark models, with the margin over Transformer-based models reaching significance (FDR-adjusted ). This indicates that CMC-Seg’s segmentation advantage is most pronounced in post-treatment cases, while it remained competitive with the strongest CNN baselines on pre-treatment scans.
| Model | Subgroup | WT | TC | ET | RC | Mean |
| 3D U-Net (Çiçek et al. [2016]) | Pre-treatment | — | ||||
| Post-treatment | ||||||
| SegResNet (Myronenko [2018]) | Pre-treatment | — | ||||
| Post-treatment | ||||||
| Swin-UNETR (Hatamizadeh et al. [2021]) | Pre-treatment | — | ||||
| Post-treatment | ||||||
| UNETR (Hatamizadeh et al. [2022]) | Pre-treatment | — | ||||
| Post-treatment | ||||||
| nnFormer (Zhou et al. [2023]) | Pre-treatment | — | ||||
| Post-treatment | ||||||
| SegMamba (Xing et al. [2024]) | Pre-treatment | — | ||||
| Post-treatment | ||||||
| CMC-Seg | Pre-treatment | — | ||||
| Post-treatment |
Table 4. Dice score ( standard deviation) of tumor classes and subregions based on treatment status on the test data.
At the sub-region level, in the pre-treatment subgroup, CMC-Seg’s WT (91.9% ± 8.5%), TC (87.3% ± 16.9%), and ET (83.3% ± 20.1%) Dice scores were competitive with the leading CNN- and Mamba-based baselines. SegResNet attained the highest WT score (92.2% ± 8.1%), SegMamba led on TC (88.5% ± 15.0%), and SegResNet and SegMamba jointly led on ET (85.0% ± 17.8% and 85.0% ± 17.2%, respectively). CMC-Seg nonetheless remains clearly superior to nnFormer and UNETR across all three regions (FDR-adjusted ).
Higher Dice score is better (). The best-performing values are bold and underlined; the second-best values are bold (tied second-best values are all marked). WT, whole tumor; TC, tumor core; NETC, non-enhancing tumor core; SNFH, surrounding non-enhancing FLAIR hyperintensity; ET, enhancing tumor; RC, resection cavity.
In the post-treatment subgroup, CMC-Seg achieved the highest TC () and ET () Dice scores, slightly higher than SegResNet ( / ) and SegMamba ( / ), while its WT score () was slightly lower than the three strongest baselines (3D U-Net, ; SegMamba, ; SegResNet, ). These findings indicate that CMC-Seg maintains competitive performance in pre-treatment cases while demonstrating more favorable relative performance in the post-treatment subgroup, particularly for TC, ET, and RC segmentation. Thus, CMC-Seg’s segmentation accuracy is mainly focused on the post-treatment subgroup. Figure 4 shows segmentation results of CMC-Seg and benchmark models on the test dataset.

Figure 4. Visualization of the segmentation results of CMC-Seg and benchmark models on the BraTS 2025 dataset.
Table 5 reports the HD95 score for all tumor classes and subregions. CMC-Seg achieved an HD95 score of mm for the RC class, the lowest RC boundary error among all seven models evaluated. CMC-Seg’s HD95 score did not differ significantly from the two strongest CNN-based baselines, 3D U-Net (mean HD95 score 5.15 mm) and SegResNet (5.03 mm), for the mean and WT HD95 scores. Compared with 3D U-Net, two subregion comparisons were significant in 3D U-Net’s favor, including TC and ET (FDR-adjusted ), indicating a modest boundary-precision advantage. Additionally, CMC-Seg showed lower HD95 scores than SegMamba across all subregions and classes; we found no significant differences on any HD95 metric.
| Model | WT | TC | ET | NETC | SNFH | RC | Mean |
| 3D U-Net [46] | **<u>5.00</u> ± <u>8.90</u> | **<u>6.02</u> ± <u>12.51</u> | **<u>5.44</u> ± <u>12.28</u> | 5.11 ± 9.62 | **<u>4.82</u> ± <u>8.06</u> | **<u>4.51</u> ± <u>7.91</u> | **<u>5.15</u> ± <u>5.87</u> |
| SegResNet [35] | 5.08 ± 9.48 | 6.19 ± 11.83 | <u>5.34</u> ± <u>11.56</u> | <u>4.75</u> ± <u>9.12</u> | 4.89 ± 8.71 | 4.69 ± 7.40 | <u>5.03</u> ± <u>5.75</u> |
| Swin-UNETR [18] | 6.10 ± 10.10 | 7.09 ± 13.98 | 5.84 ± 12.60 | 5.75 ± 11.45 | 5.73 ± 9.16 | 5.30 ± 8.11 | 5.81 ± 6.52 |
| UNETR [17] | 6.34 ± 10.01 | 7.36 ± 12.83 | 6.25 ± 12.52 | 5.95 ± 10.51 | 6.20 ± 9.46 | 6.06 ± 8.90 | 6.21 ± 6.21 |
| nnFormer [47] | 5.61 ± 10.07 | 6.97 ± 14.12 | 6.11 ± 13.84 | 4.99 ± 9.64 | 5.46 ± 9.39 | 5.25 ± 7.86 | 5.55 ± 6.76 |
| SegMamba [36] | 5.60 ± 10.17 | 7.06 ± 14.06 | 6.16 ± 13.51 | 5.60 ± 11.67 | 5.32 ± 9.42 | 4.94 ± 8.72 | 5.68 ± 7.30 |
| CMC-Seg | 5.19 ± 9.72 | 6.31 ± 12.09 | 5.65 ± 11.91 | 4.90 ± 9.30 | 5.15 ± 9.06 | <u>4.39</u> ± <u>7.24</u> | 5.20 ± 5.83 |
Table 5. HD95 score (mm; lower is better) ± standard deviation of tumor classes and subregions on the test data. Lower HD95 is better (↓). The best-performing values are bold and underlined; the second-best values are bold. WT, whole tumor; TC, tumor core; NETC, non-enhancing tumor core; SNFH, surrounding non-enhancing FLAIR hyperintensity; ET, enhancing tumor; RC, resection cavity.
In contrast, CMC-Seg showed a clear and consistent boundary-accuracy advantage over the Transformer-based baselines. The mean HD95 score was significantly lower than nnFormer, SwinUNETR, and UNETR (FDR-adjusted ). This pattern held across all classes and subregions individually, with UNETR demonstrating the most pronounced deficit (RC: mean difference mm, ). In the pre-treatment subgroup (Table 6), CMC-Seg’s mean boundary error ( mm) is comparable to 3D U-Net ( mm), SegResNet ( mm), and nnFormer ( mm), and lower than SegMamba ( mm), SwinUNETR ( mm), and UNETR ( mm).
| Model | Subgroup | WT | TC | ET | RC | Mean |
| 3D U-Net (Çiçek et al. [2016]) | Pre-treatment | — | ||||
| Post-treatment | ||||||
| SegResNet (Myronenko [2018]) | Pre-treatment | — | ||||
| Post-treatment | ||||||
| Swin-UNETR (Hatamizadeh et al. [2021]) | Pre-treatment | — | ||||
| Post-treatment | ||||||
| UNETR (Hatamizadeh et al. [2022]) | Pre-treatment | — | ||||
| Post-treatment | ||||||
| nnFormer (Zhou et al. [2023]) | Pre-treatment | — | ||||
| Post-treatment | ||||||
| SegMamba (Xing et al. [2024]) | Pre-treatment | — | ||||
| Post-treatment | ||||||
| CMC-Seg | Pre-treatment | — | ||||
| Post-treatment |
Table 6. HD95 score (lower is better) std of tumor classes and subregions based on treatment status on the test data.
In the post-treatment subgroup, CMC-Seg’s mean HD95 score dropped to mm, the second-lowest of all models, trailing only SegResNet ( mm). The regional analysis revealed a more heterogeneous picture compared to the mean HD95 values. In the pre-treatment subgroup, CMC-Seg’s WT HD95 score ( mm) was the second-lowest of all seven models, behind only 3D U-Net (5.90 mm). The ET was the one region where CMC-Seg underperformed in the pre-treatment subgroup, posting the highest boundary error of any model at mm. In the post-treatment subgroup, the results shifted notably: CMC-Seg’s ET HD95 score improved to mm, which is significantly lower than nnFormer and UNETR, as well as its TC HD95 score ( mm) was significantly lower than Transformer baselines. Taken together, CMC-Seg displays competitive boundary precision
Higher Dice score is better (). “—” indicates that the subregion is not defined for the corresponding treatment status (no resection cavity in pre-treatment cases). WT, whole tumor; TC, tumor core; ET, enhancing tumor; RC, resection cavity.
results in the pre-treatment subgroup, while these results improve in the post-treatment subgroup, particularly compared to Transformer baselines.
To characterize the trade-off between over- and under-segmentation, we additionally report precision and recall (sensitivity), stratified by pre- and post-treatment subgroup (Table 7), as region composition and boundary complexity differ notably between these two clinical subgroups. In the pre-treatment subgroup, CMC-Seg achieves a mean precision of 82.3% 13.8% and mean recall of 84.3% 13.3%. Recall exceeds precision across all pre-treatment regions except NETC, a reasonable bias for a segmentation task where under-detection of tumor tissue carries greater clinical risk than modest over-segmentation. In the post-treatment subgroup, which includes the additional RC region and more heterogeneous tissue due to treatment, mean precision rose to 86.5% 10.6%, while mean recall was 84.9% 12.8%. RC also achieves precision of 84.1% 24% and recall of 83.2% 26.8%, reflecting reasonably symmetric performance in this treatment-cavity region despite its irregular, heterogeneous morphology. Across both subgroups, SNFH shows the strongest recall (88% – 92.1%), consistent with its Dice score being the most accurate tumor class, while NETC shows the largest precision–recall gap in the post-treatment subgroup (90% precision vs. 81.1% recall), suggesting the CMC-Seg is more conservative (higher precision, lower recall) when delineating NETC after treatment-induced tissue changes.
| Metric | Subgroup | NETC | SNFH | ET | WT | RC | TC | Mean |
| Precision (%) (Pre.) | Pre-treatment | — | ||||||
| Post-treatment | ||||||||
| Recall (%) (Sensitivity) | Pre-treatment | — | ||||||
| Post-treatment |
Table 7. Precision and recall ( standard deviation) of tumor classes and subregions on the test data.
Computational complexity analysis
We examined the computational cost of achieving this accuracy (Table 8). The model’s parameters, GFLOPs, and average inference time are computed at inference with float 32 and batch size 1. CMC-Seg has 46.76M parameters, positioning it between the CNN baselines (3D U-Net, 16.32M; SegResNet, 25.21M) and the Transformer models (UNETR, 143.16M; nnFormer, 150.06M).
| Model | Parameters | GFLOPs | VRAM (GB) | Inference Time (ms) |
| 3D U-Net (Çiçek et al. [ [46]) | 16.32M | 3807.41 | 7.81 | 1089.00 ± 10.92 |
| SegResNet (Myronenko [ [35]) | 25.21M | 1174.14 | 8.50 | 411.41 ± 2.41 |
| Swin-UNETR (Hatamizadeh et al. [ [18]) | 62.19M | 1550.16 | 7.57 | 929.35 ± 6.50 |
| UNETR (Hatamizadeh et al. [ [17]) | 143.16M | 4123.45 | 8.43 | 1154.32 ± 9.14 |
| nnFormer (Zhou et al. [ [47]) | 150.06M | 494.86 | 6.29 | 1091.87 ± 6.59 |
| SegMamba (Xing et al. [ [36]) | 67.42M | 2928.91 | 8.35 | 1392.28 ± 12.21 |
| CMC-Seg | 46.76M | 381.49 | 7.48 | 1883.27 ± 19.68 |
Lower values are better for all reported metrics. The best-performing values are bold and underlined; the second-best values are bold. GFLOPs, giga floating-point operations; VRAM, video random-access memory.
Table 8.
CMC-Seg required the fewest inference GFLOPs of any model evaluated (381.49 GFLOPs), lower than lightweight models like nnFormer (494.86 GFLOPs), and showed a large gap compared with UNETR (4123.45 GFLOPs). CMC-Seg peak training VRAM usage was moderate at 7.48 GB, comparable to Swin-UNETR (7.57 GB) and below SegResNet, UNETR, and SegMamba. This favorable accuracy-per-FLOP profile did not translate into faster wall-clock inference: CMC-Seg’s inference time of 1883.27 ± 19.68 ms was the slowest among all benchmark baselines. This reflects a known characteristic of Mamba-based SSMs, whose sequential scan operations are memory-bound rather than compute-bound, so low FLOPs do not translate proportionally into low latency on current hardware.
Taken together, these results position CMC-Seg as achieving the best aggregate segmentation performance at the lowest computational cost in FLOPs, by sacrificing inference time relative to CNN- and Transformer-based alternatives (Figure 5).

Figure 5. The computational cost versus accuracy trade-off. Model parameters are shown by their circle size. CMC-Seg achieves the best mean Dice score-to-GFLOPs ratio, although it demonstrates the slowest inference time.
Ablation studies
To validate our architectural design and analyze each key component, this section presents a series of ablation studies (Table 9). Starting with a basic Mamba-CNN baseline, we gradually added our proposed modules and measured the performance enhancement at each stage. In the first analysis, we investigated the specific design of our MDM block. Model (B) replaces our proposed direction-aware scanning mechanism with a simple Mamba block that flattens the 3D feature map and processes it as a single 1D sequence.
| Model | Dice score (%) ↑ NETC | SNFH | ET | RC | Mean | HD95 score (mm) ↓ NETC | SNFH | ET | RC | Mean |
| Model (B) | ||||||||||
| Model (C) | ||||||||||
| Model (D) | ||||||||||
| CMC-Seg |
Table 9. Dice and HD95 score ( standard deviation) of the ablation models. Model (B) uses simple Mamba blocks; Model (C) uses plain skip connections; Model (D) uses simple Mamba blocks and plain skip connections. Higher Dice and lower HD95 are better (). NETC, non-enhancing tumor core; SNFH, surrounding non-enhancing FLAIR hyperintensity; ET, enhancing tumor; RC, resection cavity.
The results show a performance drop compared to our full model, with the mean Dice score falling to 79.93% ± 15.04% and the mean HD95 increasing to 5.28 ± 6.08 mm. Also, per-class analysis shows that the removal of the MDM block causes a significant decrease in the Dice score as well as a significant increase in the HD95 score for the RC class (Figure 6). This finding shows that simply applying a 1D sequence model to volumetric data is inherently flawed, as it disregards the fundamental 3D spatial structure. By processing the volume along all three orthogonal axes, our MDM

Figure 6. Effectiveness of the multi-directional Mamba and cross-attention strategy on the RC class. Model (B) uses simple Mamba blocks; Model (C) uses plain skip connections; Model (D) uses simple Mamba blocks and plain skip connections. The combination of multi-directional Mamba and cross-attention achieved the highest Dice score and the lowest HD95 score for the RC class. Asterisks indicate statistically significant differences.
Lower HD95 is better (). “—” indicates that the subregion is not defined for the corresponding treatment status (no resection cavity in pre-treatment cases). WT, whole tumor; TC, tumor core; ET, enhancing tumor; RC, resection cavity.
Recall is also reported as sensitivity. “—” indicates that the subregion is not defined for the corresponding treatment status (no resection cavity in pre-treatment cases). WT, whole tumor; TC, tumor core; NETC, non-enhancing tumor core; SNFH, surrounding non-enhancing FLAIR hyperintensity; ET, enhancing tumor; RC, resection cavity.
block preserves this crucial spatial context and creates a far more powerful representation of 3D anatomy, which is vital for accurate segmentation.
In the second step, we validated our cross-attention strategy. We removed our proposed cross-attention module from the skip connections, using direct concatenation of the encoder feature map with the decoder (Model C). This degraded both the mean Dice score and the mean HD95 score compared to our full model. Also, per-class analysis shows that the removal of the cross-attention causes a significant increase in the HD95 score for the RC class. This insight underscores the importance of cross-attention. Simple concatenations are static operations; they combine features uniformly and in a content-agnostic way. In contrast, our cross-attention strategy is dynamic and content-aware, providing high-level global context from the bottleneck layer to selectively inform feature reuse at every encoder resolution before fusion via residual gated normalization. This learned, adaptive control over feature fusion is a crucial factor behind the superior performance and robustness of the CMC-Seg.
Finally, the model variant without both multi-direction Mamba and cross-attention (Model D) yields the worst mean HD95 score among the variants. In addition, CMC-Seg and Model (B) differ significantly in Dice and HD95 scores for the RC class. Although Model (D)’s mean Dice score was higher than Model (B), this shows that the cross-attention strategy improved the mean Dice score only when combined with the MDM block. In conclusion, the ablation studies systematically demonstrated that each component of CMC-Seg, including the MDM block and the cross-attention strategy, is well justified by its performance.
Explainability experiment
This subsection evaluates the transparency and clinical interpretability of the proposed 3D segmentation model by assessing the Grad-CAM explanation maps. A fundamental challenge in medical image segmentation is multi-class explainability. Unlike classification models that produce a single class-based heatmap, this research extends Grad-CAM to all segmented classes, providing a specific heatmap for each tumor class.
We generated saliency maps from three model layers: the decoder’s third and last residual blocks and the bottleneck layer. The heatmap image represents the MRI areas that the model emphasizes throughout its decision-making. This heatmap is created using the model’s activations and is overlaid on the original image. It generally utilizes a color format of red, yellow, and blue to denote levels of high, medium, and low importance, respectively. Warm colors, like red and yellow, denote the zones where the model computes the highest value in recognizing the tumor. The tumor zone is marked in red or yellow, suggesting that these regions contributed most to the relevant class logit. The CAM heatmap utilizes color schemes to represent the model’s emphasis on the NETC, SNFH, ET, and RC zones during glioma segmentation. The closer an area is to red, the more important the model considers it for segmenting the corresponding tumor class.

Figure 8. Visualization of per-class internal feature activation maps (heatmaps) from the third decoder residual block of CMC-Seg.
To provide a more intuitive understanding of our XAI results, we visualize the heatmaps of tumor classes from various layers in Figure 7 through Figure 9. Grad-CAM helps clinicians and end-users understand which parts of the MRI image the model considers most important for tumor segmentation.

Figure 7. Visualization of per-class internal feature activation maps (heatmaps) from the last residual block of CMC-Seg.

Figure 9. Visualization of per-class internal feature activation maps (heatmaps) from the bottleneck layer of CMC-Seg.
Visualizing per-class heatmaps enhances transparency, enabling healthcare professionals to verify the AI-driven segmentation methodology used for diagnosis and patient monitoring. These results highlight the effective use of XAI in deep learning architectures, providing trustworthy models with potential clinical transparency and utility in medical imaging.
Discussion
In this study, we proposed a novel vision Mamba-CNN model enhanced with cross-attention (CMC-Seg) for 3D medical image segmentation. Our rigorous evaluations show its competitive computational efficiency and performance. Here, we go beyond the numerical results to discuss the broader implications of our findings, the intrinsic constraints of the methodology, and promising avenues for further investigation.
The most important aspect of CMC-Seg’s performance is how well it combines local feature extraction and global context modeling by developing an architecture that efficiently utilizes both, rather than choosing one over the other. As a fine-detail expert, the CNN component excels at capturing the subtle textural changes that define tumor margins. In contrast, the MDM-Mamba block serves as a contextual expert, capturing spatial interactions between a tumor and surrounding tissues as well as global anatomy. In the final stage, the cross-attention strategy refines the encoder’s raw features by attending to bottleneck features before fusing them with decoder features.
In addition, our cascade pipeline is the main factor that enables us to train our model and other benchmark models within such a low-compute-budget system and achieve competitive results on a class-imbalanced 3D dataset in only 100 epochs. Because deep learning models are opaque, we use Grad-CAM as an XAI method on several CMC-Seg layers to produce heatmaps. Analysis of these heatmaps shows that, by producing per-class heatmaps, the model improves transparency by linking predictions to clinically recognized anatomical structures and providing clinicians with a visual justification for the segmentation results.
While we benchmarked against widely used models like 3D U-Net and SwinUNETR, our benchmark had limitations. For several reasons, including computational resource and storage limitations, we couldn’t benchmark our model against nnU-Net Isensee et al. [ [48], U-Mamba Ma et al. [ [49] and foundation models Wang et al. [ [50]. In addition, our benchmarking aimed to compare model architectures, not pipelines and frameworks. nnU-Net and U-Mamba are self-configuring pipelines with their own preprocessing, training, and postprocessing configurations. Therefore, it would be interesting to benchmark our cascaded pipeline against other pipelines to see its performance and efficacy. Additionally, cross-validation with six benchmark baselines and three ablation models was impractical due to computational constraints.
There is an array of aspects in the proposed framework that could potentially be improved and expanded upon in future work. The pipeline through ensemble methods and deep supervision can enhance robustness. Additionally, integrating novel architectures such as Gated Delta NetworksYang et al. [ [51] and Forgetting TransformersLin et al. [ [52] holds promise for further accuracy gains. Including a larger and more diverse dataset is essential to improving generalizability. Future studies will focus on developing lighter models, handling missing MRI modalities, and extending the framework to support multi-tasking such as classification and prognosis prediction.
Conclusion
This work has proposed a cascade framework with CMC-Seg for pre- and post-treatment glioma segmentation, improving accuracy and computational efficiency. The two main components of CMC-Seg were multi-directional Mamba and cross-attention, and ablation experiments confirmed that both improved segmentation results. Our extensive evaluation showed competitive performance against well-established baselines, yielding the highest mean Dice score and the best mean Dice score-to-GFLOPs ratio. The explainability experiment results support that CMC-Seg is interpretable and clinically meaningful. These results establish the proposed framework as a potential and effective method for clinical implementation, especially in glioma diagnosis and treatment planning. Furthermore, accurate tumor segmentation provides a robust basis for further investigations into glioma classification and grading.
CRediT authorship contribution statement
Siavash Taremi: Conceptualization, Methodology, Software, Data curation, Formal analysis, Investigation, Visualization, Writing – original draft, Writing – review & editing. Mahmoud Heidari: Conceptualization, Methodology, Data curation, Formal analysis, Investigation, Writing – review & editing. Seyed Mohammad Hossein Hashemi: Conceptualization, Methodology, Software, Investigation, Writing – review & editing. Mohsen Hooshmand: Conceptualization, Methodology, Supervision, Project administration, Writing – review & editing.
Declaration of competing interests
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Ethics approval
Not applicable.
Funding
This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.
Data availability
The BraTS 2025 dataset analyzed during the current study is available at: https://www.synapse.org/Synapse:syn64153130/wiki/630130
References
- [1]Mackenzie Price, Angela Bartolo, Deem Alofisan, Hillary Hsu, Christine Ann Pittman Ballard, Carol Kruchko, and Quinn T Ostrom. Cbtrus statistical report: Primary brain and other central nervous system tumors diagnosed in the united states in 2019- 2023. Neuro-Oncology, 28(Supplement_3):iii1–iii60, 2026.DOI
- [2]Michael Weller, Wolfgang Wick, Ken Aldape, Michael Brada, Mitchell Berger, Stefan M Pfister, Ryo Nishikawa, Mark Rosenthal, Patrick Y Wen, Roger Stupp, et al. Glioma. Nature reviews Disease primers, 1(1):15017, 2015.
- [3]Michael Weller, Martin van den Bent, Matthias Preusser, Emilie Le Rhun, Jörg C Tonn, Giuseppe Minniti, Martin Bendszus, Carmen Balana, Olivier Chinot, Linda Dirven, et al. Eano guidelines on the diagnosis and treatment of diffuse gliomas of adulthood. Nature reviews Clinical oncology, 18(3):170–186, 2021.
- [4]Tongxue Zhou, Su Ruan, and Stéphane Canu. A review: Deep learning for medical image segmentation using multi-modality fusion. Array, 3:100004, 2019.DOI
- [5]Yessine Amri, Amine Ben Slama, Zouhair Mbarki, Ridha Selmi, and Hedi Trabelsi. Automatic glioma segmentation based on efficient u-net model using mri images. Intelligence-Based Medicine, 11:100216, 2025.DOI
- [6]Evi J van Kempen, Max Post, Manoj Mannil, Richard L Witkam, Mark Ter Laan, Ajay Patel, Frederick JA Meijer, and Dylan Henssen. Performance of machine learning algorithms for glioma segmentation of brain mri: a systematic literature review and meta-analysis. European Radiology, 31(12):9638–9653, 2021.
- [7]Tirivangani Magadza and Serestina Viriri. Deep learning for brain tumor segmentation: a survey of state-of-the-art. Journal of imaging, 7(2):19, 2021.DOI
- [8]Wenyin Zhang, Yong Wu, Bo Yang, Shunbo Hu, Liang Wu, and Sahraoui Dhelim. Overview of multi-modal brain tumor mr image segmentation. In Healthcare, volume 9, page 1051. MDPI, 2021.
- [9]Delaram J Ghadimi, Amir M Vahdani, Hanie Karimi, Pouya Ebrahimi, Mobina Fathi, Farzan Moodi, Adrina Habibzadeh, Fereshteh Khodadadi Shoushtari, Gelareh Valizadeh, Hanieh Mobarak Salari, et al. Deep learning-based techniques in glioma brain tumor segmentation using multi-parametric mri: a review on clinical applications and future outlooks. Journal of Magnetic Resonance Imaging, 61(3):1094–1109, 2025.
- [10]Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computer-assisted intervention, pages 234–241. Springer, 2015.arxiv.org/abs/1505.04597
- [11]Zongwei Zhou, Md Mahfuzur Rahman Siddiquee, Nima Tajbakhsh, and Jianming Liang. Unet++: A nested u-net architecture for medical image segmentation. In International workshop on deep learning in medical image analysis, pages 3–11. Springer, 2018.
- [12]Qichuan Geng, Zhong Zhou, and Xiaochun Cao. Survey of recent progress in semantic image segmentation with cnns. Science China Information Sciences, 61(5):051101, 2018.
- [13]Ying Yu, Chunping Wang, Qiang Fu, Renke Kou, Fuyu Huang, Boxiong Yang, Tingting Yang, and Mingliang Gao. Techniques and challenges of image segmentation: A review. Electronics, 12(5):1199, 2023.
- [14]Alexey Dosovitskiy. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929, 2020.
- [15]Chin Poo Lee, Eric Khang Heng Ooi, Nicole Kai Ning Loh, Ali Alqahtani, and Kian Ming Lim. A survey on vision transformers: Design pressures, architectural taxonomy, and future outlook. IEEE Access, 2026.
- [16]Jieneng Chen, Yongyi Lu, Qihang Yu, Xiangde Luo, Ehsan Adeli, Yan Wang, Le Lu, Alan L Yuille, and Yuyin Zhou. Transunet: Transformers make strong encoders for medical image segmentation. arXiv preprint arXiv:2102.04306, 2021.
- [17]Ali Hatamizadeh, Yucheng Tang, Vishwesh Nath, Dong Yang, Andriy Myronenko, Bennett Landman, Holger R Roth, and Daguang Xu. Unetr: Transformers for 3d medical image segmentation. In 2022 IEEE/CVF winter conference on applications of computer vision (WACV), pages 1748–1758. Ieee, 2022.
- [18]Ali Hatamizadeh, Vishwesh Nath, Yucheng Tang, Dong Yang, Holger R Roth, and Daguang Xu. Swin unetr: Swin transformers for semantic segmentation of brain tumors in mri images. In International MICCAI brainlesion workshop, pages 272–284. Springer, 2021.
- [19]Balamurugan Palanisamy, Vikas Hassija, Arpita Chatterjee, Arpita Mandal, Debanshi Chakraborty, Amit Pandey, G Sai Sesha Chalapathi, and Dhruv Kumar. Transformers for vision: A survey on innovative methods for computer vision. Ieee Access, 13:95496–95523, 2025.
- [20]Albert Gu and Tri Dao. Mamba: Linear-time sequence modeling with selective state spaces. arXiv preprint arXiv:2312.00752, 2023.
- [21]Talha Saeed, Muhammad Attique Khan, Ameer Hamza, Mohammad Shahbaz, Wazir Zada Khan, Fatimah Alhayan, Leila Jamel, and Jamel Baili. Neuro-xai: Explainable deep learning framework based on deeplabv3+ and bayesian optimization for segmentation and classification of brain tumor in mri scans. Journal of neuroscience methods, 410:110247, 2024.
- [22]Lianghui Zhu, Bencheng Liao, Qian Zhang, Xinlong Wang, Wenyu Liu, and Xinggang Wang. Vision mamba: Efficient visual representation learning with bidirectional state space model. arXiv preprint arXiv:2401.09417, 2024.arxiv.org/abs/2401.09417
- [28]E Lotan, B Zhang, S Dogra, WD Wang, D Carbone, G Fatterpekar, EK Oermann, and YW Lui. Development and practical implementation of a deep learning–based pipeline for automated pre-and postoperative glioma segmentation. American Journal of Neuroradiology, 43(1):24–32, 2022.DOI
- [33]Mariam Aboian, Udunna Anazodo, Ujjwal Baid, Spyridon Bakas, Evan Calabrese, Gian Marco Conte, Anahita Kazerooni, Yannick Kirchhoff, Florian Kofer, Dominic LaBella, Hongwei Li, Marius George Linguraru, Bjoern Menze, Jeff Rudie, Philipp Vollmuth, and Benedikt Wiestler. Miccai 2025 lighthouse challenge: Brain tumor segmentation cluster of challenges (brats), March 2025. URL https://doi.org/10.5281/zenodo.15094823.
- [34]Cecilia Diana-Albelda, Alvaro Garcia-Martin, and Jesus Besços. A review on deep learning methods for glioma segmentation, limitations, and future perspectives. Journal of Imaging, 11(8):269, 2025.
- [35]Andriy Myronenko. 3d mri brain tumor segmentation using autoencoder regularization. In International MICCAI brainlesion workshop, pages 311–320. Springer, 2018.arxiv.org/abs/1810.11654
- [36]Zhaohu Xing, Tian Ye, Yijun Yang, Guangu Liu, and Lei Zhu. Segmamba: Long-range sequential modeling mamba for 3d medical image segmentation, 2024. URL https://arxiv.org/abs/2401.13560.
- [37]Ramy A Zeineldin, Mohamed E Karar, Ziad Elshaer, Jan Coburger, Christian R Wirtz, Oliver Burgert, and Franziska Mathis-Ullrich. Explainable hybrid vision transformers and convolutional network for multimodal glioma segmentation in brain mri. Scientific reports, 14(1):3713, 2024.DOI
- [38]Driss Lamrani, Mohamed Amine Mahjoubi, Saleh Shawki, Wassima Moutaouakil, Soufiane Hamida, Bouch aib Cherradi, and Lhoussain Bahatti. Enhanced multiclass brain tumor segmentation using mri images and explainable ai techniques. Multimedia Tools and Applications, 85(1):28, 2026.DOI
- [39]Sara Tehsin, Inzamam Mashood Nasir, and Robertas Damaševičius. Explainable brain tumor segmentation via attention-guided hybrid cnn–transformer–mamba network. Knowledge-Based Systems, page 116000, 2026.DOI
- [41]Xiangbin Liu, Shufen Hou, Shuai Liu, Weiping Ding, and Yudong Zhang. Attention-based multimodal glioma segmentation with multi-attention layers for small-intensity dissimilarity. Journal of King Saud University Computer and Information Sciences, 35(4):183–195, 2023.DOI
- [42]Chengcheng Jin, Nor Safira Elaina Mohd Noor, and Haidi Ibrahim. Dm-unet: Enhancing spatial awareness via dynamic mamba for lightweight brain tumor segmentation. IEEE Access, 2026.DOI
- [43]M Jorge Cardoso, Wenqi Li, Richard Brown, Nic Ma, Eric Kerfoot, Yiheng Wang, Benjamin Murrey, Andriy Myronenko, Can Zhao, Dong Yang, et al. Monai: An open-source framework for deep learning in healthcare. arXiv preprint arXiv:2211.02701, 2022.arxiv.org/abs/2211.02701
- [44]Seyed Sadegh Mohseni Salehi, Deniz Erdogmus, and Ali Gholipour. Tversky loss function for image segmentation using 3d fully convolutional deep networks. In International workshop on machine learning in medical imaging, pages 379–387. Springer, 2017.arxiv.org/abs/1706.05721
- [45]Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollár. Focal loss for dense object detection. In Proceedings of the IEEE international conference on computer vision, pages 2980–2988, 2017.
- [46]Özgün Çiçek, Ahmed Abdulkadir, Soeren S Lienkamp, Thomas Brox, and Olaf Ronneberger. 3d u-net: learning dense volumetric segmentation from sparse annotation. In International conference on medical image computing and computer-assisted intervention, pages 424–432. Springer, 2016.arxiv.org/abs/1606.06650
- [47]Hong-Yu Zhou, Jiansen Guo, Yinghao Zhang, Xiaoguang Han, Lequan Yu, Liansheng Wang, and Yizhou Yu. nnformer: Volumetric medical image segmentation via a 3d transformer. IEEE transactions on image processing, 32:4036–4045, 2023.DOI
- [48]Fabian Isensee, Paul F Jaeger, Simon AA Kohl, Jens Petersen, and Klaus H Maier-Hein. nnu-net: a self-configuring method for deep learning-based biomedical image segmentation. Nature methods, 18(2):203–211, 2021.DOI
- [49]Jun Ma, Feifei Li, and Bo Wang. U-mamba: Enhancing long-range dependency for biomedical image segmentation. arXiv preprint arXiv:2401.04722, 2024b.arxiv.org/abs/2401.04722
- [50]Haoyu Wang, S izheng Guo, Jin Ye, Zhongying Deng, Junlong Cheng, Tianbin Li, Jianpin Chen, Yanzhou Su, Ziyan Huang, Yiqing Shen, et al. Sam-med3d: a vision foundation model for general-purpose segmentation on volumetric medical images. IEEE Transactions on Neural Networks and Learning Systems, 2025.DOI
- [51]Songlin Yang, Jan Kautz, and Ali Hatamizadeh. Gated delta networks: Improving mamba2 with delta rule. In International Conference on Learning Representations, volume 2025, pages 29687–29707, 2025.arxiv.org/abs/2412.06464
- [52]Zhixuan Lin, Evgenii Nikishin, Xu He, and Aaron Courville. Forgetting transformer: Softmax attention with a forget gate. In International Conference on Learning Representations, volume 2025, pages 69704–69738, 2025.arxiv.org/abs/2503.02130