arXiv:2610.32448cs.AIOct 2026

Manuscript Offprint

arXiv:2610.32448

POSEIDON: Scaling Training Environments for Scientific Agents from Code Repositories

Qifan Zhang, Yuhan Li, Nuo Chen, Bowen Liu, Xiao Hu, Miao Peng, Chenyi Zi, Lixin Liu, Lydell Huang, Jing Tang, Jia Li

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

Qifan Zhang1,2∗^{1,2*}, Yuhan Li2†^{2\dagger}, Nuo Chen2‡^{2\ddagger}, Bowen Liu2∗^{2*}, Xiao Hu2^{2}, Miao Peng1,2^{1,2}

Chenyi Zi1^{1}, Lixin Liu2^{2}, Lydell Huang2^{2}, Jing Tang1^{1}, Jia Li1†^{1\dagger}

1^{1}The Hong Kong University of Science and Technology (Guangzhou)

2^{2}Hunyuan Team, Tencent

Training environments remain a major bottleneck for agents in data-driven scientific discovery. Existing collections of executable and verifiable training environments are small, and their construction remains difficult to scale. To address this limitation, we introduce POSEIDON, an automated pipeline for generating diverse, verifiable training environments from scientific code repositories at scale. From the same repository budget, POSEIDON extracts nearly 10×10\times as many training environments as a prior approach by decomposing scientific workflows into four complementary task types: Reproduction, Subflow, Completion, and Correction, where each type targets a distinct capability for scientific research. A recursive improvement loop further refines failed candidates and recovers otherwise discarded environments. Using POSEIDON, we construct PEARL, a collection of 97,659 executable and verifiable environments from 7,110 public repositories spanning 10 scientific disciplines. To the best of our knowledge, PEARL is the largest and most broadly multidisciplinary collection of scientific-agent training environments to date. Qwen3.5 models (9B, 27B, and 35B-A3B) trained on PEARL achieve consistent gains across six challenging scientific-agent benchmarks. Overall, the scale and diversity of PEARL offer opportunities for training scientific discovery agents.

Figure

Figure

Figure 1 | Scaling scientific-agent training environments and improving downstream performance. Left: Cumulative number of environments synthesized as the number of source repositories increases. Under a matched repository budget of 306 repositories, POSEIDON produces 5,370 environments, compared with 575 produced by D3-Gym—a 9.3× higher yield. Right: Success rates of Qwen3.5-27B before and after training on PEARL across six scientific-discovery benchmarks.

1. Introduction

The rapid growth of scientific data and the increasing use of large language model agents in research have sparked a surge of interest in data-driven scientific discovery (Anthropic, 2026a; Gridach

∗^{*}Equal contribution.

∗^{*}Project Lead.

†^{\dagger}Corresponding authors.

et al., 2025; Liu et al., 2026; Majumder et al., 2024; Xin et al., 2025). Unlike knowledge-based question answering or isolated code generation, scientific research requires agents to carry out scientific workflows: coordinated sequences of data processing and computational steps that address a research objective. Agents must clean data, select appropriate models, write and debug programs, and iteratively revise their analyses based on intermediate results before reaching evidence-supported conclusions (Schmidgall et al., 2025; Zhou et al., 2025) (as depicted in Figure 2). The capability to carry out these scientific workflows requires integrating scientific reasoning with coding and tool use, and remains difficult for even current frontier models to master. For example, on OpenAI's GeneBench-Pro (Li et al., 2026), GPT-5.6 Sol (OpenAI, 2026b) achieves a pass rate of only 28.7% at the highest reasoning level (or 31.5% with Pro mode enabled), highlighting the immense difficulty of reliably automating complex scientific analyses. Yet, training environments designed to develop this capability remain severely limited.

D3-Gym (Moussa et al., 2026) pioneered the automated synthesis of such training environments from scientific code repositories. These repositories are valuable because they encode the scientific workflows described above in related sets of code files that connect research objectives, input data, and computational procedures. Executing these workflows provides reference outputs for verification. However, scaling this approach remains challenging. D3-Gym converts each extracted workflow into an end-to-end task, leaving more varied supervision within the workflow underused. Its collection contains only 565 environments from 239 repositories (approximately 2.4 environments per repository). This limited yield raises a central research question:

How can we efficiently exploit executable scientific workflows within code repositories to generate high-quality, diverse training environments at scale?

To answer this, we introduce POSEIDON, an automated pipeline for mining scientific code repositories through three stages: source discovery, task synthesis, and verification. Source discovery identifies repositories containing scientific code, data, and research context through domain-keyword expansion. Task synthesis extracts scientific workflows and derives four complementary task types, each corresponding to a distinct capability for scientific agents: Reproduction, reproducing the results of a complete scientific workflow from its research objective; Subflow, carrying out a standalone analysis to answer a focused scientific question motivated by a broader research context; Completion, filling in a missing function in the provided workflow code; and Correction, identifying and fixing an error in provided code.