SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2303.16406 · CVPR · 2023

Hierarchical Video-Moment Retrieval and Step-Captioning

Barlas Oguz, Yashar Mehdad, Jaemin Cho, Mohit Bansal, Abhay Zala, Xilun Chen, Satwik Kottur

arXiv · PDF · Open in the Atlas

Code that ran

10 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; 1 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 3 failures of our instrument; 2 no recorded run), measured 2026-11-22; 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/2303.16406.json · badge: /api/ran/2303.16406.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
j-min/HiREST canonical (classifier label)
classifier basis not recorded on the link
10 ran · 2 no recorded run
FunctionStatusWhere it lives
all_gather Ran
ran; our contract draft was wrong, not the code
j-min/HiREST/dist_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from vis-nlp/ChartQA, is pointer only (licence: GPL-3.0) · get_code("41c46b0d5713eb14")
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 vis-nlp/ChartQA, and GPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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_iou Ran
ran on a synthesized input
j-min/HiREST/evaluate.py
code served (permissive licence) · get_code("e84b722650b81091")
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

torch.manual_seed(0)

# Analyzing the function:
# - compute_iou takes two parameters: interval_1 and interval_2
# - Each interval is indexed with [0] and [1], so they need to be sequences with at least 2 elements
# - The values are used in arithmetic operations (min, max, subtraction, division)
# - These appear to be 1D intervals represented as [start, end] tuples or lists

# Create two simple intervals as lists
interval_1 = [10, 20]  # start=10, end=20
interval_2 = [15, 25]  # start=15, end=25

ARGS = {
    "interval_1": interval_1,
    "interval_2": interval_2,
}
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
count_parameters Ran
ran, honoured the contract we drafted
j-min/HiREST/utils.py
code served (permissive licence) · get_code("f6b944f50d3f15ae")
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) 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
import torch.nn as nn

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

ARGS = {
    "model": model
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
frame_index_to_timestamp Ran
ran on a synthesized input
j-min/HiREST/hirest_dataset.py
code served (permissive licence) · get_code("2fcba9a712be1836")
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 numpy as np

ARGS = {
    "frame_index": 15,
    "video_duration": 120,
    "n_frames": 32,
}
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 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
gather Ran
ran; our contract draft was wrong, not the code
j-min/HiREST/dist_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from vis-nlp/ChartQA, is pointer only (licence: GPL-3.0) · get_code("00a9f7918ac39329")
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 vis-nlp/ChartQA, and GPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

get_area Ran
ran on a synthesized input
j-min/HiREST/utils.py
code served (permissive licence) · get_code("db63032fdd04245b")
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)

# Create a tensor of shape [B, N, 4] where B=2 (batch), N=3 (number of boxes)
# Each box has 4 values: (x1, x2, y1, y2)
pos = torch.tensor([
    [[0.0, 10.0, 0.0, 5.0],   # batch 0, box 0: x1=0, x2=10, y1=0, y2=5
     [1.0, 6.0, 2.0, 8.0],    # batch 0, box 1: x1=1, x2=6, y1=2, y2=8
     [3.0, 7.0, 1.0, 4.0]],   # batch 0, box 2: x1=3, x2=7, y1=1, y2=4
    
    [[2.0, 12.0, 3.0, 9.0],   # batch 1, box 0: x1=2, x2=12, y1=3, y2=9
     [0.0, 5.0, 0.0, 3.0],    # batch 1, box 1: x1=0, x2=5, y1=0, y2=3
     [4.0, 8.0, 2.0, 6.0]]    # batch 1, box 2: x1=4, x2=8, y1=2, y2=6
])

ARGS = {
    "pos": pos
}
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
get_relative_distance Ran
ran on a synthesized input
j-min/HiREST/utils.py
code served (permissive licence) · get_code("924d4471d950b88f")
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 4, dtype family float, shape (2, 3, 3, 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)

# Create a small position tensor [B, N, 4]
# B=2 (batch size), N=3 (number of positions), 4 (x1, x2, y1, y2)
pos = torch.randn(2, 3, 4)

