Papers › Mixing and Shifting: Exploiting Global and Local Dependencies in Vision MLPs

Mixing and Shifting: Exploiting Global and Local Dependencies in Vision MLPs

14 Feb 2022arXiv:2202.06510archive 2025-07-28

Huangjie Zheng, Pengcheng He, Weizhu Chen, Mingyuan Zhou

Token-mixing multi-layer perceptron (MLP) models have shown competitive performance in computer vision tasks with a simple architecture and relatively small computational cost. Their success in maintaining computation efficiency is mainly attributed to avoiding the use of self-attention that is often computationally heavy, yet this is at the expense of not being able to mix tokens both globally and locally. In this paper, to exploit both global and local dependencies without self-attention, we present Mix-Shift-MLP (MS-MLP) which makes the size of the local receptive field used for mixing increase with respect to the amount of spatial shifting. In addition to conventional mixing and shifting techniques, MS-MLP mixes both neighboring and distant tokens from fine- to coarse-grained levels and then gathers them via a shifting operation. This directly contributes to the interactions between global and local tokens. Being simple to implement, MS-MLP achieves competitive performance in multiple vision benchmarks. For example, an MS-MLP with 85 million parameters achieves 83.8% top-1 classification accuracy on ImageNet-1K. Moreover, by combining MS-MLP with state-of-the-art Vision Transformers such as the Swin Transformer, we show MS-MLP achieves further improvements on three different model scales, e.g., by 0.5% on ImageNet-1K classification with Swin-B. The code is available at: https://github.com/JegZheng/MS-MLP.

PaperPDFCodeCode Syntology ran

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

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2202.06510")

Code

Syntology Ran 3 of 10 code samples harvested from 1 repository linked to this paper; 7 have no recorded run. Of those that ran: 1 ran · honoured contract; 2 ran with no contract checked.

By repository: official repository: 10 samples from 1 repository, 3 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

jegzheng/ms-mlp officialmentioned in papermentioned on GitHubpytorchMIT report
liuruiyang98/Jittor-MLP mentioned on GitHubjax 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.

Code Syntology ran Syntology

10 samples harvested; 3 ran; 1 honoured the contract we drafted; 7 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
2ran
7unverified

Licence: 0 of the 10 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from jegzheng/ms-mlp. “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. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (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 from a repository marked official are listed first. 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 four 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; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). 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.

build_optimizer jegzheng/ms-mlp/optimizer.py official repository ran MIT (permissive) · e35a4b2e4114b1a5 · report
get_grad_norm jegzheng/ms-mlp/utils.py official repository ran · honoured contract MIT (permissive) · eec1e7cba51d5e8e · report
set_weight_decay jegzheng/ms-mlp/optimizer.py official repository ran MIT (permissive) · b33222a09fc93bec · report
auto_resume_helper jegzheng/ms-mlp/utils.py official repository unverified MIT (permissive) · 0c32459bef92ff8c · report
build_model jegzheng/ms-mlp/models/build.py official repository unverified MIT (permissive) · 48744917208fe013 · report
build_scheduler jegzheng/ms-mlp/lr_scheduler.py official repository unverified MIT (permissive) · c02cc4e0b5720211 · report
check_keywords_in_name jegzheng/ms-mlp/optimizer.py official repository unverified MIT (permissive) · b0a5beb34716d5a6 · report
create_logger jegzheng/ms-mlp/logger.py official repository unverified MIT (permissive) · 80450600f7f09b0a · report
get_config jegzheng/ms-mlp/config.py official repository unverified MIT (permissive) · 72dc9e70b4c4afca · report
load_checkpoint jegzheng/ms-mlp/utils.py official repository unverified MIT (permissive) · a36ee4d8c70af50a · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxStochastic DepthSwin TransformerTransformer

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