Abstract
We propose a Transformer architecture for volumetric segmentation, a challenging task that requires keeping a complex balance in encoding local and global spatial cues, and preserving information along all axes of the volume. The encoder of the proposed design benefits from a self-attention mechanism to simultaneously encode local and global cues, while the decoder employs a parallel self and cross attention formulation to capture fine details for boundary refinement. Empirically, we show that the proposed design choices result in a computationally efficient model, with competitive and promising results on the Medical Segmentation Decathlon (MSD) brain tumor segmentation (BraTS) Task. We further show that the representations learned by our model are robust against data corruptions. Our code implementation is publicly available.
Introduction
In medical imaging, 3D segmentation—such as identifying the exact boundaries of a brain tumor from an MRI—is critical for diagnosis and treatment planning. Historically, Convolutional Neural Networks (CNNs) like U-Net have dominated this field. However, CNNs possess a limited "receptive field," struggling to capture the long-range dependencies across large 3D volumes that are essential for global context.
Recent attempts to integrate Transformers often rely on "hybrid" approaches that either use CNNs for initial feature extraction or process 3D volumes as 2D slices. The former inherits CNN limitations, while the latter discards vital inter-slice information. The primary challenge remains the quadratic complexity of Transformers: as the number of voxels in a 3D volume grows, the computational requirements for standard self-attention become prohibitive.
Methods: The VT-UNet Architecture
We introduce VT-UNet, a U-shaped architecture built entirely from Transformer blocks. By removing convolutions entirely, the model gains a highly dynamic receptive field, allowing it to better understand the global context of a tumor relative to the rest of the brain. Key architectural innovations include:
- 3D Patch Partitioning: The model divides the 3D volume into small 3D "tokens" rather than 2D slices, preserving spatial consistency across all axes.
- Hierarchical Encoder: Inspired by the Swin Transformer, the encoder utilizes 3D window-based self-attention. It calculates attention within local windows and then "shifts" those windows in subsequent layers to allow information flow across the entire volume while keeping computational costs (FLOPs) manageable.
- Parallel Attention Decoder: Unlike standard decoders that simply concatenate features, VT-UNet’s decoder performs self-attention on its own features and cross-attention (attending back to the encoder’s features) in parallel to capture fine boundary details.
- Fourier Feature Positional Encoding (FPE): To prevent the loss of spatial coordinates during tokenization, the authors inject 3D Fourier features into the fusion module, ensuring precise spatial awareness for boundary refinement.
Experimental Results
The model was evaluated on the MSD BraTS task, consisting of 484 multi-modal MRI scans. The task requires segmenting three nested regions: the Enhancing Tumor (ET), the Tumor Core (TC), and the Whole Tumor (WT).
Performance and Efficiency
VT-UNet (Base) achieved a Dice Similarity Coefficient (DSC) of 87.1%, outperforming major competitors like nnU-Net, UNETR, and nnFormer. It also significantly improved the Hausdorff Distance (HD95), indicating much sharper and more accurate tumor edges.
Crucially, VT-UNet achieves this performance with remarkable efficiency. The use of "3D Patch Merging" allows the model to reduce token counts at deeper layers. The "tiny" version (VT-UNet-S) utilizes only approximately 7% of the FLOPs required by volumetric CNN counterparts like nnU-Net, as shown in the efficiency analysis below.
Robustness to Noise
One of the most striking findings is VT-UNet's inherent robustness to common MRI artifacts, such as motion blur, ghosting, and spike noise. Transformers appear naturally more resilient to these corruptions than CNN-based models, likely because they do not rely on local pixel-to-pixel filters that are easily disrupted by noise. When tested against synthetic corruptions, VT-UNet showed a much smaller performance drop compared to other transformer-based models like nnFormer.
Conclusion
VT-UNet demonstrates that a "pure" volumetric transformer can achieve state-of-the-art accuracy in 3D medical segmentation while remaining computationally efficient and robust to data noise. While currently validated on brain tumor datasets, future work will explore its generalizability to other 3D modalities like CT or Ultrasound and different anatomical structures.
Summary updated