SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1904.07846 · 2019

Temporal Cycle-Consistency Learning

arXiv · PDF · Open in the Atlas

Code that ran

8 of 12 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 8 have no contract verdict; 0 failures of our instrument; 4 no recorded run), measured 2026-11-23; 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/1904.07846.json · badge: /api/ran/1904.07846.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
June01/tcc_Temporal_Cycle_Consistency_Loss.pytorch community (classifier label)
classifier basis not recorded on the link
8 ran · 4 no recorded run
FunctionStatusWhere it lives
align_pair_of_sequences Ran
ran on a synthesized input
June01/tcc_Temporal_Cycle_Consistency_Loss.pytorch/tcc_tf/deterministic_alignment.py
code served (permissive licence) · get_code("5127fa553d835be2")
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 tuple, ndim 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 tensorflow.compat.v2 as tf
import numpy as np

tf.enable_v2_behavior()

# Create small embedding tensors
# embs1: [M, D] - 2 embeddings of dimension 4
embs1 = tf.constant(np.random.randn(2, 4).astype(np.float32))

# embs2: [N, D] - 3 embeddings of dimension 4
embs2 = tf.constant(np.random.randn(3, 4).astype(np.float32))

# similarity_type: string, either 'l2' or 'cosine'
similarity_type = 'cosine'

# temperature: float, scaling factor
temperature = 1.0

