Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

TransUNet: Transformers Make Strong Encoders for Medical Image Segmentation

Transformers can serve as strong encoders for medical image segmentation

  • Problem U-Net's convolutions see only local neighborhoods, so they struggle to model long-range relations across a whole organ. Transformers capture global context but lose low-level detail, and direct upsampling cannot restore it.
  • Method TransUNet passes feature maps from a CNN into a Transformer encoder that models global context. A cascaded upsampler then rebuilds full resolution and receives skip-connections from the CNN features.
  • Results On Synapse, TransUNet scored 77.48 average DSC, compared to 75.57 for R50-AttnUNet.

Where CNN encoders and plain Transformers fall short

Convolutional networks have become the default for medical image segmentation, and U-Net, an encoder-decoder with skip-connections, is the usual choice. Its weak point is that convolution only sees local neighborhoods, so relations across a whole organ are hard to model. That matters most when the target varies a lot between patients in texture, shape and size.

Transformers drop that locality, because self-attention lets every position interact with every other position. The open question was whether a Transformer could simply take the place of the CNN encoder in a segmentation network.

The naive attempt encodes image patches with a Transformer and upsamples the output straight to full resolution. The authors found that this gave unsatisfactory results. Their explanation is that the Transformer produces low-resolution features without precise localization, and direct upsampling can't restore that detail. So the encoder also needs low-level visual cues that a CNN can supply.

A hybrid encoder with a U-shaped decoder

The key idea is to let a CNN extract early features, let a Transformer model global context on that feature map, and let a decoder rebuild the full resolution while reusing CNN features. The CNN keeps high-resolution spatial information and the Transformer adds global context, so the two cover each other's weakness. This is the reason the authors call the design a hybrid CNN-Transformer architecture.

The authors chose a hybrid encoder for two reasons. First, the hybrid keeps the intermediate high-resolution CNN feature maps available to the decoding path. Second, they found that the hybrid encoder performs better than a pure Transformer encoder.

The decoder is a cascaded upsampler, and it receives skip-connections from the encoding path. Together the encoder and decoder form a U-shaped network, so features are combined at several resolution levels.

How one image flows through the network

The input image has size H×W with C channels, and the network predicts a label map of the same H×W size. A CNN first turns the image into a feature map, and patches are cut from that map rather than from the raw image. Each patch is then flattened and mapped by a trainable linear projection into a D-dimensional space.

Here E is the patch projection matrix, and E_pos holds one position embedding per patch. The sequence length N is set by the feature-map size divided by the patch size, so a smaller patch gives a longer sequence.

The Transformer encoder stacks layers that each apply multihead self-attention and then an MLP, with layer normalization and a residual connection around each block. In the form the authors give, \( z'_\ell = \mathrm{MSA}(\mathrm{LN}(z_{\ell-1})) + z_{\ell-1} \) and \( z_\ell = \mathrm{MLP}(\mathrm{LN}(z'_\ell)) + z'_\ell \). The default ViT encoder uses 12 Transformer layers.

The decoder reshapes the encoder sequence back to a grid of HP×WP×D. Each cascaded upsampling block applies a 2× upsampling, a 3×3 convolution and a ReLU, and with a 224 input and patch size 16, four such blocks are needed to reach full resolution. The best setting places skip-connections at the 1/2, 1/4 and 1/8 resolution scales, which are the intermediate steps before the output layer.

The authors train with SGD, a learning rate of 0.01, momentum 0.9 and weight decay 1e-4. The default batch size is 24, and ViT and ResNet-50 start from ImageNet pretraining.

Does the cascaded decoder earn its place?

With a ViT encoder, the cascaded upsampler raised average DSC from 61.50 to 67.86 on Synapse, compared to naive upsampling. This shows the decoder matters: with the same Transformer, rebuilding resolution in steps works better than one direct upsampling.

Switching the ViT encoder to the hybrid R50-ViT raises the average DSC from 67.86 to 71.29.

Synapse multi-organ results

On Synapse, TransUNet scored 77.48 average DSC with a 31.69 mm average Hausdorff distance. Its nearest CNN rival, R50-AttnUNet, scored 75.57, and R50-U-Net scored 74.68. The authors report a 1.91% gain over R50-AttnUNet, and in their table the baselines use a ResNet-50 encoder.

