SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1907.12763 · 2019

Finding Moments in Video Collections Using Natural Language

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 10 have no contract verdict; 0 failures of our instrument; 1 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/1907.12763.json · badge: /api/ran/1907.12763.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
escorciav/moments-retrieval-page community (classifier label)
classifier basis not recorded on the link
10 ran · 1 no recorded run
FunctionStatusWhere it lives
intersection Ran
ran on a synthesized input
escorciav/moments-retrieval-page/np_segments_ops.py
code served (permissive licence) · get_code("088411e75c90ad14")
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 ndarray, 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 numpy as np

# Create sample segments1: N=2 segments with [start, end] format
segments1 = np.array([
    [0.0, 5.0],
    [3.0, 8.0]
], dtype=np.float32)

# Create sample segments2: M=3 segments with [start, end] format
segments2 = np.array([
    [1.0, 4.0],
    [6.0, 9.0],
    [2.0, 7.0]
], dtype=np.float32)

ARGS = {
    "segments1": segments1,
    "segments2": segments2
}
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 ndarray, 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
iou Ran
ran on a synthesized input
escorciav/moments-retrieval-page/evaluation.py
code served (permissive licence) · get_code("b195c4e852fe4a6d")
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 float, 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 numpy as np

# Based on the function signature and implementation, iou expects two arguments
# that are indexable (support [0] and [1] indexing) and support min/max operations.
# These appear to be interval representations [start, end].

# Ground truth interval
gt = [5, 15]

# Predicted interval
pred = [8, 12]