ARGS = {
    'embs1': embs1,
    'embs2': embs2,
    'similarity_type': similarity_type,
    'temperature': temperature,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, dtype family float — a tuple output has no array shape of its own; none is stated
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
classification_loss Ran
ran on a synthesized input
June01/tcc_Temporal_Cycle_Consistency_Loss.pytorch/tcc/losses.py
code served (permissive licence) · get_code("0a5209e8963a11c5")
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 0, dtype family float, shape () 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
from torch.autograd import Variable
import torch.nn.functional as F

torch.manual_seed(0)

# Create logits: [batch_size=2, num_classes=4]
# These are pre-softmax similarity scores
logits = torch.randn(2, 4)

# Create one-hot labels: [batch_size=2, num_classes=4]
# Each row should sum to 1.0, with 1 at the correct class index
labels = torch.zeros(2, 4)
labels[0, 0] = 1.0  # First sample: correct class is 0
labels[1, 2] = 1.0  # Second sample: correct class is 2

# Label smoothing factor
label_smoothing = 0.1

ARGS = {
    "logits": logits,
    "labels": labels,
    "label_smoothing": label_smoothing,
}
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 0, dtype family float, shape () — shape () 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
classification_loss Ran
ran on a synthesized input
June01/tcc_Temporal_Cycle_Consistency_Loss.pytorch/tcc_tf/losses.py
code served (permissive licence) · get_code("68a52026fa7e6e22")
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 EagerTensor, ndim 0, dtype family float, shape () 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 tensorflow.compat.v2 as tf
import numpy as np

# Set seed for reproducibility
tf.random.set_seed(0)

# Create small test tensors
batch_size = 2
num_classes = 4

# logits: Pre-softmax scores, shape [batch_size, num_classes]
logits = tf.constant([
    [1.0, 2.0, 0.5, -1.0],
    [0.2, -0.5, 1.5, 0.8]
], dtype=tf.float32)

# labels: One-hot encoded labels, shape [batch_size, num_classes]
# The index where cycle started should be 1
labels = tf.constant([
    [1.0, 0.0, 0.0, 0.0],
    [0.0, 1.0, 0.0, 0.0]
], dtype=tf.float32)

# label_smoothing: Float value between 0 and 1
label_smoothing = 0.1

ARGS = {
    "logits": logits,
    "labels": labels,
    "label_smoothing": label_smoothing
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 0, dtype family float, shape () — shape () 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
compute_alignment_loss Ran
ran on a synthesized input
June01/tcc_Temporal_Cycle_Consistency_Loss.pytorch/tcc/alignment.py
code served (permissive licence) · get_code("2547aeea91c92b15")
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 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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.functional as F

torch.manual_seed(0)

# Define ARGS with all parameters for compute_alignment_loss
ARGS = {
    'embs': torch.randn(2, 5, 4),  # batch_size=2, num_steps=5, embedding_dim=4
    'batch_size': 2,
    'steps': torch.arange(0, 5).unsqueeze(0).repeat([2, 1]),  # shape: [2, 5]
    'seq_lens': torch.tensor([5, 5]).int(),  # shape: [2]
    'stochastic_matching': True,
    'normalize_embeddings': False,
    'loss_type': 'classification',
    'similarity_type': 'l2',
    'num_cycles': 20,
    'cycle_length': 2,
    'temperature': 0.1,
    'label_smoothing': 0.1,
    'variance_lambda': 0.001,
    'huber_delta': 0.1,
    'normalize_indices': True,
}

# Mock the compute_stochastic_alignment_loss function since it's called but not defined
def compute_stochastic_alignment_loss(embs, steps, seq_lens, num_steps, batch_size, loss_type, similarity_type, num_cycles, cycle_length, temperature, label_smoothing, variance_lambda, huber_delta, normalize_indices):
    return torch.tensor(0.5)

# Inject the mock into the module namespace
import sys
current_module = sys.modules[__name__]
setattr(current_module, 'compute_stochastic_alignment_loss', compute_stochastic_alignment_loss)
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 0, dtype family float — no output shape is stated: observe_signature.py could not observe it (fixture:KeyError)
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
gen_cycles Ran
ran on a synthesized input
June01/tcc_Temporal_Cycle_Consistency_Loss.pytorch/tcc/stochastic_alignment.py
code served (permissive licence) · get_code("ad5776a95f99148c")
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 int, shape (2, 4) 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

torch.manual_seed(0)

ARGS = {
    "num_cycles": 2,
    "batch_size": 5,
    "cycle_length": 3,
}
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 int, shape (2, 4) — shape (2, 4) 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
gen_cycles Ran
ran on a synthesized input
June01/tcc_Temporal_Cycle_Consistency_Loss.pytorch/tcc_tf/stochastic_alignment.py
code served (permissive licence) · get_code("b32a521162e1bbf8")
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 EagerTensor, ndim 2, dtype family int, shape (2, 4) 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 tensorflow.compat.v2 as tf

# Enable eager execution for TensorFlow 2
tf.enable_v2_behavior()

# Define the arguments for gen_cycles
ARGS = {
    "num_cycles": 2,
    "batch_size": 5,
    "cycle_length": 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family int, shape (2, 4) — shape (2, 4) 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
get_scaled_similarity Ran
ran on a synthesized input
June01/tcc_Temporal_Cycle_Consistency_Loss.pytorch/tcc_tf/deterministic_alignment.py
code served (permissive licence) · get_code("41fcd5039429f2a9")
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 EagerTensor, ndim 2, dtype family float, shape (2, 3) 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 tensorflow.compat.v2 as tf
import numpy as np

tf.enable_v2_behavior()

# Create small embeddings tensors
# embs1: [M, D] where M=2, D=4
embs1 = tf.constant(np.random.randn(2, 4).astype(np.float32))

# embs2: [N, D] where N=3, D=4
embs2 = tf.constant(np.random.randn(3, 4).astype(np.float32))

# similarity_type: string, either 'l2' or 'cosine'
similarity_type = 'cosine'

# temperature: float
temperature = 1.0

ARGS = {
    'embs1': embs1,
    'embs2': embs2,
    'similarity_type': similarity_type,
    'temperature': temperature,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) 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
pairwise_l2_distance Ran
ran on a synthesized input
June01/tcc_Temporal_Cycle_Consistency_Loss.pytorch/tcc_tf/deterministic_alignment.py
code served (permissive licence) · get_code("96de8b4bd40530e4")
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 EagerTensor, ndim 2, dtype family float, shape (2, 3) 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 tensorflow.compat.v2 as tf

# Enable eager execution if needed
tf.enable_v2_behavior()

# Create small embedding tensors
# embs1: shape (2, 4) - 2 embeddings of dimension 4
embs1 = tf.constant([[1.0, 2.0, 3.0, 4.0],
                     [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)

# embs2: shape (3, 4) - 3 embeddings of dimension 4
embs2 = tf.constant([[0.5, 1.5, 2.5, 3.5],
                     [4.5, 5.5, 6.5, 7.5],
                     [9.0, 10.0, 11.0, 12.0]], dtype=tf.float32)

ARGS = {
    "embs1": embs1,
    "embs2": embs2,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family float, shape (2, 3) — shape (2, 3) 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
compute_alignment_loss Not yet run
unverified (harvested, no recorded run)
June01/tcc_Temporal_Cycle_Consistency_Loss.pytorch/tcc_tf/alignment.py
code served (permissive licence) · get_code("38131ba8792a89b6")
How it ran

no invocation recorded.

compute_stochastic_alignment_loss Not yet run
unverified (harvested, no recorded run)
June01/tcc_Temporal_Cycle_Consistency_Loss.pytorch/tcc/stochastic_alignment.py
code served (permissive licence) · get_code("a4b6bd1242719579")
How it ran

no invocation recorded.

compute_stochastic_alignment_loss Not yet run
unverified (harvested, no recorded run)
June01/tcc_Temporal_Cycle_Consistency_Loss.pytorch/tcc_tf/stochastic_alignment.py
code served (permissive licence) · get_code("9b1a3975eefce494")
How it ran

no invocation recorded.

regression_loss Not yet run
unverified (harvested, no recorded run)
June01/tcc_Temporal_Cycle_Consistency_Loss.pytorch/tcc_tf/losses.py
code served (permissive licence) · get_code("09a66ff19c97935d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 12 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.

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-23.

Repositories linked to this paper

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

Abstract

We introduce a self-supervised representation learning method based on the task of temporal alignment between videos. The method trains a network using temporal cycle consistency (TCC), a differentiable cycle-consistency loss that can be used to find correspondences across time in multiple videos. The resulting per-frame embeddings can be used to align videos by simply matching frames using the nearest-neighbors in the learned embedding space. To evaluate the power of the embeddings, we densely label the Pouring and Penn Action video datasets for action phases. We show that (i) the learned embeddings enable few-shot classification of these action phases, significantly reducing the supervised training requirements; and (ii) TCC is complementary to other methods of self-supervised learning in videos, such as Shuffle and Learn and Time-Contrastive Networks. The embeddings are also used for a number of applications based on alignment (dense temporal correspondence) between video pairs, including transfer of metadata of synchronized modalities between videos (sounds, temporal semantic labels), synchronized playback of multiple videos, and anomaly detection. Project webpage: https://sites.google.com/view/temporal-cycle-consistency .

For agents

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

get_harvested_code_for_paper("1904.07846")
get_code_for_paper("1904.07846")
have("1904.07846")

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

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

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

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

Connect an agent — have() is free.