Papers › UniFormer: Unified Transformer for Efficient Spatiotemporal Representation Learning

UniFormer: Unified Transformer for Efficient Spatiotemporal Representation Learning

12 Jan 2022arXiv:2201.04676archive 2025-07-28

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

It is a challenging task to learn rich and multi-scale spatiotemporal semantics from high-dimensional videos, due to large local redundancy and complex global dependency between video frames. The recent advances in this research have been mainly driven by 3D convolutional neural networks and vision transformers. Although 3D convolution can efficiently aggregate local context to suppress local redundancy from a small 3D neighborhood, it lacks the capability to capture global dependency because of the limited receptive field. Alternatively, vision transformers can effectively capture long-range dependency by self-attention mechanism, while having the limitation on reducing local redundancy with blind similarity comparison among all the tokens in each layer. Based on these observations, we propose a novel Unified transFormer (UniFormer) which seamlessly integrates merits of 3D convolution and spatiotemporal self-attention in a concise transformer format, and achieves a preferable balance between computation and accuracy. Different from traditional transformers, our relation aggregator can tackle both spatiotemporal redundancy and dependency, by learning local and global token affinity respectively in shallow and deep layers. We conduct extensive experiments on the popular video benchmarks, e.g., Kinetics-400, Kinetics-600, and Something-Something V1&V2. With only ImageNet-1K pretraining, our UniFormer achieves 82.9%/84.8% top-1 accuracy on Kinetics-400/Kinetics-600, while requiring 10x fewer GFLOPs than other state-of-the-art methods. For Something-Something V1 and V2, our UniFormer achieves new state-of-the-art performances of 60.9% and 71.2% top-1 accuracy respectively. Code is available at https://github.com/Sense-X/UniFormer.

PaperPDFCodeCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also 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

