Papers › VideoRoPE: What Makes for Good Video Rotary Position Embedding?

VideoRoPE: What Makes for Good Video Rotary Position Embedding?

7 Feb 2025arXiv:2502.05173archive 2025-07-28

Xilin Wei, Xiaoran Liu, Yuhang Zang, Xiaoyi Dong, Pan Zhang, Yuhang Cao, Jian Tong, Haodong Duan, Qipeng Guo, Jiaqi Wang, Xipeng Qiu, Dahua Lin

While Rotary Position Embedding (RoPE) and its variants are widely adopted for their long-context capabilities, the extension of the 1D RoPE to video, with its complex spatio-temporal structure, remains an open challenge. This work first introduces a comprehensive analysis that identifies four key characteristics essential for the effective adaptation of RoPE to video, which have not been fully considered in prior work. As part of our analysis, we introduce a challenging V-NIAH-D (Visual Needle-In-A-Haystack with Distractors) task, which adds periodic distractors into V-NIAH. The V-NIAH-D task demonstrates that previous RoPE variants, lacking appropriate temporal dimension allocation, are easily misled by distractors. Based on our analysis, we introduce \textbf{VideoRoPE}, with a \textit{3D structure} designed to preserve spatio-temporal relationships. VideoRoPE features \textit{low-frequency temporal allocation} to mitigate periodic oscillations, a \textit{diagonal layout} to maintain spatial symmetry, and \textit{adjustable temporal spacing} to decouple temporal and spatial indexing. VideoRoPE consistently surpasses previous RoPE variants, across diverse downstream tasks such as long video retrieval, video understanding, and video hallucination. Our code will be available at \href{https://github.com/Wiselnn570/VideoRoPE}{https://github.com/Wiselnn570/VideoRoPE}.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2502.05173")

Code

Syntology Ran 7 of 17 code samples harvested from 1 repository linked to this paper; 10 have no recorded run. Of those that ran: 3 ran · honoured contract; 2 ran · our draft was wrong; 1 ran · fixture could not drive it; 1 ran with no contract checked.

By repository: official repository: 17 samples from 1 repository, 7 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

wiselnn570/videorope officialmentioned in papermentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

17 samples harvested; 7 ran; 3 honoured the contract we drafted; 10 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

3ran · honoured contract
2ran · our draft was wrong
1ran · fixture could not drive it
1ran
10unverified

Licence: 0 of the 17 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from wiselnn570/videorope. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

repeat_kv wiselnn570/videorope/videorope_plus/v_ruler/easy_context/modeling_qwen2.py official repository ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · 30d7eec482ebf6b1 · report
ceil_by_factor wiselnn570/videorope/videorope_plus/v_ruler/produce_haystack_embedding.py official repository ran · honoured contract fingerprinted Apache-2.0 (permissive) · 6e45201fa27cb24a · report
floor_by_factor wiselnn570/videorope/videorope_plus/v_ruler/produce_haystack_embedding.py official repository ran · honoured contract fingerprinted Apache-2.0 (permissive) · 8155263d7ff19bb3 · report
rotate_half wiselnn570/videorope/videorope-transformer/modeling_videorope.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · b99eea6376d1e212 · report
round_by_factor wiselnn570/videorope/videorope_plus/v_ruler/produce_haystack_embedding.py official repository ran · honoured contract fingerprinted Apache-2.0 (permissive) · e252767324188623 · report
split_list wiselnn570/videorope/eval/model_longvideobench_qwen2_vl.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 076c252c52cbb161 · report
yarn_get_mscale wiselnn570/videorope/videorope-vllm/rotary_embedding.py official repository ran fingerprinted Apache-2.0 (permissive) · 6f1b3ba8631fba49 · report
apply_m_modify_multimodal_rotary_pos_emb wiselnn570/videorope/videorope-transformer/modeling_videorope.py official repository unverified Apache-2.0 (permissive) · 2c362ca95cf34cdf · report
apply_multimodal_rotary_pos_emb wiselnn570/videorope/videorope-transformer/modeling_videorope.py official repository unverified Apache-2.0 (permissive) · eb4d16c3bba7cff8 · report
apply_rotary_pos_emb wiselnn570/videorope/videorope_plus/v_ruler/easy_context/modeling_qwen2.py official repository unverified Apache-2.0 (permissive) · 5d81bffdb6022427 · report
check_ans wiselnn570/videorope/videorope_plus/v_ruler/eval/check_lengthy_multimodal_stack.py official repository unverified Apache-2.0 (permissive) · 763b44466cc2146f · report
cross_ent_normal wiselnn570/videorope/videorope_plus/v_ruler/easy_context/low_mem_cross_ent.py official repository unverified Apache-2.0 (permissive) · c35ff4a704e9ca5b · report
extract_characters_regex wiselnn570/videorope/videorope_plus/v_ruler/eval/check_lengthy_multimodal_stack.py official repository unverified Apache-2.0 (permissive) · 1b0cdd72d3d865a1 · report
get_chunk wiselnn570/videorope/eval/model_longvideobench_qwen2_vl.py official repository unverified Apache-2.0 (permissive) · e32e49fba862aa72 · report
get_chunk wiselnn570/videorope/eval/model_videohallucer.py official repository unverified Apache-2.0 (permissive) · b6f76fcc05062c30 · report
read_jsonl wiselnn570/videorope/eval/model_longvideobench_qwen2_vl.py official repository unverified Apache-2.0 (permissive) · 15f446d6c10dc173 · report
save_upload_json wiselnn570/videorope/videorope_plus/v_ruler/eval/check_lengthy_multimodal_stack.py official repository unverified Apache-2.0 (permissive) · 8e9a7dcac92dd395 · report

Tasks

HallucinationVideo RetrievalVideo Understanding

1 archive task tag without a task page not shown.

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections