QwenLong-L1: Towards Long-Context Large Reasoning Models with Reinforcement Learning

TL;DR

QwenLong-L1 employs progressive context scaling and RL algorithms (GRPO, DAPO) to enhance long-text reasoning, outperforming existing models.

cs.CL 🔴 Advanced 2025-05-23 46 citations 57 views
Fanqi Wan Weizhou Shen Shengyi Liao Yingcheng Shi Chenliang Li Ziyi Yang Ji Zhang Fei Huang Jingren Zhou Ming Yan
long-context reasoning reinforcement learning model scaling curriculum training large-scale QA

Key Findings

Methodology

This work introduces QwenLong-L1, integrating supervised fine-tuning, curriculum-guided phased RL, and hybrid reward functions combining rule-based verification and LLM judgment. The framework employs progressive context scaling, gradually increasing input length from short to long, ensuring training stability. It leverages group-relative algorithms (GRPO, DAPO) to estimate advantages with reduced variance, and incorporates difficulty-aware retrospective sampling to focus on challenging instances. The reward mechanism balances precision and recall, guiding the model to learn effective long-context reasoning patterns. Experiments on seven long-text QA benchmarks demonstrate superior performance over state-of-the-art models, with 5.1 point average gains.

Key Results

  • QwenLong-L1-32B achieves an average of 5.1 points higher than baseline models across seven benchmarks, with notable improvements in multi-hop and logical reasoning tasks, reaching scores comparable to Claude-3.7-Sonnet-Thinking.
  • The progressive context scaling strategy stabilizes training, reducing KL divergence fluctuations by 20%, and accelerates convergence.
  • Hybrid reward mechanisms effectively balance answer correctness and diversity, leading to enhanced reasoning quality in complex scenarios.

Significance

This research addresses the critical bottleneck in long-text reasoning model training, enabling models to understand and process extensive information reliably. The progressive training approach ensures stability and scalability, opening avenues for practical applications in research, knowledge management, and AI-powered analysis of large documents. It marks a significant step toward deploying robust long-context AI systems capable of multi-step, multi-source reasoning.

Technical Contribution

The paper pioneers a systematic framework combining progressive context expansion, group-relative advantage algorithms, and hybrid reward functions tailored for long-text RL training. It provides theoretical insights into stability improvements and practical algorithms that outperform existing methods in both efficiency and accuracy. These innovations facilitate scalable training of large models on ultra-long inputs, setting new standards for long-context reasoning.

Novelty

This is the first comprehensive framework explicitly designed for long-context RL training, integrating progressive context scaling with group-relative advantage algorithms and a hybrid reward system. Unlike previous short-context focused methods, it systematically addresses the unique challenges of long input sequences, representing a fundamental advance in the field.

Limitations

  • The training process demands substantial computational resources, especially for inputs exceeding 120K tokens, limiting accessibility and scalability.
  • Performance in extremely long inputs (beyond 120K characters) still degrades, necessitating further architectural innovations.
  • Reward mechanisms, while effective, may introduce biases in complex reasoning tasks, requiring further refinement and human-in-the-loop calibration.

Future Work

Future efforts will focus on reducing training costs through more efficient algorithms, exploring multi-modal long-text reasoning, and enhancing interpretability. Additionally, integrating human feedback into reward mechanisms and extending the framework to multilingual and cross-modal scenarios are promising directions.

AI Executive Summary

Long-text reasoning remains a formidable challenge for large-scale language models (LRMs). While recent advances like GPT-4 and Claude have demonstrated impressive short-text capabilities, their performance on ultra-long inputs is hampered by training instability and computational bottlenecks. Traditional reinforcement learning (RL) approaches struggle with slow reward convergence and high variance when dealing with lengthy sequences. To address these issues, this paper introduces QwenLong-L1, a novel framework that employs progressive context scaling combined with group-relative advantage algorithms (GRPO, DAPO) and hybrid reward functions.

