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

UNETR: Transformers for 3D Medical Image Segmentation

UNETR replaces the convolutional encoder with a transformer for 3D segmentation

  • Problem Convolutional encoders see a 3D volume only through small local neighbourhoods, so they struggle to capture long-range context. This hurts structures whose size and shape vary, such as brain lesions.
  • Method UNETR splits the 3D volume into non-overlapping cubes and feeds them as a token sequence to a transformer encoder. Features from layers 3, 6, 9 and 12 go to a convolutional decoder through skip connections.
  • Results UNETR reaches an average Dice of 0.891 in the BTCV Free Competition section of Table 1. The paper reports new state-of-the-art performance on the BTCV leaderboard.

Why replace the convolutional encoder

U-shaped encoder-decoder networks built from convolutions have been the usual choice for medical segmentation. The encoder compresses the volume into coarser and coarser features, the decoder expands them back to the input resolution, and skip connections return spatial detail that downsampling removed.

The weak point is range. A convolution only sees a local neighbourhood, so enlarging the receptive field with atrous layers or with attention added alongside convolutions still leaves most interactions confined to small regions. The authors argue that this hurts structures whose shape and size vary, such as brain lesions of different sizes.

The paper addresses this by making the encoder a transformer that reads the volume as a sequence of patch embeddings, so that self-attention can weight any pair of positions in one layer. The decoder stays convolutional, because the authors judge transformers to be poor at capturing localized information. The model takes a 3D CT or MRI volume and returns a voxel-wise class prediction at the input resolution.

From 3D patches to the token sequence

A volume of size H×W×D with C channels is cut into non-overlapping cubes with edge P. Each cube is flattened into a vector of length P cubed times C, which gives a sequence of \( N=(H\times W\times D)/P^{3} \) tokens. A linear projection maps each token into a K-dimensional space, and K stays the same through every transformer layer.

The sequence has no extra classification token, since the backbone is built for dense segmentation.

Each transformer block applies layer normalization, then multi-head self-attention, then a two-layer MLP with GELU activations, with a residual addition after each sublayer. Writing the sublayers as MSA and MLP, the update is \[ z'_i=MSA(Norm(z_{i-1}))+z_{i-1},\quad z_i=MLP(Norm(z'_i))+z'_i \] for i from 1 to L, where L is the number of layers.

Inside each head, the attention weights come from the similarity of queries and keys, \[ A=Softmax\left(\frac{qk^\top}{\sqrt{K_h}}\right),\quad K_h=K/n \] and the head output is A applied to the values. The n heads are concatenated and projected back to K dimensions by a trainable matrix. The paper uses K_h = K/n as the scaling factor so that the parameter count stays fixed as the number of heads changes.

Reading features at four depths

Sequence outputs from layers 3, 6, 9 and 12 are taken as skip features. Each sequence is reshaped into a tensor of size H/P × W/P × D/P × K, which with patch resolution 16 and embedding size 768 is the size the paper reports at the encoder outputs.

At the bottleneck, which is the output of the last transformer layer, a deconvolutional layer doubles the resolution of the feature map. The decoder then works upward. At each stage the upsampled map is concatenated with the encoder feature from the matching depth, passed through 3×3×3 convolutions, and upsampled again by a deconvolution, until the input resolution is reached.

A final 1×1×1 convolution with a softmax activation gives the voxel-wise predictions. Because the encoder keeps one resolution across its layers, all changes of resolution happen in these convolutional and deconvolutional stages. The authors contrast this with hierarchical vision transformers, which lower the resolution inside the transformer.

Training objective and sliding-window inference

Training minimizes a voxel-wise loss that adds a soft dice term to a cross-entropy term. The dice term is averaged over the J classes and compares the predicted probabilities Y with the one-hot ground truth G over the I voxels. \[ L(G,Y)=1-\frac{2}{J}\sum_{j=1}^{J}\frac{\sum_{i=1}^{I}G_{i,j}Y_{i,j}}{\sum_{i=1}^{I}G_{i,j}^2+\sum_{i=1}^{I}Y_{i,j}^2}-\frac{1}{I}\sum_{i=1}^{I}\sum_{j=1}^{J}G_{i,j}\log Y_{i,j} \] The minus sign in front of the log term means that minimizing the loss maximizes the average log-likelihood of the one-hot labels, while the dice term pushes the per-class overlap upward.

The two terms are added without a weighting factor in the formula.

The encoder follows the ViT-B16 layout with L = 12 layers and embedding size K = 768, using patches of 16×16×16. The authors did not initialize the transformer from pre-trained weights, because pre-training gave no performance gain in their experiments.

At inference the trained model is applied to overlapping windows of the volume, with a 0.5 overlap between neighbouring patches. For BTCV the Free Competition entries use ensembling, which fuses the outputs of models from four different five-fold cross-validations.

Datasets, sampling and splits

For the Free Competition the training cases are increased to 80 volumes using additional data from the same cohort.

