Papers › Video-FocalNets: Spatio-Temporal Focal Modulation for Video Action Recognition

Video-FocalNets: Spatio-Temporal Focal Modulation for Video Action Recognition

13 Jul 2023ICCV 2023 1arXiv:2307.06947archive 2025-07-28

Syed Talal Wasim, Muhammad Uzair Khattak, Muzammal Naseer, Salman Khan, Mubarak Shah, Fahad Shahbaz Khan

Recent video recognition models utilize Transformer models for long-range spatio-temporal context modeling. Video transformer designs are based on self-attention that can model global context at a high computational cost. In comparison, convolutional designs for videos offer an efficient alternative but lack long-range dependency modeling. Towards achieving the best of both designs, this work proposes Video-FocalNet, an effective and efficient architecture for video recognition that models both local and global contexts. Video-FocalNet is based on a spatio-temporal focal modulation architecture that reverses the interaction and aggregation steps of self-attention for better efficiency. Further, the aggregation step and the interaction step are both implemented using efficient convolution and element-wise multiplication operations that are computationally less expensive than their self-attention counterparts on video representations. We extensively explore the design space of focal modulation-based spatio-temporal context modeling and demonstrate our parallel spatial and temporal encoding design to be the optimal choice. Video-FocalNets perform favorably well against the state-of-the-art transformer-based models for video recognition on five large-scale datasets (Kinetics-400, Kinetics-600, SS-v2, Diving-48, and ActivityNet-1.3) at a lower computational cost. Our code/models are released at https://github.com/TalalWasim/Video-FocalNets.

