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(·).
Papers archive 2025-07-28
7 shown of 7, newest first. Repository counts are the archive's code-links table. A Syntology line states what Syntology ran from that paper's harvested code; it is per sample and not a correctness claim.
-
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 ran 8 of 15 samples · 7 unverified · 1 pointer-only (licence)
-
Pay Attention to MLPs 17 May 2021 · 20 repositories · arXiv:2105.08050Syntology ran 34 of 44 samples · 10 unverified · 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