SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2501.07305 · ICCV · 2025

The Devil is in the Spurious Correlations: Boosting Moment Retrieval with Dynamic Learning

Angela Yao, Wen Li, Lixin Duan, Fanyue Wei, Xinyang Zhou

arXiv · PDF · Open in the Atlas

Code that ran

8 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; 1 honoured the contract we drafted, 1 violated it and 1 has no contract verdict; 5 failures of our instrument; 3 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/2501.07305.json · badge: /api/ran/2501.07305.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
xyangzhou/TD-DETR canonical (classifier label)
classifier basis not recorded on the link
8 ran · 3 no recorded run
FunctionStatusWhere it lives
build_position_encoding Ran
ran; our contract draft was wrong, not the code
xyangzhou/TD-DETR/td_detr/position_encoding.py
pointer only (licence: MIT); the stored copy get_code serves, from zxccade/SHINE, is pointer only (licence: NOASSERTION) · get_code("d6ca656c20df137a")
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 zxccade/SHINE, 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.

count_parameters Ran
ran, honoured the contract we drafted
xyangzhou/TD-DETR/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.

gen_sineembed_for_position Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
xyangzhou/TD-DETR/td_detr/transformer.py
code served (permissive licence) · get_code("ef58ba4fdac7256e")
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 (2, 4, 256) 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 math

torch.manual_seed(0)

# The function expects pos_tensor with shape (batch, sequence, 2)
# where the last dimension contains [center, span] values
# Based on the function body:
# - pos_tensor is indexed as pos_tensor[:, :, 0] and pos_tensor[:, :, 1]
# - This produces tensors of shape (batch, sequence)
# - These are then expanded with [:, :, None] to (batch, sequence, 1)
# - And divided by dim_t which has shape (128,), broadcasting to (batch, sequence, 128)

batch_size = 2
sequence_length = 4
pos_tensor = torch.randn(batch_size, sequence_length, 2, dtype=torch.float32)

ARGS = {
    "pos_tensor": pos_tensor
}
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 (2, 4, 256) — shape (2, 4, 256) 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
inverse_sigmoid Ran
ran; our contract draft was wrong, not the code
xyangzhou/TD-DETR/td_detr/model.py
pointer only (licence: MIT); the stored copy get_code serves, from wjun0830/qd-detr, is pointer only (licence: NOASSERTION) · get_code("6897880b6ce14c94")
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 wjun0830/qd-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.

prepare_batch_inputs Ran
ran on a synthesized input
xyangzhou/TD-DETR/td_detr/start_end_dataset.py
code served (permissive licence) · get_code("ba9fbbf6b2237b8d")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create small tensors for query features (text)
query_feat_tensor = torch.randn(2, 4)  # batch_size=2, feature_dim=4
query_feat_mask = torch.ones(2, 3, dtype=torch.bool)  # batch_size=2, seq_len=3

# Create small tensors for video features
video_feat_tensor = torch.randn(2, 5)  # batch_size=2, feature_dim=5
video_feat_mask = torch.ones(2, 6, dtype=torch.bool)  # batch_size=2, seq_len=6

# Create span labels (list of dicts with spans tensors)
span_labels = [
    {'spans': torch.tensor([[0, 1], [2, 3]])},
    {'spans': torch.tensor([[1, 2], [3, 4]])}
]

# Create saliency labels
saliency_pos_labels = torch.randn(2, 7)
saliency_neg_labels = torch.randn(2, 8)
saliency_all_labels = torch.randn(2, 9)

# Create indices
idxs = torch.tensor([0, 1])

# Construct batched model inputs dict with all optional fields
batched_model_inputs = {
    'query_feat': (query_feat_tensor, query_feat_mask),
    'video_feat': (video_feat_tensor, video_feat_mask),
    'span_labels': span_labels,
    'saliency_pos_labels': saliency_pos_labels,
    'saliency_neg_labels': saliency_neg_labels,
    'saliency_all_labels': saliency_all_labels,
    'idxs': idxs
}

ARGS = {
    'batched_model_inputs': batched_model_inputs,
    'device': 'cpu',
    'non_blocking': False
}
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
span_cxw_to_xx Ran
ran, violated the contract we drafted
xyangzhou/TD-DETR/td_detr/span_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from mingyao1120/TR-DETR, is pointer only (licence: NOASSERTION) · get_code("b7639c2e8b83837b")
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.

span_xx_to_cxw Ran
ran; our contract draft was wrong, not the code
xyangzhou/TD-DETR/td_detr/span_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from Zhuo-Cao/QV-M2, is pointer only (licence: NONE) · get_code("7114f025044af9b4")
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.

