SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2507.17402 · ICCV · 2025

Enhancing Partially Relevant Video Retrieval with Hyperbolic Learning

Jun Li, Shu-Tao Xia, Min Zhang, Yaowei Wang, Long Chen, Bin Chen, Jinpeng Wang, Chaolei Tan, Niu Lian

arXiv · PDF · Open in the Atlas

Code that ran

9 of 9 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 0 have no contract verdict; 8 failures of our instrument; 0 no recorded run), measured 2026-11-24; 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/2507.17402.json · badge: /api/ran/2507.17402.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
lijun2005/ICCV25-HLFormer canonical (classifier label)
classifier basis: census
9 ran · 0 no recorded run
FunctionStatusWhere it lives
clean_str Ran
ran; our contract draft was wrong, not the code
lijun2005/ICCV25-HLFormer/src/Datasets/data_provider.py
code served (permissive licence) · get_code("1f1241398f80e513")
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 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 re

def clean_str(string):
    string = re.sub('[^A-Za-z0-9]', ' ', string)
    return string.strip().lower().split()

ARGS = {
    'string': 'Hello World! 123'
}
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 list, ndim 1, 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
exp_map0 Ran
ran; our contract draft was wrong, not the code
lijun2005/ICCV25-HLFormer/src/Models/HLFormer/lorentz.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from PalAvik/hycoclip, is pointer only (licence: NOASSERTION) · get_code("50425fe76b28f3bd")
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 PalAvik/hycoclip, 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.

getVideoId Ran
ran; our contract draft was wrong, not the code
lijun2005/ICCV25-HLFormer/src/Datasets/data_provider.py
code served (permissive licence) · get_code("8c68bbddd5e8e5bc")
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 torch

torch.manual_seed(0)

# The function getVideoId takes a cap_id parameter and splits it by '#'
# to extract the video id (the part before the first '#')
# cap_id should be a string

cap_id = "video_123#caption_456"

ARGS = {
    "cap_id": cap_id
}
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 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
get_configs Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
lijun2005/ICCV25-HLFormer/src/Configs/builder.py
code served (permissive licence) · get_code("9b8507e5287d271d")
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 unittest.mock import Mock, patch, MagicMock

torch.manual_seed(0)

# Create mock config modules that would be imported
class MockTVRConfig:
    @staticmethod
    def get_cfg_defaults():
        return {
            'model': 'tvr_model',
            'dataset': 'tvr',
            'batch_size': 32,
            'num_epochs': 10,
            'learning_rate': 0.001
        }

class MockACTConfig:
    @staticmethod
    def get_cfg_defaults():
        return {
            'model': 'act_model',
            'dataset': 'act',
            'batch_size': 16,
            'num_epochs': 20,
            'learning_rate': 0.0001
        }

class MockCHAConfig:
    @staticmethod
    def get_cfg_defaults():
        return {
            'model': 'cha_model',
            'dataset': 'cha',
            'batch_size': 8,
            'num_epochs': 15,
            'learning_rate': 0.0005
        }

# Mock the Configs module structure
import sys
from types import ModuleType

configs_module = ModuleType('Configs')
tvr_module = ModuleType('Configs.tvr')
act_module = ModuleType('Configs.act')
cha_module = ModuleType('Configs.cha')

tvr_module.get_cfg_defaults = MockTVRConfig.get_cfg_defaults
act_module.get_cfg_defaults = MockACTConfig.get_cfg_defaults
cha_module.get_cfg_defaults = MockCHAConfig.get_cfg_defaults

sys.modules['Configs'] = configs_module
sys.modules['Configs.tvr'] = tvr_module
sys.modules['Configs.act'] = act_module
sys.modules['Configs.cha'] = cha_module

configs_module.tvr = tvr_module
configs_module.act = act_module
configs_module.cha = cha_module

