Papers › Scaling RL to Long Videos

Scaling RL to Long Videos

10 Jul 2025arXiv:2507.07966archive 2025-07-28

Yukang Chen, Wei Huang, Baifeng Shi, Qinghao Hu, Hanrong Ye, Ligeng Zhu, Zhijian Liu, Pavlo Molchanov, Jan Kautz, Xiaojuan Qi, Sifei Liu, Hongxu Yin, Yao Lu, Song Han

We introduce a full-stack framework that scales up reasoning in vision-language models (VLMs) to long videos, leveraging reinforcement learning. We address the unique challenges of long video reasoning by integrating three critical components: (1) a large-scale dataset, LongVideo-Reason, comprising 52K long video QA pairs with high-quality reasoning annotations across diverse domains such as sports, games, and vlogs; (2) a two-stage training pipeline that extends VLMs with chain-of-thought supervised fine-tuning (CoT-SFT) and reinforcement learning (RL); and (3) a training infrastructure for long video RL, named Multi-modal Reinforcement Sequence Parallelism (MR-SP), which incorporates sequence parallelism and a vLLM-based engine tailored for long video, using cached video embeddings for efficient rollout and prefilling. In experiments, LongVILA-R1-7B achieves strong performance on long video QA benchmarks such as VideoMME. It also outperforms Video-R1-7B and even matches Gemini-1.5-Pro across temporal reasoning, goal and purpose reasoning, spatial reasoning, and plot reasoning on our LongVideo-Reason-eval benchmark. Notably, our MR-SP system achieves up to 2.1x speedup on long video RL training. LongVILA-R1 demonstrates consistent performance gains as the number of input video frames scales. LongVILA-R1 marks a firm step towards long video reasoning in VLMs. In addition, we release our training system for public availability that supports RL training on various modalities (video, text, and audio), various models (VILA and Qwen series), and even image and video generation models. On a single A100 node (8 GPUs), it supports RL training on hour-long videos (e.g., 3,600 frames / around 256k tokens).

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="2507.07966")

Code

Syntology Ran 8 of 24 code samples harvested from 2 repositories linked to this paper; 16 have no recorded run. Of those that ran: 1 ran · violated contract; 3 ran · our draft was wrong; 1 ran · fixture could not drive it; 3 ran with no contract checked.

By repository: official repository: 6 samples from 1 repository, 4 ran; found in paper text by Syntology: 18 samples from 1 repository, 4 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

hiyouga/easyr1 officialmentioned in papermentioned on GitHubpytorch 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

24 samples harvested; 8 ran; 0 honoured the contract we drafted; 16 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.

1ran · violated contract
3ran · our draft was wrong
1ran · fixture could not drive it
3ran
16unverified

Licence: 0 of the 24 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 2 repositories linked to this paper, official or community; each sample names its own and says which. “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.

SeqAllToAll hiyouga/easyr1/verl/utils/ulysses.py official repository ran Apache-2.0 (permissive) · 9ab20c0df51491c6 · report
_unpad_tensor hiyouga/easyr1/verl/utils/ulysses.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · bc1859396d0efde4 · report
gather_seq_scatter_heads hiyouga/easyr1/verl/utils/ulysses.py official repository ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · c370c3e6e37ff52d · report
get_ulysses_sequence_parallel_world_size hiyouga/easyr1/verl/utils/ulysses.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 5bc06ef1058a26db · report
all_to_all_tensor hiyouga/easyr1/verl/utils/ulysses.py official repository unverified Apache-2.0 (permissive) · 50fceeb8e224ae4b · report
get_ulysses_sequence_parallel_group hiyouga/easyr1/verl/utils/ulysses.py official repository unverified Apache-2.0 (permissive) · c3db68c3c1890a1b · report
check_dot_in_model_path nvlabs/long-rl/verl/utils/vila_remote_code/modeling_vila.py found in paper text by Syntology ran · violated contract Apache-2.0 (permissive) · 8dd6b65f72c07727 · report
get_vila_version nvlabs/long-rl/verl/utils/vila_remote_code/modeling_vila.py found in paper text by Syntology ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 554c742ab091b991 · report
prepare_fa2_from_position_ids NVlabs/Long-RL/verl/models/transformers/flash_attention_utils.py found in paper text by Syntology ran Apache-2.0 (permissive) · 4049cf08f994464e · report
unpad_dataproto NVlabs/Long-RL/verl/protocol.py found in paper text by Syntology ran Apache-2.0 (permissive) · a91c18341292d50e · report
collect_video_files NVlabs/Long-RL/longvideo-reason/step3_merge_captions.py found in paper text by Syntology unverified Apache-2.0 (permissive) · defc3c221f010765 · report
compute_gae_advantage_return NVlabs/Long-RL/verl/trainer/core_algos.py found in paper text by Syntology unverified Apache-2.0 (permissive) · b0bfe8a6b7ced02a · report
compute_grpo_outcome_advantage NVlabs/Long-RL/verl/trainer/core_algos.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 758c7f607efffb52 · report
flash_attention_forward NVlabs/Long-RL/verl/models/transformers/flash_attention_utils.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 2058875a75c3ff14 · report
generate_captions NVlabs/Long-RL/longvideo-reason/step4_gen_reasoning_data.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 6e021f58ff92252d · report
generate_gpt NVlabs/Long-RL/longvideo-reason/step6_reformat_reasoning_data.py found in paper text by Syntology unverified Apache-2.0 (permissive) · c02118fc07296220 · report
get_chunked_index NVlabs/Long-RL/verl/models/transformers/qwen2_5_omni.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 452188d5e8665c1e · report
get_kl_controller NVlabs/Long-RL/verl/trainer/core_algos.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 7633fd09bcf8972a · report
get_llm_pos_ids_for_vision NVlabs/Long-RL/verl/models/transformers/qwen2_5_omni.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 2b24afde621bf5ff · report
get_rope_index_omni NVlabs/Long-RL/verl/models/transformers/qwen2_5_omni.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 867399f13a93e09a · report
merge_captions NVlabs/Long-RL/longvideo-reason/step3_merge_captions.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 34e4399c3e46211a · report
pad_dataproto_to_divisor NVlabs/Long-RL/verl/protocol.py found in paper text by Syntology unverified Apache-2.0 (permissive) · c7a1430e0e702826 · report
parse_reasoning NVlabs/Long-RL/longvideo-reason/step5_parse_reasoning_data.py found in paper text by Syntology unverified Apache-2.0 (permissive) · d9f1e79118788b85 · report
union_tensor_dict NVlabs/Long-RL/verl/protocol.py found in paper text by Syntology unverified Apache-2.0 (permissive) · ad658a1d6fe829ba · report

Tasks

Reinforcement Learning (RL)Spatial ReasoningVideo Generation

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