The MSD spleen task uses 41 CT volumes as a binary task with one input channel, with intensities normalized to [0,1] by the 5th and 95th percentiles of foreground intensity.

Random training samples are volumes of 96×96×96 for the multi-organ and spleen tasks and 128×128×128 for the brain task, with foreground and background patches sampled at a 1:1 ratio. The brain and spleen MSD data are split into training, validation and test sets at 80:15:5.

BTCV multi-organ results

In the Standard Competition section of Table 1, UNETR reaches an average Dice of 0.856. The next highest rows in that section are CoTr at 0.844 and CoTr* at 0.841, followed by TransUNet at 0.838. The running text gives 85.3% for this section, so the text and Table 1 do not match here.

In the Free Competition section UNETR reaches 0.891. The closest other rows are nnUNet-dys3 at 0.888 and nnUNet-v2 at 0.884. The text gives an overall average of 0.899 for this section. The table value 0.891 is the one used in this comparison.

The per-organ rows show the gains are largest on the smaller structures. UNETR's gallbladder Dice of 0.750 and adrenal gland Dice of 0.741 exceed the highest values among the other Standard rows, which are 0.705 and 0.694. The authors support this with a qualitative figure in which nnUNet confuses liver with stomach tissue, while UNETR delineates the two organs.

All BTCV rows are taken from the BTCV leaderboard, so the baseline numbers are reported results rather than runs made under the paper's own setup.

Brain tumor and spleen results on MSD

On MSD spleen segmentation, UNETR reaches a Dice of 0.964 with an HD95 of 1.333. The highest baseline spleen Dice in Table 2 is CoTr at 0.954, whose HD95 is 3.860.

On the brain tumor task, UNETR reaches an All-class Dice of 0.711, against 0.696 for TransBTS and 0.683 for CoTr. Its Tumor Core Dice of 0.761 is above the TC values of 0.735 for TransBTS and 0.748 for CoTr, and its whole tumor Dice of 0.789 is above the 0.779 for TransBTS.

The TransBTS row has no spleen value, so the spleen comparison covers the other baselines only.

Decoder and patch resolution ablations

The decoder ablation keeps the UNETR encoder and replaces the CNN decoder with three 3D decoders taken from SETR: Naive UPsampling, Progressive UPsampling and Multi-scale Aggregation. The comparison covers the MSD spleen task and the brain tumor task.

With the encoder fixed, spleen Dice is 0.932 for Naive UPsampling, 0.941 for Progressive UPsampling and 0.950 for Multi-scale Aggregation, against 0.964 for the UNETR decoder. On brain tumor the All-class Dice is 0.636, 0.668 and 0.684 for the same three decoders, against 0.711 for the UNETR decoder.

The sequence length grows with the inverse cube of the patch edge, so smaller patches cost more memory. In the ablation, moving from patch resolution 32 to 16 raises spleen Dice from 0.953 to 0.964 and the brain tumor All-class Dice from 0.703 to 0.711. Only the two values 32 and 16 were compared, because lower resolutions were not tried for memory reasons.

Parameters, FLOPs and inference time

The running text gives 48.24G FLOPs for TransUNet, whereas Table 5 gives 48.34G.

UNETR has the lowest FLOPs in Table 5 and more parameters than every model except TransUNet. Its inference time is second lowest, behind only nnUNet.

Limitations

Lower patch resolutions than 16 were not tested because of memory constraints, so the patch trend is only observed between 32 and 16. The reported ablations cover the decoder and the patch resolution.

The text and Table 1 give different average Dice values, with 0.899 against 0.891 in the Free Competition and 85.3% against 0.856 in the Standard Competition. The text gives 48.24G FLOPs for TransUNet, while Table 5 gives 48.34G.

The BTCV baseline rows come from the leaderboard, so the comparison rests on reported numbers rather than on a matched re-run of each baseline.

Paper info

Authors
Ali Hatamizadeh, Yucheng Tang, Vishwesh Nath, Dong Yang, Andriy Myronenko, Bennett Landman, Holger Roth, Daguang Xu
Venue
arXiv · Preprint
First published
2021-3-18
Added
2026-11-12
Updated
2021-10-9
Version
v3
arXiv
2103.10504
Category
eess.IV · cs.CV · cs.LG
Original paper terms
CC BY-NC-ND 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

Ali Hatamizadeh, Yucheng Tang, Vishwesh Nath, Dong Yang, Andriy Myronenko, Bennett Landman, Holger Roth, Daguang Xu (2021). UNETR: Transformers for 3D Medical Image Segmentation. arXiv:2103.10504v3. https://arxiv.org/abs/2103.10504v3

BibTeX
@misc{hatamizadeh2021unetr,
  title = {{UNETR: Transformers for 3D Medical Image Segmentation}},
  author = {Ali Hatamizadeh and Yucheng Tang and Vishwesh Nath and Dong Yang and Andriy Myronenko and Bennett Landman and Holger Roth and Daguang Xu},
  year = {2021},
  eprint = {2103.10504},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2103.10504v3}
}

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