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

Swin UNETR: Swin Transformers for Semantic Segmentation of Brain Tumors in MRI Images

Swin UNETR uses shifted-window transformers to segment brain tumors in MRI

  • Problem Convolutional networks have small kernels, so they capture long-range context poorly. That hurts segmentation of brain tumors, which vary widely in size and shape.
  • Method Swin UNETR pairs a hierarchical Swin transformer encoder with a CNN decoder. The encoder uses shifted-window self-attention to produce features at five resolutions, and skip connections join them to the decoder.
  • Results Swin UNETR reached a mean Dice of 0.913 in five-fold cross-validation, above nnU-Net at 0.908 and SegResNet at 0.907.

Why convolutional encoders miss long-range context

U-shaped fully convolutional networks are the usual choice for volumetric segmentation, but their small convolution kernels reach only a limited span of context in a volume. This matters for brain tumors because they vary in shape and size, and the effective receptive field of a stack of convolutions stays confined to local regions even after the kernels are enlarged.

Vision transformers model long-range information through pairwise interactions between token embeddings, which gives both local and global context. UNETR uses a plain vision transformer as its encoder on 3D input patches, while other hybrids place a transformer as a standalone block inside an otherwise convolutional network.

The question here is whether a hierarchical transformer encoder, which yields features at several resolutions and feeds a CNN decoder at each of them, improves multi-modal brain tumor segmentation over these FCNN-based and ViT-based alternatives. The authors test this on the 2021 edition of the BraTS challenge.

How the Swin UNETR encoder tokenizes and attends

The input is a four-channel 3D MRI volume, with T1, T1c, T2 and FLAIR as the modalities. A patch partition layer splits the volume into non-overlapping 3D patches and projects them into an embedding space of dimension C, which is set to 48 in the encoder. The brain tumor task is cast as sequence-to-sequence prediction, so the multi-modal input becomes a one-dimensional sequence of embeddings before the transformer.

Attention is computed inside non-overlapping windows of size M by M by M, and in the next layer the window grid is shifted by floor(M/2) voxels along each axis. Table 1 lists a window size of [7,7,7] for the configuration used. The shift lets information cross window borders that the first layer kept separate.

Each pair of layers applies a regular window-based attention block W-MSA followed by a shifted block SW-MSA, each wrapped with layer normalization, an MLP and a residual connection. The update is written as \\( \\hat{z}_l = \\text{W-MSA}(\\text{LN}(z_{l-1})) + z_{l-1} \\), \\( z_l = \\text{MLP}(\\text{LN}(\\hat{z}_l)) + \\hat{z}_l \\), \\( \\hat{z}_{l+1} = \\text{SW-MSA}(\\text{LN}(z_l)) + z_l \\) and \\( z_{l+1} = \\text{MLP}(\\text{LN}(\\hat{z}_{l+1})) + \\hat{z}_{l+1} \\).

Within each attention block the scores are \\( \\text{Softmax}(QK^\\top/\\sqrt{d})V \\), where d is the size of the query and key, and the shifted windows are formed with a 3D cyclic shift so that the shift does not add extra windows.

The encoder has four stages with two transformer blocks each, so there are L = 8 layers in total. The patch size is 2 by 2 by 2, and each patch has a feature dimension of 2 × 2 × 2 × 4 = 32, because the four input channels are included. A patch merging layer groups each 2 by 2 by 2 block of patches, concatenates them into a 4C-dimensional vector and reduces it to 2C with a linear layer, halving the resolution at the end of each stage.

How the CNN decoder uses the encoder features

At each stage i from 0 to 4 and at the bottleneck (i = 5), the features are reshaped to H/2^i by W/2^i by D/2^i and passed through a residual block of two 3 by 3 by 3 convolutions normalized with instance normalization. Each level then doubles the resolution with a deconvolution and concatenates the result with the features of the previous stage, which is how the skip connections enter the decoder.

The concatenated features go through another residual block of the same form.

The final segmentation is produced by a 1 × 1 × 1 convolution followed by a sigmoid activation, and the output has three channels for ET, WT and TC.

Loss and training setup

The model is trained with a voxel-wise soft Dice loss that compares the predicted probability Y for each class with the one-hot ground truth G. For each class j, the loss sums the product of G and Y over all voxels i and divides by the sum of the squared G and the squared Y, and subtracts the total from one. The text prints the prefactor as 2J in front of the sum over the J classes, and the normalization over classes is not stated more explicitly, so the overall scaling should be read from the printed formula.

