SearchGym: Bootstrapping Real-World Search Agents via Cost-Effective and High-Fidelity Environment Simulation

Xichen Zhang, Ziyi He, Yinghao Zhu, Sitong Wu, Shaozuo Yu, Meng Chu, Wenhu Zhang, Haoru Tan, Jiaya Jia

TL;DR

Training autonomous search agents for complex reasoning tasks is hampered by the prohibitive cost of real-world API interactions and the noise in static datasets. This paper introduces SearchGym, a novel high-fidelity simulation environment that generates verifiable, solvable tasks, enabling robust agent training without real-world costs. SearchGym-RL, a curriculum learning methodology, further enhances agent capabilities, leading to state-of-the-art performance and strong sim-to-real generalization.

What Problem Does This Paper Address?

Autonomous search agents, powered by Large Language Models (LLMs), are crucial for tackling knowledge-intensive reasoning tasks. These agents need to interact with external tools like search engines to gather information and synthesize it. Reinforcement Learning (RL) is the standard paradigm for training these agents, but it faces a critical dilemma:

  • Prohibitive Cost of Real-World Interaction: Training directly with live commercial Web APIs is extremely expensive. The paper estimates that a single training epoch can cost over $500, making extensive exploration and hyperparameter tuning impractical.
  • Noise and Data Misalignment in Static Datasets: Using static datasets (like Wikipedia snapshots) introduces noise due to data misalignment. This can lead to corrupted reward signals, where agents are penalized for correct reasoning or rewarded for hallucinations, destabilizing training and causing policy collapse.

The paper aims to bridge this gap by creating a cost-effective, high-fidelity simulation environment that provides clean, verifiable training signals, enabling the development of robust and capable search agents.

Methods

The paper introduces two key components: SearchGym (the simulation environment) and SearchGym-RL (the training methodology).

SearchGym Simulation Environment: This environment is built using a four-stage generative pipeline:

  1. Knowledge Graph Synthesis: A verifiable knowledge graph is constructed based on a predefined schema, ensuring factual grounding and strict solvability of tasks.
  2. Entity Corpus Generation: A searchable document corpus is created by synthesizing Wikipedia-style documents for each entity in the knowledge graph. These documents are associated with unique URLs to mimic web pages.
  3. Edge Verifiability and Filtering: To ensure that reasoning paths are discoverable via search, edges in the knowledge graph are verified by executing queries against the document corpus. Only retrievable edges are retained, decoupling reasoning from retrieval failures.
  4. Question-Answer Synthesis: Complex Question-Answering (QA) pairs are synthesized from verified paths. These are categorized into Simple QA (linear paths), Parallel QA (multiple independent paths), and Combo QA (nested paths), creating a closed-loop environment where the LLM agent interacts with a simulated search engine.

SearchGym-RL Training Methodology: This methodology employs a curriculum learning strategy to progressively optimize agent policies:

  1. Action Space: The agent uses two primitive actions: Search(q) (returns snippets with URLs) and Access(u) (retrieves full document content). This design encourages agents to evaluate relevance based on summaries before deep reading.
  2. Reinforcement Learning: The agent is trained using Group Relative Policy Optimization (GRPO) with a token-level F1 score as the terminal reward.
  3. Hierarchical Skill Acquisition (Curriculum Learning):
    • Stage 1: Foundational Skill Acquisition: Agents are trained on Simple QA tasks with shorter reasoning chains (1-6 hops) to master core skills like query formulation and document parsing.
  4. Stage 2: Advanced Reasoning Development: Agents are introduced to more complex Parallel and Combo QA tasks, and longer-horizon problems (6-12 hops), to develop problem decomposition and information synthesis abilities.