ARGS = {
    "pos": pos
}
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 4, dtype family float, shape (2, 3, 3, 4) — shape (2, 3, 3, 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
load_data Ran
ran on a synthesized input
j-min/HiREST/evaluate.py
code served (permissive licence) · get_code("1e89d4c87725a5eb")
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 1, 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 json
import tempfile
import os

# Create temporary JSON files for testing
temp_dir = tempfile.mkdtemp()

# Create a ground truth JSON file
gt_dict = {
    "samples": [
        {"id": 1, "label": "cat"},
        {"id": 2, "label": "dog"}
    ],
    "metadata": {"version": "1.0"}
}
gt_file = os.path.join(temp_dir, "gt.json")
with open(gt_file, 'w') as f:
    json.dump(gt_dict, f)

# Create a predictions JSON file
pred_dict = {
    "predictions": [
        {"id": 1, "pred": "cat", "confidence": 0.95},
        {"id": 2, "pred": "dog", "confidence": 0.87}
    ]
}
pred_file = os.path.join(temp_dir, "pred.json")
with open(pred_file, 'w') as f:
    json.dump(pred_dict, f)

# Define ARGS with both string paths (file I/O) and dict inputs
ARGS = {
    "gt_data": gt_file,
    "pred_data": pred_file
}
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 tuple, ndim 1, 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
reduce_dict Ran
ran; our contract draft was wrong, not the code
j-min/HiREST/dist_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from vis-nlp/ChartQA, is pointer only (licence: GPL-3.0) · get_code("44f4152cc7eb1ddd")
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 vis-nlp/ChartQA, and GPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

timestamp_to_frame_index Ran
ran on a synthesized input
j-min/HiREST/hirest_dataset.py
code served (permissive licence) · get_code("8a0d3c4ffde35ee2")
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 numpy as np

# Construct arguments for timestamp_to_frame_index
timestamp = 5.5  # A timestamp in seconds
video_duration = 120  # Video duration in seconds
n_frames = 32  # Number of frames to divide video into

ARGS = {
    "timestamp": timestamp,
    "video_duration": video_duration,
    "n_frames": n_frames,
}
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 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
build_model Not yet run
unverified (harvested, no recorded run)
j-min/HiREST/EVA_clip/model.py
code served (permissive licence) · get_code("88e56e4d0c6044f2")
How it ran

no invocation recorded.

evaluate_video_retrieval Not yet run
unverified (harvested, no recorded run)
j-min/HiREST/evaluate.py
code served (permissive licence) · get_code("45808df80214028e")
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, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 3 the same month, 5 later) and 7 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
count_parameters 180 other papers
82 dated earlier, 3 the same month, 91 later, 4 same year, order not determinable · 8 only as an assembly brick
1705.08415 (2017-05)
Supervised Community Detection with Line Graph Neural Networks
1707.01926 (2017-07)
Diffusion Convolutional Recurrent Neural Network: Data-Driven Traffic Forecasting
1808.09367 (2018-08)
Deriving Machine Attention from Human Rationales
and 177 more not named here
build_model 119 other papers
25 dated earlier, 1 the same month, 88 later, 3 same year, order not determinable, 2 undated
1809.11096 (2018-09)
Large Scale GAN Training for High Fidelity Natural Image Synthesis
1901.07441 (2019-01)
PadChest: A large chest x-ray image dataset with multi-label annotated reports
2104.14294 (2021-04)
Emerging Properties in Self-Supervised Vision Transformers
and 116 more not named here
all_gather 16 other papers
2 dated earlier, 1 the same month, 10 later, 3 same year, order not determinable
2108.02833 (2021-08)
Elaborative Rehearsal for Zero-shot Action Recognition
136730727 (2022 (year only))
Self-Supervised Sparse Representation for Video Anomaly Detection
2023.findings-emnlp.644 (2023 (year only))
VIP5: Towards Multimodal Foundation Models for Recommendation
and 13 more not named here
gather 14 other papers
2 dated earlier, 9 later, 3 same year, order not determinable
2108.02833 (2021-08)
Elaborative Rehearsal for Zero-shot Action Recognition
136730727 (2022 (year only))
Self-Supervised Sparse Representation for Video Anomaly Detection
2023.findings-emnlp.644 (2023 (year only))
VIP5: Towards Multimodal Foundation Models for Recommendation
and 11 more not named here
reduce_dict 8 other papers
1 dated earlier, 5 later, 2 same year, order not determinable
2208.12306 (2022-08)
Multimedia Generative Script Learning for Task Planning
2023.findings-emnlp.644 (2023 (year only))
VIP5: Towards Multimodal Foundation Models for Recommendation
and 5 more not named here

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

There is growing interest in searching for information from large video corpora. Prior works have studied relevant tasks, such as text-based video retrieval, moment retrieval, video summarization, and video captioning in isolation, without an end-to-end setup that can jointly search from video corpora and generate summaries. Such an endto-end setup would allow for many interesting applications, e.g., a text-based search that finds a relevant video from a video corpus, extracts the most relevant moment from that video, and segments the moment into important steps with captions. To address this, we present the HIREST (HIerarchical REtrieval and STep-captioning) dataset and propose a new benchmark that covers hierarchical information retrieval and visual/textual stepwise summarization from an instructional video corpus. HIREST consists of 3.4K text-video pairs from an instructional video dataset, where 1.1K videos have annotations of moment spans relevant to text query and breakdown of each moment into key instruction steps with caption and timestamps (totaling 8.6K step captions). Our hierarchical benchmark consists of video retrieval, moment retrieval, and two novel moment segmentation and step captioning tasks. In moment segmentation, models break down a video moment into instruction steps and identify start-end boundaries. In step captioning, models generate a textual summary for each step. We also present starting point task-specific and end-to-end joint baseline models for our new benchmark. While the baseline models show some promising results, there still exists large room for future improvement by the community. 1 * equal contribution 1 code and data: https://github.com/j-min/HiREST

For agents

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

get_harvested_code_for_paper("2303.16406")
get_code_for_paper("2303.16406")
have("2303.16406")

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

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

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

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

Connect an agent — have() is free.