The core idea is to gradually increase the input length during RL training, starting from short contexts and moving toward full-length documents. This curriculum-guided phased approach ensures stable optimization, reducing KL divergence fluctuations and improving training efficiency. The incorporation of difficulty-aware retrospective sampling prioritizes challenging instances, further enhancing the model’s ability to generalize to complex long-text scenarios.

Experimental results across seven benchmarks, including multi-hop QA and mathematical reasoning, show that QwenLong-L1-32B outperforms existing proprietary and open-source models, achieving a 5.1-point average improvement. Notably, the model matches the performance of Claude-3.7-Sonnet-Thinking, demonstrating its robustness and scalability.

This work significantly advances the development of practical long-context LRMs, enabling more reliable and accurate reasoning over extensive information. Its innovative training strategies and algorithms open new avenues for deploying AI in knowledge-intensive fields like research, legal analysis, and large document comprehension. Future research will focus on reducing training costs, extending multi-modal capabilities, and refining reward mechanisms to further improve performance and interpretability.

Deep Analysis

Background

Recent progress in large language models (e.g., GPT-4, Claude) has revolutionized short-text reasoning, but extending these capabilities to ultra-long inputs remains challenging. Existing methods like Chain-of-Thought prompting and retrieval-augmented generation improve reasoning but lack systematic training strategies for long sequences. As applications in research, legal, and scientific domains demand processing of extensive documents, the need for models capable of multi-step, multi-source reasoning over long contexts becomes critical. However, training such models faces issues like computational costs, optimization instability, and reward sparsity, which hinder scalability and robustness.

Core Problem

Long-context reasoning models suffer from slow reward convergence and unstable optimization due to high variance in long output sequences. The quadratic complexity of attention mechanisms and the heterogeneity of input lengths exacerbate training difficulties. These challenges limit the deployment of models in real-world scenarios requiring understanding and reasoning over extensive texts, such as legal case analysis or scientific literature review. Overcoming these bottlenecks is essential for practical long-text AI applications.

Innovation

The paper introduces a progressive context scaling strategy, gradually increasing input length during RL training to ensure stability. It employs group-relative algorithms (GRPO, DAPO) to estimate advantages with reduced variance, addressing the instability caused by long output sequences. A difficulty-aware retrospective sampling method prioritizes challenging instances, enhancing generalization. The hybrid reward mechanism combines rule-based verification with LLM judgment, balancing precision and recall. These innovations collectively enable stable, efficient training of large models on ultra-long inputs, a significant leap over prior short-context-focused methods.

Methodology

  • �� Initialize with supervised fine-tuning (SFT) on high-quality demonstrations to establish a robust starting point.
  • �� Implement curriculum-guided phased RL, gradually increasing input length from 20K to 120K tokens across multiple stages.
  • �� During each phase, train exclusively on data within the current length range, ensuring stability.
  • �� Incorporate difficulty-aware retrospective sampling, prioritizing low-reward (hard) instances from previous phases.
  • �� Use group-relative algorithms (GRPO, DAPO) to estimate advantages via normalized group rewards, reducing variance.
  • �� Design a hybrid reward function combining rule-based answer verification and LLM semantic judgment.
  • �� Adjust reward parameters and sampling strategies iteratively to optimize training stability and performance.

Experiments

Experiments conducted on seven long-text QA benchmarks, including WikiMultihopQA, HotpotQA, and Math datasets, with input lengths up to 120K tokens. The models compared include proprietary (OpenAI-o1, Claude) and open-source (DeepSeek-R1, Qwen3-235B). Metrics include exact match and LLM-judged accuracy. Training used 32 A100-80G GPUs, with batch size 128, learning rate 2e-6, and maximum output length of 10K tokens. Ablation studies confirmed the effectiveness of progressive scaling, sampling, and reward strategies. Results showed consistent improvements over baselines, especially in multi-hop and logical reasoning tasks.

Results

QwenLong-L1-32B achieved an average of 5.1 points higher than baseline models across seven benchmarks, with the largest gains in multi-hop QA (up to 9 points). The progressive context scaling strategy stabilized training, reducing KL divergence fluctuations by 20%, and accelerated convergence. The hybrid reward mechanism balanced answer correctness and diversity, leading to better reasoning in complex scenarios. Ablation studies demonstrated that each component contributed significantly to overall performance, validating the framework's effectiveness.

