Source-linked AI summary

UTNet: A Hybrid Transformer Architecture for Medical Image Segmentation

Yunhe Gao, Mu Zhou, Dimitris Metaxas

arXiv:2107.00781v2cs.CV

TL;DR

Convolutional segmentation lacks explicit long-range dependency, while Transformer use in medical vision is challenged by quadratic attention cost and limited medical data. UTNet combines convolution and self-attention in a U-shaped network, reporting leading performance across the cardiac segmentation outcomes.

  • Problem

    Convolutional segmentation lacks explicit long-range dependency, while Transformer use in medical vision is challenged by quadratic attention cost and limited medical data.

    Source: §1 · pp. 1–3
  • Method

    UTNet is a U-shaped hybrid network that combines convolution for local features with encoder- and decoder-side self-attention for capturing long-range dependencies.

    Source: §1 · p. 3, §4 · p. 8
  • Results

    UTNet demonstrates leading performance across all reported segmentation outcomes (LV, MYO, and RV) and retains competitive performance on test data from vendors C and D.

    Source: §3.3 · pp. 7–8
  • Takeaways & Limitations

    The authors conclude that UTNet's hybrid design may make richly parameterized Transformers more accessible in medical vision.

    Source: §4 · p. 8

Abstract

from arXiv · show

Transformer architecture has emerged to be successful in a number of natural language processing tasks. However, its applications to medical vision remain largely unexplored. In this study, we present UTNet, a simple yet powerful hybrid Transformer architecture that integrates self-attention into a convolutional neural network for enhancing medical image segmentation. UTNet applies self-attention modules in both encoder and decoder for capturing long-range dependency at different scales with minimal overhead. To this end, we propose an efficient self-attention mechanism along with relative position encoding that reduces the complexity of self-attention operation significantly from $O(n^2)$ to approximate $O(n)$. A new self-attention decoder is also proposed to recover fine-grained details from the skipped connections in the encoder. Our approach addresses the dilemma that Transformer requires huge amounts of data to learn vision inductive bias. Our hybrid layer design allows the initialization of Transformer into convolutional networks without a need of pre-training. We have evaluated UTNet on the multi-label, multi-vendor cardiac magnetic resonance imaging cohort. UTNet demonstrates superior segmentation performance and robustness against the state-of-the-art approaches, holding the promise to generalize well on other medical image segmentations.

1 Introduction

The introduction presents UTNet as a U-shaped convolution–Transformer hybrid for medical image segmentation, combining local features with efficient self-attention for long-range context. It is designed to address convolutional limitations and Transformer costs and data demands.

  • Convolutional encoder–decoders capture local texture and expand receptive fields through stacked layers and downsampling, but lack explicit global dependency modeling and use fixed-shape kernels [25].Source: §1 · p. 1
  • Self-attention dynamically aggregates input-relevant long-range features, but its O(n^2) cost and weak image inductive bias impede high-resolution segmentation and small-data training [3].Because standard attention is costly, prior applications used image patches or already-downsampled CNN features, although high-resolution features matter for boundaries in medical segmentation.Source: §1 · pp. 2–3
  • UTNet combines convolutional local-intensity features with self-attention and reports superior segmentation performance and robustness on multi-label, multi-vendor cardiac MRI.It replaces the last convolution in each UNet building block except at the highest resolution with a Transformer module; efficient attention reduces time and space complexity from O(n^2) to approximate O(n), and relative position encoding models content-position relationships.Source: §1 · p. 3

2 Method

UTNet integrates self-attention into a convolutional encoder-decoder at multiple scales, using compressed key/value representations and 2D relative position encoding to capture long-range context efficiently.

2.1 Revisiting Self-attention Mechanism

  • UTNet uses four-head MHSA with 1×1-convolutional query, key, and value projections to aggregate global context; its decoder takes encoder skip features and low-resolution decoder features as inputs.The context-aggregating matrix weights value features using normalized query-key similarities.Source: §2.1 · p. 3, Figure 2 · p. 4

2.2 Efficient Self-attention Mechanism

  • Projecting keys and values to k=hw≪n reduces attention cost to O(nkd); implementation uses 1×1 convolution and bilinear interpolation, with reduced size 8.The approach targets redundant pair-wise attention in structured, high-resolution feature maps and draws on the low-rank nature of self-attention for long sequences.Source: §2.2 · p. 4