PaperPDFConference PDFCodeCode 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 32 code samples harvested from 3 repositories linked to this paper: 23 ran (of which 7 constructed an object rather than computing a result; 16 with no instrument failure: 1 honoured, 1 violated, 14 with no contract checked; 7 where Syntology's instrument failed) · 9 unverified. Where Syntology's instrument failed: 7 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: official repository: 21 samples from 1 repository, 17 ran (10 with no instrument failure; 7 where Syntology's instrument failed); community (archive-listed): 11 samples from 2 repositories, 6 ran (6 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-25 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

talalwasim/video-focalnets officialmentioned in papermentioned on GitHubpytorchSyntology: 21 samples, 17 ran (7 instrument-failed) · 4 unverified report
hayatkhan8660-maker/DVFL-Net mentioned on GitHubpytorchMITSyntology: 4 samples, 2 ran (0 instrument-failed) · 2 unverified report
innat/Video-FocalNets mentioned on GitHubtfSyntology: 7 samples, 4 ran (0 instrument-failed) · 3 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

32 samples harvested: 23 ran (of which 7 constructed an object rather than computing a result; 16 with no instrument failure: 1 honoured, 1 violated, 14 with no contract checked; 7 where Syntology's instrument failed) · 9 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · honoured contract
1ran · violated contract
7ran · our draft was wrong
14ran
9unverified

Licence: 21 of the 32 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 2 samples that ran, the graph records a signature this page does not show, each row saying why in its tooltip: for 1, an argument's recorded type or element kind is a printout of an object in Syntology's harness (such as a mock object, a class or a pandas printout), not the type of an input, so it does not describe the call's shape; for 1, 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.

talalwasim/video-focalnets official repository 21 samples, 17 ran (7 instrument-failed) · 4 unverified
PatchEmbed in 123 papers
census: 9 implementations from 9 papers, 6 distinct outputs on one shared input
classification/videofocalnet.py ran fingerprinted no licence file found · pointer only · e83dd8c65a734673 · report fixture: returned PatchEmbed · level recorded 2026-09-22
SpatioTemporalFocalModulation classification/videofocalnet.py ran no licence file found · pointer only · 304fe25c547d2f00 · report fixture: returned SpatioTemporalFocalModulation · level recorded 2026-09-22
VideoFocalNet classification/videofocalnet.py ran no licence file found · pointer only · 0b5ff5992ed0ad74 · report fixture: returned VideoFocalNet · level recorded 2026-09-22
auto_resume_helper in 27 papers utils.py ran · our draft was wrong no licence file found · pointer only · 0c32459bef92ff8c · report fixture: signature output_dir:str/0/str · returned str · level recorded 2026-09-25
build_optimizer in 83 papers optimizer.py ran no licence file found · pointer only · e35a4b2e4114b1a5 · report fixture: signature config:Config/0/?, model:callable/0/? · returned AdamW · level recorded 2026-09-24
build_scheduler in 56 papers lr_scheduler.py ran · our draft was wrong no licence file found · pointer only · 07e8b4b487c0abb6 · report fixture: signature config:SimpleNamespace/0/?, optimizer:SGD/0/?, n_iter_per_epoch:int/0/int · returned LinearLRScheduler · level recorded 2026-09-25
build_transforms in 10 papers classification/videofocalnet.py ran no licence file found · pointer only · 652ca38bafaf4f7d · report fixture: signature img_size:int/0/int, center_crop:bool/0/bool · returned Compose · level recorded 2026-09-24
build_transforms4display classification/videofocalnet.py ran no licence file found · pointer only · 4a1a30b09528ee69 · report fixture: signature img_size:int/0/int, center_crop:bool/0/bool · returned Compose · level recorded 2026-09-24
check_keywords_in_name in 32 papers optimizer.py ran · violated contract no licence file found · pointer only · b0a5beb34716d5a6 · report fixture: signature name:str/0/str, keywords:tuple/1/str · returned bool · level recorded 2026-09-25
create_logger in 172 papers logger.py ran · our draft was wrong no licence file found · pointer only · 80450600f7f09b0a · report fixture: signature output_dir:str/0/str, dist_rank:int/0/int, name:str/0/str · returned Logger · level recorded 2026-09-25
get_grad_norm in 45 papers utils.py ran · honoured contract no licence file found · pointer only · eec1e7cba51d5e8e · report fixture: signature parameters:list/1/Tensor, norm_type:int/0/int · returned float · level recorded 2026-09-22
load_checkpoint in 277 papers utils.py ran no licence file found · pointer only · f8587b4b569b31e3 · report fixture: returned float · level recorded 2026-09-24
one_hot in 150 papers
census: 18 implementations from 25 papers, 10 distinct outputs across 6 buckets, one shared input per bucket this sample: bucket 1 of 6, arg 1: rank 1, kind int, dtype int64
datasets/blending.py ran · our draft was wrong no licence file found · pointer only · 4728dc2025227bba · report fixture: signature x:Tensor/1/int, num_classes:int/0/int, on_value:float/0/float, off_value:float/0/float, device:str/0/str · returned Tensor · level recorded 2026-09-22
set_weight_decay in 32 papers optimizer.py ran no licence file found · pointer only · b33222a09fc93bec · report fixture: signature model:callable/0/?, skip_list:tuple/1/empty, skip_keywords:tuple/1/empty · returned list · level recorded 2026-09-24
shear_x in 43 papers datasets/rand_augment.py ran · our draft was wrong no licence file found · pointer only · e866e1196986f728 · report fixture: signature img:Image/0/?, factor:float/0/float, resample:int/0/int, fillcolor:tuple/1/int · returned Image · level recorded 2026-09-24
shear_y in 37 papers datasets/rand_augment.py ran · our draft was wrong no licence file found · pointer only · 7b2503c99c9447fb · report fixture: signature img:Image/0/?, factor:float/0/float, resample:int/0/int, fillcolor:tuple/1/int · returned Image · level recorded 2026-09-24
translate_x_rel in 27 papers datasets/rand_augment.py ran · our draft was wrong no licence file found · pointer only · 323759f906fbb394 · report fixture: signature img:Image/0/?, pct:float/0/float, resample:int/0/int, fillcolor:tuple/1/int · returned Image · level recorded 2026-09-24
BasicLayer in 56 papers classification/videofocalnet.py unverified no licence file found · pointer only · 5da5482bcfc017c2 · report
VideoFocalNetBlock classification/videofocalnet.py unverified no licence file found · pointer only · 719831d1fc53a0b9 · report
build_model in 469 papers classification/build.py unverified no licence file found · pointer only · bdac4358ea39d416 · report
get_config in 203 papers config.py unverified no licence file found · pointer only · eb702a1f77e3c7bd · report
hayatkhan8660-maker/DVFL-Net community (archive-listed) 4 samples, 2 ran (0 instrument-failed) · 2 unverified
build_teacher_model classification/build.py ran MIT (permissive) · d38f3624367ac8a0 · report fixture: signature config:SimpleNamespace/0/? · returned ResNet · level recorded 2026-09-24
loss_fn_kd in 9 papers classification/criterion.py ran MIT (permissive) · 40e37850e70297c2 · report fixture: signature student_outputs:Tensor/2/float, labels:Tensor/1/int, teacher_outputs:Tensor/2/float, kd_params:KDParams/0/?, criterion:callable/0/? · returned tuple · level recorded 2026-09-24
find_package_location get_local_rank.py unverified MIT (permissive) · 028190203e877ad1 · report
get_config in 203 papers config.py unverified MIT (permissive) · 0493984d01a4e886 · report
innat/Video-FocalNets community (archive-listed) 7 samples, 4 ran (0 instrument-failed) · 3 unverified
TFDropPath videofocalnet/model.py ran · metamorphic tier: deterministic MIT (permissive) · a58723c1a5bda855 · report fixture: returned TFDropPath · level recorded 2026-09-22
TFMlp videofocalnet/model.py ran MIT (permissive) · bef3ab0dcd7067cf · report fixture: returned TFMlp · level recorded 2026-09-22
TFPatchEmbed videofocalnet/model.py ran MIT (permissive) · 44a2e84640d35e69 · report fixture: returned TFPatchEmbed · level recorded 2026-09-22
TFSpatioTemporalFocalModulation videofocalnet/model.py ran MIT (permissive) · bcd922fa8a50f633 · report fixture: returned TFSpatioTemporalFocalModulation · level recorded 2026-09-22
TFBasicLayer videofocalnet/model.py unverified MIT (permissive) · 456892b8f3ad701f · report
TFVideoFocalNet videofocalnet/model.py unverified MIT (permissive) · 80d19d9d058074c1 · report
TFVideoFocalNetBlock videofocalnet/model.py unverified MIT (permissive) · 7359d74430b2ebd3 · 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 Video-FocalNet (harvested), lifted in the same batch on 2026-09-09: alternative readings kept side by side; none replaces or supersedes another.

harvested Assembly for Video-FocalNet (graph method: Video-FocalNet). 7 bricks; individually on a fixture: 4 ran (of which 4 constructed an object rather than computing a result; 4 with no instrument failure: 0 honoured, 0 violated, 4 with no contract checked; 0 where Syntology's instrument failed) · 3 unverified; every one of the 4 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. TFVideoFocalNet entry · level 0 · unverified · 80d19d9d058074c1
  2. TFBasicLayer model · level 0 · unverified · 456892b8f3ad701f
  3. TFPatchEmbed helper · level 1 · ran · 44a2e84640d35e69
  4. TFVideoFocalNetBlock model · level 0 · unverified · 7359d74430b2ebd3
  5. TFDropPath helper · level 1 · ran · a58723c1a5bda855
  6. TFMlp helper · level 1 · ran · bef3ab0dcd7067cf
  7. TFSpatioTemporalFocalModulation model · level 1 · ran · bcd922fa8a50f633

harvested Assembly for Video-FocalNet (graph method: Video-FocalNet). 6 bricks; individually on a fixture: 4 ran (of which 4 constructed an object rather than computing a result; 4 with no instrument failure: 0 honoured, 0 violated, 4 with no contract checked; 0 where Syntology's instrument failed) · 2 unverified; every one of the 4 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. VideoFocalNet entry · level 1 · ran · 0b5ff5992ed0ad74
  2. BasicLayer model · level 0 · unverified · 5da5482bcfc017c2
  3. PatchEmbed model · level 1 · ran · e83dd8c65a734673
  4. VideoFocalNetBlock model · level 0 · unverified · 719831d1fc53a0b9
  5. Mlp model · level 1 · ran · a1715055832f71fd
  6. SpatioTemporalFocalModulation model · level 1 · ran · 304fe25c547d2f00

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="2307.06947") returns these assemblies with each brick's role and wiring (how to connect).

Tasks

Action RecognitionTemporal Action LocalizationVideo Recognition

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Action Recognition Diving-48 Video-FocalNet-B Accuracy 90.8 #2 of 18 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

Absolute Position EncodingsAdamAttentionBPEConvolutionDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

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