SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2307.16715 · ICCV · 2023

UniVTG: Towards Unified Video-Language Temporal Grounding

Rui Yan, Kevin Lin, Shraman Pramanick, Pengchuan Zhang, Joya Chen, Alex Wang, Difei Gao, Mike Shou

arXiv · PDF · Open in the Atlas

Code that ran

11 of 16 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 4 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 5 failures of our instrument; 5 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/2307.16715.json · badge: /api/ran/2307.16715.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
showlab/univtg canonical (classifier label)
classifier basis: census
9 ran · 4 no recorded run
showlab/UniVTG community
Papers with Code archive
2 ran · 1 no recorded run
FunctionStatusWhere it lives
Conv Ran
ran on a synthesized input · constructed an object; no result was computed
showlab/UniVTG/model/univtg.py
code served (permissive licence) · get_code("fe525fce2ed45fdc")
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, Conv: the run constructed the object and did not call it, so no result was computed. 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)

ARGS = {
    "input_dim": 4,
    "hidden_dim": 8,
    "output_dim": 3,
    "num_layers": 2,
    "kernel_size": 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 Conv — 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 Conv 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
Model Ran
ran on a synthesized input · constructed an object; no result was computed
showlab/UniVTG/model/univtg.py
code served (permissive licence) · get_code("71a63e8e4005103c")
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, Model: the run constructed the object and did not call it, so no result was computed. 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)

# Build a minimal transformer
class MinimalTransformer(nn.Module):
    def __init__(self, d_model=64):
        super().__init__()
        self.d_model = d_model
        self.encoder_layer = nn.TransformerEncoderLayer(
            d_model=d_model, 
            nhead=4, 
            dim_feedforward=128, 
            batch_first=True
        )
        self.encoder = nn.TransformerEncoder(self.encoder_layer, num_layers=1)
    
    def forward(self, x, mask=None):
        return self.encoder(x, src_key_padding_mask=mask)

# Build minimal position embedding
class MinimalPositionEmbedding(nn.Module):
    def __init__(self, d_model=64, max_len=100):
        super().__init__()
        self.embedding = nn.Embedding(max_len, d_model)
    
    def forward(self, x):
        seq_len = x.shape[1]
        positions = torch.arange(seq_len, dtype=torch.long, device=x.device)
        return self.embedding(positions).unsqueeze(0)

# Create instances
hidden_dim = 64
txt_dim = 32
vid_dim = 48
max_v_l = 75

transformer = MinimalTransformer(d_model=hidden_dim)
position_embed = MinimalPositionEmbedding(d_model=hidden_dim, max_len=max_v_l)
txt_position_embed = MinimalPositionEmbedding(d_model=hidden_dim, max_len=100)

