SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2104.00650 · ICCV · 2021

Frozen in Time: A Joint Video and Image Encoder for End-to-End Retrieval

Andrew Zisserman, Arsha Nagrani, Gül Varol, Max Bain

arXiv · PDF · Open in the Atlas

Code that ran

10 of 11 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 4 have no contract verdict; 6 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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/2104.00650.json · badge: /api/ran/2104.00650.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
m-bain/frozen-in-time canonical (classifier label)
classifier basis: census
10 ran · 1 no recorded run
FunctionStatusWhere it lives
attn Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
m-bain/frozen-in-time/model/video_transformer.py
pointer only (licence: MIT); the stored copy get_code serves, from unitaryai/VTC, is pointer only (licence: NONE) · get_code("544c604bc4f58d28")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from unitaryai/VTC, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

compute_similarity Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
m-bain/frozen-in-time/model/model.py
code served (permissive licence) · get_code("682226b68a0f1905")
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. 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)

# Create small tensors for a and b with distinct dimensions
# a: batch_size=2, embedding_dim=4
a = torch.randn(2, 4)

# b: batch_size=3, embedding_dim=4 (different batch size for distinction)
b = torch.randn(3, 4)

# a_mask and b_mask are optional, set to None
a_mask = None
b_mask = None

# style parameter - using 'single' as that's the implemented case
style = 'single'

# eps for numerical stability
eps = 1e-08

# return_raw parameter
return_raw = False

# temp parameter
temp = 0.5

ARGS = {
    'a': a,
    'b': b,
    'a_mask': a_mask,
    'b_mask': b_mask,
    'style': style,
    'eps': eps,
    'return_raw': return_raw,
    'temp': temp,
}
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 tuple — a tuple output has no array shape of its own; none is 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
cosine_sim Ran
ran; our contract draft was wrong, not the code
m-bain/frozen-in-time/model/loss.py
pointer only (licence: MIT); the stored copy get_code serves, from kadarakos/mulisera, is pointer only (licence: NONE) · get_code("9b0a787b92a87023")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from kadarakos/mulisera, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

nll_loss Ran
ran on a synthesized input
m-bain/frozen-in-time/model/loss.py
code served (permissive licence) · get_code("8c2db3d4435816c0")
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
import torch.nn.functional as F

torch.manual_seed(0)

# NLL loss expects log probabilities as output and target class indices
# output should be of shape (batch_size, num_classes) with log probabilities
# target should be of shape (batch_size,) with class indices

batch_size = 2
num_classes = 4

output = F.log_softmax(torch.randn(batch_size, num_classes), dim=1)
target = torch.randint(0, num_classes, (batch_size,))

