Skip to main content
QUICK REVIEW

[Paper Review] ResMLP: Feedforward networks for image classification with data-efficient training

Hugo Touvron, Piotr Bojanowski|arXiv (Cornell University)|May 7, 2021
Digital Imaging for Blood DiseasesComputer Science5 citations
TL;DR

ResMLP is a simple, purely feedforward neural network architecture for image classification that replaces self-attention with linear patch interactions, achieving state-of-the-art accuracy on ImageNet-1k with data-efficient training. It matches or exceeds ViT performance using only linear layers and GELU activations, demonstrating that modern training strategies can make MLP-only models highly effective without architectural priors like convolution or attention.

ABSTRACT

We present ResMLP, an architecture built entirely upon multi-layer perceptrons for image classification. It is a simple residual network that alternates (i) a linear layer in which image patches interact, independently and identically across channels, and (ii) a two-layer feed-forward network in which channels interact independently per patch. When trained with a modern training strategy using heavy data-augmentation and optionally distillation, it attains surprisingly good accuracy/complexity trade-offs on ImageNet. We also train ResMLP models in a self-supervised setup, to further remove priors from employing a labelled dataset. Finally, by adapting our model to machine translation we achieve surprisingly good results. We share pre-trained models and our code based on the Timm library.

Motivation & Objective

  • To explore whether a purely multi-layer perceptron (MLP) architecture can achieve strong performance on image classification without inductive biases like convolution or self-attention.
  • To investigate if data-efficient training strategies—such as heavy data augmentation and knowledge distillation—can enable simple MLPs to match or exceed vision transformer performance.
  • To evaluate whether such a model can generalize beyond images, particularly in sequence-to-sequence tasks like machine translation.
  • To analyze the internal representations of the model to understand what inductive biases emerge from training a minimal architecture.

Proposed method

  • ResMLP processes non-overlapping image patches via a linear projection into d-dimensional embeddings.
  • The network alternates between two residual blocks: (1) a cross-patch linear layer that allows interaction across patches with shared weights, and (2) a two-layer feedforward network that enables channel-wise interaction per patch.
  • Each block uses residual connections and pre-normalization, similar to ResNet and DeiT, but omits batch or layer normalization.
  • The final patch representations are averaged and passed to a linear classifier for image-level prediction.
  • The model is trained using cross-entropy loss with data augmentation and optionally knowledge distillation from a teacher model.
  • A sequence-to-sequence variant of ResMLP is adapted for machine translation, replacing Transformer layers with ResMLP blocks while preserving cross-attention between encoder and decoder.

Experimental results

Research questions

  • RQ1Can a purely feedforward network with no attention or convolutional inductive biases achieve competitive performance on ImageNet-1k with data-efficient training?
  • RQ2How does the performance of a minimal MLP architecture compare to vision transformers when trained with the same modern training regime?
  • RQ3To what extent can self-supervised pre-training or knowledge distillation improve the accuracy of a simple MLP-based model?
  • RQ4Can a ResMLP-based architecture generalize to other domains, such as sequence-to-sequence tasks like machine translation?
  • RQ5What kind of inductive biases emerge in the learned filters of a minimal MLP architecture, and how do they compare to convolutions or attention?

Key findings

  • ResMLP achieves state-of-the-art accuracy on ImageNet-1k with a simple architecture based solely on linear layers and feedforward networks, outperforming or matching ViT under the same training regime.
  • The model trains more stably than vision transformers when using the same data-augmentation and distillation strategy, allowing it to forgo batch normalization or layer normalization.
  • Visualizations of the linear layers reveal filter patterns resembling convolutions in early layers and long-range interactions in deeper layers, suggesting emergent spatial inductive biases.
  • ResMLP benefits significantly from knowledge distillation, achieving high accuracy even with limited labeled data.
  • The model is compatible with self-supervised pre-training methods like DINO, enabling strong performance without any labeled data.
  • A sequence-to-sequence version of ResMLP achieves competitive results on the WMT machine translation benchmark, demonstrating transferability beyond computer vision.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.