ResMLP is a residual network that replaces the self-attention of ViT with "a single linear layer across patches" and classifies images using only fully connected layers and GELU. It was published in 2021 by Touvron and colleagues at Facebook AI. It comes from the same research group as DeiT and emphasizes reaching good accuracy when trained on ImageNet-1K alone.
ViT showed that images can be classified even after removing the assumptions built into convolutions, such as "look at nearby pixels" and "produce the same features when the position shifts". ResMLP pushes this trend further, examining how much accuracy remains when even attention, whose weights depend on the data, is removed. Google published MLP-Mixer around the same time with a very similar idea. The differences are as follows.
- The patch-mixing part is a single linear layer: MLP-Mixer uses a 2-layer MLP, whereas ResMLP uses a linear layer with no hidden layer.
- Aff instead of normalization: instead of layer normalization, which computes statistics, it uses a simple transformation that learns only a per-channel scale and shift.
- Training on ImageNet-1K alone: MLP-Mixer assumed large-scale pretraining on ImageNet-21k or JFT-300M, whereas ResMLP trains on ImageNet-1K alone using DeiT's training recipe (strong data augmentation and, optionally, knowledge distillation).
The main results of the paper are as follows.
- Trained on ImageNet-1K alone, ResMLP-S24 reached 79.4% accuracy and ResMLP-B24 reached 81.0%.
- Knowledge distillation from a CNN improved results substantially, with ResMLP-B24/8 reaching 83.6%.
- Viewing the weights of the learned linear layers as images revealed convolution-like local patterns in the shallow layers.