ARGS = {
    "output": output,
    "target": target,
}
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
order_sim Ran
ran on a synthesized input
m-bain/frozen-in-time/model/loss.py
code served (permissive licence) · get_code("da16023b8239c604")
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 (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 torch

torch.manual_seed(0)

# Based on the function body, it expects:
# - im: a tensor that will be unsqueezed at dimension 0, so needs shape (num_images, embedding_dim)
# - s: a tensor that will be unsqueezed at dimension 1, so needs shape (num_sentences, embedding_dim)
# Both tensors are used in broadcasting and arithmetic operations

# Create small tensors with distinct dimensions
# im: (2, 4) - 2 images, 4-dim embeddings
# s: (3, 4) - 3 sentences, 4-dim embeddings
im = torch.randn(2, 4)
s = torch.randn(3, 4)

ARGS = {
    "im": im,
    "s": s,
}
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 (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
read_frames_cv2 Ran
ran on a synthesized input
m-bain/frozen-in-time/base/base_dataset.py
code served (permissive licence) · get_code("ba8f16f08094547c")
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. 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 numpy as np
import cv2
import tempfile
import os

# Create a minimal test video file
def create_test_video(filepath, num_frames=10, width=64, height=48):
    """Create a simple test video file"""
    fourcc = cv2.VideoWriter_fourcc(*'mp4v')
    out = cv2.VideoWriter(filepath, fourcc, 30.0, (width, height))
    
    for i in range(num_frames):
        # Create a simple frame with changing color
        frame = np.zeros((height, width, 3), dtype=np.uint8)
        frame[:, :, 0] = (i * 25) % 256  # Blue channel changes
        frame[:, :, 1] = (i * 15) % 256  # Green channel changes
        frame[:, :, 2] = (i * 10) % 256  # Red channel changes
        out.write(frame)
    
    out.release()

# Create temporary video file
temp_dir = tempfile.gettempdir()
video_path = os.path.join(temp_dir, "test_video.mp4")
create_test_video(video_path, num_frames=10, width=64, height=48)

ARGS = {
    'video_path': video_path,
    'num_frames': 3,
    'sample': 'uniform',
    'fix_start': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
retrieval_as_classification Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
m-bain/frozen-in-time/model/metric.py
code served (permissive licence) · get_code("63ecff4c1a42090b")
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 dict. 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 numpy as np
import scipy.stats

# Create small similarity matrix: shape (num_labels, num_queries)
# After transpose in function, it becomes (num_queries, num_labels)
num_queries = 3
num_labels = 4

# sims will be transposed to (num_queries, num_labels)
# So we create it as (num_labels, num_queries)
sims = np.array([
    [0.9, 0.7, 0.5],  # label 0 similarities
    [0.6, 0.8, 0.4],  # label 1 similarities
    [0.3, 0.5, 0.9],  # label 2 similarities
    [0.2, 0.4, 0.6],  # label 3 similarities
], dtype=np.float32)

# query_masks indicates which labels are relevant for each query
# Shape matches sims: (num_labels, num_queries)
# Will be transposed to (num_queries, num_labels)
query_masks = np.array([
    [1, 0, 0],  # label 0 is relevant for query 0
    [1, 1, 0],  # label 1 is relevant for queries 0, 1
    [0, 1, 1],  # label 2 is relevant for queries 1, 2
    [0, 0, 1],  # label 3 is relevant for query 2
], dtype=np.float32)

ARGS = {
    'sims': sims,
    'query_masks': query_masks,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
ipdb, matplotlib, numpy, scipy, zsvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
sample_frames Ran
ran on a synthesized input
m-bain/frozen-in-time/base/base_dataset.py
code served (permissive licence) · get_code("4dadb89db8c00cc2")
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 list, ndim 1, dtype family int; 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 random
import numpy as np

# Set seed for reproducibility
random.seed(42)
np.random.seed(42)

# Define ARGS dictionary with all parameters for sample_frames
ARGS = {
    'num_frames': 8,
    'vlen': 100,
    'sample': 'rand',
    'fix_start': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family int — a list 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
sim_matrix Ran
ran; our contract draft was wrong, not the code
m-bain/frozen-in-time/model/model.py
pointer only (licence: MIT); the stored copy get_code serves, from showlab/egovlp, is pointer only (licence: NONE) · get_code("185c7b880ca6135e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from showlab/egovlp, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

t2v_metrics Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
m-bain/frozen-in-time/model/metric.py
code served (permissive licence) · get_code("e50223362e6e9644")
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 dict. 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 numpy as np

# Create a simple similarity matrix
# sims should be N x M where N is num_queries and M is num_vids
# Let's create a 4x2 matrix (4 queries, 2 videos)
# With 2 queries per video
num_queries = 4
num_vids = 2
queries_per_video = num_queries // num_vids

# Create a similarity matrix with some structure
# Diagonal-like pattern where queries match their corresponding videos well
sims = np.array([
    [0.9, 0.1],
    [0.85, 0.2],
    [0.15, 0.95],
    [0.2, 0.88]
], dtype=np.float32)

# Create query_masks - optional parameter to mask queries
# All queries are valid in this case
query_masks = np.ones(num_queries, dtype=np.bool_)

ARGS = {
    'sims': sims,
    'query_masks': query_masks,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
ipdb, numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
v2t_metrics Not yet run
unverified (harvested, no recorded run)
m-bain/frozen-in-time/model/metric.py
code served (permissive licence) · get_code("000e15329b7114d0")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 9 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 2 the same month, 9 later) and 2 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
cosine_sim 12 other papers
5 dated earlier, 7 later
1707.05612 (2017-07)
VSE++: Improving Visual-Semantic Embeddings with Hard Negatives
1806.10348 (2018-06)
Learning Visually-Grounded Semantics from Contrastive Adversarial Samples
1809.06181 (2018-09)
Dual Encoding for Zero-Example Video Retrieval
and 9 more not named here
attn 8 other papers
1 dated earlier, 7 later · 2 only as an assembly brick
2102.05095 (2021-02)
Is Space-Time Attention All You Need for Video Understanding?
2201.04850 (2022-01)
Bridging Video-text Retrieval with Multiple Choice Questions
2210.10820 (2022-10)
VTC: Improving Video-Text Retrieval with User Comments
and 5 more not named here
sim_matrix 8 other papers
8 later
2022.findings-emnlp.24 (2022 (year only))
AssistSR: Task-oriented Video Segment Retrieval for Personal AI Assistant
2206.01670 (2022-06)
Egocentric Video-Language Pretraining
2212.04501 (2022-12)
Learning Video Representations from Large Language Models
and 5 more not named here
nll_loss 7 other papers
7 later
2109.04912 (2021-09)
ReasonBERT: Pre-trained to Reason with Distant Supervision
2022.findings-acl.116 (2022 (year only))
Thai Nested Named Entity Recognition Corpus
2022.findings-emnlp.24 (2022 (year only))
AssistSR: Task-oriented Video Segment Retrieval for Personal AI Assistant
and 4 more not named here
order_sim 7 other papers
3 dated earlier, 4 later
1809.06181 (2018-09)
Dual Encoding for Zero-Example Video Retrieval
2004.09144 (2020-04)
Transformer Reasoning Network for Image-Text Matching and Retrieval
2008.05231 (2020-08)
Fine-grained Visual Textual Alignment for Cross-Modal Retrieval using Transformer Encoders
and 4 more not named here
v2t_metrics 5 other papers
1 dated earlier, 1 the same month, 3 later
1907.13487 (2019-07)
Use What You Have: Video Retrieval Using Representations From Collaborative Experts
2104.08271 (2021-04)
TEACHTEXT: CrossModal Generalized Distillation for Text-Video Retrieval
2305.03347 (2023-05)
A Large Cross-Modal Video Retrieval Dataset with Reading Comprehension
and 2 more not named here
retrieval_as_classification 4 other papers
1 dated earlier, 1 the same month, 2 later
1907.13487 (2019-07)
Use What You Have: Video Retrieval Using Representations From Collaborative Experts
2104.08271 (2021-04)
TEACHTEXT: CrossModal Generalized Distillation for Text-Video Retrieval
2105.02192 (2021-05)
Audio Retrieval with Natural Language Queries
and 1 more not named here
sample_frames 2 other papers
2 later
2305.02519 (2023-05)
ANetQA: A Large-scale Benchmark for Fine-grained Compositional Reasoning over Untrimmed Videos
2305.03347 (2023-05)
A Large Cross-Modal Video Retrieval Dataset with Reading Comprehension
read_frames_cv2 1 other paper
1 later
2305.03347 (2023-05)
A Large Cross-Modal Video Retrieval Dataset with Reading Comprehension

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

Repositories linked to this paper

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

Abstract

Frame #1 Frame #2 Frame #M … … … … … "Man drinking a bottle of water in the park" 0 0 CLS 1 0 1 1 1 N 2 0 2 1 2 N M 0 * M 1 M N Linear Projection Video M x N Image 1 x N Linear Similarity Score … … … … "Icy landscape of mountainous regions" Text Encoder Figure 1: Joint Image and Video Training: Our dual encoding model consists of a visual encoder for images and video and a text encoder for captions. Unlike 2D or 3D CNNs, our space-time transformer encoder allows us to train flexibly on both images and videos with captions jointly, by treating an image as a single frame video.

For agents

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

get_harvested_code_for_paper("2104.00650")
get_code_for_paper("2104.00650")
have("2104.00650")

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

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

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

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

Connect an agent — have() is free.