Papers › Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformer

Shuffle Transformer: Rethinking Spatial Shuffle for Vision Transformer

7 Jun 2021arXiv:2106.03650archive 2025-07-28

Zilong Huang, Youcheng Ben, Guozhong Luo, Pei Cheng, Gang Yu, Bin Fu

Very recently, Window-based Transformers, which computed self-attention within non-overlapping local windows, demonstrated promising results on image classification, semantic segmentation, and object detection. However, less study has been devoted to the cross-window connection which is the key element to improve the representation ability. In this work, we revisit the spatial shuffle as an efficient way to build connections among windows. As a result, we propose a new vision transformer, named Shuffle Transformer, which is highly efficient and easy to implement by modifying two lines of code. Furthermore, the depth-wise convolution is introduced to complement the spatial shuffle for enhancing neighbor-window connections. The proposed architectures achieve excellent performance on a wide range of visual tasks including image-level classification, object detection, and semantic segmentation. Code will be released for reproduction.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 12 code samples harvested from 1 repository linked to this paper: 10 ran (of which 0 constructed an object rather than computing a result; 6 with no instrument failure: 1 honoured, 1 violated, 4 with no contract checked; 4 where Syntology's instrument failed) · 2 unverified. Where Syntology's instrument failed: 3 where our contract draft was wrong; 1 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: community (archive-listed): 12 samples from 1 repository, 10 ran (6 with no instrument failure; 4 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 1 of its repositories that Syntology harvested for other papers:

Levels written between 2026-09-22 and 2026-09-25 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 2 of the 10 samples that ran have no recorded date.

mulinmeng/Shuffle-Transformer mentioned on GitHubpytorchMITSyntology: 12 samples, 10 ran (4 instrument-failed) · 2 unverified report
BR-IDL/PaddleViT paddleSyntology: not harvested report
alibaba/EasyCV pytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to End-to-End Object Detection with Transformers (arXiv:2005.12872; that paper's own run record: 70 ran (of which 45 constructed an object rather than computing a result; 62 with no instrument failure: 2 honoured, 1 violated, 59 with no contract checked; 8 where Syntology's instrument failed) · 22 unverified), Training data-efficient image transformers & distillation through attention (arXiv:2012.12877; that paper's own run record: 12 ran (of which 1 constructed an object rather than computing a result; 9 with no instrument failure: 1 honoured, 0 violated, 8 with no contract checked; 3 where Syntology's instrument failed) · 7 unverified), Masked Autoencoders Are Scalable Vision Learners (arXiv:2111.06377; that paper's own run record: 86 ran (of which 40 constructed an object rather than computing a result; 68 with no instrument failure: 8 honoured, 0 violated, 60 with no contract checked; 18 where Syntology's instrument failed) · 51 unverified) and 1 more (every one in this page's JSON twin); nothing checks that they implement this paper's method. report
mindspore-courses/External-Attention-MindSpore mindsporeSyntology: not harvested report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

12 samples harvested: 10 ran (of which 0 constructed an object rather than computing a result; 6 with no instrument failure: 1 honoured, 1 violated, 4 with no contract checked; 4 where Syntology's instrument failed) · 2 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · honoured contract
1ran · violated contract
3ran · our draft was wrong
1ran; the contract check could not run
4ran
2unverified

Licence: 6 of the 12 samples are pointer only, meaning Syntology does not serve that copy's text. For 6 of them, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from mulinmeng/Shuffle-Transformer. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

mulinmeng/Shuffle-Transformer community (archive-listed) 12 samples, 10 ran (4 instrument-failed) · 2 unverified
window_partition in 377 papers
census: 13 implementations from 17 papers, 5 distinct outputs across 3 buckets, one shared input per bucket
models/swin_transformer.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant fingerprinted MIT (permissive) · 144d10b49baeb8a6 · report fixture: signature x:Tensor/4/float, window_size:int/0/int · returned Tensor · level recorded, date not recorded
auto_resume_helper in 27 papers utils.py ran · our draft was wrong MIT (permissive) here; the stored copy is pointer only · 0c32459bef92ff8c · report fixture: signature output_dir:str/0/str · returned str · level recorded 2026-09-25
build_optimizer in 83 papers optimizer.py ran MIT (permissive) here; the stored copy is pointer only · e35a4b2e4114b1a5 · report fixture: signature config:Config/0/?, model:callable/0/? · returned AdamW · level recorded 2026-09-24
build_scheduler in 56 papers lr_scheduler.py ran MIT (permissive) here; the stored copy is pointer only · c02cc4e0b5720211 · report fixture: signature config:Config/0/?, optimizer:SGD/0/?, n_iter_per_epoch:int/0/int · returned LinearLRScheduler · level recorded 2026-09-25
check_keywords_in_name in 32 papers optimizer.py ran · violated contract MIT (permissive) here; the stored copy is pointer only · b0a5beb34716d5a6 · report fixture: signature name:str/0/str, keywords:tuple/1/str · returned bool · level recorded 2026-09-25
create_logger in 172 papers logger.py ran · our draft was wrong MIT (permissive) here; the stored copy is pointer only · 80450600f7f09b0a · report fixture: signature output_dir:str/0/str, dist_rank:int/0/int, name:str/0/str · returned Logger · level recorded 2026-09-25
get_grad_norm in 45 papers utils.py ran · honoured contract MIT (permissive) · eec1e7cba51d5e8e · report fixture: signature parameters:list/1/Tensor, norm_type:int/0/int · returned float · level recorded 2026-09-22
load_checkpoint in 277 papers utils.py ran MIT (permissive) · 640408a0715e42c2 · report fixture: signature config:Config/0/?, model:callable/0/?, optimizer:SGD/0/?, lr_scheduler:StepLR/0/?, logger:callable/0/? · returned float · level recorded 2026-09-25
set_weight_decay in 32 papers optimizer.py ran MIT (permissive) here; the stored copy is pointer only · b33222a09fc93bec · report fixture: signature model:callable/0/?, skip_list:tuple/1/empty, skip_keywords:tuple/1/empty · returned list · level recorded 2026-09-24
window_reverse in 296 papers models/swin_transformer.py ran · our draft was wrong MIT (permissive) · 61bf152e6a42a184 · report fixture: signature windows:Tensor/4/float, window_size:int/0/int, H:int/0/int, W:int/0/int · returned Tensor · level recorded, date not recorded
build_model in 469 papers models/build.py unverified MIT (permissive) · 2448a1ccdc5ce4aa · report
get_config in 203 papers config.py unverified MIT (permissive) · 02a9e80c2bb81815 · report

Tasks

Image ClassificationObject DetectionSegmentationSemantic Segmentationimage-classificationobject-detection

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Semantic Segmentation ADE20K UperNet Shuffle-B Validation mIoU 50.5 #111 of 235 Archive leaderboard report
Semantic Segmentation ADE20K UperNet Shuffle-T Validation mIoU 47.6 #161 of 235 Archive leaderboard report
Semantic Segmentation ADE20K val UperNet Shuffle-B mIoU 50.5 #49 of 95 Archive leaderboard report
Semantic Segmentation ADE20K val UperNet Shuffle-S mIoU 49.6 #57 of 95 Archive leaderboard report
Semantic Segmentation ADE20K val UperNet Shuffle-T mIoU 47.6 #66 of 95 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Introduced by this paper: Shuffle-T

Absolute Position EncodingsAdamAttentionBPEConvolutionDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionShuffle-TSoftmaxTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections