Papers › Is Space-Time Attention All You Need for Video Understanding?
Is Space-Time Attention All You Need for Video Understanding?
Gedas Bertasius, Heng Wang, Lorenzo Torresani
We present a convolution-free approach to video classification built exclusively on self-attention over space and time. Our method, named "TimeSformer," adapts the standard Transformer architecture to video by enabling spatiotemporal feature learning directly from a sequence of frame-level patches. Our experimental study compares different self-attention schemes and suggests that "divided attention," where temporal attention and spatial attention are separately applied within each block, leads to the best video classification accuracy among the design choices considered. Despite the radically new design, TimeSformer achieves state-of-the-art results on several action recognition benchmarks, including the best reported accuracy on Kinetics-400 and Kinetics-600. Finally, compared to 3D convolutional networks, our model is faster to train, it can achieve dramatically higher test efficiency (at a small drop in accuracy), and it can also be applied to much longer video clips (over one minute long). Code and models are available at: https://github.com/facebookresearch/TimeSformer.
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):
get_harvested_code_for_paper(arxiv_id="2102.05095")get_code(code_sha256="…")with a sample'scode_sha256from the list belowget_citation_path(paper_1="2102.05095", paper_2="…")with another paper's arXiv id or titleget_concepts_for_paper(arxiv_id="2102.05095")
Code
The archive's official repository (facebookresearch/TimeSformer) was not harvested; the 42 samples below come from 6 community repositories, and 1 more is identical to code Syntology harvested from another paper's repository.
Syntology 43 code samples: 42 from 6 repositories linked to this paper, 1 identical to code harvested from another paper's repository. Across all 43: 35 ran (of which 17 constructed an object rather than computing a result; 21 with no instrument failure: 0 honoured, 1 violated, 20 with no contract checked; 14 where Syntology's instrument failed) · 8 unverified. Where Syntology's instrument failed: 5 where our contract draft was wrong; 9 where the contract check could not run; failures of Syntology's instrument, not of the code.
By repository: community (archive-listed): 42 samples from 6 repositories, 34 ran (20 with no instrument failure; 14 where Syntology's instrument failed); 1 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.
No sample is linked to this paper from 7 of its repositories that Syntology harvested for other papers:
- mx-mark/videotransformer-pytorch, community (archive-listed): harvested for another paper, listed under the repository
- MindCode-4/code-5, community (archive-listed): harvested for another paper, listed under the repository
- PaddlePaddle/PaddleVideo, community (archive-listed): harvested for another paper, listed under the repository
- open-mmlab/mmaction2, community (archive-listed): harvested for another paper, listed under the repository
- pwc-1/Paper-10, community (archive-listed): harvested for another paper, listed under the repository
- pwc-1/Paper-9, community (archive-listed): harvested for another paper, listed under the repository
- towhee-io/towhee, community (archive-listed): harvested for 12 other papers, listed under the repository
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. 3 of the 35 samples that ran have no recorded date.
16 repositories listed; official and paper-mentioned ones first.
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
43 samples harvested: 35 ran (of which 17 constructed an object rather than computing a result; 21 with no instrument failure: 0 honoured, 1 violated, 20 with no contract checked; 14 where Syntology's instrument failed) · 8 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.
Licence: 14 of the 43 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 6 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. 1 sample is listed last, in a group without a repository. “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.
census: 13 implementations from 12 papers, 10 distinct outputs across 4 buckets, one shared input per bucket timesformer_pytorch/timesformer_pytorch.py ran MIT (permissive) ·
9e6eb12055d4b5db · report
fixture: returned Attention · level recorded 2026-09-22 1e12db9a2b6a6d61 · report
fixture: returned TimeSformer · level recorded 2026-09-22 c9b2023a8e7f543b · report
fixture: signature q:Tensor/3/float, k:Tensor/3/float, v:Tensor/3/float · returned Tensor · level recorded 2026-09-22 3c436600aed6654a · report
fixture: returned Decoder · level recorded 2026-09-22 1879ef86738392c0 · report
fixture: returned DecoderLayer · level recorded 2026-09-22 070741108b175c8f · report
fixture: returned Encoder · level recorded 2026-09-22 38ab040cbcf984b8 · report
fixture: returned EncoderLayer · level recorded 2026-09-22 bb5aa1cbee56c9d7 · report
fixture: returned MultiHeadedAttention · level recorded 2026-09-22 cf33bd73aa85bae0 · report
fixture: signature query:Tensor/5/float, key:Tensor/5/float, value:Tensor/5/float, mask:NoneType/0/?, dropout:callable/0/? · returned Tensor · level recorded 2026-09-22 2c2573860f1078bc · report
fixture: returned SublayerConnection · level recorded 2026-09-22 0f190b82b567601a · report
fixture: signature query:Tensor/5/float, key:Tensor/5/float, value:Tensor/5/float, mask:Tensor/2/bool, dropout:callable/0/? · returned Tensor · level recorded 2026-09-22 382b7426a720dd16 · report
fixture: signature tensor:Tensor/4/float, output_size:tuple/1/int, kernel_size:tuple/1/int · returned Tensor · level recorded 2026-09-22 d1d6c81b2e101027 · report
fixture: returned input_embedding · level recorded 2026-09-22 5eee191e9a7fe18e · report
fixture: signature img:Tensor/4/float, kernel_size:tuple/1/int · returned Tensor · level recorded 2026-09-22 9323660c90d8a3a4 · report
2125f85e76f4efc7 · report
fixture: signature h:int/0/int, w:int/0/int, device:str/0/str · returned tuple · level recorded 2026-09-24 0183b5f0d306482f · report
fixture: returned FeedForward · level recorded 2026-09-22 census: 12 implementations from 12 papers, 1 distinct output on one shared input timesformer_pytorch/timesformer_pytorch.py ran fingerprinted MIT (permissive) ·
384419959d31762c · report
fixture: signature x:Tensor/2/float · returned Tensor · level recorded 2026-09-24 8bb9d8688ba435cf · report
fixture: returned PreNorm · level recorded 2026-09-22 42b61b5b4f622a76 · report
fixture: returned PreTokenShift · level recorded 2026-09-22 4e0216fcf6abef9d · report
fixture: signature n:int/0/int, device:device/0/? · returned tuple · level recorded 2026-09-22 b47a2562da71bf81 · report
fixture: signature q:Tensor/2/float, k:Tensor/2/float, rot_emb:tuple/1/Tensor · returned tuple · level recorded 2026-09-22 5d2b139fbe3e2fe5 · report
fixture: signature q:Tensor/3/float, k:Tensor/3/float, v:Tensor/3/float, mask:Tensor/3/bool · returned Tensor · level recorded, date not recorded census: 5 implementations from 8 papers, 2 distinct outputs across 2 buckets, one shared input per bucket this sample: bucket 2 of 2, arg 1: rank 2, kind float, dtype float32 timesformer_pytorch/timesformer_pytorch.py ran · our draft was wrong fingerprinted MIT (permissive) ·
07e3c5417d5f77fc · report
fixture: signature x:Tensor/2/float · returned Tensor · level recorded 2026-09-22 census: 5 implementations from 5 papers, 5 distinct outputs across 4 buckets, one shared input per bucket this sample: bucket 1 of 4, arg 1: rank 4, kind float, dtype float32 timesformer_pytorch/timesformer_pytorch.py ran · our draft was wrong fingerprinted MIT (permissive) ·
f6e07e75149898e3 · report
fixture: signature t:Tensor/4/float, amt:int/0/int · returned Tensor · level recorded, date not recorded census: 13 implementations from 12 papers, 10 distinct outputs across 4 buckets, one shared input per bucket timesformer_pytorch/timesformer_pytorch.py unverified MIT (permissive) ·
f7e0694aefe90304 · report
1c93e555127bcf25 · report
409ab4896697a02f · report
fixture: returned Mlp · level recorded 2026-09-22 90617d5175fc43de · report
fixture: returned VarAttention · level recorded 2026-09-22 02e3cffeb7724448 · report
fixture: returned VideoPatchEmbed · level recorded 2026-09-22 2af0e5fbba35a2f7 · report
9ad394810b771a6b · report
7c6f43d2449917c6 · report
6ed6a97e76e9e405 · report
fixture: returned SpacetimeMHSA · level recorded 2026-09-22 b5fc28091e91cbe9 · report
fixture: returned TimeSformerBlock · level recorded 2026-09-22 d153fd18d2c78fd5 · report
fixture: signature x:Tensor/4/float, batch:int/0/int, space:bool/0/bool · returned Tensor · level recorded 2026-09-22 3b4883ee8560ec7c · report
fixture: signature v:Tensor/4/float, k:Tensor/4/float, E:Tensor/2/float · returned tuple · level recorded 2026-09-22 214635d3580c503e · report
fixture: signature x:Tensor/4/float, patches:int/0/int · returned Tensor · level recorded 2026-09-22 43ee896c0cb92a0e · report
fixture: signature x:Tensor/4/float · returned tuple · level recorded 2026-09-22 2349364a5be28b97 · report
fixture: signature x:Tensor/4/float, frames:int/0/int · returned Tensor · level recorded 2026-09-22 cc63279ce5b42414 · report
e29cd379b8279b38 · report
1 sample is identical to code Syntology harvested from another paper's repository; this paper's own copy was not located, so no repository is named and no licence is recorded.
census: 5 implementations from 103 papers, 1 distinct output on one shared input this sample: bucket 1 of 1, arg 1: rank 1, kind int, dtype int64 repository not located ran · violated contract licence of this copy not recorded ·
aa5486a3650902d8 · report
fixture: signature val:Tensor/1/int · returned bool · level recorded, date not recorded 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.
5 assemblies on this paper: 5 harvested, 0 generated, listed in 1 groups (siblings lifted in one batch form one group).
5 sibling assemblies for TimeSformer (harvested), lifted in the same batch on 2026-09-09: alternative readings kept side by side; none replaces or supersedes another.
harvested Assembly for TimeSformer (graph method: TimeSformer). 13 bricks; individually on a fixture: 11 ran (of which 3 constructed an object rather than computing a result; 7 with no instrument failure: 0 honoured, 1 violated, 6 with no contract checked; 4 where Syntology's instrument failed) · 2 unverified. The assembly has not been run end-to-end.
one of 5 siblings
- TimeSformer entry · level 0 · unverified ·
1c93e555127bcf25 - Attention model · level 0 · unverified ·
f7e0694aefe90304 - AxialRotaryEmbedding helper · level 1 · ran ·
2125f85e76f4efc7 - FeedForward model · level 1 · ran ·
0183b5f0d306482f - PreNorm helper · level 1 · ran ·
8bb9d8688ba435cf - PreTokenShift helper · level 1 · ran ·
42b61b5b4f622a76 - RotaryEmbedding helper · level 1 · ran ·
4e0216fcf6abef9d - exists helper · level 1 · ran · violated contract ·
aa5486a3650902d8 - apply_rot_emb helper · level 1 · ran; the contract check could not run (RAISES) ·
b47a2562da71bf81 - attn helper · level 1 · ran · our draft was wrong ·
5d2b139fbe3e2fe5 - GEGLU helper · level 1 · ran ·
384419959d31762c - shift helper · level 1 · ran · our draft was wrong ·
f6e07e75149898e3 - rotate_every_two helper · level 1 · ran · our draft was wrong ·
07e3c5417d5f77fc
harvested Assembly for TimeSformer (graph method: TimeSformer). 13 bricks; individually on a fixture: 12 ran (of which 7 constructed an object rather than computing a result; 7 with no instrument failure: 0 honoured, 0 violated, 7 with no contract checked; 5 where Syntology's instrument failed) · 1 unverified. The assembly has not been run end-to-end.
one of 5 siblings
- SpaceTimeTransformer entry · level 0 · unverified ·
9323660c90d8a3a4 - Decoder model · level 1 · ran ·
3c436600aed6654a - DecoderLayer model · level 1 · ran ·
1879ef86738392c0 - Encoder model · level 1 · ran ·
070741108b175c8f - EncoderLayer model · level 1 · ran ·
38ab040cbcf984b8 - fold_tensor data_transform · level 1 · ran; the contract check could not run (RAISES) ·
382b7426a720dd16 - input_embedding model · level 1 · ran ·
d1d6c81b2e101027 - unfold_StackOverChannel data_transform · level 1 · ran; the contract check could not run (RAISES) ·
5eee191e9a7fe18e - MultiHeadedAttention model · level 1 · ran ·
bb5aa1cbee56c9d7 - SpaceAttention model · level 1 · ran; the contract check could not run (RAISES) ·
cf33bd73aa85bae0 - SublayerConnection model · level 1 · ran ·
2c2573860f1078bc - TimeAttention model · level 1 · ran; the contract check could not run (RAISES) ·
0f190b82b567601a - clones helper · level 1 · ran · our draft was wrong ·
d2d810cddae9f875
harvested Assembly for TimeSformer (graph method: TimeSformer). 10 bricks; individually on a fixture: 8 ran (of which 2 constructed an object rather than computing a result; 2 with no instrument failure: 0 honoured, 0 violated, 2 with no contract checked; 6 where Syntology's instrument failed) · 2 unverified. The assembly has not been run end-to-end.
one of 5 siblings
- Timesformer entry · level 0 · unverified ·
cc63279ce5b42414 - TimeSformerBlock model · level 1 · ran ·
b5fc28091e91cbe9 - expand_to_batch helper · level 1 · ran; the contract check could not run ·
4429c4f5d33938e5 - SpacetimeMHSA model · level 1 · ran ·
6ed6a97e76e9e405 - compute_mhsa helper · level 0 · unverified ·
e29cd379b8279b38 - merge_timespace helper · level 1 · ran; the contract check could not run (RAISES) ·
d153fd18d2c78fd5 - project_vk_linformer helper · level 1 · ran · our draft was wrong ·
3b4883ee8560ec7c - space_att_rearrange helper · level 1 · ran; the contract check could not run (RAISES) ·
214635d3580c503e - split_cls helper · level 1 · ran; the contract check could not run (RAISES) ·
43ee896c0cb92a0e - time_att_rearrange helper · level 1 · ran; the contract check could not run (RAISES) ·
2349364a5be28b97
harvested Assembly for TimeSformer (graph method: TimeSformer). 6 bricks; individually on a fixture: 6 ran (of which 4 constructed an object rather than computing a result; 5 with no instrument failure: 0 honoured, 0 violated, 5 with no contract checked; 1 where Syntology's instrument failed) · 0 unverified. The assembly has not been run end-to-end.
one of 5 siblings
- TimeSformer entry · level 1 · ran ·
1e12db9a2b6a6d61 - Attention model · level 1 · ran ·
9e6eb12055d4b5db - FeedForward helper · level 1 · ran ·
0183b5f0d306482f - PreNorm helper · level 1 · ran ·
8bb9d8688ba435cf - attn helper · level 1 · ran · our draft was wrong ·
c9b2023a8e7f543b - GEGLU helper · level 1 · ran ·
384419959d31762c
harvested Assembly for TimeSformer (graph method: TimeSformer). 6 bricks; individually on a fixture: 4 ran (of which 3 constructed an object rather than computing a result; 3 with no instrument failure: 0 honoured, 0 violated, 3 with no contract checked; 1 where Syntology's instrument failed) · 2 unverified. The assembly has not been run end-to-end.
one of 5 siblings
- Timesformer entry · level 0 · unverified ·
9ad394810b771a6b - SpaceTimeBlock model · level 0 · unverified ·
2af0e5fbba35a2f7 - VideoPatchEmbed model · level 1 · ran ·
02e3cffeb7724448 - Mlp model · level 1 · ran ·
409ab4896697a02f - VarAttention model · level 1 · ran ·
90617d5175fc43de - attn helper · level 1 · ran · our draft was wrong ·
c9b2023a8e7f543b
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="2102.05095") returns these assemblies with each brick's role and wiring (how to connect).
Tasks
Results from the paper archive 2025-07-28
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
Introduced by this paper: TimeSformer
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