Datasets

  • SearchGym Synthetic Corpus: Approximately 41,000 verifiable tasks generated by the SearchGym pipeline. This corpus is used for training.
  • SearchGymBench: A held-out set of 642 complex tasks from the SearchGym corpus, used for evaluation to ensure generalized reasoning capabilities.
  • Standard QA Datasets (for evaluation):
    • Single-hop QA: Natural Questions (NQ), TriviaQA, PopQA.
  • Multi-hop QA: 2WikiMultiHopQA, HotpotQA, Bamboogle, Musique.
  • Challenging "Deep Research" Benchmarks (for evaluation): GAIA, xbench-DeepSearch.
  • Local Wikipedia Dump (2018): Used for standard QA evaluation in a local retrieval setting.

The paper's primary contribution is the SearchGym Synthetic Corpus, which is designed to be high-fidelity, verifiable, and strictly solvable, addressing the limitations of existing static datasets.

Key Insights and Ideas

  • Corrupted Reward Signals are Detrimental: The paper strongly emphasizes that data misalignment in static datasets leads to corrupted reward signals, which destabilize RL training and hinder agent performance. This highlights the critical need for clean, verifiable training data.
  • High-Fidelity Simulation is Scalable and Cost-Effective: SearchGym demonstrates that a well-designed simulation environment can provide a cost-effective and scalable alternative to real-world API interactions for training complex agents. The data generation cost is remarkably low ($50 for a large corpus).
  • Curriculum Learning is Essential for Complex Reasoning: The two-stage curriculum learning approach in SearchGym-RL is crucial for progressively building agent capabilities, moving from simple to complex reasoning tasks. Omitting the second stage significantly degrades performance on challenging benchmarks.
  • Richer Action Space Enhances Reasoning: The dual-primitive action space (Search and Access) forces agents to actively evaluate search snippets, leading to better reasoning and performance compared to a simplified search-only baseline.
  • Sim-to-Real Generalization is Achievable: Policies trained in the SearchGym environment generalize well to real-world web environments, outperforming agents trained on static datasets and even web-enhanced baselines in some cases.

Key Results

  • Superior Performance: SearchGym-RL, particularly with the Qwen2.5-7B-Base model, significantly outperforms baselines like Search-R1 and ASearcher across various benchmarks. For instance, it achieves a 10.6% relative margin over the web-enhanced ASearcher baseline on nine diverse benchmarks.
  • Robustness: The method shows robustness across different LLM architectures and scales (Qwen, Llama, 3B to 8B models).
  • Sim-to-Real Generalization: The Qwen2.5-7B agent trained in SearchGym outperforms the web-trained ASearcher baseline on GAIA (by 3.89%) and xbench-DeepSearch (by 17.00%), while using fewer search actions (3.71 vs. 5.92 per query).
  • Cost-Effectiveness: Training with SearchGym incurs zero API costs, a stark contrast to the ASearcher baseline's cost exceeding $500 per run.
  • Training Stability: SearchGym-RL exhibits stable, monotonic improvement in reward, unlike Search-R1 which shows volatility and policy collapse due to noisy data.

Limitations and Future Work

  • Limitations:
    • While SearchGym aims for high fidelity, it is still a simulation. The paper acknowledges that real-world web environments can have unpredictable nuances.
  • The paper focuses on specific types of reasoning tasks. Extending to more diverse and complex reasoning patterns might require further environment development.
  • Future Work:
    • The authors suggest that high-fidelity simulation is a promising direction for developing capable autonomous search agents.
  • The paper's success validates the approach for future research in agent training and simulation environments.
  • Further exploration of curriculum learning strategies and action space designs could yield even more capable agents.

Summary updated

BibTeX
@inproceedings{zhang2026searchgym,
  author = {Xichen Zhang and Ziyi He and Yinghao Zhu and Sitong Wu and Shaozuo Yu and Meng Chu and Wenhu Zhang and Haoru Tan and Jiaya Jia},
  title = {{SearchGym: Bootstrapping Real-World Search Agents via Cost-Effective and High-Fidelity Environment Simulation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2026},
  doi = {10.18653/v1/2026.acl-long.848},
}
Figure