TL;DR
Teaching language models to search the web using reinforcement learning (RL) typically demands hundreds of thousands of queries to commercial search engines, incurring steep API costs and erratic retrieval quality. ZeroSearch replaces live search engines during training with a fine-tuned simulator LLM that generates controllable snippets (from helpful to noisy). Coupled with an easy-to-hard curriculum rollout, models trained on this simulated environment match or exceed the performance of models trained on live Google Search—while slashing API costs to zero.
What Problem Does This Paper Address?
Reinforcement learning has emerged as a powerful tool to teach LLMs iterative, multi-turn reasoning and tool use (as seen in models like OpenAI o1, DeepSeek-R1, and Search-R1). However, training an LLM agent to interact with live web search engines introduces two severe bottlenecks:
- Uncontrolled Document Quality: Live search returns unpredictable, noisy, or irrelevant documents. In early training iterations, this noise destabilizes the policy before it even learns formatting and basic reasoning.
- Prohibitive API Expenses & Rate Limits: Standard RL rollouts require tens or hundreds of thousands of interaction steps. Making hundreds of thousands of live search API calls (e.g., via Google/SerpAPI) is financially prohibitive, slow, and hard to scale.
Methods
ZeroSearch trains LLMs to master search-augmented reasoning without touching external search APIs during the RL loop:
[Policy Model] ──(generates query)──> [Simulation LLM]
▲ │
│ ▼
└──(returns useful/noisy docs)──────────┘
- Search Simulation Tuning: The authors fine-tune an off-the-shelf LLM (e.g., Qwen-2.5-3B/7B/14B) on interaction trajectories to simulate the snippet style of search engines. By switching prompt keywords (
usefulvs.noisy) and conditioning on the ground-truth QA context, the simulator can purposefully generate either evidence-rich or distracting/noisy documents. - Curriculum-Based Rollout: An exponential schedule ($p_i$) gradually ramps up the probability of generating noisy snippets as training steps ($i$) advance. Early in training, high-quality documents help the policy master formatting and query generation; later, noisier documents force the agent to refine, filter, and execute multi-hop reasoning.
- Document Token Loss Masking: Because returned documents are generated by an external simulator rather than the policy, their tokens are masked out during backpropagation. Gradients only flow through the policy’s reasoning, query formulation, and answer generation steps.
- F1 Reward Design: Instead of exact match (EM)—which causes "reward hacking," where models produce excessively verbose answers to get a hit—the reward uses token-level F1 overlap between predicted and reference answers.
During evaluation, the simulator is discarded: models are tested directly against live Google Search (SerpAPI).
Datasets
The authors use standard, established open-domain QA benchmarks:
- Training: Merged training splits of Natural Questions (NQ) and HotpotQA.
- Evaluation (7 benchmarks):
- Single-hop QA: Natural Questions (NQ), TriviaQA, PopQA.
- Multi-hop QA: HotpotQA, 2WikiMultiHopQA, MuSiQue, Bamboogle.
No new datasets were introduced; evaluation focuses on assessing both in-domain and out-of-domain generalization.
Key Insights and Ideas
- LLMs Are Capable Search Engines for Themselves: Because LLMs already contain extensive world knowledge, they can synthesize realistic search results when conditioned on the user prompt and query.
- Controlled Noise Beats Real-World Noise: Counterintuitively, training on a simulated search engine outperformed training on live Google Search. Because the noise schedule is explicitly controlled, the model avoids getting bogged down by irrelevant information early on and only faces noise once it has learned basic search-and-answer discipline.
- Document Masking is Critical: The ablation study shows that failing to mask document tokens leads to immediate reward degradation, proving that penalizing or rewarding external retrieval tokens destabilizes RL policy gradients.
- Base Models Shine Without SFT Warm-up: ZeroSearch works out of the box on raw base models (e.g., Qwen-2.5-7B-Base, LLaMA-3.2-3B-Base) using standard RL algorithms (REINFORCE, GRPO, PPO), eliminating the need for an expensive supervised demonstration phase.
Key Results
- Outperforming Live Search (Search-R1):
- Qwen-2.5-7B-Base: ZeroSearch reached 40.93% average EM across 7 datasets, compared to 39.51% for Search-R1 trained on live search.
- LLaMA-3.2-3B-Base: ZeroSearch scored 36.07% vs. Search-R1's 34.21%.
- Simulator Scaling: An SFT-7B simulator achieved parity with Google Search (33.53% vs. 32.81% on Qwen-2.5-3B-Base), while an SFT-14B simulator beat Google Search (34.47%).
- Massive Cost Reduction: For a standard training run (~64,000 queries over 12 hours):
- Google Search API (SerpAPI): $586.70
- ZeroSearch (SFT-7B on AWS GPU instances): $35.40 (over a 90% reduction).
Limitations and Future Work
- GPU Underutilization: The simulation server experiences bursty traffic—heavy load during rollout sampling, idle during policy backpropagation. Sharing a simulator across concurrent training jobs is suggested but not systematically evaluated.
- Simulator Knowledge Boundaries: The simulator's ability to create realistic snippets relies on its internal weights and provided question-answer context; it cannot simulate completely fresh or post-cutoff world events without additional scaffolding.
- Fixed Structural Tags: The policy relies on a rigid prompt template (
<think>,<search>,<information>,<answer>). Extending this to dynamic tool invocation formats remains an area for future work.
Summary updated