SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2508.15439 · ICCV · 2025

Aligning Moments in Time using Video Queries

Manish Gupta, Anand Mishra, Yogesh Kumar, Uday Agarwal

arXiv · PDF · Open in the Atlas

Code that ran

4 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 3 failures of our instrument; 4 no recorded run), measured 2026-11-23; 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/2508.15439.json · badge: /api/ran/2508.15439.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
vl2g/MATR community
Papers with Code archive
4 ran · 4 no recorded run
FunctionStatusWhere it lives
VarTable Ran
ran on a synthesized input · constructed an object; no result was computed
vl2g/MATR/model/matr.py
code served (permissive licence) · get_code("7f43eb575fd3e179")
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, VarTable: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

# VarTable.__init__ takes dims and optional dtype and device parameters
# dims should be a tuple/list where:
#   - dims[0] is d1 (first dimension)
#   - dims[1] is d2 (second dimension)
#   - dims[2:] is d_rest (remaining dimensions for the inner tensors)

# The function creates a d1 x d2 table where each cell contains a tensor of shape d_rest

ARGS = {
    'dims': (3, 4, 2, 5),  # 3x4 table, each cell is a (2, 5) tensor
    'dtype': torch.float,
    'device': 'cpu'
}
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 VarTable — 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 VarTable 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
batch_NW Ran
ran; our contract draft was wrong, not the code
vl2g/MATR/model/matr.py
code served (permissive licence) · get_code("215efb486f250141")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 math

torch.manual_seed(0)

# Create sample cost tensors for batch_NW
# zx_costs_list: list of tensors with shape [Ki, Ni] (alignment costs between sequences)
# drop_costs_list: list of tensors with shape [Ni] (costs of dropping items)

# Batch element 1: K=3, N=4
zx_costs_1 = torch.randn(3, 4)
drop_costs_1 = torch.randn(4)

# Batch element 2: K=5, N=6
zx_costs_2 = torch.randn(5, 6)
drop_costs_2 = torch.randn(6)

zx_costs_list = [zx_costs_1, zx_costs_2]
drop_costs_list = [drop_costs_1, drop_costs_2]

ARGS = {
    'zx_costs_list': zx_costs_list,
    'drop_costs_list': drop_costs_list,
    'softning': 'prob',
    'gamma_min': 1
}
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
minGamma Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
vl2g/MATR/model/matr.py
code served (permissive licence) · get_code("95f5c8a903667f35")
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 3, dtype family float, shape (1, 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
from torch import log, exp

torch.manual_seed(0)

# Create test inputs - the function accepts either a tensor or a list of tensors
# Using a list of tensors with batch dimension
inputs_list = [torch.randn(2, 4), torch.randn(2, 4)]

# Define ARGS dict with all parameters
ARGS = {
    "inputs": inputs_list,
    "gamma": 1.0,
    "keepdim": 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 Tensor, ndim 3, dtype family float, shape (1, 2, 4) — shape (1, 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
minProb Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
vl2g/MATR/model/matr.py
code served (permissive licence) · get_code("c32dab01ad8e0a83")
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 3, dtype family float, shape (1, 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
import torch.nn.functional as F

torch.manual_seed(0)

# Create small test tensors
# The function operates on inputs with shape (batch, features)
# We'll test with a list of tensors and a stacked tensor

# Test case 1: list of tensors with batch size > 1
tensor1 = torch.randn(2, 4)
tensor2 = torch.randn(2, 4)
inputs_list = [tensor1, tensor2]

# Test case 2: single tensor
inputs_tensor = torch.randn(2, 4)

# We'll use the list case as the primary test
inputs = inputs_list

# gamma parameter - controls temperature in softmax
gamma = 1.0

# keepdim parameter - whether to keep dimension after reduction
keepdim = True

ARGS = {
    "inputs": inputs,
    "gamma": gamma,
    "keepdim": keepdim
}
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 3, dtype family float, shape (1, 2, 4) — shape (1, 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
Model Not yet run
unverified (harvested, no recorded run)
vl2g/MATR/model/matr.py
code served (permissive licence) · get_code("62e850bb45e52bc9")
How it ran

no invocation recorded.

batch_dropDTW Not yet run
unverified (harvested, no recorded run)
vl2g/MATR/model/matr.py
code served (permissive licence) · get_code("f647cb52e33ece46")
How it ran

no invocation recorded.

compute_alignment_loss Not yet run
unverified (harvested, no recorded run)
vl2g/MATR/model/matr.py
code served (permissive licence) · get_code("6577fff738b3db0f")
How it ran

no invocation recorded.

compute_all_costs Not yet run
unverified (harvested, no recorded run)
vl2g/MATR/model/matr.py
code served (permissive licence) · get_code("2785d66e6ea36b95")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 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 8 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

Video-to-video moment retrieval (Vid2VidMR) is the task of localizing unseen events or moments in a target video using a query video. This task poses several challenges, such as the need for semantic frame-level alignment and modeling complex dependencies between query and target videos. To tackle this challenging problem, we introduce MATR (Moment Alignment TRansformer), a transformerbased model designed to capture semantic context as well as the temporal details necessary for precise moment localization. MATR conditions target video representations on query video features using dual-stage sequence alignment that encodes the required correlations and dependencies. These representations are then used to guide foreground/background classification and boundary prediction heads, enabling the model to accurately identify moments in the target video that semantically match with the query video. Additionally, to provide a strong task-specific initialization for MATR, we propose a self-supervised pre-training technique that involves training the model to localize random clips within videos. Extensive experiments demonstrate that MATR achieves notable performance improvements of 13.1% in R@1 and 8.1% in mIoU on an absolute scale compared to state-of-the-art methods on the popular ActivityNet-VRL dataset. Additionally, on our newly proposed dataset, SportsMoments, MATR shows a 14.7% gain in R@1 and a 14.4% gain in mIoU on an absolute scale over strong baselines. We make the dataset and code public at: https://github.com/vl2g/MATR. * Equal Contribution 1 A moment is a continuous segment of frames within a target video that best represents the actions, events, or interactions described by the query.

For agents

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

get_harvested_code_for_paper("2508.15439")
get_code_for_paper("2508.15439")
have("2508.15439")

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

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

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

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

Connect an agent — have() is free.