Skip to main content
QUICK REVIEW

[Paper Review] RepMLPNet: Hierarchical Vision MLP with Re-parameterized Locality

Xiaohan Ding, Honghao Chen|arXiv (Cornell University)|Dec 21, 2021
Advanced Neural Network ApplicationsComputer Science6 citations
TL;DR

RepMLPNet introduces a novel hierarchical vision MLP architecture that enhances fully connected (FC) layers with learned local inductive bias via Locality Injection—a re-parameterization technique merging trained convolutional kernels into FC weights. This enables strong performance on image recognition and, for the first time, seamless transfer to Cityscapes semantic segmentation, achieving 77.12 mIoU with a 5×5 conv replacement.

ABSTRACT

Compared to convolutional layers, fully-connected (FC) layers are better at modeling the long-range dependencies but worse at capturing the local patterns, hence usually less favored for image recognition. In this paper, we propose a methodology, Locality Injection, to incorporate local priors into an FC layer via merging the trained parameters of a parallel conv kernel into the FC kernel. Locality Injection can be viewed as a novel Structural Re-parameterization method since it equivalently converts the structures via transforming the parameters. Based on that, we propose a multi-layer-perceptron (MLP) block named RepMLP Block, which uses three FC layers to extract features, and a novel architecture named RepMLPNet. The hierarchical design distinguishes RepMLPNet from the other concurrently proposed vision MLPs. As it produces feature maps of different levels, it qualifies as a backbone model for downstream tasks like semantic segmentation. Our results reveal that 1) Locality Injection is a general methodology for MLP models; 2) RepMLPNet has favorable accuracy-efficiency trade-off compared to the other MLPs; 3) RepMLPNet is the first MLP that seamlessly transfer to Cityscapes semantic segmentation. The code and models are available at https://github.com/DingXiaoH/RepMLP.

Motivation & Objective

  • To address the lack of local inductive bias in standard MLPs, which hinders performance on small datasets and downstream tasks.
  • To develop a method that injects locality into fully connected layers without sacrificing inference speed.
  • To design a hierarchical MLP architecture capable of serving as a strong backbone for dense prediction tasks like semantic segmentation.
  • To enable efficient, data-efficient training of MLPs using standard optimization and augmentation, avoiding reliance on massive datasets or distillation.

Proposed method

  • Proposes Locality Injection: a structural re-parameterization method that merges trained convolutional kernels into FC layer weights to inject local inductive bias.
  • Introduces the RepMLP Block, a multi-branch module combining a global perceptron, channel-wise perceptron, and local convolutions, with batch normalization for residual fusion.
  • Uses a three-branch training-time structure (FC + conv + BN) that is re-parameterized into a single three-FC inference structure via equivalent parameter transformation.
  • Employs a patch-based inference strategy for high-resolution tasks like Cityscapes, replacing standard embedding layers with 3×3 or 5×5 convs to preserve cross-patch context.
  • Applies standard data augmentation and training protocols, avoiding distillation or special techniques.
  • Designs a hierarchical RepMLPNet with multiple RepMLP Blocks to produce multi-scale feature maps suitable for segmentation backbones.

Experimental results

Research questions

  • RQ1Can a fully connected layer be effectively enhanced with local inductive bias without increasing inference cost?
  • RQ2Can a vision MLP achieve strong performance on small datasets and downstream dense prediction tasks without massive data or distillation?
  • RQ3Is there a re-parameterization method that can inject locality into FC layers while preserving their global modeling capacity?
  • RQ4Can an MLP-based backbone be successfully transferred to high-resolution semantic segmentation tasks like Cityscapes?
  • RQ5Does the proposed Locality Injection method generalize across different MLP architectures and datasets?

Key findings

  • Locality Injection boosts ResMLP accuracy by 9.51% on CIFAR-100 with only 216 extra parameters, demonstrating its effectiveness even on small datasets.
  • RepMLPNet achieves 76.27 mIoU on Cityscapes val set using standard ImageNet pretraining, marking the first successful transfer of an MLP backbone to this task.
  • Replacing 3×3 downsampling layers with 5×5 convs increases mIoU to 77.12 with negligible FLOP increase, showing improved cross-patch communication.
  • Removing the Local Perceptron from RepMLPNet-D256 causes a 2.15% accuracy drop on ImageNet, confirming the importance of injected locality.
  • RepMLPNet maintains favorable accuracy-efficiency trade-off compared to concurrent MLPs, with lower training costs and no need for distillation.
  • The hierarchical design enables feature maps at multiple scales, qualifying RepMLPNet as a viable backbone for segmentation frameworks like UperNet.

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.