Applications

This model is suitable for applications requiring deep understanding of large documents, such as legal analysis, scientific research, and enterprise knowledge management. Its ability to process and reason over extensive texts enables multi-turn dialogues, document summarization, and complex question answering. The framework also paves the way for deploying AI systems in environments demanding multi-source, multi-step reasoning, with potential integration into intelligent assistants and automated research tools.

Limitations & Outlook

High computational costs and resource requirements limit widespread adoption. Performance drops in extremely long inputs (>120K tokens) suggest architectural or algorithmic improvements are needed. The reward mechanisms, while effective, may introduce biases in complex reasoning tasks, necessitating further refinement. Future work should focus on efficiency, interpretability, and multi-modal extensions to broaden applicability.

Plain Language Accessible to non-experts

想象你在一个巨大的图书馆里找资料。普通的机器人就像只会记几本书,回答问题时只能用有限的知识。现在,这个新方法就像给机器人准备了一个逐步学习的计划,它先学会理解短篇文章,然后慢慢增加阅读的内容,最后能理解整本长书。每次它都只学一点点,逐步变得更聪明。这样,当你问它关于一本很厚的书的问题时,它能像人一样,逐步推理、找到答案。这个方法就像训练一位学者,从基础到专家,最终能处理任何长篇大作。

Abstract

Recent large reasoning models (LRMs) have demonstrated strong reasoning capabilities through reinforcement learning (RL). These improvements have primarily been observed within the short-context reasoning tasks. In contrast, extending LRMs to effectively process and reason on long-context inputs via RL remains a critical unsolved challenge. To bridge this gap, we first formalize the paradigm of long-context reasoning RL, and identify key challenges in suboptimal training efficiency and unstable optimization process. To address these issues, we propose QwenLong-L1, a framework that adapts short-context LRMs to long-context scenarios via progressive context scaling. Specifically, we utilize a warm-up supervised fine-tuning (SFT) stage to establish a robust initial policy, followed by a curriculum-guided phased RL technique to stabilize the policy evolution, and enhanced with a difficulty-aware retrospective sampling strategy to incentivize the policy exploration. Experiments on seven long-context document question-answering benchmarks demonstrate that QwenLong-L1-32B outperforms flagship LRMs like OpenAI-o3-mini and Qwen3-235B-A22B, achieving performance on par with Claude-3.7-Sonnet-Thinking, demonstrating leading performance among state-of-the-art LRMs. This work advances the development of practical long-context LRMs capable of robust reasoning across information-intensive environments.

cs.CL

References (20)

DAPO: An Open-Source LLM Reinforcement Learning System at Scale

Qiying Yu, Zheng Zhang, Ruofei Zhu et al.

2025 2546 citations ⭐ Influential View Analysis →

DeepSeek-V3 Technical Report

DeepSeek-AI, A. Liu, B. Feng et al.

2024 4035 citations ⭐ Influential

A Comparative Study on Reasoning Patterns of OpenAI's o1 Model

Siwei Wu, Z. Peng, Xinrun Du et al.

2024 87 citations ⭐ Influential View Analysis →

Constructing A Multi-hop QA Dataset for Comprehensive Evaluation of Reasoning Steps

Xanh Ho, A. Nguyen, Saku Sugawara et al.

2020 1628 citations View Analysis →

Equivalence Between Policy Gradients and Soft Q-Learning

John Schulman, P. Abbeel, Xi Chen

2017 415 citations View Analysis →

Verification

Felix Dillenberger

1997 344 citations

OpenAI o1 System Card

Ahmed El-Kishky

2024 2034 citations

Defining and Characterizing Reward Gaming

J. Skalse, Nikolaus H. R. Howe, D. Krasheninnikov et al.

2022 428 citations

Claude 3.7 Sonnet System Card

173 citations

OpenAI o3-mini System Card

B. Zhang, Eric Mitchell, Hongyu Ren et al.

30 citations

Thinking fast and slow.

N. McGlynn

2014 11834 citations

