SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2503.13377 · 2025

Time-R1: Post-Training Large Vision Language Model for Temporal Video Grounding

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 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; 2 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 1 failure 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/2503.13377.json · badge: /api/ran/2503.13377.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
www-ye/timezero canonical (classifier label)
classifier basis not recorded on the link
6 ran · 1 no recorded run
FunctionStatusWhere it lives
calc_iou Ran
ran on a synthesized input
www-ye/timezero/evaluate.py
code served (permissive licence) · get_code("dcfb9aa7fd47c20b")
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 float, 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 numpy as np

# Create sample data for calc_iou
# The function expects:
# - candidates: array of shape (N, 2) with start and end positions
# - gt: array of shape (2,) with ground truth start and end positions

candidates = np.array([
    [1.0, 5.0],
    [2.0, 6.0]
])

gt = np.array([3.0, 7.0])

ARGS = {
    "candidates": candidates,
    "gt": gt
}
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 1, dtype family float, 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
convert_example Ran
ran on a synthesized input
www-ye/timezero/src/open_r1/sft.py
code served (permissive licence) · get_code("8109f13c92146bbb")
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 torch

QUESTION_TEMPLATE = 'To accurately pinpoint the event "[EVENT]" in the video, determine the precise time period of the event.\n\nProvide the start and end times (in seconds, precise to two decimal places) in the format "start time to end time" within the <answer> </answer> tags. For example: "12.54 to 17.83".'

def convert_example(example):
    """
    correct example into "messages" 
    eg:
    {
      "system": "You are a helpful assistant.",
      "conversations": [
          {"from": "user", "value": "How many objects are included in this image?",
           "image_path": "/path/to/image.png"},
          {"from": "assistant", "value": "<think>
I can see 10 objects
</think>
<answer>
10
</answer>"}
      ]
    }
    """
    messages = []
    messages.append({'role': 'user', 'content': [{'type': 'text', 'text': QUESTION_TEMPLATE.replace('[EVENT]', example['problem'])}, {'type': 'video', 'video': example['video_path'], 'total_pixels': 3584 * 28 * 28, 'min_pixels': 16 * 28 * 28}]})
    st, ed = example['solution']
    answer_text = f'<answer>{str(st)} to {str(ed)}</answer>'
    messages.append({'role': 'assistant', 'content': answer_text})
    example['messages'] = messages
    return example

example_dict = {
    'problem': 'person walking across street',
    'video_path': '/path/to/video.mp4',
    'solution': (5.25, 12.75)
}

ARGS = {
    'example': example_dict
}
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 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
format_reward Ran
ran, honoured the contract we drafted
www-ye/timezero/src/open_r1/grpo.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from zywang0104/Video-KTR, is pointer only (licence: NONE) · get_code("26720b6f9ee7eba4")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from zywang0104/Video-KTR, 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.

iou_timestamp_reward Ran
ran; our contract draft was wrong, not the code
www-ye/timezero/src/open_r1/grpo_video.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from InternRobotics/EgoThinker, is pointer only (licence: NONE) · get_code("27e99ab68fa237fd")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from InternRobotics/EgoThinker, 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.

load_json_dataset Ran
ran on a synthesized input
www-ye/timezero/src/open_r1/sft.py
code served (permissive licence) · get_code("665a0162e1acaefc")
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 DatasetDict. 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 os
import torch
import json
import tempfile
import shutil
from datasets import Dataset, DatasetDict

torch.manual_seed(0)

# Create temporary directories for testing
temp_dir = tempfile.mkdtemp()
train_data_path = os.path.join(temp_dir, 'train.json')
eval_data_path = os.path.join(temp_dir, 'eval.json')
video_folder = os.path.join(temp_dir, 'videos')
preprocessed_data_path = os.path.join(temp_dir, 'preprocessed')

# Create video folder
os.makedirs(video_folder, exist_ok=True)
os.makedirs(preprocessed_data_path, exist_ok=True)

