LongZero: Enhancing Long-Context Reasoning in LLMs from Zero Data
Organizations: Dept. of Comp. Sci. and Tech., Institute for AI, BNRist Center, THBI Lab, Tsinghua-Bosch Joint ML Center, Tsinghua University
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 , 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 can generalize to real tasks, and outperforms both baselines, suggesting a viable and promising path to improving long-context reasoning of LLMs.
Figures & tables
| Qwen3-4B-T | Qwen3-8B | |
| Synthesis per 2,560 unstable reasoning questions | ||
| Worlds attempted | ~3.8K | ~5.4K |
| Worlds accepted | ~3.6K | ~5.1K |
| Questions filtered | ~14.4K | ~19.5K |
| always correct | 69.3% | 68.3% |
| unstable (kept) | 17.7% | 13.1% |
| 7 Method | LB1 | LBv2 | FRAMES | AA-LCR | LongReason | Avg |
|---|---|---|---|---|---|---|
| Qwen3-4B-Thinking-2507 | ||||||
| Base model | 65.43 | 40.56 | 51.27 | 36.50 | 79.66 | 54.68 |
| Enhanced HotpotQA (from LoongRL) | 65.94 | 43.04 | 51.46 | 41.50 | 80.92 | 56.57 |
| Teacher-synthesized QA | 66.12 | 41.85 | 52.97 | 38.50 | 80.48 | 55.99 |
| LongZero (Ours) | 67.22 | 43.34 | 55.76 | 39.50 | 81.30 | 57.42 |
| Qwen3-8B (Thinking) | ||||||
| 7 Training data | LB1 | LBv2 | FRAMES | AA-LCR | LongReason | Avg |
|---|---|---|---|---|---|---|
| Base model | 65.43 | 40.56 | 51.27 | 36.50 | 79.66 | 54.68 |
| Reasoning data only | 67.04 | 42.64 | 54.61 | 34.00 | 78.59 | 55.38 |
| Retrieval data only | 64.51 | 41.65 | 52.18 | 33.00 | 77.90 | 53.85 |
| Reasoning and retrieval data, 1:1 | 67.29 | 41.35 | 53.64 | 36.50 | 80.98 | 55.95 |
| Reasoning and retrieval data, 2:1 (Ours) | 67.22 | 43.34 | 55.76 | 39.50 | 81.30 | 57.42 |
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
| Stage | Decoding | Max tokens |
|---|---|---|
| Specification | thinking, / | 28,672 |
| Plan | (non-thinking † ) | 16,384 |
| Expansion | (non-thinking † ) | 5,120 |
| Difficulty filter | thinking, | 8,192 |
| Hyperparameter | Value |
|---|---|
| Algorithm | GRPO (verl) |
| Batch per step | 64 prompts 8 |
| Training steps | 72 (4B), 108 (8B) |
| PPO update | 16 prompts, 1 epoch |
| Optimizer | AdamW (0.9, 0.999) |
| Learning rate | , constant |
| 5 Method | HQA | 2WQA | MSQ | Avg |
|---|---|---|---|---|
| Base model | 67.04 | 78.46 | 50.79 | 65.43 |
| Enhanced HotpotQA | 66.59 | 76.41 | 54.82 | 65.94 |
| Teacher-synthesized QA | 67.73 | 77.97 | 52.68 | 66.12 |
| LongZero (Ours) | 67.17 | 79.62 | 54.86 | 67.22 |
| 5 Method | HQA | 2WQA | MSQ | Avg |
|---|---|---|---|---|
| Base model | 66.58 | 76.83 | 47.48 | 63.63 |
| Enhanced HotpotQA | 67.91 | 75.43 | 51.60 | 64.98 |
| Teacher-synthesized QA | 66.99 | 76.12 | 49.08 | 64.07 |
| LongZero (Ours) | 66.90 | 78.20 | 51.38 | 65.49 |
| 7 \Block 2-1 Method | Difficulty | Length | \Block 2-1 Overall | |||
|---|---|---|---|---|---|---|
| Easy | Hard | Short | Medium | Long | ||
| Base model | 48.44 | 35.69 | 47.78 | 37.44 | 34.72 | 40.56 |
| \Block [l]Enhanced | ||||||
| HotpotQA | 49.74 | 38.91 | 51.67 | 38.37 | 37.96 | 43.04 |
| \Block [l]Teacher- | ||||||
| synthesized QA | 47.66 | 38.26 | 51.94 | 35.12 | 38.43 | 41.85 |
| 7 \Block 2-1 Method | Difficulty | Length | \Block 2-1 Overall | |||
|---|---|---|---|---|---|---|
| Easy | Hard | Short | Medium | Long | ||
| Base model | 40.89 | 26.69 | 45.00 | 25.35 | 24.07 | 32.11 |
| \Block [l]Enhanced | ||||||
| HotpotQA | 37.24 | 27.65 | 44.17 | 23.49 | 25.46 | 31.31 |
| \Block [l]Teacher- | ||||||
| synthesized QA | 38.54 | 29.90 | 45.83 | 27.21 | 24.07 | 33.20 |
| 5 Training data | HQA | 2WQA | MSQ | Avg |
|---|---|---|---|---|
| Base model | 67.04 | 78.46 | 50.79 | 65.43 |
| Reasoning data only | 68.51 | 78.45 | 54.15 | 67.04 |
| Retrieval data only | 64.57 | 78.48 | 50.48 | 64.51 |
| \Block [l]Reasoning and | ||||
| retrieval data, 1:1 | 67.33 | 79.58 | 54.96 | 67.29 |
| \Block [l]Reasoning and retrieval |
| 7 \Block 2-1 Training | ||||||
|---|---|---|---|---|---|---|
| data | Difficulty | Length | \Block 2-1 Overall | |||
| Easy | Hard | Short | Medium | Long | ||
| \Block [l]Base | ||||||
| model | 48.44 | 35.69 | 47.78 | 37.44 | 34.72 | 40.56 |
| \Block [l]Reasoning | ||||||
| data only | 51.04 | 37.46 | 48.33 | 39.77 | 38.89 | 42.64 |