temporal_iou Ran
ran; our contract draft was wrong, not the code
xyangzhou/TD-DETR/td_detr/span_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from Zhuo-Cao/QV-M2, is pointer only (licence: NONE) · get_code("e4ae5582a2533cdb")
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.

accuracy Not yet run
unverified (harvested, no recorded run)
xyangzhou/TD-DETR/td_detr/misc.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)
xyangzhou/TD-DETR/td_detr/transformer.py
code served (permissive licence) · get_code("595b7178ce4c0616")
How it ran

no invocation recorded.

multi_head_attention_forward Not yet run
unverified (harvested, no recorded run)
xyangzhou/TD-DETR/td_detr/attention.py
pointer only (licence: MIT); the stored copy get_code serves, from wjj1wjj/Nodule-DETR, is pointer only (licence: NONE) · get_code("a82091666b9db8cf")
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 wjj1wjj/Nodule-DETR, 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.

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, 9 are also present in other papers whose code we hold (9 with at least one paper dated earlier, 0 the same month, 7 later) and 2 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
inverse_sigmoid 28 other papers
27 dated earlier, 1 later · 10 only as an assembly brick
2201.12329 (2022-01)
DAB-DETR: Dynamic Anchor Boxes are Better Queries for DETR
2203.01305 (2022-03)
DN-DETR: Accelerate DETR Training by Introducing Query DeNoising
2209.13306 (2022-09)
Embracing Consistency: A One-Stage Approach for Spatio-Temporal Video Grounding
and 25 more not named here
multi_head_attention_forward 24 other papers
22 dated earlier, 2 later
2203.01305 (2022-03)
DN-DETR: Accelerate DETR Training by Introducing Query DeNoising
2203.03605 (2022-03)
DINO: DETR with Improved DeNoising Anchor Boxes for End-to-End Object Detection
2206.02777 (2022-06)
Mask DINO: Towards A Unified Transformer-based Framework for Object Detection and Segmentation
and 21 more not named here
accuracy 14 other papers
13 dated earlier, 1 later
2307.02869 (2023-07)
MomentDiff: Generative Video Moment Retrieval from Random to Real
2307.16715 (2023-07)
UniVTG: Towards Unified Video-Language Temporal Grounding
2308.06947 (2023-08)
Knowing Where to Focus: Event-aware Transformer for Video Grounding
and 11 more not named here
count_parameters 11 other papers
10 dated earlier, 1 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
span_cxw_to_xx 10 other papers
9 dated earlier, 1 later · 2 only as an assembly brick
2107.09609 (2021-07)
QVHIGHLIGHTS: Detecting Moments and Highlights in Videos via Natural Language Queries
2307.02869 (2023-07)
MomentDiff: Generative Video Moment Retrieval from Random to Real
2311.08835 (2023-11)
Correlation-Guided Query-Dependency Calibration for Video Temporal Grounding
and 7 more not named here
build_position_encoding 9 other papers
9 dated earlier
2307.02869 (2023-07)
MomentDiff: Generative Video Moment Retrieval from Random to Real
2307.16715 (2023-07)
UniVTG: Towards Unified Video-Language Temporal Grounding
2308.06947 (2023-08)
Knowing Where to Focus: Event-aware Transformer for Video Grounding
and 6 more not named here
span_xx_to_cxw 9 other papers
8 dated earlier, 1 later
2307.02869 (2023-07)
MomentDiff: Generative Video Moment Retrieval from Random to Real
2311.08835 (2023-11)
Correlation-Guided Query-Dependency Calibration for Video Temporal Grounding
2312.00083 (2023-12)
BAM-DETR: Boundary-Aligned Moment Detection Transformer for Temporal Sentence Grounding in Videos
and 6 more not named here
temporal_iou 8 other papers
7 dated earlier, 1 later
2307.02869 (2023-07)
MomentDiff: Generative Video Moment Retrieval from Random to Real
2311.08835 (2023-11)
Correlation-Guided Query-Dependency Calibration for Video Temporal Grounding
2401.01529 (2024-01)
Glance and Focus: Memory Prompting for Multi-Event Video Question Answering
and 5 more not named here
gen_sineembed_for_position 2 other papers
2 dated earlier
2311.16464 (2023-11)
Bridging the Gap: A Unified Video Comprehension Framework for Moment Retrieval and Highlight Detection
Xiao_Bridging_the_Gap_A_Unified_Video_Comprehension_Framework_for_Moment_CVPR_2024_paper (2024 (year only))
Bridging the Gap: A Unified Video Comprehension Framework for Moment Retrieval and Highlight Detection

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.

For agents

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

get_harvested_code_for_paper("2501.07305")
get_code_for_paper("2501.07305")
have("2501.07305")

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

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

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

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

Connect an agent — have() is free.