Papers › UniFormer: Unifying Convolution and Self-attention for Visual Recognition

UniFormer: Unifying Convolution and Self-attention for Visual Recognition

24 Jan 2022arXiv:2201.09450archive 2025-07-28

Kunchang Li, Yali Wang, Junhao Zhang, Peng Gao, Guanglu Song, Yu Liu, Hongsheng Li, Yu Qiao

It is a challenging task to learn discriminative representation from images and videos, due to large local redundancy and complex global dependency in these visual data. Convolution neural networks (CNNs) and vision transformers (ViTs) have been two dominant frameworks in the past few years. Though CNNs can efficiently decrease local redundancy by convolution within a small neighborhood, the limited receptive field makes it hard to capture global dependency. Alternatively, ViTs can effectively capture long-range dependency via self-attention, while blind similarity comparisons among all the tokens lead to high redundancy. To resolve these problems, we propose a novel Unified transFormer (UniFormer), which can seamlessly integrate the merits of convolution and self-attention in a concise transformer format. Different from the typical transformer blocks, the relation aggregators in our UniFormer block are equipped with local and global token affinity respectively in shallow and deep layers, allowing to tackle both redundancy and dependency for efficient and effective representation learning. Finally, we flexibly stack our UniFormer blocks into a new powerful backbone, and adopt it for various vision tasks from image to video domain, from classification to dense prediction. Without any extra training data, our UniFormer achieves 86.3 top-1 accuracy on ImageNet-1K classification. With only ImageNet-1K pre-training, it can simply achieve state-of-the-art performance in a broad range of downstream tasks, e.g., it obtains 82.9/84.8 top-1 accuracy on Kinetics-400/600, 60.9/71.2 top-1 accuracy on Sth-Sth V1/V2 video classification, 53.8 box AP and 46.4 mask AP on COCO object detection, 50.8 mIoU on ADE20K semantic segmentation, and 77.4 AP on COCO pose estimation. We further build an efficient UniFormer with 2-4x higher throughput. Code is available at https://github.com/Sense-X/UniFormer.

PaperPDFCode

In Syntology View this paper on Syntology, its page in Syntology's graph. That page lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

sense-x/uniformer mentioned in papermentioned on GitHubpytorchApache-2.0Syntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to UniFormer: Unified Transformer for Efficient Spatiotemporal Representation Learning (arXiv:2201.04676; that paper's own run record: 27 ran (of which 14 constructed an object rather than computing a result; 16 with no instrument failure: 1 honoured, 0 violated, 15 with no contract checked; 11 where Syntology's instrument failed) · 10 unverified); nothing checks that they implement this paper's method. report
Westlake-AI/openmixup mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to mixup: Beyond Empirical Risk Minimization (arXiv:1710.09412; that paper's own run record: 36 ran (of which 5 constructed an object rather than computing a result; 14 with no instrument failure: 0 honoured, 0 violated, 14 with no contract checked; 22 where Syntology's instrument failed) · 11 unverified), Visualizing the Loss Landscape of Neural Nets (arXiv:1712.09913; that paper's own run record: 3 ran (of which 1 constructed an object rather than computing a result; 2 with no instrument failure: 0 honoured, 0 violated, 2 with no contract checked; 1 where Syntology's instrument failed) · 5 unverified), CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features (arXiv:1905.04899; that paper's own run record: 17 ran (of which 6 constructed an object rather than computing a result; 10 with no instrument failure: 2 honoured, 0 violated, 8 with no contract checked; 7 where Syntology's instrument failed) · 7 unverified) and 1 more (every one in this page's JSON twin); nothing checks that they implement this paper's method. report
bespontaneous/ffn mentioned on GitHubpytorchMITSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Frame Flexible Network (arXiv:2303.14817; that paper's own run record: 1 ran (of which 0 constructed an object rather than computing a result; 1 with no instrument failure: 0 honoured, 0 violated, 1 with no contract checked; 0 where Syntology's instrument failed) · 0 unverified); nothing checks that they implement this paper's method. report
bespontaneous/mca-pytorch mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to TSM: Temporal Shift Module for Efficient Video Understanding (arXiv:1811.08383; that paper's own run record: 10 ran (of which 0 constructed an object rather than computing a result; 5 with no instrument failure: 1 honoured, 0 violated, 4 with no contract checked; 5 where Syntology's instrument failed) · 6 unverified); nothing checks that they implement this paper's method. report
sithu31296/semantic-segmentation mentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers (arXiv:2105.15203; that paper's own run record: 66 ran (of which 22 constructed an object rather than computing a result; 52 with no instrument failure: 1 honoured, 2 violated, 49 with no contract checked; 14 where Syntology's instrument failed) · 20 unverified), FaPN: Feature-aligned Pyramid Network for Dense Image Prediction (arXiv:2108.07058; that paper's own run record: 2 ran (of which 0 constructed an object rather than computing a result; 2 with no instrument failure: 0 honoured, 0 violated, 2 with no contract checked; 0 where Syntology's instrument failed) · 2 unverified) and A ConvNet for the 2020s (arXiv:2201.03545; that paper's own run record: 57 ran (of which 39 constructed an object rather than computing a result; 49 with no instrument failure: 2 honoured, 0 violated, 47 with no contract checked; 8 where Syntology's instrument failed) · 23 unverified); nothing checks that they implement this paper's method. report
Asthestarsfalll/UniFormer-MegEngine pytorchSyntology: not harvested report
leondgarse/keras_cv_attention_models tfSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to RepViT: Revisiting Mobile CNN From ViT Perspective (arXiv:2307.09283; that paper's own run record: 6 ran (of which 0 constructed an object rather than computing a result; 3 with no instrument failure: 0 honoured, 0 violated, 3 with no contract checked; 3 where Syntology's instrument failed) · 6 unverified); nothing checks that they implement this paper's method. report
gitlab.com/birder/birder pytorchSyntology: not harvested report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Image ClassificationObject DetectionPose EstimationRepresentation LearningSemantic SegmentationVideo Classificationobject-detection

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Classification ImageNet UniFormer-L (384 res) GFLOPs 39.2 #160 of 1060 Archive leaderboard report
Image Classification ImageNet UniFormer-L (384 res) Number of params 100M #160 of 1060 Archive leaderboard report
Image Classification ImageNet UniFormer-L (384 res) Top 1 Accuracy 86.3% #160 of 1060 Archive leaderboard report
Image Classification ImageNet UniFormer-L GFLOPs 12.6 #216 of 1060 Archive leaderboard report
Image Classification ImageNet UniFormer-L Number of params 100M #216 of 1060 Archive leaderboard report
Image Classification ImageNet UniFormer-L Top 1 Accuracy 85.6% #216 of 1060 Archive leaderboard report
Image Classification ImageNet UniFormer-S GFLOPs 3.6 #427 of 1060 Archive leaderboard report
Image Classification ImageNet UniFormer-S Number of params 22M #427 of 1060 Archive leaderboard report
Image Classification ImageNet UniFormer-S Top 1 Accuracy 83.4% #427 of 1060 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Convolution

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections