Methods › Computer Vision › Image Models › gMLP
gMLP
Introduced by Hanxiao Liu et al. in Pay Attention to MLPs
archive 2025-07-28 Description, source and code snippet are the archive's method entry.
gMLP is an MLP-based alternative to Transformers without self-attention, which simply consists of channel projections and spatial projections with static parameterization. It is built out of basic MLP layers with gating. The model consists of a stack of L blocks with identical size and structure. Let X ∈ℝ^(n ×d) be the token representations with sequence length n and dimension d. Each block is defined as:
Z=σ(X U), Z̃=s(Z), Y=Z̃ V
where σ is an activation function such as GeLU. U and V define linear projections along the channel dimension - the same as those in the FFNs of Transformers (e.g., their shapes are 768 ×3072 and 3072 ×768 for BERT_(base)).
A key ingredient is s(·), a layer which captures spatial interactions. When s is an identity mapping, the above transformation degenerates to a regular FFN, where individual tokens are processed independently without any cross-token communication. One of the major focuses is therefore to design a good s capable of capturing complex spatial interactions across tokens. This leads to the use of a Spatial Gating Unit which involves a modified linear gating.
The overall block layout is inspired by inverted bottlenecks, which define s(·) as a spatial depthwise convolution. Note, unlike Transformers, gMLP does not require position embeddings because such information will be captured in s(·).
In Syntology repository known, no verified implementation (declared_code; repositories: 5 listed of 20 in the graph, strongest link: mentioned on GitHub). This answer is about arXiv:2105.08050, the paper the archive credits with this method.
Origin paper of this answer, arXiv:2105.08050 (its page on this site · its page on Syntology): Syntology's run record for its harvested code, 34 ran (of which 15 constructed an object rather than computing a result; 31 with no instrument failure: 1 honoured, 4 violated, 26 with no contract checked; 3 where Syntology's instrument failed) · 10 unverified (of 44 harvested samples) · 11 pointer-only (licence). The instrument figure counts failures of Syntology's instrument, not of the code. Ran means executed on a synthesized input, not that the code is correct.
Syntology's have check for this name (free, it answers coverage only), read 2026-10-05; ask it again live. A level is the served verification level of that one answer; nothing here is summed across methods.
Papers archive 2025-07-28
archive papers tagged: 7 · with a code link: 4 · where Syntology ran a sample: 2 (2 with a run with no instrument failure, 0 where every run was a failure of Syntology's instrument) Syntology
Show: all tagged papersonly where code ran (2 of 7 tagged: 2 with a run with no instrument failure, 0 where every run was a failure of Syntology's instrument)
Page 1 of 1: papers 1 to 7 of 7, newest first by the archive's date (ties by slug), in archive order.
Repository counts are the archive's code-links table. A Syntology line states what Syntology ran from that paper's harvested code, as “N ran (of which C constructed an object rather than computing a result; K with no instrument failure: H honoured, V violated, P with no contract checked; I where Syntology's instrument failed) · U unverified”; the instrument figure counts failures of Syntology's instrument, not of the code. It is per sample and not a correctness claim. When the archive marks a repository official for the paper, the line starts with that repository's state (the archive's flag, not a verdict on who wrote the code; “community repositories only” when every sample that ran came from a community repository, “official: no sample here; runs from other or unrecorded repositories” when some came from a repository the paper names or has in its text, or from none recorded); hover it for the repositories the samples that ran came from.
-
gSwin: Gated MLP Vision Model with Hierarchical Structure of Shifted Window 24 Aug 2022 · 0 repositories · arXiv:2208.11718
-
A Proposal of Multi-Layer Perceptron with Graph Gating Unit for Graph Representation Learning and its Application to Surrogate Model for FEM 11 Jul 2022 · 1 repository
-
Are We Really Making Much Progress in Text Classification? A Comparative Review 8 Apr 2022 · 1 repository · arXiv:2204.03954
-
Efficient Language Modeling with Sparse all-MLP 14 Mar 2022 · 0 repositories · arXiv:2203.06850
-
Convolutional Gated MLP: Combining Convolutions & gMLP 6 Nov 2021 · 0 repositories · arXiv:2111.03940
-
CycleMLP: A MLP-like Architecture for Dense Prediction 21 Jul 2021 · 8 repositories · arXiv:2107.10224Syntology official (archive's flag): 2 ran · 10 ran (of which 6 constructed an object rather than computing a result; 9 with no instrument failure: 1 honoured, 1 violated, 7 with no contract checked; 1 where Syntology's instrument failed) · 5 unverified (of 15 harvested samples) · 2 pointer-only (licence)
-
Pay Attention to MLPs 17 May 2021 · 20 repositories · arXiv:2105.08050Syntology 34 ran (of which 15 constructed an object rather than computing a result; 31 with no instrument failure: 1 honoured, 4 violated, 26 with no contract checked; 3 where Syntology's instrument failed) · 10 unverified (of 44 harvested samples) · 11 pointer-only (licence)
Tasks archive 2025-07-28
20 shown of 31 tasks the archive attaches to papers tagged with this method, by distinct papers. A task without a page in the catalog is plain text.
Usage over time archive 2025-07-28
Components: the archive holds no method-to-method composition, so PwC's Components table cannot be rebuilt; the Papers list carries no Results column for the same reason (the archive does not join its leaderboard rows to method tags).
Categories archive 2025-07-28
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