MetaFormer is actually what you need for vision

Transformers have shown great potential in computer vision tasks. A common belief is their attention-based token mixer module contributes most to their competence. However, recent works show the attention-based module in transformers can be replaced by spatial MLPs and the resulted models still perf...

Full description

Saved in:
Bibliographic Details
Main Authors: YU, Weihao, LUO, Mi, ZHOU, Pan, SI, Chenyang, ZHOU, Yichen, WANG, Xinchao, FENG, Jiashi, YAN, Shuicheng
Format: text
Language:English
Published: Institutional Knowledge at Singapore Management University 2022
Subjects:
Online Access:https://ink.library.smu.edu.sg/sis_research/8983
https://ink.library.smu.edu.sg/context/sis_research/article/9986/viewcontent/2022_CVPR_MetaFormer.pdf
Tags: Add Tag
No Tags, Be the first to tag this record!
Institution: Singapore Management University
Language: English
id sg-smu-ink.sis_research-9986
record_format dspace
spelling sg-smu-ink.sis_research-99862024-07-25T08:30:59Z MetaFormer is actually what you need for vision YU, Weihao LUO, Mi ZHOU, Pan SI, Chenyang ZHOU, Yichen WANG, Xinchao FENG, Jiashi YAN, Shuicheng Transformers have shown great potential in computer vision tasks. A common belief is their attention-based token mixer module contributes most to their competence. However, recent works show the attention-based module in transformers can be replaced by spatial MLPs and the resulted models still perform quite well. Based on this observation, we hypothesize that the general architecture of the transformers, instead of the specific token mixer module, is more essential to the model's performance. To verify this, we deliberately replace the attention module in transformers with an embarrassingly simple spatial pooling operator to conduct only basic token mixing. Surprisingly, we observe that the derived model, termed as PoolFormer, achieves competitive performance on multiple computer vision tasks. For example, on ImageNet-1K, PoolFormer achieves 82.1 % top-1 accuracy, surpassing well-tuned vision transformer/MLP-like baselines DeiT-B/ResMLP-B24 by 0.3%/1.1% accuracy with 35%/52% fewer parameters and 49%/61% fewer MACs. The effectiveness of Pool-Former verifies our hypothesis and urges us to initiate the concept of “MetaFormer”, a general architecture abstracted from transformers without specifying the token mixer. Based on the extensive experiments, we argue that MetaFormer is the key player in achieving superior results for recent transformer and MLP-like models on vision tasks. This work calls for more future research dedicated to improving MetaFormer instead of focusing on the token mixer modules. Additionally, our proposed PoolFormer could serve as a starting baseline for future MetaFormer architecture design. 2022-06-01T07:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/8983 info:doi/10.1109/CVPR52688.2022.01055 https://ink.library.smu.edu.sg/context/sis_research/article/9986/viewcontent/2022_CVPR_MetaFormer.pdf http://creativecommons.org/licenses/by-nc-nd/4.0/ Research Collection School Of Computing and Information Systems eng Institutional Knowledge at Singapore Management University Computer vision Computational modeling Focusing Computer architecture Transformers Pattern recognition Task analysis Graphics and Human Computer Interfaces
institution Singapore Management University
building SMU Libraries
continent Asia
country Singapore
Singapore
content_provider SMU Libraries
collection InK@SMU
language English
topic Computer vision
Computational modeling
Focusing
Computer architecture
Transformers
Pattern recognition
Task analysis
Graphics and Human Computer Interfaces
spellingShingle Computer vision
Computational modeling
Focusing
Computer architecture
Transformers
Pattern recognition
Task analysis
Graphics and Human Computer Interfaces
YU, Weihao
LUO, Mi
ZHOU, Pan
SI, Chenyang
ZHOU, Yichen
WANG, Xinchao
FENG, Jiashi
YAN, Shuicheng
MetaFormer is actually what you need for vision
description Transformers have shown great potential in computer vision tasks. A common belief is their attention-based token mixer module contributes most to their competence. However, recent works show the attention-based module in transformers can be replaced by spatial MLPs and the resulted models still perform quite well. Based on this observation, we hypothesize that the general architecture of the transformers, instead of the specific token mixer module, is more essential to the model's performance. To verify this, we deliberately replace the attention module in transformers with an embarrassingly simple spatial pooling operator to conduct only basic token mixing. Surprisingly, we observe that the derived model, termed as PoolFormer, achieves competitive performance on multiple computer vision tasks. For example, on ImageNet-1K, PoolFormer achieves 82.1 % top-1 accuracy, surpassing well-tuned vision transformer/MLP-like baselines DeiT-B/ResMLP-B24 by 0.3%/1.1% accuracy with 35%/52% fewer parameters and 49%/61% fewer MACs. The effectiveness of Pool-Former verifies our hypothesis and urges us to initiate the concept of “MetaFormer”, a general architecture abstracted from transformers without specifying the token mixer. Based on the extensive experiments, we argue that MetaFormer is the key player in achieving superior results for recent transformer and MLP-like models on vision tasks. This work calls for more future research dedicated to improving MetaFormer instead of focusing on the token mixer modules. Additionally, our proposed PoolFormer could serve as a starting baseline for future MetaFormer architecture design.
format text
author YU, Weihao
LUO, Mi
ZHOU, Pan
SI, Chenyang
ZHOU, Yichen
WANG, Xinchao
FENG, Jiashi
YAN, Shuicheng
author_facet YU, Weihao
LUO, Mi
ZHOU, Pan
SI, Chenyang
ZHOU, Yichen
WANG, Xinchao
FENG, Jiashi
YAN, Shuicheng
author_sort YU, Weihao
title MetaFormer is actually what you need for vision
title_short MetaFormer is actually what you need for vision
title_full MetaFormer is actually what you need for vision
title_fullStr MetaFormer is actually what you need for vision
title_full_unstemmed MetaFormer is actually what you need for vision
title_sort metaformer is actually what you need for vision
publisher Institutional Knowledge at Singapore Management University
publishDate 2022
url https://ink.library.smu.edu.sg/sis_research/8983
https://ink.library.smu.edu.sg/context/sis_research/article/9986/viewcontent/2022_CVPR_MetaFormer.pdf
_version_ 1814047700303216640