Global Filter Networks for Image Classification
arXiv:2107.00645
Abstract
Recent advances in self-attention and pure multi-layer perceptrons (MLP) models for vision have shown great potential in achieving promising performance with fewer inductive biases. These models are generally based on learning interaction among spatial locations from raw data. The complexity of self-attention and MLP grows quadratically as the image size increases, which makes these models hard to scale up when high-resolution features are required. In this paper, we present the Global Filter Network (GFNet), a conceptually simple yet computationally efficient architecture, that learns long-term spatial dependencies in the frequency domain with log-linear complexity. Our architecture replaces the self-attention layer in vision transformers with three key operations: a 2D discrete Fourier transform, an element-wise multiplication between frequency-domain features and learnable global filters, and a 2D inverse Fourier transform. We exhibit favorable accuracy/complexity trade-offs of our models on both ImageNet and downstream tasks. Our results demonstrate that GFNet can be a very competitive alternative to transformer-style models and CNNs in efficiency, generalization ability and robustness. Code is available at https://github.com/raoyongming/GFNet
Accepted to NeurIPS 2021. Project page: https://gfnet.ivg-research.xyz/
References in corpus (7)
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- PyTorch: An Imperative Style, High-Performance Deep Learning Library
- Decoupled Weight Decay Regularization
- MLP-Mixer: An all-MLP Architecture for Vision
- CvT: Introducing Convolutions to Vision Transformers
- Are we done with ImageNet?
- Pay Attention to MLPs
Cited by in corpus (7)
- CycleMLP: A MLP-like Architecture for Dense Prediction
- A Battle of Network Structures: An Empirical Study of CNN, Transformer, and MLP
- S-MLPv2: Improved Spatial-Shift MLP Architecture for Vision
- MetaFormer Is Actually What You Need for Vision
- Adaptive Fourier Neural Operators: Efficient Token Mixers for Transformers
- Hire-MLP: Vision MLP via Hierarchical Rearrangement
- An Image Patch is a Wave: Phase-Aware Vision MLP