Inputs are normalized to zero mean and unit standard deviation over non-zero voxels, with a learning rate of 0.0008. The models were trained for 800 epochs with a linear warmup and a cosine annealing learning rate schedule on a DGX-1 cluster with 8 NVIDIA V100 GPUs.

At inference, a sliding window approach is used with an overlap of 0.7 for neighboring windows. The text gives these settings as single values and does not describe a search over alternatives.

Data and evaluation protocol

The BraTS 2021 training set has 1251 subjects, each with T1, T1Gd, T2 and T2-FLAIR volumes that are rigidly aligned, resampled to 1 mm isotropic and skull-stripped, with an input size of 240 × 240 × 155. Annotations are merged into three nested regions, Whole Tumor, Tumor Core and Enhancing Tumor.

The validation set has 219 cases without public labels, and its scores were obtained by submitting segmentations to the official server. The testing set was provided without labels, and participants had no further information about it.

The internal comparison uses five-fold cross-validation with an 80:20 ratio, and no additional data was used. The final result averages an ensemble of 10 Swin UNETR models taken from two separate five-fold training runs.

Five-fold cross-validation against nnU-Net, SegResNet and TransBTS

The comparison runs Swin UNETR against SegResNet, nnU-Net and TransBTS on the same internal split, with Dice reported per fold and averaged over ET, WT and TC. Averaged over the five folds, Swin UNETR reaches 0.913, against 0.908 for nnU-Net, 0.907 for SegResNet and 0.891 for TransBTS.

The authors report that Swin UNETR is higher on every fold and on average for ET, WT and TC, and the Table 2 averages show it at 0.891 for ET, 0.933 for WT and 0.917 for TC. nnU-Net and SegResNet are close to each other, with nnU-Net slightly ahead, and TransBTS is lowest.

The authors attribute the advantage of Swin UNETR to learning multi-scale context in its hierarchical encoder through self-attention and modeling long-range dependencies. They attribute the weaker TransBTS result to a design in which the transformer is used only at the bottleneck, without connections to the decoder at different resolutions.

BraTS 2021 validation and testing results

On the validation set, Swin UNETR reaches mean Dice scores of 0.858 for ET, 0.926 for WT and 0.885 for TC. The corresponding Hausdorff distances are 6.016 mm for ET, 5.831 mm for WT and 3.770 mm for TC, where lower values are better, so ET has the largest boundary error and TC the smallest.

According to the official challenge results, the method ranks among the top methods out of more than 2000 submissions in the validation phase, which the authors present as the first transformer-based model to place competitively in BraTS challenges.

On the testing set, Swin UNETR reaches Dice scores of 0.853 for ET, 0.927 for WT and 0.876 for TC. Hausdorff distances there are 16.326 mm for ET, 4.739 mm for WT and 15.309 mm for TC, so the ET and TC boundary distances are much larger than on the validation set while WT is similar. The authors observe that ET and WT are close to their validation values, and that TC is lower on the testing set; the testing table reports only Swin UNETR, so no competitor is compared there.

Limitations

Validation labels are not public, so the validation scores exist only as server results and cannot be recomputed locally. The testing set has no public labels either, and its results are reported only for Swin UNETR.

The cross-validation comparison uses an internal split, while the validation and testing scores come from the server, so the two sets of numbers are not one controlled comparison. The paper reports no ablation of the window shift, the skip connections or the ensemble, so the contribution of each part is not isolated.

Table 1 lists the embed dimension as 768, while the text sets the embedding dimension C to 48, and the paper does not reconcile the two. Training runs for 800 epochs with a single learning rate, and no search over alternatives is described.

Paper info

Authors
Hatamizadeh, Ali, Nath, Vishwesh, Tang, Yucheng, Yang, Dong, Roth, Holger, Xu, Daguang
Venue
arXiv · Preprint
First published
2022-1-4
Added
2026-11-12
Updated
2022-1-4
Version
v1
arXiv
2201.01266
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

Hatamizadeh, Ali, Nath, Vishwesh, Tang, Yucheng, Yang, Dong, Roth, Holger, Xu, Daguang (2022). Swin UNETR: Swin Transformers for Semantic Segmentation of Brain Tumors in MRI Images. arXiv:2201.01266v1. https://arxiv.org/abs/2201.01266v1

BibTeX
@misc{ali2022swin,
  title = {{Swin UNETR: Swin Transformers for Semantic Segmentation of Brain Tumors in MRI Images}},
  author = {Hatamizadeh, Ali and Nath, Vishwesh and Tang, Yucheng and Yang, Dong and Roth, Holger and Xu, Daguang},
  year = {2022},
  eprint = {2201.01266},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2201.01266v1}
}

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