SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2204.02968 · CVPR · 2022

Temporal Alignment Networks for Long-term Video

Andrew Zisserman, Tengda Han, Weidi Xie

arXiv · PDF · Open in the Atlas

Code that ran

7 of 13 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (6 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 0 failures of our instrument; 6 no recorded run), measured 2026-11-24; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2204.02968.json · badge: /api/ran/2204.02968.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
tengdahan/temporalalignnet community
Papers with Code archive
7 ran · 6 no recorded run
FunctionStatusWhere it lives
InceptionBlock Ran
ran on a synthesized input · constructed an object; no result was computed
tengdahan/temporalalignnet/model/tan_model.py
code served (permissive licence) · get_code("0df2b78f603a930b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, InceptionBlock: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "input_dim": 3,
    "num_outputs_0_0a": 4,
    "num_outputs_1_0a": 4,
    "num_outputs_1_0b": 4,
    "num_outputs_2_0a": 4,
    "num_outputs_2_0b": 4,
    "num_outputs_3_0b": 4,
    "gating": True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type InceptionBlock — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a InceptionBlock output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
MaxPool3dTFPadding Ran
ran on a synthesized input · constructed an object; no result was computed
tengdahan/temporalalignnet/model/tan_model.py
code served (permissive licence) · get_code("8506495852b4f8b4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, MaxPool3dTFPadding: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch as th

th.manual_seed(0)

# The function expects:
# - kernel_size: tuple of 3 ints (for 3D pooling)
# - stride: tuple of 3 ints or None (defaults to kernel_size if None)
# - padding: str, either 'SAME' or other value

ARGS = {
    'kernel_size': (3, 3, 3),
    'stride': (2, 2, 2),
    'padding': 'SAME'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MaxPool3dTFPadding — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MaxPool3dTFPadding output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ResidualAttentionBlock_Step Ran
ran on a synthesized input · constructed an object; no result was computed
tengdahan/temporalalignnet/model/tan_model.py
code served (permissive licence) · get_code("a2c95b29cc4457e1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, ResidualAttentionBlock_Step: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn
from torch.nn import LayerNorm
from collections import OrderedDict

torch.manual_seed(0)

class QuickGELU(nn.Module):
    def forward(self, x: torch.Tensor):
        return x * torch.sigmoid(1.702 * x)

class ResidualAttentionBlock_Step(nn.Module):
    def __init__(self, d_model: int, n_head: int):
        super().__init__()
        self.attn = nn.MultiheadAttention(d_model, n_head)
        self.ln_1 = LayerNorm(d_model)
        self.mlp = nn.Sequential(OrderedDict([('c_fc', nn.Linear(d_model, d_model * 4)), ('gelu', QuickGELU()), ('c_proj', nn.Linear(d_model * 4, d_model))]))
        self.ln_2 = LayerNorm(d_model)

    def attention(self, x: torch.Tensor, key_padding_mask: torch.Tensor=None):
        key_padding_mask = key_padding_mask.to(device=x.device) if key_padding_mask is not None else None
        return self.attn(x, x, x, need_weights=False, key_padding_mask=key_padding_mask)[0]

    def forward(self, x: torch.Tensor, key_padding_mask: torch.Tensor=None):
        x_norm = self.ln_1(x)
        x = x + self.attention(x_norm, key_padding_mask)
        x = x + self.mlp(self.ln_2(x))
        return (x, x_norm)

d_model = 4
n_head = 2
batch_size = 2
seq_len = 3

block = ResidualAttentionBlock_Step(d_model=d_model, n_head=n_head)

x = torch.randn(seq_len, batch_size, d_model)
key_padding_mask = torch.tensor([[False, False, True], [False, True, True]], dtype=torch.bool)

ARGS = {
    'd_model': d_model,
    'n_head': n_head
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ResidualAttentionBlock_Step — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ResidualAttentionBlock_Step output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
STConv3D Ran
ran on a synthesized input · constructed an object; no result was computed
tengdahan/temporalalignnet/model/tan_model.py
code served (permissive licence) · get_code("305b2476d6ded39a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, STConv3D: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "input_dim": 3,
    "output_dim": 16,
    "kernel_size": [3, 3, 3],
    "stride": 1,
    "padding": 0,
    "separable": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type STConv3D — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a STConv3D output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
SelfGating Ran
ran on a synthesized input · constructed an object; no result was computed
tengdahan/temporalalignnet/model/tan_model.py
code served (permissive licence) · get_code("570b0eeb1de9556e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, SelfGating: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class SelfGating(nn.Module):
    def __init__(self, input_dim):
        super(SelfGating, self).__init__()
        self.fc = nn.Linear(input_dim, input_dim)

    def forward(self, input_tensor):
        """Feature gating as used in S3D-G."""
        spatiotemporal_average = torch.mean(input_tensor, dim=[2, 3, 4])
        weights = self.fc(spatiotemporal_average)
        weights = torch.sigmoid(weights)
        return weights[:, :, None, None, None] * input_tensor

input_dim = 4
model = SelfGating(input_dim)

input_tensor = torch.randn(2, 4, 3, 5, 6)

ARGS = {
    "input_dim": input_dim
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SelfGating — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SelfGating output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
TemporalEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
tengdahan/temporalalignnet/model/tan_model.py
code served (permissive licence) · get_code("ef0ab5fa8216c1c7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, TemporalEncoder: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn

torch.manual_seed(0)

ARGS = {
    'width': 4,
    'layers': 2,
    'heads': 2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type TemporalEncoder — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a TemporalEncoder output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_position_embedding_sine Ran
ran, honoured the contract we drafted
tengdahan/temporalalignnet/model/tan_model.py
code served (permissive licence) · get_code("86899fbb16005e41")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (1024, 512) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import math

torch.manual_seed(0)

ARGS = {
    "feature_dim": 512,
    "num_features": 1024,
    "temperature": 10000
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (1024, 512) — shape (1024, 512) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
S3D Not yet run
unverified (harvested, no recorded run)
tengdahan/temporalalignnet/model/tan_model.py
code served (permissive licence) · get_code("56dbdac6a6137e13")
How it ran

no invocation recorded.

Sentence_Embedding Not yet run
unverified (harvested, no recorded run)
tengdahan/temporalalignnet/model/tan_model.py
code served (permissive licence) · get_code("0933997ffa263669")
How it ran

no invocation recorded.

TemporalAligner Not yet run
unverified (harvested, no recorded run)
tengdahan/temporalalignnet/model/tan_model.py
code served (permissive licence) · get_code("87987b3797775fe6")
How it ran

no invocation recorded.

Word2VecModel Not yet run
unverified (harvested, no recorded run)
tengdahan/temporalalignnet/model/tan_model.py
code served (permissive licence) · get_code("9afb254f1519d81b")
How it ran

no invocation recorded.

get_word2vec_text_module Not yet run
unverified (harvested, no recorded run)
tengdahan/temporalalignnet/model/tan_model.py
code served (permissive licence) · get_code("8ada3a5d70324060")
How it ran

no invocation recorded.

load_milnce Not yet run
unverified (harvested, no recorded run)
tengdahan/temporalalignnet/model/tan_model.py
code served (permissive licence) · get_code("24e2a428251d5383")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 0 later) and 9 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
InceptionBlock
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2005.00200 (2020-05)
HERO: Hierarchical Encoder for Video+Language Omni-representation Pre-training
MaxPool3dTFPadding
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2005.00200 (2020-05)
HERO: Hierarchical Encoder for Video+Language Omni-representation Pre-training
STConv3D
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2005.00200 (2020-05)
HERO: Hierarchical Encoder for Video+Language Omni-representation Pre-training
SelfGating
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2005.00200 (2020-05)
HERO: Hierarchical Encoder for Video+Language Omni-representation Pre-training

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

The objective of this paper is a temporal alignment network that ingests long term video sequences, and associated text sentences, in order to: (1) determine if a sentence is alignable with the video; and (2) if it is alignable, then determine its alignment. The challenge is to train such networks from large-scale datasets, such as HowTo100M, where the associated text sentences have significant noise, and are only weakly aligned when relevant. Apart from proposing the alignment network, we also make four contributions: (i) we describe a novel cotraining method that enables to denoise and train on raw instructional videos without using manual annotation, despite the considerable noise; (ii) to benchmark the alignment performance, we manually curate a 10-hour subset of HowTo100M, totalling 80 videos, with sparse temporal descriptions. Our proposed model, trained on HowTo100M, outperforms strong baselines (CLIP, MIL-NCE) on this alignment dataset by a significant margin; (iii) we apply the trained model in the zero-shot settings to multiple downstream video understanding tasks and achieve state-of-the-art results, including text-video retrieval on YouCook2, and weakly supervised video action segmentation on Breakfast-Action. (iv) we use the automaticallyaligned HowTo100M annotations for end-to-end finetuning of the backbone model, and obtain improved performance on downstream action recognition tasks.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2204.02968")
get_code_for_paper("2204.02968")
have("2204.02968")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2204.02968.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2204.02968.svg)](https://syntology.ai/paper/2204.02968)

Connect an agent — have() is free.