# Create dummy video files
video_path_1 = os.path.join(video_folder, 'video_001.mp4')
video_path_2 = os.path.join(video_folder, 'video_002.mp4')
open(video_path_1, 'w').close()
open(video_path_2, 'w').close()

# Create train JSON data
train_data = {
    'video_001': {
        'duration': 120.5,
        'timestamps': [[5.0, 15.0], [20.0, 30.0]],
        'sentences': ['A person walks down the street.', 'The person stops at a corner.']
    },
    'video_002': {
        'duration': 90.3,
        'timestamps': [[10.0, 25.0], [35.0, 50.0]],
        'sentences': ['A car drives past.', 'A bird flies overhead.']
    }
}

# Create eval JSON data
eval_data = {
    'video_001': {
        'duration': 120.5,
        'timestamps': [[40.0, 55.0]],
        'sentences': ['The person enters a building.']
    }
}

# Write JSON files
with open(train_data_path, 'w') as f:
    json.dump(train_data, f)

with open(eval_data_path, 'w') as f:
    json.dump(eval_data, f)

ARGS = {
    'train_data_path': train_data_path,
    'eval_data_path': eval_data_path,
    'video_folder': video_folder,
    'preprocessed_data_path': ''
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
datasets, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DatasetDict — a DatasetDict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DatasetDict 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
parse_timestamp_output Ran
ran, honoured the contract we drafted
www-ye/timezero/src/open_r1/grpo_video.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from InternRobotics/EgoThinker, is pointer only (licence: NONE) · get_code("fc83720f5859eac2")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from InternRobotics/EgoThinker, 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.

collate_fn Not yet run
unverified (harvested, no recorded run)
www-ye/timezero/src/open_r1/sft.py
code served (permissive licence) · get_code("0ba9682f0587f9f4")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 later) and 4 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
format_reward 3 other papers
3 later
2505.12434 (2025-05)
VIDEORFT: Incentivizing Video Reasoning Capability in MLLMs via Reinforced Fine-Tuning
2510.23569 (2025-10)
EgoThinker: Unveiling Egocentric Reasoning with Spatio-Temporal CoT
2601.19686 (2026-01)
2 RELATED WORK Reinforcement learning has emerged as a powerful paradigm for enhancing the reasoning abilities of LLMs
iou_timestamp_reward 1 other paper
1 later
2510.23569 (2025-10)
EgoThinker: Unveiling Egocentric Reasoning with Spatio-Temporal CoT
parse_timestamp_output 1 other paper
1 later
2510.23569 (2025-10)
EgoThinker: Unveiling Egocentric Reasoning with Spatio-Temporal CoT

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

Temporal Video Grounding (TVG), the task of locating specific video segments based on language queries, is a core challenge in long-form video understanding. While recent Large Vision-Language Models (LVLMs) have shown early promise in tackling TVG through supervised fine-tuning (SFT), their abilities to generalize remain limited. To address this, we propose a novel post-training framework that enhances the generalization capabilities of LVLMs via reinforcement learning (RL). Specifically, our contributions span three key directions: (1) Time-R1: we introduce a reasoning-guided post-training framework via RL with verifiable reward to enhance the capabilities of LVLMs on the TVG task. (2) TimeRFT: we explore data-efficient post-training strategies on our curated RL-friendly dataset, which trains the model to progressively comprehend difficult samples, leading to better generalization. (3) TVGBench: we carefully construct a small yet comprehensive benchmark for LVLM evaluation, assessing 11 types of queries and featuring balanced distributions across both videos and queries. Extensive experiments demonstrate that Time-R1 achieves state-of-the-art performance across multiple downstream datasets using only 2.5K training data, while improving its general video understanding capabilities.

For agents

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

get_harvested_code_for_paper("2503.13377")
get_code_for_paper("2503.13377")
have("2503.13377")

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

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

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

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

Connect an agent — have() is free.