Hybrid Swin Deformable Attention U-Net for Medical Image Segmentation

Lichao Wang, Jiahao Huang, Xiaodan Xing, Guang Yang

Introduction

In the field of medical imaging, the precise segmentation of anatomical structures and pathological lesions is a cornerstone of diagnosis and treatment planning. While Convolutional Neural Networks (CNNs) have long dominated this space due to their proficiency in capturing local textures, and Transformers have recently introduced the ability to model long-range dependencies, existing hybrid architectures still face significant challenges. Specifically, standard "Swin" Transformers utilize fixed-window attention mechanisms that often struggle with the irregular, curved, and thin geometries typical of human anatomy. Furthermore, the "black box" nature of these models remains a barrier to clinical adoption.

To address these issues, researchers have introduced SDAH-UNet, a hybrid architecture that integrates a novel Swin Deformable Attention mechanism with parallel convolutions. This model not only achieves state-of-the-art performance in cardiac and brain tumor segmentation but also offers a built-in interpretability feature through "deformation points."

Methodology

The core innovation of SDAH-UNet lies in the SDAPC block (Swin Deformable Attention with Parallel Convolution). This block is designed to capture both fine-grained local details and broad global context simultaneously.

Swin Deformable MSA (SDMSA)

Unlike standard multi-head self-attention (MSA) which samples from a rigid grid, the SDMSA module utilizes a lightweight internal network to calculate spatial offsets. This allows the attention mechanism to "deform" its sampling points, effectively wrapping its focus around the specific shape of a lesion or organ. This flexibility reduces computational redundancy by ignoring irrelevant background pixels and focusing on information-dense regions.

Parallel Convolution Branch

To ensure that the model does not lose the high-frequency texture details necessary for identifying subtle tissue boundaries, a depthwise convolution branch runs in parallel with the attention branch. While the Transformer captures the holistic structure, the CNN branch preserves the fine edges and textures. These two streams are then fused to create a comprehensive feature representation.

U-Shape Architecture

SDAH-UNet adopts the classic U-Net symmetry, employing these hybrid blocks in both the encoder and decoder stages. This allows for multi-scale feature extraction and precise reconstruction of the segmentation map through skip connections.

Experimental Results

The model was rigorously evaluated on two benchmark datasets: the Automated Cardiac Diagnosis Challenge (ACDC) and the Brain Tumor Segmentation 2020 (BraTS2020) challenge.

Performance Metrics

On the ACDC dataset, which focuses on the right ventricle, left ventricle, and myocardium, SDAH-UNet achieved a 92.23% Dice Similarity Coefficient (DSC). This performance surpasses established benchmarks such as nnUNet (91.86%) and Swin-Unet (88.08%).

In the more complex task of brain tumor segmentation (BraTS2020), the model reached an average DSC of 86.90%, outperforming the previous year's UNet-2022 (84.76%). These results demonstrate the model's robustness across different imaging modalities and anatomical structures.

Computational Efficiency

Despite its high parameter count (approximately 163M), SDAH-UNet is computationally efficient. It recorded 37.95 GFLOPs, which is significantly lower than some simpler hybrid models like TransUNet (53.41 GFLOPs). This suggests that the deformable mechanism allows the model to achieve higher accuracy without a proportional increase in computational cost.

Interpretability and Clinical Utility

A significant advantage of SDAH-UNet is its inherent interpretability. The "deformation points"—the specific coordinates the model selects to attend to—can be visualized for clinicians. Unlike traditional heatmaps (e.g., Grad-CAM), which are often blurry and imprecise, these points cluster tightly around the boundaries of tumors and organs. This provides a clear, intuitive map of where the model is focusing its "attention," helping doctors verify the model's logic and build trust in its outputs.

Conclusion and Future Work

SDAH-UNet represents a significant step forward in making hybrid Transformer-CNN models both more accurate and more transparent for medical use. By allowing the attention mechanism to adapt to the shape of human anatomy, the model achieves superior segmentation results while maintaining computational efficiency.

Future research will focus on extending this deformable logic from 2D slices to fully 3D architectures to capture more spatial context. Additionally, further clinical studies are required to evaluate how these visual "deformation points" impact the decision-making process of radiologists in real-world diagnostic environments.

Summary updated

BibTeX
@inproceedings{wang2023hybrid,
  author = {Lichao Wang and Jiahao Huang and Xiaodan Xing and Guang Yang},
  title = {{Hybrid Swin Deformable Attention U-Net for Medical Image Segmentation}},
  booktitle = {SIPAIM},
  year = {2023},
  url = {https://openreview.net/forum?id=uOb9tgAXPG},
}
Figure