MSA$^2$Net: Multi-scale Adaptive Attention-guided Network for Medical Image Segmentation

Sina Ghorbani Kolahi, Seyed Kamal Chaharsooghi, Toktam Khatibi, Afshin Bozorgpour, Reza Azad, Moein Heidari, Ilker Hacihaliloglu, Dorit MerhofarXiv 2024

TL;DR

MSA$^2$Net introduces an innovative hybrid CNN-Transformer architecture for medical image segmentation that replaces standard, rigid skip connections with a novel Multi-Scale Adaptive Spatial Attention Gate (MASAG). By dynamically balancing local details and global context, the network effectively handles massive variations in tissue size and shape, achieving state-of-the-art results on both radiology and dermatology datasets.

What Problem Does This Paper Address?

Accurate medical image segmentation is a cornerstone of modern disease diagnosis and treatment planning. However, automated models must cope with extreme biological variability: organs and lesions differ wildly in size, shape, texture, and density from patient to patient.

Traditional Convolutional Neural Networks (CNNs) excel at capturing local textures but struggle to model long-range spatial dependencies due to their localized receptive fields. Conversely, Vision Transformers (ViTs) are fantastic at capturing global context but are computationally heavy and often smooth out fine-grained, high-frequency details.

While hybrid CNN-Transformer architectures attempt to bridge this gap using U-shaped networks (like U-Net), they typically rely on simplistic skip connections (such as basic addition or concatenation) to pass features from the encoder to the decoder. These static connections fail to adapt to content variance, creating a bottleneck. This paper tackles this exact limitation by introducing an intelligent, adaptive feature-fusion mechanism directly into the skip connections.

Methods

The authors propose MSA$^2$Net, which combines a powerful hierarchical transformer encoder with a hybrid decoder, linked together by a novel attention-guided skip connection.

  1. The Encoder: Utilizes a pretrained MaxViT hierarchical transformer, which blends inverted residual block convolutions (MBConv) with multi-axis attention to extract robust multi-scale features.
  2. The Skip Connection (MASAG): The core innovation is the Multi-Scale Adaptive Spatial Attention Gate (MASAG). Instead of passively passing data, MASAG dynamically refines features through four sequential stages:
  3. Multi-Scale Feature Fusion: Extracts local context from the encoder using depthwise and dilated convolutions, while capturing global context from the decoder via channel-wise max and average pooling.
  4. Spatial Selection: Applies a channel-wise softmax to dynamically weight and prioritize the most relevant features from both paths.
  5. Spatial Interaction & Cross-Modulation: Interweaves local and global features using sigmoid gating to mutually enrich the feature maps.
  6. Recalibration: Generates a final spatial attention map to scale and refine the encoder's original output before it enters the decoder.
  7. The Decoder: Employs a split strategy. Shallow layers use Large Kernel Attention (LKA) to manage high-resolution details and boundary definitions, while deeper layers use Dual Attention Enhanced Transformer (DAE-Former) blocks to preserve long-range interactions at lower resolutions.
  8. Loss Function: Integrates Boundary Difference over Union (BDoU) loss to dynamically penalize boundary errors based on the target object's size.
Figure 1: Our proposed segmentation network, called MSA2Net, is composed of an encoder (using pretrained MaxViT block) and a decoder (comprising DAE-Former blocks in deeper layers and LKA blocks in shallow ones). The encoding-decoding feature fusion is performed via our novel MASAG module.

Datasets

The model was rigorously evaluated on two public medical image benchmarks:

  • Synapse Multi-Organ Segmentation Dataset: Consists of 30 abdominal clinical CT cases (3,779 axial images) with annotations for 8 abdominal organs (spleen, kidneys, gallbladder, liver, stomach, aorta, and pancreas).
  • ISIC 2018 Dataset: A skin lesion segmentation benchmark containing 2,594 dermoscopy images characterized by irregular boundaries and intricate color distributions.

Key Insights and Ideas

  • Countering the "Low-Pass Filter" Effect: Standard self-attention mechanisms inherently act as low-pass filters, which can wash out high-frequency details (like fine textures and sharp boundaries) in deeper network layers. The authors demonstrate via frequency analysis that MASAG successfully preserves these high-frequency components, which are crucial for detecting irregular lesions and small structural boundaries.
  • Dynamic Receptive Fields: Rather than forcing the network to use a fixed window size, MASAG dynamically scales its receptive field based on the image content. This allows the same architecture to seamlessly segment massive structures like the liver alongside tiny, intricate structures like the aorta.
  • Highly Efficient Innovation: Despite its multi-stage architecture, the MASAG module is remarkably lightweight. It accounts for only 8% of the total network parameters (9.44M out of 112.77M), making it an excellent "plug-and-play" candidate for other U-shaped networks.

Key Results

MSA$^2$Net outperformed or matched existing state-of-the-art (SOTA) models across both benchmarks:

  • Synapse Dataset: Achieved a Dice Similarity Coefficient (DSC) of 84.75% and a Hausdorff Distance (HD95) of 13.29. It significantly reduced the boundary error compared to the previous best hybrid model, 2D D-LKA Net (which scored an HD95 of 20.04). It showed particularly strong performance jumps in notoriously difficult, highly variable organs like the pancreas (+1.59%) and aorta (+1.13%).
Quantitative results on the Synapse dataset showing MSA$^2$Net outperforming existing SOTA methods across multiple organs.
  • ISIC 2018 Dataset: Achieved a top-tier DSC of 0.9129, outperforming recent advanced diffusion-based models like DermoSegDiff (0.9005) and pure transformer models like Swin-UNet (0.8946).
Table 1: The evaluation outcomes of the suggested approach on the Synapse dataset are presented in this comparison. The highest performing result is highlighted in blue, while the second highest is indicated in red. The metrics include parameters, reported in millions (M), and FLOPS, quantified in billions (G). The DSC and HD95 values are provided for several abdominal organs: spleen (Spl), right kidney (RKid), left kidney (LKid), gallbladder (Gal), liver (Liv), stomach (Sto), aorta (Aor), and pancreas (Pan).

Limitations and Future Work

While the MASAG module itself is lightweight and efficient, the overall MSA$^2$Net model is quite large, totaling 112.77 million parameters. This footprint is primarily driven by the heavy, pretrained MaxViT-B encoder (64.12M parameters). This high parameter count and computational complexity could pose challenges for deployment in real-time clinical applications or on resource-constrained hardware.

The authors note that because MASAG is modular, future research should focus on pairing it with lighter, more computationally efficient backbones, or extending its application to other dense prediction tasks like video object segmentation.

Summary updated

BibTeX
@misc{kolahi2024msa,
  author = {Sina Ghorbani Kolahi and Seyed Kamal Chaharsooghi and Toktam Khatibi and Afshin Bozorgpour and Reza Azad and Moein Heidari and Ilker Hacihaliloglu and Dorit Merhof},
  title = {{MSA$^2$Net: Multi-scale Adaptive Attention-guided Network for Medical Image Segmentation}},
  year = {2024},
  eprint = {2407.21640},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.21640},
}
Figure