LoongRL: 長文脈における高度な推論のための強化学習
LoongRL:Reinforcement Learning for Advanced Reasoning over Long Contexts
October 22, 2025
著者: Siyuan Wang, Gaokai Zhang, Li Lyna Zhang, Ning Shang, Fan Yang, Dongyao Chen, Mao Yang
cs.AI
要旨
長文脈の推論は、大規模言語モデルにとって不可欠である。強化学習(RL)は、連鎖思考(chain-of-thought)における「アハ体験」を誘発することで短い文脈の推論を強化するが、長文脈推論に必要な高度な思考パターンは未だ十分に探求されておらず、高難度のRLデータも不足している。本論文では、高度な長文脈推論のためのデータ駆動型RL手法であるLoongRLを紹介する。LoongRLの中核となるのはKeyChainであり、これは短いマルチホップQA(質問応答)を高難度の長文脈タスクに変換する合成手法である。具体的には、UUIDチェーンを挿入することで、真の質問を大量の関連性の低い文書群の中に隠す。これらのタスクを解決するためには、モデルが正しいチェーンを段階的に追跡し、真の質問を特定し、関連する事実を検索し、それらを推論して正しく回答する必要がある。KeyChainデータを用いたRLトレーニングは、計画-検索-推論-再確認という新たな推論パターンを誘発し、トレーニング長をはるかに超えて一般化する。16Kでトレーニングされたモデルは、128Kのタスクを効果的に解決し、高コストなフル長RLロールアウトを回避する。Qwen2.5-7Bおよび14Bにおいて、LoongRLは長文脈マルチホップQAの精度をそれぞれ+23.5%および+21.1%の絶対的な向上をもたらす。その結果、LoongRL-14Bは74.2のスコアを達成し、o3-mini(74.5)やDeepSeek-R1(74.9)といったはるかに大規模なフロンティアモデルに匹敵する。また、長文脈検索を改善し、128Kの針探しストレステストを全て通過し、短い文脈の推論能力も維持する。
English
Reasoning over long contexts is essential for large language models. While
reinforcement learning (RL) enhances short-context reasoning by inducing "Aha"
moments in chain-of-thought, the advanced thinking patterns required for
long-context reasoning remain largely unexplored, and high-difficulty RL data
are scarce. In this paper, we introduce LoongRL, a data-driven RL method for
advanced long-context reasoning. Central to LoongRL is KeyChain, a synthesis
approach that transforms short multi-hop QA into high-difficulty long-context
tasks by inserting UUID chains that hide the true question among large
collections of distracting documents. Solving these tasks requires the model to
trace the correct chain step-by-step, identify the true question, retrieve
relevant facts and reason over them to answer correctly. RL training on
KeyChain data induces an emergent plan-retrieve-reason-recheck reasoning
pattern that generalizes far beyond training length. Models trained at 16K
effectively solve 128K tasks without prohibitive full-length RL rollout costs.
On Qwen2.5-7B and 14B, LoongRL substantially improves long-context multi-hop QA
accuracy by +23.5% and +21.1% absolute gains. The resulting LoongRL-14B reaches
a score of 74.2, rivaling much larger frontier models such as o3-mini (74.5)
and DeepSeek-R1 (74.9). It also improves long-context retrieval, passes all
128K needle-in-a-haystack stress tests, and preserves short-context reasoning
capabilities.