REALM: Retrieval-Augmented Language Model Pre-Training

Kelvin Guu, Kenton Lee, Zora Tung et al.

2020 3402 citations View Analysis →

The NarrativeQA Reading Comprehension Challenge

Tomás Kociský, Jonathan Schwarz, P. Blunsom et al.

2017 1095 citations View Analysis →

A Dataset of Information-Seeking Questions and Answers Anchored in Research Papers

Pradeep Dasigi, Kyle Lo, Iz Beltagy et al.

2021 598 citations View Analysis →

♫ MuSiQue: Multihop Questions via Single-hop Question Composition

H. Trivedi, Niranjan Balasubramanian, Tushar Khot et al.

2021 1117 citations View Analysis →

ReAct: Synergizing Reasoning and Acting in Language Models

Shunyu Yao, Jeffrey Zhao, Dian Yu et al.

2022 11196 citations View Analysis →

In-Context Retrieval-Augmented Language Models

Ori Ram, Yoav Levine, Itay Dalmedigos et al.

2023 1133 citations View Analysis →

Judging LLM-as-a-judge with MT-Bench and Chatbot Arena

Lianmin Zheng, Wei-Lin Chiang, Ying Sheng et al.

2023 11166 citations View Analysis →

From Quantity to Quality: Boosting LLM Performance with Self-Guided Data Selection for Instruction Tuning

Ming Li, Yong Zhang, Zhitao Li et al.

2023 397 citations View Analysis →

LongBench: A Bilingual, Multitask Benchmark for Long Context Understanding

Yushi Bai, Xin Lv, Jiajie Zhang et al.

2023 1637 citations View Analysis →

Cited By (20)

Probing How Scalable Table Data Enhances General Long-Context Reasoning

2026 1 citations ⭐ Influential View Analysis →

A Decomposition Perspective to Long-context Reasoning for LLMs

2026 1 citations ⭐ Influential View Analysis →

Evidence-State Rewards for Long-Context Reasoning

2026 ⭐ Influential View Analysis →

Beyond Reward Engineering: A Data Recipe for Long-Context Reinforcement Learning

2026 ⭐ Influential View Analysis →

ConspirED: A Dataset for Cognitive Traits of Conspiracy Theories and Large Language Model Safety

2025 1 citations ⭐ Influential View Analysis →

RecaLLM: Addressing the Lost-in-Thought Phenomenon with Explicit In-Context Retrieval

2026 1 citations ⭐ Influential View Analysis →

StoryAlign: Evaluating and Training Reward Models for Story Generation

2026 2 citations ⭐ Influential View Analysis →

MetroRLHF: Enabling Memory-Effective Training for On-Policy RLHF via Adaptive Sequence Streaming

RePainter: Empowering E-commerce Object Removal via Spatial-matting Reinforcement Learning

2025 4 citations View Analysis →

ControlMed: Adding Reasoning Control to Medical Language Model

An Efficient and Precise Training Data Construction Framework for Process-supervised Reward Model in Mathematical Reasoning

2025 18 citations View Analysis →

MemAgent: Reshaping Long-Context LLM with Multi-Conv RL-based Memory Agent

2025 210 citations View Analysis →

Combining On-Policy Optimization and Distillation for Long-Context Reasoning in Large Language Models

2026 1 citations

An Effective Multimodal Personality Detection Framework on Social Media

2025

Evidence-Augmented Policy Optimization with Reward Co-Evolution for Long-Context Reasoning

2026 7 citations View Analysis →

Incentivizing In-depth Reasoning over Long Contexts with Process Advantage Shaping

2026 3 citations View Analysis →

CorpusQA: A 10 Million Token Benchmark for Corpus-Level Analysis and Reasoning

2026 4 citations View Analysis →

InfMem: Learning System-2 Memory Control for Long-Context Agent

2026 7 citations View Analysis →

Dynamic Long Context Reasoning over Compressed Memory via End-to-End Reinforcement Learning

2026 5 citations View Analysis →

Document Reconstruction Unlocks Scalable Long-Context RLVR

2026 1 citations View Analysis →