长上下文推理是当前大模型的瓶颈,LongTraceRL 用搜索轨迹和细粒度奖励解决了干扰项和奖励稀疏的问题,做推理模型训练或长文档理解的团队可以直接用开源代码复现。
LongTraceRL 是一种新方法,旨在解决大语言模型在长上下文推理中难以定位和整合关键信息的问题。它通过知识图谱随机游走生成多跳问题,并利用搜索智能体的轨迹构建高混淆度的干扰文档,使训练上下文更具挑战性。同时,它提出了一种基于实体级过程监督的“评分奖励”,只对正确答案的推理过程进行细粒度评估,避免奖励作弊。在 4B 到 30B 的多个推理模型上,LongTraceRL 在五个长上下文基准测试中持续优于强基线,并促进了基于证据的推理。代码、数据集和模型已开源。
LongTraceRL: Learning Long-Context Reasoning from Search Agent Trajectories with Rubric Rewards
Long-context reasoning remains a central challenge for large language models, which often fail to locate and integrate key information in extensive distracting content. Reinforcement learning with verifiable rewards (RLVR) has shown promise for this task, yet existing methods are limited by low-confusability distractors and sparse, outcome-only reward signals that cannot supervise intermediate reasoning steps. To address these issues, we introduce \textsc{LongTraceRL}. For data construction, we generate multi-hop questions via knowledge graph random walks and leverage search agent trajectories to build \emph{tiered distractors}: documents the agent read but did not cite (high confusability) and documents that appeared in search results but were never opened (low confusability), producing training contexts that are far more challenging than those built by random sampling or one-shot search. For reward design, we propose a \emph{rubric reward} that uses the gold entities along each reasoning chain as fine-grained, entity-level process supervision. This rubric reward is applied only to responses with correct final answers (positive-only strategy), distinguishing the reasoning quality among correct responses and preventing reward hacking. Experiments on three reasoning LLMs (4B--30B) across five long-context benchmarks demonstrate that \textsc{LongTraceRL} consistently outperforms strong baselines and encourages comprehensive, evidence-grounded reasoning. Codes, datasets and models are available at \href{https://github.com/THU-KEG/LongTraceRL}{https://github.com/THU-KEG/LongTraceRL}.