LoongRL: Reinforcement Learning for Advanced Reasoning over Long Contexts
Siyuan Wang, Gaokai Zhang, Li Lyna Zhang, Ning Shang, Fan Yang, Dongyao Chen, Mao Yang
International Conference on Learning Representations 2026 · Oral
Overview
The talk introduces LoongRL, a novel approach designed to imbue relatively small language models with advanced multi-hop reasoning capabilities over exceptionally long contexts. Presented by Gaokai Zhang and his collaborators, this work addresses a critical limitation in modern large language models (LLMs): while adept at retrieval over long documents, they often falter when complex, multi-step reasoning is required across vast information landscapes. Furthermore, existing reinforcement learning (RL) methods, typically employed to enhance model capabilities, predominantly operate within short-context domains, making their application to long-context reasoning both challenging and prohibitively expensive.

Key moments
- 0:00 LoongRL: 7B model rivals larger models at 128k context
- 1:15 LoongRL's solution: KeyChain data synthesis and GRPO training
- 1:55 KeyChain: Hiding questions for multi-hop retrieval and reasoning
- 3:10 Multi-stage GRPO curriculum for gradual capability building
- 4:05 RL elicits "plan-retrieve-reason-recheck" reasoning pattern
- 4:50 LoongRL-7B rivals frontier models on long-context benchmarks
- 6:20 Efficient generalization from 16k training to 128k inference
- 8:00 Q&A: Generalization limits beyond 128k context
LoongRL: Reinforcement Learning for Advanced Reasoning over Long Contexts
Speakers: Siyuan Wang, Gaokai Zhang, Li Lyna Zhang, Ning Shang, Fan Yang, Dongyao Chen, Mao Yang
Conference: ICLR 2026
YouTube: https://slideslive.com/39062106
Overview
The talk introduces LoongRL, a novel approach designed to imbue relatively small language models with advanced multi-hop reasoning capabilities over exceptionally long contexts. Presented by Gaokai Zhang and his collaborators, this work addresses a critical limitation in modern large language models (LLMs): while adept at retrieval over long documents, they often falter when complex, multi-step reasoning is required across vast information landscapes. Furthermore, existing reinforcement learning (RL) methods, typically employed to enhance model capabilities, predominantly operate within short-context domains, making their application to long-context reasoning both challenging and prohibitively expensive.
LoongRL tackles these dual challenges by proposing an innovative two-pronged solution: KeyChain, an efficient, automatic data synthesis method, and a multi-stage curriculum GRPO (Generalized Policy Optimization) training recipe. The core breakthrough lies in demonstrating that a 7-billion parameter model, trained on a significantly shorter context window of 16,000 tokens, can achieve reasoning performance comparable to much larger, state-of-the-art models like O3-mini and DeepSeek-R1 when evaluated on inference contexts of up to 128,000 tokens. This advancement represents a substantial leap towards making sophisticated long-context reasoning more accessible and computationally efficient for a broader range of AI applications.
Background
▶ Watch: LoongRL: 7B model rivals larger models at 128k context (0:00)
The evolution of large language models has seen remarkable progress in their ability to process and generate human-like text across increasingly long context windows. Modern LLMs can now ingest tens or even hundreds of thousands of tokens, enabling them to handle entire documents, code repositories, or extended conversations. This capability has significantly improved performance on tasks requiring extensive information retrieval, where the model needs to locate specific facts within a large body of text. However, a persistent challenge remains: multi-hop reasoning over these long documents. This refers to tasks where the answer cannot be found through a single, direct lookup but requires synthesizing information from multiple, often disparate, parts of the context, connecting logical steps, and performing complex inference. Despite their vast context windows, many LLMs struggle with these intricate reasoning patterns, often succumbing to hallucination or superficial retrieval.
Simultaneously, reinforcement learning (RL) has emerged as a powerful paradigm for fine-tuning LLMs, allowing them to align with human preferences, follow instructions more accurately, and improve performance on specific tasks. Methods like Reinforcement Learning from Human Feedback (RLHF) have been instrumental in enhancing model utility. However, the vast majority of RL applications for LLMs have focused on short-context domains, such as mathematical problem-solving or code generation, where the input and output sequences are relatively constrained. Applying RL to long-context reasoning presents two significant hurdles: first, the scarcity of high-quality, human-annotated datasets specifically designed for multi-hop reasoning over long documents, which are expensive and time-consuming to create; and second, the prohibitive computational cost of performing RL training on extremely long sequences, where memory and processing requirements scale dramatically with context length.
This confluence of challenges—LLMs' struggle with complex long-context reasoning, the lack of suitable RL data, and the computational burden of long-context RL—creates a critical gap in the ML/systems space. Addressing this gap requires innovative approaches to both data generation and training methodologies that can efficiently cultivate advanced reasoning skills in LLMs without incurring exorbitant costs or compromising general capabilities. LoongRL directly confronts this problem by seeking to enable smaller models to reason effectively over extensive documents, a capability traditionally reserved for much larger, more expensive models or those trained on full-length contexts.
Key Findings
▶ Watch: KeyChain: Hiding questions for multi-hop retrieval and reasoning (1:55)
LoongRL presents several compelling findings that collectively advance the state-of-the-art in long-context reasoning for language models:
- Superior Long-Context Reasoning with Smaller Models: The most significant finding is that a relatively small 7-billion parameter model, LoongRL-7B, trained exclusively on 16,000-token contexts, achieves reasoning performance on 128,000-token inference contexts that rivals powerful frontier models such as O3-mini and DeepSeek-R1. Specifically, LoongRL-7B improved its score from 489 to 724 on the combined LongBench-v1 and LongBench-v2 benchmarks, demonstrating a substantial leap in capability. The 14-billion parameter variant, LoongRL-14B, also showed impressive gains, improving from 531 to 742.
- Efficient Training Paradigm: LoongRL establishes that strong long-context reasoning capabilities can be cultivated by efficiently training on shorter long contexts (16k tokens) rather than requiring costly training at the full inference context length (128k tokens). This paradigm shift is crucial for reducing the computational and financial barriers to developing advanced LLMs.
- Elicitation of Advanced Reasoning Patterns: Through its novel training methodology, LoongRL elicits an advanced, four-stage reasoning pattern within the model: plan, retrieve, reason, and recheck. This emergent behavior enables the model to break down complex problems, strategically locate information, perform inference, and iteratively verify or seek additional supporting facts, mirroring human-like problem-solving strategies.
- Preservation of General Capabilities: A common concern with specialized RL training is the potential for overfitting to narrow task formats, leading to catastrophic forgetting or degradation of general capabilities. LoongRL successfully mitigates this, demonstrating not only preservation but even improvement on the standardized LLM benchmark MMLU and largely maintaining performance on the instruction-following benchmark IFEval. This indicates that the advanced reasoning skills are integrated without compromising the model's broader utility.
- Effectiveness of Synthesized Data and Curriculum: The work rigorously demonstrates the indispensable role of the automatically synthesized KeyChain data and the adaptive multi-stage curriculum GRPO training recipe. The KeyChain data is shown to be sufficiently challenging to prevent saturation and sustain continuous learning, while the curriculum effectively guides the model's development from simpler tasks to progressively harder ones, ensuring consistent improvement.
Technical Deep Dive
▶ Watch: RL elicits "plan-retrieve-reason-recheck" reasoning pattern (4:05)
The technical core of LoongRL lies in the symbiotic design of its data synthesis pipeline, KeyChain, and its multi-stage GRPO training curriculum. Together, these components enable efficient learning of complex reasoning over long contexts.
KeyChain Data Synthesis
The primary challenge in training LLMs for long-context multi-hop reasoning is the scarcity of appropriate, high-quality training data. KeyChain addresses this by providing an easy yet efficient automatic data synthesis mechanism that bypasses the need for expensive human expert annotation.
- Seed Dataset Generation: The process begins with existing multi-hop QA datasets. From these, instances with an "appropriate difficulty" are selected to form a proper seed dataset. This ensures a foundational level of complexity for the subsequent training.
- Distractor Document Augmentation: To simulate long-context scenarios, distractor documents are added to these seed instances, extending the overall context length to the target training context size (e.g., 16,000 tokens). This is a common practice in long-context research to increase the informational density.
- Hiding the Question via UUID Chains: The innovative aspect of KeyChain is the introduction of an "extensive layer of retrieval" for the question itself. Instead of presenting the question directly, end-to-end UUID chains are randomly inserted throughout the context. The actual question is hidden within one of these chains, while other incorrect chains lead to distracting or irrelevant questions.
- This design forces the model to engage in a multi-pass retrieval process. First, it must locate the correct question by following the appropriate UUID chain, which, like the incorrect ones, can involve multiple "jumps" or steps across the document.
- Only after successfully identifying the real question can the model then proceed to retrieve relevant evidence from the context to answer it. This two-tiered retrieval process (question-finding then evidence-finding) fundamentally enhances the difficulty and forces deeper contextual understanding beyond simple keyword matching.
- The structure is designed to extensively train both retrieval and reasoning simultaneously, compelling the model to first search the context for the question, decide what information is needed, go back to the context for evidence, and then use that information for reasoning.
- Reward Mechanism: In the RL training, rewards are only granted for the correct final answer. This strict reward function prevents "reward hacking," where a model might exploit superficial patterns or provide partially correct information without true understanding.
- Difficulty Manipulation: KeyChain also incorporates mechanisms for difficulty manipulation to ensure a gradual learning curve. This prevents the model from being overwhelmed by overly complex tasks at the outset, akin to not asking a primary school student to learn linear algebra immediately.
Multi-Stage Curriculum GRPO Training Recipe
To effectively leverage the KeyChain data and cultivate advanced reasoning, LoongRL employs a multi-stage GRPO (Generalized Policy Optimization) training curriculum. GRPO is a policy optimization algorithm that aims to find an optimal policy by iteratively updating the policy parameters based on observed rewards.
The curriculum consists of three distinct stages:
- Non-KeyChain Warm-up Stage: This initial stage uses regular long-context data where the question is not hidden. The purpose is to provide a foundational understanding and improve the "weaker 7B model" with basic long-context processing capabilities before introducing the more complex KeyChain tasks. This prevents the model from being "thrown into the deep end" immediately.
- KeyChain-based Training Stage: After the warm-up, the model transitions to actual KeyChain-based training. Here, the model learns to navigate the hidden question structures, perform multi-pass retrieval, and engage in the initial stages of the plan-retrieve-reason-recheck pattern.
- Hard Mining Stage: The final stage focuses exclusively on the "more difficult and unresolved data" encountered during previous training. This hard mining strategy ensures that the model dedicates its learning capacity to mastering the most challenging aspects of long-context reasoning, pushing its boundaries beyond easily solvable problems.
The intuition behind this curriculum is to gradually build the model's reasoning capabilities. The transition between stages is dynamically managed, with a "plateau in reward" serving as a proxy for switching stages. This adaptive mechanism ensures the model is neither struggling to catch up with overwhelming difficulty nor becoming complacent with tasks that are too easy, thereby optimizing the learning trajectory.
Emergent Reasoning Pattern
A key insight from the LoongRL project is the observation that this specific data synthesis and curriculum design elicits an advanced, four-stage reasoning pattern within the model:
- Plan: The model learns to break down difficult problems into specific, manageable steps.
- Retrieve: It becomes adept at locating easier-to-find information relevant to each step, often requiring iterative searches within the context.
- Reason: The model then reasons over the retrieved information to derive intermediate conclusions or partial answers.
- Recheck: Finally, it verifies its current state, and if needed, goes back to the context to retrieve more supporting facts or refine its understanding.
This iterative plan-retrieve-reason-recheck behavior is a direct consequence of the KeyChain data's design, which "enforces and teaches the model to continue going back to the context until it finds the answer for sure." The increased "token responsiveness" observed during training suggests the model is learning to allocate more, but reasonable, computational effort to difficult reasoning problems, aligning with this sophisticated problem-solving approach.
The ability to train on 16k tokens and generalize to 128k is explained by the analogy that adding the KeyChain's extensive retrieval layer (e.g., 100 times retrieval at 16k) is computationally equivalent to performing a smaller number of retrievals (e.g., 10 times) at 128k. This implies that the intensive "work" done in the shorter training context effectively pre-trains the model for appropriate levels of work in longer inference contexts.
Experimental Setup & Results
▶ Watch: LoongRL-7B rivals frontier models on long-context benchmarks (4:50)
The experimental evaluation of LoongRL was designed to rigorously assess its long-context reasoning capabilities, its efficiency, and its impact on general model performance.
Models: The primary focus was on LoongRL-7B, a 7-billion parameter model, with supplementary results provided for LoongRL-14B, a 14-billion parameter variant. Both models were initialized from existing base LLMs.
Training Context: A crucial aspect of the setup was that all models were trained using a maximum context length of 16,000 tokens. This "shorter long context" strategy is central to the project's efficiency claims.
Inference Context & Generalization: Despite being trained on 16k tokens, the models were evaluated for their ability to generalize to much longer inference contexts, specifically up to 128,000 tokens. The speaker also speculated that the model should be able to generalize well to 200,000 tokens, although formal evaluations were not conducted beyond 128k due to benchmark limitations.
Benchmarks:
- Long-Context Reasoning: The primary evaluation was conducted on LongBench-v1 and LongBench-v2, two widely recognized benchmarks for assessing long-context reasoning abilities. These benchmarks typically involve tasks that require processing extensive documents to answer complex questions.
- General Capabilities: To ensure that specialized RL training did not degrade broader LLM performance, models were also evaluated on:
- MMLU (Massive Multitask Language Understanding): A standardized benchmark covering a wide range of academic and professional subjects, used to gauge general knowledge and reasoning.
- IFEval (Instruction Following Evaluation): A benchmark designed to assess a model's ability to accurately follow complex instructions.
Baselines: LoongRL's performance was benchmarked against strong frontier reasoning models, specifically O3-mini and DeepSeek-R1, which are known for their robust long-context capabilities.
Headline Numbers & Performance:
- LoongRL-7B: Demonstrated significant improvement on long-context reasoning. Its score on LongBench-v1 and LongBench-v2 (presumably an aggregate or average metric) improved from an initial 489 to 724. This performance is highlighted as "rivaling strong frontier reasoning models like O3-mini and DeepSeek-R1."
- LoongRL-14B: Also showed substantial gains, improving its LongBench score from 531 to 742.
- General Capabilities: LoongRL not only preserved but improved on MMLU, indicating an enhancement in general knowledge and reasoning rather than degradation. Performance on IFEval was "largely preserved," addressing concerns about overfitting or catastrophic forgetting.
Key Experimental Insights:
- KeyChain's Essential Role: Ablations and training dynamics clearly demonstrated that the KeyChain data is "inevitably essential" for the RL process. It was sufficiently hard to prevent the model from quickly saturating and enabled continuous learning, underscoring the necessity of properly designed training data combined with a tailored curriculum.
- Consistent Training Dynamics: Both LoongRL-7B and LoongRL-14B exhibited "consistent improvement across the training stages without slowing down on some plateau," suggesting the multi-stage curriculum effectively managed difficulty and maintained learning momentum.
- Efficient Generalization Mechanism: The speaker explained the generalization from 16k training to 128k inference by positing that the "extensive layer of retrieval" introduced by KeyChain at 16k tokens (e.g., performing 100 times retrieval) could be conceptually equivalent to performing fewer retrievals (e.g., 10 times) at 128k tokens. This suggests that the model learns a more robust and intensive search strategy within a shorter context, which then translates efficiently to longer contexts.
These results collectively affirm LoongRL's ability to cultivate advanced long-context reasoning in smaller models, achieve state-of-the-art performance, and do so efficiently without compromising other critical capabilities.
Practical Implications
▶ Watch: Q&A: Generalization limits beyond 128k context (8:00)
LoongRL's contributions have several significant practical implications for practitioners, infrastructure teams, model builders, and deployers in the AI/ML space:
- Reduced Computational Cost for Long-Context LLMs: The most immediate impact is the potential to significantly lower the computational resources required to develop and train LLMs capable of strong long-context reasoning. By demonstrating that training on 16,000 tokens can generalize effectively to 128,000 tokens inference, LoongRL bypasses the need for prohibitively expensive training at full inference context lengths. This translates to lower GPU hours, less energy consumption, and faster experimentation cycles.
- Democratization of Advanced Reasoning Capabilities: LoongRL enables relatively smaller models (e.g., 7B parameters) to achieve reasoning performance comparable to much larger, more expensive, or proprietary frontier models. This can make advanced multi-hop reasoning over long documents accessible to a wider range of organizations and researchers who may not have access to massive computational budgets or the resources to train models from scratch on huge contexts.
- Efficient Data Generation: The KeyChain automatic data synthesis method offers a cheap and efficient way to curate high-quality, hard-enough long-context reasoning data. This eliminates the bottleneck and high cost associated with human expert annotation, making it easier for teams to generate custom datasets tailored to specific long-context reasoning needs without human-in-the-loop intervention.
- Robustness and Generalization: The finding that LoongRL preserves and even improves general capabilities (MMLU, IFEval) while specializing in long-context reasoning is crucial. It means model builders can confidently apply this RL methodology without fear of degrading the model's broader utility or encountering catastrophic forgetting, making the resulting models more versatile for deployment.
- Blueprint for Cultivating Complex Skills: LoongRL provides a systematic framework—combining structured data synthesis with a multi-stage curriculum RL—for cultivating complex, emergent reasoning behaviors in LLMs. This methodology can serve as a blueprint for teaching other sophisticated skills that require iterative processing and deep contextual understanding.
Tradeoffs and Limitations:
- Complexity of Implementation: While the data synthesis is automatic, designing and implementing the KeyChain mechanism (UUID chains, difficulty manipulation) and the multi-stage GRPO curriculum requires specialized expertise in RL and data engineering. It's not a plug-and-play solution for all existing datasets.
- Generalization Limits: While generalization to 128k tokens is impressive, the talk acknowledges that the breaking point beyond 128k is unknown. The speaker speculated about 200k, but further research is needed to understand the true upper bounds of this generalization and if the "100x retrieval at 16k ~ 10x retrieval at 128k" analogy holds indefinitely.
- Specific Task Focus: Although general capabilities are preserved, the training is highly specialized for multi-hop question answering and reasoning over long documents. Its direct applicability to other long-context tasks (e.g., summarization, creative writing, code generation) might require adaptation or further fine-tuning.
- Initial Model Strength: The approach starts with "weaker 7B models." The baseline performance of these models before LoongRL training (e.g., 489 on LongBench for 7B) suggests they have some initial long-context processing ability, which is then dramatically enhanced. The effectiveness on truly weak or unspecialized base models might vary.
Overall, LoongRL offers a powerful, efficient, and practical pathway for developing advanced long-context reasoning capabilities in LLMs, especially for teams seeking to maximize performance while minimizing computational overhead.
Key Takeaways
- Efficient Long-Context Reasoning: LoongRL enables 7B parameter models, trained on 16k token contexts, to rival larger SOTA models like O3-mini and DeepSeek-R1 on 128k token inference contexts.
- Novel Data Synthesis (KeyChain): The KeyChain method automatically synthesizes challenging long-context data by hiding questions within UUID chains, forcing multi-pass retrieval for both questions and evidence, without human-in-the-loop annotation.
- Multi-Stage GRPO Curriculum: A multi-stage GRPO training recipe (warm-up, KeyChain-based, hard mining) gradually builds reasoning capabilities, adapting to model progress using reward plateaus.
- Emergent Reasoning Pattern: The training elicits an advanced plan-retrieve-reason-recheck problem-solving strategy within the model, enhancing its ability to break down complex tasks and iteratively seek information.
- Preservation of General Capabilities: LoongRL improves general LLM benchmarks like MMLU and preserves performance on instruction following, demonstrating that specialized long-context training does not compromise broader utility.
- Cost-Effective Development: The approach suggests that strong long-context reasoning can be cultivated efficiently at much shorter training contexts, drastically reducing the computational and financial burden of developing such models.
About the Speaker(s)
The talk was presented by Gaokai Zhang, representing a collaborative effort with Siyuan Wang, Li Lyna Zhang, Ning Shang, Fan Yang, Dongyao Chen, and Mao Yang. While specific institutional affiliations are not detailed in the transcript, the work was showcased at ICLR 2026, indicating their involvement in cutting-edge research in artificial intelligence and machine learning. Gaokai Zhang introduced himself as an enthusiastic presenter of the LoongRL paper, highlighting the team's achievement in enabling smaller models to reason effectively over long documents, addressing key challenges in data scarcity and computational expense for reinforcement learning in this domain.
Reviews
→ Top-rated talks at International Conference on Learning Representations 2026
All talks from International Conference on Learning Representations 2026