The skip-connections matter for the hybrid as well. Against R50-ViT-CUP, which has the same hybrid encoder but no skip-connections, TransUNet gains 6.19%. This is the paper's evidence that the CNN features passed to the decoder are doing real work.

Per organ, the gallbladder score is 87.23 for TransUNet, compared to 55.92 for R50-AttnUNet. The comparison is one dataset and one split, so the per-organ gap shows where the advantage sits on this data.

How much the skip-connections contribute

The authors varied the number of skip-connections over 0, 1 and 3 on Synapse. Adding more skip-connections generally raised average DSC, and the 1-skip setting used only the 1/4 resolution scale. The 3-skip setting, at 1/2, 1/4 and 1/8, was the best and is the TransUNet default.

The gain was larger for smaller organs such as the aorta, gallbladder, kidneys and pancreas than for the liver, spleen and stomach. The authors read this as support for adding skip-connections to recover precise low-level details.

The authors also placed a light Transformer in the 1/8-resolution skip-connection, which raised average DSC by 1.4%. They used a light Transformer there only because of GPU memory limits, and the other two skip-connections stayed unchanged.

Input resolution and patch size

The 512 input makes the Transformer sequence about 5× longer, which drives up the computation. So the authors kept 224×224 for the other comparisons.

Patch size sets sequence length, since patch size 16 gives 196 tokens and patch size 32 gives 49. With patch size 8 the sequence has 784 tokens, and average DSC rose to 77.83 from 77.48 at patch size 16. The authors chose patch size 16 as the default, following ViT.

Model size and cost

The authors compared a Base and a Large TransUNet configuration on Synapse. The Large model scored 78.52 average DSC, compared to 77.48 for Base. Because of the computation cost, the authors used the Base model for all other experiments.

Cardiac MR results on ACDC

On the ACDC dataset, TransUNet scored 89.71 average DSC, compared to 87.55 for R50-U-Net. Its average DSC was also above R50-ViT-CUP at 87.57 and R50-AttnUNet at 86.75. The ACDC split is 70 training cases, 10 validation and 20 test cases. The authors describe the gains over the pure CNN and Transformer baselines as consistent with the Synapse results.

What the example segmentations show

In the first example row, TransUNet predicts fewer false positives than the compared methods. In the second row, the pancreas boundary from R50-ViT-CUP is coarser than TransUNet's. In the third row, R50-ViT-CUP fills the inner hole of the left kidney, while TransUNet doesn't. The authors attribute this to TransUNet using both global context and low-level detail.

Limitations

The experiments use only Synapse CT and ACDC cardiac MR. The 3D volumes are predicted slice by slice and stacked into a 3D result. The 512×512 input raises cost sharply, so the authors kept 224×224 for the main comparisons. The light Transformer in the 1/8 skip-connection was used only because of GPU memory.

Paper info

Authors
Jieneng Chen, Yongyi Lu, Qihang Yu, Xiangde Luo, Ehsan Adeli, Yan Wang, Le Lu, Alan L. Yuille, Yuyin Zhou
Venue
arXiv · Preprint
First published
2021-2-8
Added
2026-11-11
Updated
2021-2-8
Version
v1
arXiv
2102.04306
Category
cs.CV
Original paper terms
CC BY 4.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Jieneng Chen, Yongyi Lu, Qihang Yu, Xiangde Luo, Ehsan Adeli, Yan Wang, Le Lu, Alan L. Yuille, Yuyin Zhou (2021). TransUNet: Transformers Make Strong Encoders for Medical Image Segmentation. arXiv:2102.04306v1. https://arxiv.org/abs/2102.04306v1

BibTeX
@misc{chen2021transunet,
  title = {{TransUNet: Transformers Make Strong Encoders for Medical Image Segmentation}},
  author = {Jieneng Chen and Yongyi Lu and Qihang Yu and Xiangde Luo and Ehsan Adeli and Yan Wang and Le Lu and Alan L. Yuille and Yuyin Zhou},
  year = {2021},
  eprint = {2102.04306},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2102.04306v1}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up