SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2409.19865 · 2024

TokenBinder: Text-Video Retrieval with One-to-Many Alignment Paradigm

arXiv · PDF · Open in the Atlas

Code that ran

11 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; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 11 failures of our instrument; 0 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-22; 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/2409.19865.json · badge: /api/ran/2409.19865.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
bingqingzhang/TokenBinder canonical (classifier label)
classifier basis: census
11 ran · 0 no recorded run
FunctionStatusWhere it lives
split_cls Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
bingqingzhang/TokenBinder/src/modeling/CLIP_ViP.py
pointer only (licence: MIT); the stored copy get_code serves, from microsoft/xpretrain, is pointer only (licence: NOASSERTION) · get_code("062b60459dee65d8")
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 microsoft/xpretrain, 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.

clip_loss Ran
ran; our contract draft was wrong, not the code
bingqingzhang/TokenBinder/src/modeling/CLIP.py
pointer only (licence: MIT); the stored copy get_code serves, from microsoft/xpretrain, is pointer only (licence: NOASSERTION) · get_code("e5b89b1f72c319ed")
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 microsoft/xpretrain, 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.

contrastive_loss Ran
ran; our contract draft was wrong, not the code
bingqingzhang/TokenBinder/src/modeling/CLIP.py
pointer only (licence: MIT); the stored copy get_code serves, from microsoft/xpretrain, is pointer only (licence: NOASSERTION) · get_code("4675779aec92d6c0")
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 microsoft/xpretrain, 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.

get_padding Ran
ran; our contract draft was wrong, not the code
bingqingzhang/TokenBinder/src/datasets/data_utils.py
code served (permissive licence) · get_code("0cf387da46369b1a")
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 int; 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
from PIL import Image
import numpy as np

torch.manual_seed(0)

# Test case 1: torch.Tensor input with pad_all=False
tensor_image = torch.randn(1, 3, 4, 5)  # batch=1, channels=3, h=4, w=5

# Test case 2: PIL Image input with pad_all=True
pil_image = Image.new('RGB', (6, 7))  # w=6, h=7

ARGS = {
    "image": tensor_image,
    "max_w": 10,
    "max_h": 12,
    "pad_all": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, 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 int — 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
gumbel_softmax Ran
ran; our contract draft was wrong, not the code
bingqingzhang/TokenBinder/src/modeling/scene_decoder.py
code served (permissive licence) · get_code("7f29142583965575")
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, 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)

