科学领域终端环境的自监督扩展

·

研究论文 · 2026/10/06

终端智能体正日益被部署到软件工程之外的科学等专业领域。构建训练环境需要可执行的参考行为和领域特定的验证器,以区分语义正确性与表面合理的产物。为每个任务编写这些组件需要反复工程化,限制了复用。我们提出软件在环重建(SWR),一种自监督框架,从现有软件工作流(将结构化输入映射到输出的可执行程序)中获取参考输出和验证目标。对于每个工作流,我们执行多种输入配置,并将案例划分为公开观察和隐藏评估。给定指令、输入模式以及公开的输入-输出观察,智能体在无法访问源工作流的情况下构建可编辑程序。候选程序在隐藏配置上根据工作流输出进行评估。分层验证器结合领域特定的语义比较、结构有效性和防捷径检查,同时公开反馈支持迭代修订。该构建方式允许添加额外的工作流和配置,而无需为每个任务编写参考解决方案。我们以六个领域的500个工作流和46个软件家族实例化SWR。每个任务三次尝试中,Qwen3.8-Max解决了838个任务并产生1,422条验证轨迹,我们过采样为3,000个仅重建的训练示例。对Qwen3.8-27B进行监督微调,在三个随机种子下将Terminal-Bench 2的平均性能从47.94%提升至53.56%,并在所有四项报告的评估中,在四个匹配令牌语料控制中取得最高平均值。这些结果表明,现有科学软件可以为终端智能体提供可扩展的、行为验证的监督。

该工作提出了一种可扩展的自监督方法,利用现有科学软件自动生成训练环境,显著降低了为专业领域构建终端智能体训练数据的工程成本,并通过实验验证了其有效性,对推动终端智能体在科学等领域的应用具有重要意义。

Terminal agents are increasingly deployed beyond software engineering in science and other specialized domains. Constructing training environments requires executable reference behavior and a domain-specific verifier that distinguishes semantic correctness from superficially plausible artifacts. Authoring these components for each task requires repeated engineering and limits reuse. We introduce software-in-the-loop reconstruction, a self-supervised framework that obtains reference outputs and verification targets from existing software workflows, executable programs mapping structured inputs to outputs. For each workflow, we execute multiple input configurations and partition cases into public observations and hidden evaluations. Given the instruction, input schema, and public input--output observations, an agent constructs an editable program without access to the source workflow. The candidate is evaluated on hidden configurations against workflow outputs. A hierarchical verifier combines domain-specific semantic comparison, structural validity, and anti-shortcut checks, while public feedback supports iterative revision. The construction admits additional workflows and configurations without authoring a reference solution for each task. We instantiate SWR with 500 workflows and 46 software families across six domains. Across three attempts per task, Qwen3.8-Max solves 838 tasks and produces 1,422 verified trajectories, which we oversample to 3,000 reconstruction-only training examples. Supervised fine-tuning of Qwen3.8-27B improves mean Terminal-Bench 2 performance from 47.94% to 53.56% across three seeds and achieves the highest mean among four matched-token corpus controls on all four reported evaluations. These results indicate that existing scientific software can provide scalable, behaviorally verified supervision for terminal agents.

阅读原文

参与讨论