2.3 Relative Positional Encoding

  • To model spatial structure, UTNet adds learnable 2D relative height and width embeddings, computed after low-dimensional projection, to the attention logits.The encoding addresses standard self-attention’s loss of position information and the lack of translation equivariance in sinusoidal embeddings used in prior work.Source: §2.3 · p. 5

2.4 Network Architecture

  • UTNet combines convolutional image inductive bias with Transformer context at encoder and decoder levels, omitting original-resolution attention because shallow-layer attention added computation without experimental benefit.The hybrid design is intended to avoid large-scale pretraining while capturing long-range relationships.Source: §2.4 · p. 5

3 Experiment

UTNet is evaluated on multi-vendor cardiac MRI segmentation for LV, RV, and MYO, with same-vendor performance and cross-vendor robustness assessed. The experiments report leading segmentation performance, robustness, and efficiency, alongside ablations of its attention design.

3.1 Experiment Setup

  • The challenge cohort has 150 training images from vendors A and B and 200 test images from A, B, C, and D, including unseen training vendors C and D.The experiments assess same-vendor performance on A and cross-vendor robustness; reported metrics are Dice score and Hausdorff distance.Source: §3.1 · p. 6

3.2 Implementation Detail

  • Models are trained from scratch for 150 epochs using SGD, Dice plus cross-entropy loss, and on-the-fly augmentation.Images are resampled to 1.2 × 1.2 mm in-plane spacing and randomly cropped to 256 × 256; batch size is 16.Source: §3.2 · p. 6

3.3 Segmentation Results

  • UTNet leads the reported LV, MYO, and RV segmentation outcomes against UNet, ResUNet, CBAM, and dual attention on vendor A data.ResUNet slightly improves on UNet, while CBAM offers limited improvement and dual attention performs nearly the same as ResUNet.Source: Table 1 · p. 7, §3.3 · p. 7
  • Self-attention at progressively higher levels improves performance by capturing finer detail, but adding it at the original resolution yields a saturating curve.The authors suggest shallow layers focus on local texture, where global context is less informative.Source: Figure 3 · p. 7, §3.3 · p. 7
  • Reduced size 8 performs best among 4, 8, and 16, and interpolation down-sampling is slightly better than max-pooling.These are the efficient self-attention design comparisons in Fig. 3(b).Source: Figure 3 · p. 7, §3.3 · p. 8
  • The Transformer encoder-decoder combination gives optimal performance, and removing relative positional encoding causes a large performance drop.These comparisons use the optimal hyperparameters from the attention-position and efficient-attention ablations.Source: Figure 3 · p. 7, §3.3 · p. 8
  • On vendors C and D absent from training, UTNet retains competitive performance as competing approaches suffer vendor-related drops.UTNet also shows the most consistent boundary results; other methods miss subtle RV and MYO boundary characteristics.Source: Table 2 · p. 8, §3.3 · p. 8
  • UTNet uses 3.8 GB of GPU memory and takes 0.146 s, versus dual attention’s 36.9 GB and 0.243 s under the stated comparison.The comparison uses four resolutions, an input image size and batch size of 256 × 256 × 16.Source: §3.3 · p. 8

4 Conclusion

UTNet combines convolutional layers and self-attention for medical image segmentation, with a hybrid design that avoids pre-training and supports efficient long-sequence processing.

  • UTNet is a U-shape hybrid Transformer network that merges convolutional layers and self-attention for medical image segmentation.Source: §4 · p. 8
  • Its hybrid layer design initializes Transformers into convolutional networks without pre-training, while self-attention in the encoder and decoder captures long-range dependencies at different network levels.Source: §4 · p. 8
  • Efficient handling of long sequences may broaden UTNet’s use in downstream medical tasks and make richly parameterized Transformer models more accessible in medical vision.Source: §4 · p. 8
  • On unseen hard cases from vendors C and D, only UTNet provides consistent segmentation despite motion blur, noise, and low-contrast boundaries.Source: Figure 4 · p. 9
Loading 2107.00781v2…