ARGS = {
    'dataset_name': 'tvr'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
Configs, numpy, 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
mask_logits Ran
ran, honoured the contract we drafted
lijun2005/ICCV25-HLFormer/src/Models/HLFormer/model.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from songpipi/amdnet, is pointer only (licence: NONE) · get_code("1c17153fb5488283")
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 songpipi/amdnet, 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.

onehot Ran
ran; our contract draft was wrong, not the code
lijun2005/ICCV25-HLFormer/src/Models/HLFormer/model_components.py
code served (permissive licence) · get_code("23b5db90923f7386")
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 int, shape (2, 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 long tensor of indexes
# The function expects a long tensor with arbitrary shape
# Let's create a 2D tensor with shape (2, 3) containing index values
indexes = torch.tensor([[0, 1, 2], [1, 2, 0]], dtype=torch.long)

# N can be None (will be inferred from max index) or an explicit integer
# Let's provide an explicit N value that's larger than the max index
N = 4

ARGS = {
    "indexes": indexes,
    "N": N,
}
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 int, shape (2, 3, 4) — shape (2, 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
pairwise_dist Ran
ran; our contract draft was wrong, not the code
lijun2005/ICCV25-HLFormer/src/Models/HLFormer/lorentz.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from PalAvik/hycoclip, is pointer only (licence: NOASSERTION) · get_code("c7fb06306d01f2ab")
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 PalAvik/hycoclip, 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.

pairwise_inner Ran
ran; our contract draft was wrong, not the code
lijun2005/ICCV25-HLFormer/src/Models/HLFormer/lorentz.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from PalAvik/hycoclip, is pointer only (licence: NOASSERTION) · get_code("19d1fe78ec51afe1")
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 PalAvik/hycoclip, 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.

read_video_ids Ran
ran; our contract draft was wrong, not the code
lijun2005/ICCV25-HLFormer/src/Datasets/data_provider.py
code served (permissive licence) · get_code("70f2efad3d316afb")
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 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 tempfile
import os

# Create a temporary caption file for testing
temp_dir = tempfile.mkdtemp()
cap_file = os.path.join(temp_dir, "captions.txt")

# Write sample caption data to the file
# Format: cap_id caption
# cap_id format: video_id#caption_index
with open(cap_file, 'w') as f:
    f.write("video_001#0 A man is walking in the park\n")
    f.write("video_001#1 The man continues walking\n")
    f.write("video_002#0 A cat is sleeping on a mat\n")
    f.write("video_003#0 Birds are flying in the sky\n")
    f.write("video_002#1 The cat wakes up\n")

ARGS = {
    "cap_file": cap_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 list, ndim 1, 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

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 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, 0 later) and 0 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
mask_logits 13 other papers
13 dated earlier · 1 only as an assembly brick
1904.11574 (2019-04)
TVQA+: Spatio-Temporal Grounding for Video Question Answering
2001.09099 (2020-01)
TVR: A Large-Scale Dataset for Video-Subtitle Moment Retrieval
2005.06409 (2020-05)
Dense-Caption Matching and Frame-Selection Gating for Temporal Localization in VideoQA
and 10 more not named here
pairwise_dist 4 other papers
4 dated earlier · 2 only as an assembly brick
2304.09172 (2023-04)
Hyperbolic Image-Text Representations
2410.06912 (2024-10)
Compositional Entailment Learning for Hyperbolic Vision-Language Models
2503.12127 (2025-03)
Hyperbolic Safety-Aware Vision-Language Models
and 1 more not named here
pairwise_inner 4 other papers
4 dated earlier · 2 only as an assembly brick
2304.09172 (2023-04)
Hyperbolic Image-Text Representations
2410.06912 (2024-10)
Compositional Entailment Learning for Hyperbolic Vision-Language Models
2503.12127 (2025-03)
Hyperbolic Safety-Aware Vision-Language Models
and 1 more not named here
exp_map0 3 other papers
3 dated earlier · 1 only as an assembly brick
2304.09172 (2023-04)
Hyperbolic Image-Text Representations
2410.06912 (2024-10)
Compositional Entailment Learning for Hyperbolic Vision-Language Models
2506.21476 (2025-06)
Global and Local Entailment Learning for Natural World Imagery
clean_str 2 other papers
2 dated earlier
2310.05195 (2023-10)
GMMFormer: Gaussian-Mixture-Model Based Transformer for Efficient Partially Relevant Video Retrieval
2405.13824 (2024-05)
GMMFormer v2: An Uncertainty-aware Framework for Partially Relevant Video Retrieval
getVideoId 2 other papers
2 dated earlier
2310.05195 (2023-10)
GMMFormer: Gaussian-Mixture-Model Based Transformer for Efficient Partially Relevant Video Retrieval
2405.13824 (2024-05)
GMMFormer v2: An Uncertainty-aware Framework for Partially Relevant Video Retrieval
onehot 2 other papers
2 dated earlier
2105.06247 (2021-05)
Video Corpus Moment Retrieval with Contrastive Learning
2310.05195 (2023-10)
GMMFormer: Gaussian-Mixture-Model Based Transformer for Efficient Partially Relevant Video Retrieval
read_video_ids 2 other papers
2 dated earlier
2310.05195 (2023-10)
GMMFormer: Gaussian-Mixture-Model Based Transformer for Efficient Partially Relevant Video Retrieval
2405.13824 (2024-05)
GMMFormer v2: An Uncertainty-aware Framework for Partially Relevant Video Retrieval
get_configs 1 other paper
1 dated earlier
2405.13824 (2024-05)
GMMFormer v2: An Uncertainty-aware Framework for Partially Relevant Video Retrieval

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-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Partially Relevant Video Retrieval (PRVR) addresses the critical challenge of matching untrimmed videos with text queries describing only partial content. Existing methods suffer from geometric distortion in Euclidean space that sometimes misrepresents the intrinsic hierarchical structure of videos and overlooks certain hierarchical semantics, ultimately leading to suboptimal temporal modeling. To address this issue, we propose the first hyperbolic modeling framework for PRVR, namely HLFormer, which leverages hyperbolic space learning to compensate for the suboptimal hierarchical modeling capabilities of Euclidean space. Specifically, HLFormer integrates the Lorentz Attention Block and Euclidean Attention Block to encode video embeddings in hybrid spaces, using the Mean-Guided Adaptive Interaction Module to dynamically fuse features. Additionally, we introduce a Partial Order Preservation Loss to enforce "text ≺ video" hierarchy through Lorentzian cone constraints. This approach further enhances cross-modal matching by reinforcing partial relevance between video content and text queries. Extensive experiments show that HLFormer outperforms state-of-the-art methods. Code is released at https://github.com/lijun2005/ICCV25-HLFormer.

For agents

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

get_harvested_code_for_paper("2507.17402")
get_code_for_paper("2507.17402")
have("2507.17402")

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

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

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

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

Connect an agent — have() is free.