ARGS = {
    "transformer": transformer,
    "position_embed": position_embed,
    "txt_position_embed": txt_position_embed,
    "txt_dim": txt_dim,
    "vid_dim": vid_dim,
    "input_dropout": 0.1,
    "aux_loss": False,
    "max_v_l": max_v_l,
    "span_loss_type": "l1",
    "use_txt_pos": False,
    "n_input_proj": 2
}
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 Model — 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 Model 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
PositionalEncoding Ran
ran, honoured the contract we drafted
showlab/univtg/model/position_encoding.py
code served (permissive licence) · get_code("94aab69ebd3439ec")
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 (8, 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 numpy as np

torch.manual_seed(0)

# The function takes two parameters: n_position and d_hid
# n_position: number of positions (sequence length)
# d_hid: hidden dimension size

ARGS = {
    "n_position": 8,
    "d_hid": 4
}
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 Tensor, ndim 2, dtype family float, shape (8, 4) — shape (8, 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
build_position_encoding Ran
ran; our contract draft was wrong, not the code
showlab/univtg/model/position_encoding.py
code served (permissive licence) · get_code("2912d21d62514265")
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 math
import torch
from torch import nn

torch.manual_seed(0)

class Args:
    def __init__(self):
        self.hidden_dim = 4
        self.position_embedding = 'sine'
        self.max_q_l = 8
        self.input_dropout = 0.1

ARGS = {
    'args': Args()
}
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, 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
convert_to_hms Ran
ran; our contract draft was wrong, not the code
showlab/univtg/main_gradio.py
code served (permissive licence) · get_code("0dc91e6607bb2ec1")
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 str. 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 time

def convert_to_hms(seconds):
    return time.strftime('%H:%M:%S', time.gmtime(seconds))

ARGS = {
    'seconds': 3661
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
count_parameters Ran
ran, honoured the contract we drafted
showlab/univtg/utils/model_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from Zhuo-Cao/QV-M2, is pointer only (licence: NONE) · get_code("edb929dece68582e")
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 Zhuo-Cao/QV-M2, 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.

drop_path Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
showlab/univtg/model/transformer_encoder_droppath.py
pointer only (licence: MIT); the stored copy get_code serves, from showlab/VLog, is pointer only (licence: NONE) · get_code("10e67144852e5fce")
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/VLog, 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.

mask_logits Ran
ran, honoured the contract we drafted
showlab/univtg/model/univtg.py
pointer only (licence: MIT); the stored copy get_code serves, from mingyao1120/TR-DETR, is pointer only (licence: NOASSERTION) · get_code("60df4d5a1eee1b92")
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 mingyao1120/TR-DETR, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

process_mat Ran
ran, honoured the contract we drafted
showlab/univtg/eval/qfvs.py
code served (permissive licence) · get_code("4d2286148f711e02")
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 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 numpy as np

# Construct the mat argument based on how process_mat uses it
# The function expects mat['Tags'][0] to be a list of video_mats
# Each video_mat is indexed as [0] and passed to process_video_mat
# process_video_mat iterates over shot_vec and accesses shot_vec[0][0]

# Build nested structure matching the access pattern
shot_data_1 = np.array([[np.array([1.0, 2.0, 3.0, 4.0])]])  # shot_vec[0][0] access
shot_data_2 = np.array([[np.array([5.0, 6.0, 7.0, 8.0])]])  # shot_vec[0][0] access

video_mat_1 = np.array([shot_data_1, shot_data_2])  # video_mat[0] gives shot_data_1
video_mat_2 = np.array([shot_data_1, shot_data_2])  # second video

videos = np.array([np.array([video_mat_1]), np.array([video_mat_2])])  # videos[i][0] gives video_mat_i

mat = {
    'Tags': np.array([videos])  # mat['Tags'][0] gives videos
}

ARGS = {
    'mat': mat
}
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 3, dtype family float — 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
process_video_mat Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
showlab/univtg/eval/qfvs.py
code served (permissive licence) · get_code("b3a40dcb09d6a4a9")
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, 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 numpy as np

# Analyze the function:
# - It takes video_mat as input
# - Iterates over video_mat (so it's iterable)
# - For each shot_vec, accesses shot_vec[0][0] (nested indexing)
# - Appends the result to a list
# - Converts result to numpy array

# video_mat should be a structure where each element can be indexed twice
# shot_vec[0][0] suggests a 2D structure (or nested lists/arrays)

# Create a small video_mat with nested structure
# Each shot_vec will be a 2D array/list, so [0][0] accesses first element
shot_1 = [[np.array([1.0, 2.0, 3.0, 4.0])]]  # Nested list containing array
shot_2 = [[np.array([5.0, 6.0, 7.0, 8.0])]]  # Nested list containing array
shot_3 = [[np.array([9.0, 10.0, 11.0, 12.0])]]  # Nested list containing array

video_mat = [shot_1, shot_2, shot_3]

ARGS = {
    'video_mat': video_mat
}
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, 4) — shape (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
sim_matrix Ran
ran; our contract draft was wrong, not the code
showlab/univtg/model/univtg.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.

accuracy Not yet run
unverified (harvested, no recorded run)
showlab/univtg/model/moment_detr.py
pointer only (licence: MIT); the stored copy get_code serves, from Zhuo-Cao/QV-M2, is pointer only (licence: NONE) · get_code("081c8abd57d082fd")
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 Zhuo-Cao/QV-M2, 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. No invocation recorded.

build_transformer Not yet run
unverified (harvested, no recorded run)
showlab/univtg/model/transformer.py
code served (permissive licence) · get_code("a03d2e1a023a5c63")
How it ran

no invocation recorded.

build_transformer Not yet run
unverified (harvested, no recorded run)
showlab/univtg/model/transformer_encoder_droppath.py
code served (permissive licence) · get_code("141ae5fb5b4041f0")
How it ran

no invocation recorded.

init_weights Not yet run
unverified (harvested, no recorded run)
showlab/UniVTG/model/univtg.py
code served (permissive licence) · get_code("6846bf0b5c7629d7")
How it ran

no invocation recorded.

load_videos_tag Not yet run
unverified (harvested, no recorded run)
showlab/univtg/eval/qfvs.py
code served (permissive licence) · get_code("0581196da1c218b5")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 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 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
build_transformer 32 other papers
17 dated earlier, 15 later
2005.12872 (2020-05)
End-to-End Object Detection with Transformers
2103.12115 (2021-03)
End-to-End Trainable Multi-Instance Pose Estimation with Transformers
2104.04369 (2021-04)
Video-aided Unsupervised Grammar Induction
and 29 more not named here
accuracy 14 other papers
1 the same month, 13 later
2307.02869 (2023-07)
MomentDiff: Generative Video Moment Retrieval from Random to Real
2308.06947 (2023-08)
Knowing Where to Focus: Event-aware Transformer for Video Grounding
2311.08835 (2023-11)
Correlation-Guided Query-Dependency Calibration for Video Temporal Grounding
and 11 more not named here
count_parameters 11 other papers
4 dated earlier, 7 later
2001.09099 (2020-01)
TVR: A Large-Scale Dataset for Video-Subtitle Moment Retrieval
2105.06247 (2021-05)
Video Corpus Moment Retrieval with Contrastive Learning
2207.00383 (2022-07)
ReLER@ZJU-Alibaba Submission to the Ego4D Natural Language Queries Challenge 2022
and 8 more not named here
build_position_encoding 9 other papers
1 the same month, 8 later
2307.02869 (2023-07)
MomentDiff: Generative Video Moment Retrieval from Random to Real
2308.06947 (2023-08)
Knowing Where to Focus: Event-aware Transformer for Video Grounding
2311.16464 (2023-11)
Bridging the Gap: A Unified Video Comprehension Framework for Moment Retrieval and Highlight Detection
and 6 more not named here
sim_matrix 8 other papers
5 dated earlier, 3 later
2104.00650 (2021-04)
Frozen in Time: A Joint Video and Image Encoder for End-to-End Retrieval
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
and 5 more not named here
mask_logits
brick of this paper's assembly: helper
5 other papers
3 dated earlier, 2 later · 1 only as an assembly brick
2004.13931 (2020-04)
Span-based Localizing Network for Natural Language Video Localization
2207.00383 (2022-07)
ReLER@ZJU-Alibaba Submission to the Ego4D Natural Language Queries Challenge 2022
2301.00746 (2023-01)
NaQ: Leveraging Narrations as Queries to Supervise Episodic Memory
and 2 more not named here
init_weights
brick of this paper's assembly: helper
3 other papers
1 dated earlier, 2 later · 2 only as an assembly brick
2006.05165 (2020-06)
Learning to Recover from Multi-Modality Errors for Non-Autoregressive Neural Machine Translation
2508.15439 (2025-08)
Aligning Moments in Time using Video Queries
2605.24816 (2026-05)
AOEPT: Breaking the Implicit Modality-Reduction Bottleneck in Modality-Missing Prompt Tuning
Conv
brick of this paper's assembly: helper
1 other paper
1 later · 1 only as an assembly brick
2508.15439 (2025-08)
Aligning Moments in Time using Video Queries
drop_path 1 other paper
1 later
2503.09402 (2025-03)
VLog: Video-Language Models by Generative Retrieval of Narration Vocabulary

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 Temporal Grounding (VTG), which aims to ground target clips from videos (such as consecutive intervals or disjoint shots) according to custom language queries (e.g., sentences or words), is key for video browsing on social media. Most methods in this direction develop taskspecific models that are trained with type-specific labels, such as moment retrieval (time interval) and highlight detection (worthiness curve), which limits their abilities to generalize to various VTG tasks and labels. In this paper, we propose to Unify the diverse VTG labels and tasks, dubbed UniVTG, along three directions: Firstly, we revisit a wide range of VTG labels and tasks and define a unified formulation. Based on this, we develop data annotation schemes to create scalable pseudo supervision. Secondly, we develop an effective and flexible grounding model capable of addressing each task and making full use of each label. Lastly, thanks to the unified framework, we are able to unlock temporal grounding pretraining from large-scale diverse labels and develop stronger grounding abilities e.g., zero-shot grounding. Extensive experiments on three tasks (moment retrieval, highlight detection and video summarization) across seven datasets (QVHighlights, Charades-STA, TACoS, Ego4D, YouTube Highlights, TV-Sum, and QFVS) demonstrate the effectiveness and flexibility of our proposed framework. The codes are available at https://github.com/showlab/UniVTG.

For agents

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

get_harvested_code_for_paper("2307.16715")
get_code_for_paper("2307.16715")
have("2307.16715")

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

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

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

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

Connect an agent — have() is free.