Syntology 37 code samples harvested from 3 repositories linked to this paper: 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. Where Syntology's instrument failed: 8 where our contract draft was wrong; 3 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: official repository: 5 samples from 1 repository, 4 ran (4 with no instrument failure; 0 where Syntology's instrument failed); community (archive-listed): 30 samples from 1 repository, 23 ran (12 with no instrument failure; 11 where Syntology's instrument failed); community: 2 samples from 1 repository, 0 ran (0 with no instrument failure; 0 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written between 2026-09-22 and 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

sense-x/uniformer officialmentioned in papermentioned on GitHubpytorchApache-2.0Syntology: 5 samples, 4 ran (0 instrument-failed) · 1 unverified report
towhee-io/towhee pytorchSyntology: 30 samples, 23 ran (11 instrument-failed) · 7 unverified 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.

Code Syntology ran Syntology

37 samples harvested: 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. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · honoured contract
8ran · our draft was wrong
3ran; the contract check could not run
15ran
10unverified

Licence: 0 of the 37 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 3 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. For 6 samples that ran, the graph records a signature this page does not show: for a class the fixture built without calling, the harness called the object with inputs it made up itself, so the recorded signature is the harness's probe, not the fixture's arguments. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

sense-x/uniformer official repository 5 samples, 4 ran (0 instrument-failed) · 1 unverified
CBlock image_classification/models/uniformer.py ran Apache-2.0 (permissive) · e8faab56f5f8df9b · report fixture: returned CBlock · level recorded 2026-09-22
SABlock image_classification/models/uniformer.py ran Apache-2.0 (permissive) · 8a8dcc08ab9bfa65 · report fixture: returned SABlock · level recorded 2026-09-22
head_embedding image_classification/models/uniformer.py ran fingerprinted Apache-2.0 (permissive) · 0c3842c98c1ef897 · report fixture: returned head_embedding · level recorded 2026-09-22
middle_embedding image_classification/models/uniformer.py ran fingerprinted Apache-2.0 (permissive) · 8f5a6c1aca9ba4de · report fixture: returned middle_embedding · level recorded 2026-09-22
UniFormer image_classification/models/uniformer.py unverified Apache-2.0 (permissive) · 199ff8d54ab96603 · report
towhee-io/towhee community (archive-listed) 30 samples, 23 ran (11 instrument-failed) · 7 unverified
CBlock towhee/models/uniformer/uniformer.py ran · metamorphic tier: deterministic Apache-2.0 (permissive) · f8b18bc5e8ba3ac5 · report fixture: returned CBlock · level recorded 2026-09-22
CMlp towhee/models/uniformer/uniformer.py ran · metamorphic tier: deterministic Apache-2.0 (permissive) · 3fca321b162e5063 · report fixture: returned CMlp · level recorded 2026-09-22
DropPath in 75 papers
census: 17 implementations from 17 papers, 8 distinct outputs across 3 buckets, one shared input per bucket
towhee/models/uniformer/uniformer.py ran · metamorphic tier: deterministic fingerprinted Apache-2.0 (permissive) · 8f059bf3db11537b · report fixture: returned DropPath · level recorded 2026-09-22
Dropout in 8 papers towhee/models/uniformer/uniformer.py ran · metamorphic tier: deterministic Apache-2.0 (permissive) · 6b2146395f61d804 · report fixture: returned Dropout · level recorded 2026-09-22
Einsum towhee/models/uniformer/uniformer.py ran · metamorphic tier: deterministic Apache-2.0 (permissive) · d2f31546ef368292 · report fixture: returned Einsum · level recorded 2026-09-22
GELU in 21 papers towhee/models/uniformer/uniformer.py ran · metamorphic tier: deterministic Apache-2.0 (permissive) · d4114dbf5943332c · report fixture: returned GELU · level recorded 2026-09-22
Linear in 127 papers towhee/models/uniformer/uniformer.py ran · metamorphic tier: deterministic Apache-2.0 (permissive) · 82f963c4eb1876d4 · report fixture: returned Linear · level recorded 2026-09-22
Mlp in 102 papers towhee/models/uniformer/uniformer.py ran · metamorphic tier: deterministic Apache-2.0 (permissive) · 865f8893e93aa461 · report fixture: returned Mlp · level recorded 2026-09-22
PatchEmbed in 123 papers
census: 9 implementations from 9 papers, 6 distinct outputs on one shared input
towhee/models/uniformer/uniformer.py ran · metamorphic tier: deterministic Apache-2.0 (permissive) · e23cb083b2438d3d · report fixture: returned PatchEmbed · level recorded 2026-09-22
Softmax in 5 papers towhee/models/uniformer/uniformer.py ran · metamorphic tier: deterministic Apache-2.0 (permissive) · 15c57dc641cf3d74 · report fixture: returned Softmax · level recorded 2026-09-22
SpeicalPatchEmbed towhee/models/uniformer/uniformer.py ran fingerprinted Apache-2.0 (permissive) · 68e7dd5cd494241b · report fixture: signature x:Tensor/5/float · returned Tensor · level recorded 2026-09-24
_no_grad_trunc_normal_ in 16 papers
census: 16 implementations from 16 papers, 1 distinct output on one shared input this sample: bucket 1 of 1, arg 1: rank 2, kind float, dtype float32
towhee/models/uniformer/uniformer.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant Apache-2.0 (permissive) · 607038475fdc388b · report fixture: signature tensor:Tensor/2/float, mean:float/0/float, std:float/0/float, a:float/0/float, b:float/0/float · returned Tensor · level recorded 2026-09-22
_ntuple in 17 papers towhee/models/uniformer/uniformer.py ran · our draft was wrong Apache-2.0 (permissive) · 2f3cf06bc7cb9815 · report fixture: signature n:int/0/int · returned function · level recorded 2026-09-22
bn_3d towhee/models/uniformer/uniformer.py ran · our draft was wrong Apache-2.0 (permissive) · 5e851f59c9824316 · report fixture: signature dim:int/0/int · returned BatchNorm3d · level recorded 2026-09-22
conv_1x1x1 towhee/models/uniformer/uniformer.py ran · our draft was wrong Apache-2.0 (permissive) · 84e3e49d2ae685c9 · report fixture: signature inp:int/0/int, oup:int/0/int, groups:int/0/int · returned Conv3d · level recorded 2026-09-22
conv_1xnxn towhee/models/uniformer/uniformer.py ran · our draft was wrong Apache-2.0 (permissive) · 0120a7f1a1e50907 · report fixture: signature inp:int/0/int, oup:int/0/int, kernel_size:int/0/int, stride:int/0/int, groups:int/0/int · returned Conv3d · level recorded 2026-09-22
conv_3x3x3 towhee/models/uniformer/uniformer.py ran · our draft was wrong Apache-2.0 (permissive) · b7ed0955d5e0c6f0 · report fixture: signature inp:int/0/int, oup:int/0/int, groups:int/0/int · returned Conv3d · level recorded 2026-09-22
conv_3xnxn towhee/models/uniformer/uniformer.py ran · our draft was wrong Apache-2.0 (permissive) · 813d5682c2f6b672 · report fixture: signature inp:int/0/int, oup:int/0/int, kernel_size:int/0/int, stride:int/0/int, groups:int/0/int · returned Conv3d · level recorded 2026-09-22
conv_3xnxn_std towhee/models/uniformer/uniformer.py ran · our draft was wrong Apache-2.0 (permissive) · 7e0fda53f432a9bd · report fixture: signature inp:int/0/int, oup:int/0/int, kernel_size:int/0/int, stride:int/0/int, groups:int/0/int · returned Conv3d · level recorded 2026-09-22
conv_5x5x5 towhee/models/uniformer/uniformer.py ran · our draft was wrong Apache-2.0 (permissive) · b2472041187c554f · report fixture: signature inp:int/0/int, oup:int/0/int, groups:int/0/int · returned Conv3d · level recorded 2026-09-22
drop_path in 325 papers
census: 27 implementations from 61 papers, 5 distinct outputs across 2 buckets, one shared input per bucket this sample: bucket 1 of 2, arg 1: rank 4, kind float, dtype float32
towhee/models/uniformer/uniformer.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant Apache-2.0 (permissive) · 39eace7e2822504f · report fixture: signature x:Tensor/4/float, drop_prob:float/0/float, training:bool/0/bool · returned Tensor · level recorded 2026-09-22
safe_divide in 19 papers
census: 3 implementations from 5 papers, 2 distinct outputs on one shared input this sample: bucket 1 of 1, arg 1: rank 2, kind float, dtype float32 · arg 2: rank 2, kind float, dtype float32
towhee/models/uniformer/uniformer.py ran · honoured contract fingerprinted Apache-2.0 (permissive) · 507e144112f81dc6 · report fixture: signature a:Tensor/2/float, b:Tensor/2/float · returned Tensor · level recorded 2026-09-22
trunc_normal_ in 154 papers
census: 37 implementations from 54 papers, 4 distinct outputs on one shared input this sample: bucket 1 of 1, arg 1: rank 2, kind float, dtype float32
towhee/models/uniformer/uniformer.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant Apache-2.0 (permissive) · f3e47c6e3250d13b · report fixture: signature tensor:Tensor/2/float, mean:float/0/float, std:float/0/float, a:float/0/float, b:float/0/float · returned Tensor · level recorded 2026-09-22
RelProp towhee/models/uniformer/uniformer.py unverified Apache-2.0 (permissive) · e04c66afc6a652b1 · report
RelPropSimple towhee/models/uniformer/uniformer.py unverified Apache-2.0 (permissive) · 1bc2938f5a5b8e2e · report
SABlock towhee/models/uniformer/uniformer.py unverified Apache-2.0 (permissive) · 2e84a2e6147c7e87 · report
SplitSABlock towhee/models/uniformer/uniformer.py unverified Apache-2.0 (permissive) · 79921eebe00978bd · report
Uniformer towhee/models/uniformer/uniformer.py unverified Apache-2.0 (permissive) · 2e4559833b1c24b6 · report
forward_hook towhee/models/uniformer/uniformer.py unverified Apache-2.0 (permissive) · f1b1138b372a9b03 · report
lucidrains/uniformer-pytorch community 2 samples, 0 ran · 2 unverified
FeedForward in 198 papers uniformer_pytorch/uniformer_pytorch.py unverified MIT (permissive) · 298b1968dc3403b8 · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it. Siblings are assemblies lifted from this paper in the same batch for the same method: alternative readings kept side by side; none replaces or supersedes another.

2 assemblies on this paper: 2 harvested, 0 generated, listed in 1 groups (siblings lifted in one batch form one group).

2 sibling assemblies for UniFormer (harvested), lifted in the same batch on 2026-09-09: alternative readings kept side by side; none replaces or supersedes another.

harvested Assembly for UniFormer (graph method: UniFormer). 30 bricks; individually on a fixture: 23 ran (of which 10 constructed an object rather than computing a result; 12 with no instrument failure: 1 honoured, 0 violated, 11 with no contract checked; 11 where Syntology's instrument failed) · 7 unverified. The assembly has not been run end-to-end.

one of 2 siblings

  1. Uniformer entry · level 0 · unverified · 2e4559833b1c24b6
  2. CBlock model · level 1 · ran · f8b18bc5e8ba3ac5
  3. PatchEmbed model · level 1 · ran · e23cb083b2438d3d
  4. SABlock model · level 0 · unverified · 2e84a2e6147c7e87
  5. SpeicalPatchEmbed model · level 1 · ran · 68e7dd5cd494241b
  6. SplitSABlock model · level 0 · unverified · 79921eebe00978bd
  7. bn_3d helper · level 1 · ran · our draft was wrong · 5e851f59c9824316
  8. trunc_normal_ helper · level 1 · ran; the contract check could not run (RAISES) · f3e47c6e3250d13b
  9. CMlp helper · level 1 · ran · 3fca321b162e5063
  10. DropPath helper · level 1 · ran · 8f059bf3db11537b
  11. conv_1x1x1 helper · level 1 · ran · our draft was wrong · 84e3e49d2ae685c9
  12. conv_3x3x3 helper · level 1 · ran · our draft was wrong · b7ed0955d5e0c6f0
  13. conv_5x5x5 helper · level 1 · ran · our draft was wrong · b2472041187c554f
  14. drop_path helper · level 1 · ran; the contract check could not run (RAISES) · 39eace7e2822504f
  15. conv_1xnxn helper · level 1 · ran · our draft was wrong · 0120a7f1a1e50907
  16. conv_3xnxn_std helper · level 1 · ran · our draft was wrong · 7e0fda53f432a9bd
  17. Mlp helper · level 1 · ran · 865f8893e93aa461
  18. MultiHeadAttention helper · level 0 · unverified · e00c355740a3cab6
  19. conv_3xnxn helper · level 1 · ran · our draft was wrong · 813d5682c2f6b672
  20. _no_grad_trunc_normal_ helper · level 1 · ran; the contract check could not run (RAISES) · 607038475fdc388b
  21. Dropout helper · level 1 · ran · 6b2146395f61d804
  22. GELU helper · level 1 · ran · d4114dbf5943332c
  23. Linear helper · level 1 · ran · 82f963c4eb1876d4
  24. Einsum helper · level 1 · ran · d2f31546ef368292
  25. Softmax helper · level 1 · ran · 15c57dc641cf3d74
  26. RelProp helper · level 0 · unverified · e04c66afc6a652b1
  27. safe_divide helper · level 1 · ran · honoured contract · 507e144112f81dc6
  28. RelPropSimple helper · level 0 · unverified · 1bc2938f5a5b8e2e
  29. forward_hook helper · level 0 · unverified · f1b1138b372a9b03
  30. _ntuple helper · level 1 · ran · our draft was wrong · 2f3cf06bc7cb9815

harvested Assembly for UniFormer (graph method: UniFormer). 9 bricks; individually on a fixture: 8 ran (of which 8 constructed an object rather than computing a result; 8 with no instrument failure: 0 honoured, 0 violated, 8 with no contract checked; 0 where Syntology's instrument failed) · 1 unverified; every one of the 8 samples that ran constructed an object rather than computing a result. The assembly has not been run end-to-end.

one of 2 siblings

  1. UniFormer entry · level 0 · unverified · 199ff8d54ab96603
  2. CBlock model · level 1 · ran · e8faab56f5f8df9b
  3. PatchEmbed model · level 1 · ran · 4c61832d00a1f67e
  4. SABlock model · level 1 · ran · 8a8dcc08ab9bfa65
  5. head_embedding model · level 1 · ran · 0c3842c98c1ef897
  6. middle_embedding model · level 1 · ran · 8f5a6c1aca9ba4de
  7. CMlp helper · level 1 · ran · 0e0efb67773d6946
  8. Attention model · level 1 · ran · 9af3eb132594e510
  9. Mlp helper · level 1 · ran · a1715055832f71fd

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2201.04676") returns these assemblies with each brick's role and wiring (how to connect).

Tasks

Representation Learning

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

3D ConvolutionConvolution

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