ARGS = {
    "logits": torch.randn(2, 4),
    "tau": 1.0,
    "hard": False,
    "dim": -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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (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
image_to_tensor Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
bingqingzhang/TokenBinder/src/datasets/data_utils.py
code served (permissive licence) · get_code("e9242c50098a6ea2")
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 (3, 5, 7) 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)

# Test case 1: 3D image (H, W, C)
image_3d = np.random.rand(5, 7, 3).astype(np.float32)

# Test case 2: 2D image (H, W)
image_2d = np.random.rand(5, 7).astype(np.float32)

# Test case 3: 4D batch (B, H, W, C)
image_4d = np.random.rand(2, 5, 7, 3).astype(np.float32)

# Using the 3D case as primary example
ARGS = {
    'image': image_3d,
    'keepdim': True
}
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 3, dtype family float, shape (3, 5, 7) — shape (3, 5, 7) 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
init_transform_dict Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
bingqingzhang/TokenBinder/src/datasets/dataloader.py
code served (permissive licence) · get_code("e68de232f06a2883")
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
from torchvision import transforms

torch.manual_seed(0)

ARGS = {
    'video_res': (240, 320),
    'input_res': (224, 224),
    'randcrop_scale': (0.8, 1.0),
    'color_jitter': (0.2, 0.2, 0.1),
    'norm_mean': (0.48145466, 0.4578275, 0.40821073),
    'norm_std': (0.26862954, 0.26130258, 0.27577711),
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — 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
init_transform_dict_simple Ran
ran; our contract draft was wrong, not the code
bingqingzhang/TokenBinder/src/datasets/dataloader.py
code served (permissive licence) · get_code("b80fcb70077eb505")
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
import numpy as np
from torchvision import transforms

torch.manual_seed(0)

ARGS = {
    'video_res': (240, 320),
    'input_res': (224, 224),
    'randcrop_scale': (0.8, 1.0),
    'color_jitter': (0, 0, 0),
    'norm_mean': (0.48145466, 0.4578275, 0.40821073),
    'norm_std': (0.26862954, 0.26130258, 0.27577711)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, torchvision — 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
mask_batch_text_tokens Ran
ran; our contract draft was wrong, not the code
bingqingzhang/TokenBinder/src/datasets/data_utils.py
pointer only (licence: MIT); the stored copy get_code serves, from microsoft/xpretrain, is pointer only (licence: NOASSERTION) · get_code("f828f173e6c2fea2")
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 microsoft/xpretrain, 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.

move_to_cuda Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
bingqingzhang/TokenBinder/src/datasets/dataloader.py
code served (permissive licence) · get_code("b68769dd52ad6c44")
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. 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)

# The function move_to_cuda accepts a single parameter: batch
# It can be a Tensor, list, tuple, dict, or other type
# We'll test with a complex nested structure to cover all branches

batch = {
    "tensor_field": torch.randn(2, 4),
    "list_field": [torch.randn(2, 3), torch.randn(1, 4)],
    "tuple_field": (torch.randn(2, 2), torch.randn(3, 4)),
    "nested_dict": {
        "inner_tensor": torch.randn(2, 5),
        "inner_list": [torch.randn(1, 2)]
    },
    "scalar_field": 42,
    "string_field": "test"
}

ARGS = {
    "batch": batch
}
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
parse_with_config Ran
ran; our contract draft was wrong, not the code
bingqingzhang/TokenBinder/src/configs/config.py
pointer only (licence: MIT); the stored copy get_code serves, from SixCorePeach/MCAM, is pointer only (licence: NONE) · get_code("3e81145412a40e36")
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 SixCorePeach/MCAM, 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.

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, 2 the same month, 2 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
contrastive_loss 27 other papers
14 dated earlier, 2 the same month, 10 later, 1 same year, order not determinable · 3 only as an assembly brick
2206.00621 (2022-06)
Cross-View Language Modeling: Towards Unified Cross-Lingual Cross-Modal Pre-training
2209.06430 (2022-09)
CLIP-ViP: Adapting Pre-trained Image-Text Model to Video-Language Alignment
2210.00312 (2022-10)
Multimodal Analogical Reasoning over Knowledge Graphs
and 24 more not named here
clip_loss 6 other papers
5 dated earlier, 1 the same month · 1 only as an assembly brick
2206.00621 (2022-06)
Cross-View Language Modeling: Towards Unified Cross-Lingual Cross-Modal Pre-training
2209.06430 (2022-09)
CLIP-ViP: Adapting Pre-trained Image-Text Model to Video-Language Alignment
2210.00312 (2022-10)
Multimodal Analogical Reasoning over Knowledge Graphs
and 3 more not named here
parse_with_config 6 other papers
5 dated earlier, 1 later
Li_Align_and_Prompt_Video-and-Language_Pre-Training_With_Entity_Prompts_CVPR_2022_paper (2022 (year only))
Align and Prompt: Video-and-Language Pre-training with Entity Prompts
Lin_SwinBERT_End-to-End_Transformers_With_Sparse_Attention_for_Video_Captioning_CVPR_2022_paper (2022 (year only))
SWINBERT: End-to-End Transformers with Sparse Attention for Video Captioning
2206.03428 (2022-06)
Revealing Single Frame Bias for Video-and-Language Learning
and 3 more not named here
mask_batch_text_tokens 5 other papers
5 dated earlier
Li_Align_and_Prompt_Video-and-Language_Pre-Training_With_Entity_Prompts_CVPR_2022_paper (2022 (year only))
Align and Prompt: Video-and-Language Pre-training with Entity Prompts
2206.03428 (2022-06)
Revealing Single Frame Bias for Video-and-Language Learning
2210.06031 (2022-10)
Long-Form Video-Language Pre-Training with Multimodal Temporal Contrastive Learning
and 2 more not named here
image_to_tensor 4 other papers
4 dated earlier
Li_Align_and_Prompt_Video-and-Language_Pre-Training_With_Entity_Prompts_CVPR_2022_paper (2022 (year only))
Align and Prompt: Video-and-Language Pre-training with Entity Prompts
2206.03428 (2022-06)
Revealing Single Frame Bias for Video-and-Language Learning
2303.04995 (2023-03)
Text-Visual Prompting for Efficient 2D Temporal Video Grounding
and 1 more not named here
gumbel_softmax 3 other papers
3 dated earlier
2303.17056 (2023-03)
Audio-Visual Grouping Network for Sound Localization from Mixtures
2309.05281 (2023-09)
Class-Incremental Grouping Network for Continual Audio-Visual Learning
2310.19001 (2023-10)
Uncovering Prototypical Knowledge for Weakly Open-Vocabulary Semantic Segmentation
move_to_cuda 3 other papers
3 dated earlier
Li_Align_and_Prompt_Video-and-Language_Pre-Training_With_Entity_Prompts_CVPR_2022_paper (2022 (year only))
Align and Prompt: Video-and-Language Pre-training with Entity Prompts
2206.03428 (2022-06)
Revealing Single Frame Bias for Video-and-Language Learning
2303.04995 (2023-03)
Text-Visual Prompting for Efficient 2D Temporal Video Grounding
get_padding 2 other papers
2 dated earlier
2206.03428 (2022-06)
Revealing Single Frame Bias for Video-and-Language Learning
2303.04995 (2023-03)
Text-Visual Prompting for Efficient 2D Temporal Video Grounding
split_cls 1 other paper
1 dated earlier
2209.06430 (2022-09)
CLIP-ViP: Adapting Pre-trained Image-Text Model to Video-Language Alignment

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

Text-Video Retrieval (TVR) methods typically match query-candidate pairs by aligning text and video features in coarse-grained, fine-grained, or combined (coarse-to-fine) manners. However, these frameworks predominantly employ a one(query)-to-one(candidate) alignment paradigm, which struggles to discern nuanced differences among candidates, leading to frequent mismatches. Inspired by Comparative Judgement in human cognitive science, where decisions are made by directly comparing items rather than evaluating them independently, we propose TokenBinder. This innovative two-stage TVR framework introduces a novel one-to-many coarse-to-fine alignment paradigm, imitating the human cognitive process of identifying specific items within a large collection. Our method employs a Focused-view Fusion Network with a sophisticated cross-attention mechanism, dynamically aligning and comparing features across multiple videos to capture finer nuances and contextual variations. Extensive experiments on six benchmark datasets confirm that TokenBinder substantially outperforms existing state-of-the-art methods. These results demonstrate its robustness and the effectiveness of its fine-grained alignment in bridging intra- and inter-modality information gaps in TVR tasks.

For agents

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

get_harvested_code_for_paper("2409.19865")
get_code_for_paper("2409.19865")
have("2409.19865")

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

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

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

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

Connect an agent — have() is free.