arXiv:2610.30132cs.CLOct 2026

Manuscript Offprint

arXiv:2610.30132

LongZero: Enhancing Long-Context Reasoning in LLMs from Zero Data

Zhennan Wan, Jianfei Chen

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Reinforcement learning (RL) is an effective way to strengthen the long-context reasoning of large language models (LLMs), but it needs training data that are long, diverse, challenging, and verifiable. Human annotation of such data is expensive, naturally occurring data are too scarce to sustain RL, and existing synthesis methods depend on external corpora or stronger teacher models, which become harder to obtain as the trained models get stronger. Recently, RL from zero data, in which a model learns from tasks it proposes itself, has achieved excellent performance, but existing methods target short-context tasks. Therefore, we propose LONGZERO, a method that lets an LLM improve its own long-context reasoning without any external data. Instead of writing questions and answers over existing documents, LONGZERO first has the model synthesize the question and answer with its supporting evidence in a compact structured form, and only then separately expands the evidence into a long multi-document context. LONGZERO combines these self-written multi-hop reasoning tasks with self-written multi-round retrieval tasks and trains the model with GRPO. We evaluate LONGZERO on two LLMs across five long-context reasoning benchmarks and compare it with RL on data synthesized from external corpora. Experimental results show that LONGZERO generalizes to real tasks and outperforms both baselines, suggesting a viable and promising path to improving long-context reasoning of LLMs. 1^{1}

1 Introduction

Reasoning over long context, such as collections of reports, long conversations, or entire books, is required in many applications of large language models (LLMs) (Bai et al., 2025; Krishna et al.,

(a) Existing: synthesize from external corpora

Figure

(b) LongZero: zero external data

Figure

Figure 1: Core idea of LONGZERO. (a) Existing methods build long-context RL data from external corpora. (b) LONGZERO lets the policy write the question, evidence, and answer, expand them into long-context data, and learn with RL from answering its own questions.

2025). Following the success of reinforcement learning with verifiable rewards (RLVR) on short-context reasoning (DeepSeek-AI et al., 2025; Team et al., 2025; Lambert et al., 2024; Yu et al., 2025b), a growing body of work applies RL to long-context reasoning (Wan et al., 2025; Wang et al., 2025a; Shen et al., 2025; Chen et al., 2026). These studies consistently show that training data are a decisive factor: useful RL data demand (i) substantial length, (ii) evidence retrieval and consolidation, (iii) sufficient difficulty for producing a learning signal, and (iv) automatically verifiable answers (Wang et al., 2025a; Xu et al., 2026; Lv et al., 2026).

Data with all of these properties are difficult to obtain. Human annotation of long-context questions is expensive, and naturally occurring long-context QA data are far scarcer than what RL consumes. Existing pipelines therefore build training tasks from existing resources (Figure 1a): they extend short multi-hop QA datasets with distractor

∗^{*}Corresponding Author

1^{1}Code and data are available at https://github.com/zhennan1/LongZero.

documents (Wang et al., 2025a), ask a model to write questions over real documents (Yang et al., 2025b; Shen et al., 2025; Lv et al., 2026), combine knowledge graphs with search-agent trajectories (Lin et al., 2026), or simply rely on a stronger teacher model to generate training data (Mukherjee et al., 2023; Liu et al., 2024b). All of these approaches depend on external data or models. Real-world facts also introduce a confound: a model may answer from its parametric knowledge instead of the given context (Longpre et al., 2021), and public text may overlap with evaluation data (Sainz et al., 2023).

At the same time, RL from zero data has emerged as an alternative to curated training sets. In these methods the model proposes its own tasks and learns from solving them (Zhao et al., 2025a; Huang et al., 2025; Chen et al., 2025; Liu et al., 2025). This line of work has achieved excellent performance in short-context domains, such as mathematics, code, games, and tool-using agents (Xia et al., 2025; Yue et al., 2026; Acikgoz et al., 2026). This leads to our research question: Can an LLM also improve its long-context reasoning from zero data?

Long-context tasks are harder to synthesize from zero data: a task consists of a long input together with a question about it, and the model must produce both. Letting the model write a long document and then pose a question about it inherits the very weakness the task is meant to address, since a model that cannot yet reason reliably over long contexts cannot reliably write or verify questions about the long text it has just written. Our key observation is that the order of generation can be reversed. If the model first writes the question, evidence, and answer as a short structured specification, and only then expands the evidence into a long multi-document context, the answer is fixed before any long text exists, and the only remaining risk of error lies in the expansion.

Building on this observation, we propose LONGZERO (Figure 1b). LONGZERO uses the model being trained to synthesize two complementary kinds of long-context tasks: reasoning tasks, in which multi-hop questions over a fictional world must be answered from eight model-written documents, and retrieval tasks in the style of multi-round co-reference resolution (MRCR; Vodrahalli et al., 2024), in which the model must reproduce one specific earlier response in a long, model-written conversation. The same model then answers each reasoning question several times, and only the questions it sometimes answers correctly and sometimes incorrectly are kept, because these are the questions on which group-relative policy optimization (GRPO; Shao et al., 2024) receives a non-zero learning signal.

Our main contributions are as follows:

• We propose LONGZERO, a long-context RL method in which the LLM itself first synthesizes the question, evidence, and answer in a structured format, then expands them into long-context data, and is finally trained on these data.

• We evaluate LONGZERO on two base models and five long-context reasoning benchmarks, and experimental results show that LONGZERO can generalize from self-generated tasks to general long-context reasoning tasks.

• We compare LONGZERO with two synthetic-data baselines built from external corpora, and experimental results show that LONGZERO outperforms both baselines, demonstrating the effectiveness of LONGZERO in improving long-context reasoning of LLMs without external data.