NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Pyramid Medical Transformer for Medical Image Segmentation

Zhuangzhuang Zhang, Baozhou Sun, Weixiong ZhangarXiv 2021

Introduction

Medical image segmentation is a high-stakes task requiring the precise identification of anatomical boundaries. While Convolutional Neural Networks (CNNs) like U-Net have traditionally dominated this field due to their local feature-extraction capabilities, they often struggle to capture long-range spatial dependencies. Conversely, Vision Transformers (ViTs) excel at global context but face significant hurdles in medical imaging, including quadratic computational complexity ($O(N^2)$) and rigid patch-based partitioning that can fragment cohesive objects.

The Pyramid Medical Transformer (PMTrans) addresses these challenges by integrating the local strengths of CNNs with the global modeling power of Transformers within a multi-resolution pyramidal framework.

Methodology

PMTrans introduces several key innovations to balance global context with local precision while maintaining computational efficiency.

1. Pyramidal Architecture

The model utilizes a four-branch structure. Three Transformer-based branches operate at different scales (full resolution, 1/2, and 1/4) to capture short, mid, and long-range associations simultaneously. A parallel shallow CNN branch is employed to preserve low-level context, such as textures and edges, which Transformers may otherwise smooth over.

The PMTrans architecture featuring multi-scale Transformer branches and a parallel CNN path for feature fusion.

2. Gated Axial Attention

To keep computational costs manageable, PMTrans employs axial attention, which computes self-attention along the height and width axes separately rather than across every pixel pair. The authors incorporate "gates" into these layers to stabilize training, a critical feature when working with the typically small datasets found in medical imaging.

The axial self-attention mechanism decomposes 2D attention into sequential height and width operations to reduce complexity.

3. Adaptive Partitioning and Deep Supervision

Unlike fixed-grid Transformers, PMTrans uses an adaptive partitioning scheme where each pixel attends to a subregion centered on itself. This prevents the "cutting" of objects and allows the model to adapt to irregular shapes. Features from the CNN and Transformer branches are merged via attention gates, and deep supervision—calculating loss at multiple scales—is used to ensure robust learning across all layers.

Experimental Results

PMTrans was evaluated on three diverse medical imaging benchmarks, consistently outperforming both pure CNN and existing Transformer-based models:

  • GLAS (Gland Segmentation): Achieved a Dice Similarity Coefficient (DSC) of 0.81, outperforming the best CNN baseline by 3.36%.
  • MoNuSeg (Nuclei Segmentation): Achieved a DSC of 0.80, demonstrating robustness in segmenting very small objects.
  • HECKTOR (Head and Neck Tumor): Achieved a DSC of 0.80, a 2.21% improvement over previous state-of-the-art Transformer models.

Ablation studies confirmed that the multi-scale approach is vital: the long-range branch is essential for larger structures like glands, while the short-range branch is critical for fine boundary details.

Discussion and Conclusion

The success of PMTrans highlights that fixed-size patching is a primary bottleneck for vision transformers in medical tasks. By moving to an adaptive, centered-window approach and maintaining a CNN branch for low-level features, PMTrans achieves state-of-the-art accuracy. While currently limited by the memory requirements of a four-branch architecture and the use of 2D slices for 3D volumes, it represents a significant step forward in hybrid medical image segmentation.

Summary updated

BibTeX
@misc{zhang2021pyramid,
  author = {Zhuangzhuang Zhang and Baozhou Sun and Weixiong Zhang},
  title = {{Pyramid Medical Transformer for Medical Image Segmentation}},
  year = {2021},
  eprint = {2104.14702},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.14702},
}
Figure