HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

Global Filter Networks for Image Classification

Yongming Rao Wenliang Zhao Zheng Zhu Jiwen Lu Jie Zhou

Global Filter Networks for Image Classification

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

Benchmarks

BenchmarkMethodologyMetrics
domain-generalization-on-imagenet-aGFNet-S
Top-1 accuracy %: 14.3
domain-generalization-on-imagenet-cGFNet-S
mean Corruption Error (mCE): 53.8
image-classification-on-cifar-10GFNet-H-B
Percentage correct: 99.0
image-classification-on-cifar-100GFNet-H-B
PARAMS: 54M
Percentage correct: 90.3
image-classification-on-flowers-102GFNet-H-B
Accuracy: 98.8
PARAMS: 54M
image-classification-on-imagenetGFNet-H-B
GFLOPs: 8.6
Hardware Burden:
Number of params: 54M
Operations per network pass:
Top 1 Accuracy: 82.9%
image-classification-on-stanford-carsGFNet-H-B
Accuracy: 93.2

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp
Global Filter Networks for Image Classification | Papers | HyperAI