ARGS = {
    "gt": gt,
    "pred": pred
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
iou Ran
ran on a synthesized input
escorciav/moments-retrieval-page/np_segments_ops.py
code served (permissive licence) · get_code("aacfc922c8662169")
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 ndarray, ndim 2, dtype family float, shape (3, 2) 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 numpy as np

# Create segments1: N=3 segments, each with [start, end]
segments1 = np.array([
    [0.0, 2.0],
    [1.5, 4.0],
    [3.0, 5.0]
], dtype=np.float32)

# Create segments2: M=2 segments, each with [start, end]
segments2 = np.array([
    [1.0, 3.0],
    [3.5, 6.0]
], dtype=np.float32)

ARGS = {
    "segments1": segments1,
    "segments2": segments2
}
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 ndarray, ndim 2, dtype family float, shape (3, 2) — shape (3, 2) 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
length Ran
ran on a synthesized input
escorciav/moments-retrieval-page/np_segments_ops.py
code served (permissive licence) · get_code("d84840dc2bd43436")
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 ndarray, ndim 1, dtype family int, shape (2,) 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 numpy as np

torch.manual_seed(0)

# The function takes segments which should be shape [N, 2]
# It computes segments[:, 1] - segments[:, 0], so it needs indexing support
# Works with both numpy arrays and torch tensors

# Test with numpy array
segments_np = np.array([
    [10, 25],
    [30, 50],
])

ARGS = {
    "segments": segments_np
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (2,) — shape (2,) 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
load_args_from_snapshot Ran
ran on a synthesized input
escorciav/moments-retrieval-page/utils.py
code served (permissive licence) · get_code("6390768a6e335198")
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 bool, 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 json
from pathlib import Path
import tempfile
import os

# Create a temporary directory and files for testing
temp_dir = tempfile.mkdtemp()
snapshot_file = Path(temp_dir) / "snapshot.json"
logfile_path = Path(temp_dir) / "logfile.txt"

# Create a valid snapshot JSON file
snapshot_data = {
    "h5_path_nis": "/path/to/data.h5",
    "test_list": "/path/to/test.txt",
    "val_list": "/path/to/val.txt",
    "train_list": "/path/to/train.txt",
    "learning_rate": 0.001,
    "batch_size": 32
}

with open(snapshot_file, 'w') as f:
    json.dump(snapshot_data, f)

# Create a minimal args object
class Args:
    def __init__(self):
        self.snapshot = snapshot_file
        self.logfile = logfile_path
        self.learning_rate = 0.01
        self.batch_size = 16

args_obj = Args()

ARGS = {
    'args': args_obj,
    'path_vars': {'h5_path_nis', 'test_list', 'val_list', 'train_list'}
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, 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
rank Ran
ran on a synthesized input
escorciav/moments-retrieval-page/evaluation.py
code served (permissive licence) · get_code("c1da49f7d5c70e4e")
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 int, ndim 0, dtype family int, 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

torch.manual_seed(0)

# The function expects:
# - gt: a ground truth value (can be a tuple or converted to tuple)
# - pred: a list-like object with an .index() method that contains gt

# Create a simple ground truth value
gt = (1, 2, 3)

# Create a list of predictions where gt is one of the elements
pred = [(0, 0, 0), (1, 2, 3), (4, 5, 6)]

ARGS = {
    "gt": gt,
    "pred": pred
}
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 int, ndim 0, dtype family int, 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
setup_model Ran
ran on a synthesized input
escorciav/moments-retrieval-page/moment_freq_prior.py
code served (permissive licence) · get_code("1fce4e0dc008c8b4")
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 DiscretizedFrequencyPrior. 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 logging
import numpy as np
from scipy.stats import gaussian_kde

class SimpleArgs:
    def __init__(self):
        self.kde = False
        self.proposal_interface = None
        self.ts_edges = None
        self.te_edges = None
        self.bins = [[0.0, 0.5, 1.0], [0.0, 0.5, 1.0]]

ARGS = {
    'args': SimpleArgs()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DiscretizedFrequencyPrior — a DiscretizedFrequencyPrior output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DiscretizedFrequencyPrior 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
ship_to Ran
ran on a synthesized input
escorciav/moments-retrieval-page/utils.py
code served (permissive licence) · get_code("691a4f0f7b37c9f0")
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. 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

torch.manual_seed(0)

# Construct valid arguments for ship_to function
# The function expects:
# - x: an iterable containing tensors, dicts of tensors, or other objects
# - device: a torch device

# Create sample data with tensors, dicts of tensors, and other objects
x = [
    torch.randn(2, 4),  # A tensor
    {
        "tensor_a": torch.randn(2, 3),
        "tensor_b": torch.randn(2, 5),
    },  # A dict with tensors
    "some_string",  # A non-tensor, non-dict object
    torch.randn(2, 6),  # Another tensor
    {"single": torch.randn(2, 2)},  # Another dict with a tensor
]

device = torch.device("cpu")

ARGS = {
    "x": x,
    "device": device,
}
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 list — a list 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
unique2d_perserve_order Ran
ran on a synthesized input
escorciav/moments-retrieval-page/utils.py
code served (permissive licence) · get_code("4456556cb38137bc")
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 ndarray, ndim 2, dtype family int, shape (3, 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 numpy as np

# Create a 2D numpy array with some duplicate values in each row
# The function processes each row independently to find unique values while preserving order
x = np.array([
    [1, 2, 3, 2, 1],
    [5, 4, 5, 6, 4],
    [7, 8, 7, 9, 8]
], dtype=np.int32)

ARGS = {
    'x': x
}
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 ndarray, ndim 2, dtype family int, shape (3, 3) — shape (3, 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
video_duration Ran
ran on a synthesized input
escorciav/moments-retrieval-page/moment_freq_prior.py
code served (permissive licence) · get_code("87d42332302da432")
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 float, 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

class MockDataset:
    def __init__(self):
        self.metadata = [
            {'video': 'video_1'},
            {'video': 'video_2'},
            {'video': 'video_3'}
        ]
        self.metadata_per_video = {
            'video_1': {'duration': 10.5},
            'video_2': {'duration': 20.3},
            'video_3': {'duration': 15.7}
        }

dataset = MockDataset()
moment_index = 0

ARGS = {
    'dataset': dataset,
    'moment_index': moment_index
}
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 float, 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
video_evaluation Not yet run
unverified (harvested, no recorded run)
escorciav/moments-retrieval-page/evaluation.py
code served (permissive licence) · get_code("2440ead3c8d32056")
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, 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 11 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 the task of retrieving relevant video moments from a large corpus of untrimmed, unsegmented videos given a natural language query. Our task poses unique challenges as a system must efficiently identify both the relevant videos and localize the relevant moments in the videos. To address these challenges, we propose SpatioTemporal Alignment with Language (STAL), a model that represents a video moment as a set of regions within a series of short video clips and aligns a natural language query to the moment's regions. Our alignment cost compares variable-length language and video features using symmetric squared Chamfer distance, which allows for efficient indexing and retrieval of the video moments. Moreover, aligning language features to regions within a video moment allows for finer alignment compared to methods that extract only an aggregate feature from the entire video moment. We evaluate our approach on two recently proposed datasets for temporal localization of moments in video with natural language (DiDeMo and Charades-STA) extended to our video corpus moment retrieval setting. We show that our STAL re-ranking model outperforms the recently proposed Moment Context Network on all criteria across all datasets on our proposed task, obtaining relative gains of 37% - 118% for average recall and up to 30% for median rank. Moreover, our approach achieves more than 130x faster retrieval and 8x smaller index size with a 1M video corpus in an approximate setting.

For agents

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

get_harvested_code_for_paper("1907.12763")
get_code_for_paper("1907.12763")
have("1907.12763")

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

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

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

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

Connect an agent — have() is free.