HyperAIHyperAI

Command Palette

Search for a command to run...

Trajectory2Gym: 도구 사용 에이전트를 위한 결정 접지형 조합적 상호작용 합성

Yihao Hu Zhihao Wen Yitong Lin Siyuan Lu Pan Wang Wei Wu Jiang-Ming Yang Tao Lin

초록

성공적인 도구 사용 궤적이 반드시 유용한 지도 신호가 되는 것은 아니다. 성공적인 상호작용이라 하더라도 다단계 의존성을 과소 표현하거나, 결정 시점에 에이전트에게 보이는 정보로 정당화되지 않는 행동을 포함할 수 있다. 우리는 효과적인 궤적 지도를 위한 두 가지 결합된 요건을 식별한다. 중요한 관찰-행동 의존성이 표현되도록 하는 조합적 포괄성(compositional coverage)과, 각 지도 행동이 학습자에게 보이는 상호작용 이력에 의해 뒷받침되도록 하는 결정 접지(decision grounding)가 그것이다. 우리는 과소 지원되는 조합적 구조를 중심으로 실행 가능한 상호작용을 구성하고, 실제 실행에서 접지된 결정들에서만 지도 신호를 도출하는 Trajectory2Gym을 소개한다. 구조적 지원 선택이 결과 경험을 할당하고, 부모 정규화 지도 미세조정(parent-normalized supervised fine-tuning)이 의미적 상호작용을 훈련 가중치의 단위로 보존한다. 이는 궤적 생성을 성공적인 궤적의 수집이 아니라 학습 가능한 상호작용 경험의 의도적 구성으로 재정의한다. 다섯 가지 Qwen3 규모에서 Trajectory2Gym은 테스트한 모든 규모에서 Tau1, Tau2, BFCL을 향상시켰으며, 세 벤치마크 동일 가중 평균을 16.9–29.8%p 높였다. 향상 폭은 이후의 결정이 이전 관찰 및 피드백에 의존하는 상태유지(stateful) 및 다중 턴 상호작용에서 가장 컸다. 우리의 결과는 도구 사용 에이전트의 확장이 단순히 더 많은 성공 궤적을 수집하는 데 달려 있지 않고, 의존성이 표현되고 에이전트의 가시 이력으로부터 결정을 학습할 수 있는 상호작용을 구성하는 데 달려 있음을 시사한다.

One-sentence Summary

Researchers from Westlake University and Ant International propose Trajectory2Gym, which constructs executable tool-use interactions around under-supported compositional structures and supervises only decision-grounded actions using structural-support selection and parent-normalized fine-tuning, improving Tau1, Tau2, and BFCL by an equal-weight three-benchmark mean of 16.9 to 29.8 percentage points across five Qwen3 scales.

Key Contributions

  • The paper introduces Trajectory2Gym, a trajectory construction framework that builds executable tool-use interactions around under-supported compositional structures and derives supervision only from decisions grounded in the learner-visible interaction history.
  • Trajectory2Gym contributes structural-support selection for allocating the resulting experience and parent-normalized supervised fine-tuning that keeps the complete semantic interaction as the unit of training weight.
  • Experiments across five Qwen3 scales show that standard supervised fine-tuning on the constructed interactions improves Tau1, Tau2, and BFCL at every tested scale, increasing the equal-weight three-benchmark mean by 16.9 to 29.8 percentage points, with the largest gains on stateful and multi-turn tasks.

Introduction

Tool-use agents must learn compositional interactions, where observations, user updates, or state changes determine later decisions in multi-turn workflows such as customer support and API use. Prior training pipelines often filter trajectories by task completion or per-call execution, but success alone does not guarantee that each imitated action was justified by the agent-visible history, and logged data often lacks sufficient coverage of cross-step dependencies and recovery after authentic errors. The authors introduce Trajectory2Gym, which synthesizes under-supported interaction paths, certifies supervision only for decisions grounded in visible evidence and workflow order, and applies structural-support selection with parent-normalized supervised fine-tuning.

Dataset

The authors construct a synthetic interaction dataset from compositional capability paths executed in native environments.

  • Sources and composition: A shared capability vocabulary covers semantic actions and arguments, observation outcomes, recovery, branching, handoff, termination, and horizon. Native tools and observations map to these roles. An ordered path composes required capabilities into one interaction. A generator creates a request and compatible initial state for a target path, and a teacher executes the task in the native environment. Each trajectory is assigned one canonical path for support accounting.

  • Certification and filtering: A path is certified only when its action and observation dependencies appear in the executed log. Only certified structures update the support inventory and guide later synthesis rounds. The method targets paths whose support falls below the scale-specific target and conditions the generator on them. Construction establishes entities, prerequisites, and information sources for each path, and binds required values to visible sources such as the request, a user exchange, or a tool result.

  • Dataset assembly: The authors assemble Ds\mathcal{D}_sDs​ from the certified pool. Selection preserves task breadth, covers capability paths, and gives repeated support to under-represented structures such as discovery, recovery, and completion. The target number of distinct trajectories per feasible canonical path grows with learner scale: 1, 2, 3, 4, and 8 from 1.7B to 30B-A3B. Selection starts from a fixed certified core, adds one completing exemplar per training task, closes uncovered atoms and paths, and then adds trajectories that reduce support deficits.

  • Processing and schema: Selected trajectories are rendered through native prompts, roles, tool schemas, and visible observations. One semantic trajectory may yield several training examples. Non-target visible messages remain context.

  • Use in the model: For supervised fine-tuning, the authors use parent-normalized SFT. Each parent trajectory receives equal weight, and its weight is distributed across rendered examples in proportion to their certified target-token counts. This prevents long multi-turn interactions from dominating per-example averaging. The provided excerpt does not describe an explicit train/validation/test split or mixture ratios beyond the scale-dependent per-path support targets.

Method

The authors propose Trajectory2Gym, a framework designed to construct high-quality supervised trajectory sets for tool-use agents by addressing compositional coverage and decision grounding. The overall pipeline consists of three tightly coupled stages: compositional interaction synthesis, grounded supervision, and structural-support learning.

Refer to the framework diagram:

In the first stage, compositional interaction synthesis, the authors turn under-supported interaction paths into executed native interactions. A shared capability vocabulary covers semantic actions, arguments, observation outcomes, recovery, branching, and termination. A generator constructs a request and a compatible initial state for a target path, and a teacher executes the task in the native environment. Each trajectory is assigned a canonical path for support accounting. Native execution supplies authentic observations, state changes, and rejections, ensuring that teacher-only guidance stays out of the student trace. A path is certified only when its action and observation dependencies appear in the executed log.

The second stage, grounded supervision, transforms each executed log into a student context and a set of certified targets. This stage ensures that each supervised action is supported by the realized interaction and its decision-time context.

As shown in the figure below:

The authors distinguish native execution validity et∈{0,1}e_{t} \in \{0, 1\}et​∈{0,1} from decision-time grounding vt∈{0,1}v_{t} \in \{0, 1\}vt​∈{0,1}, defining local eligibility as:

gt=etvtg_{t} = e_{t} v_{t}gt​=et​vt​

The decision context contains only events exposed through the native agent interface; teacher hints and private events never enter the student context. For a tool call, execution validity requires authenticated non-error execution, while decision-time grounding requires the tool to be available and identifier-like arguments to be supported by preceding visible information. The final supervision mask incorporates native terminal success and ordered subsequence inclusion of the task requirements:

mt=Rτ1[qτ⪯Aτ]gtm_{t} = R_{\tau} \mathbf{1}[q_{\tau} \preceq A_{\tau}] g_{t}mt​=Rτ​1[qτ​⪯Aτ​]gt​

where RτR_{\tau}Rτ​ is native terminal success, qτq_{\tau}qτ​ is the task ordered requirements, and AτA_{\tau}Aτ​ is the canonicalized sequence of relevant operations. Rejected calls and their authentic errors remain visible context without imitation loss, while the grounded recovery that follows becomes a target.

In the third stage, structural-support learning, the authors assemble the final dataset to preserve task breadth and cover capability paths, giving repeated support to under-represented structures such as discovery, recovery, and completion. For a given learner scale, a target number of distinct trajectories per feasible canonical path is defined. The remaining deficit of a selected set is calculated as:

δs(p;S)=[ds−nS(p)]+\delta_{s}(p; \mathcal{S}) = [d_{s} - n_{\mathcal{S}}(p)]_{+}δs​(p;S)=[ds​−nS​(p)]+​

The selection process starts from a fixed certified core, adds completing exemplars per training task, closes uncovered atoms and paths, and then adds trajectories that reduce the support deficits.

For training, the authors employ parent-normalized supervised fine-tuning (SFT). Since one semantic trajectory may yield several training examples, per-example averaging would cause long multi-turn interactions to dominate the loss. Instead, each trajectory contribution is defined at the parent level. The loss for a trajectory is calculated as the average negative log-likelihood of its certified next-token pairs:

ℓθ(τ)=−1Nτ∑u=1Nτlog⁡πθ(yu∣hu),LSFT(θ)=1∣Ds∣∑τ∈Dsℓθ(τ)\ell_{\theta}(\tau) = -\frac{1}{N_{\tau}} \sum_{u=1}^{N_{\tau}} \log \pi_{\theta}(y_{u} \mid h_{u}), \quad \mathcal{L}_{\mathrm{SFT}}(\theta) = \frac{1}{|\mathcal{D}_{s}|} \sum_{\tau \in \mathcal{D}_{s}} \ell_{\theta}(\tau)ℓθ​(τ)=−Nτ​1​u=1∑Nτ​​logπθ​(yu​∣hu​),LSFT​(θ)=∣Ds​∣1​τ∈Ds​∑​ℓθ​(τ)

This approach ensures each parent receives equal weight regardless of rendering multiplicity, keeping the semantic training mass independent of how many examples a trajectory is rendered into.

Experiment

Trajectory2Gym is evaluated by fine-tuning Qwen3 models from 1.7B to 30B on scale-conditioned trajectory data and testing them on Tau1, Tau2, and BFCL, with paired comparisons against each model's own initialization and against public agent-training checkpoints. The experiments show that standard SFT on decision-grounded compositional data improves stateful tool use at every tested scale, with gains concentrated in multi-step and multi-turn tasks, and smaller post-trained models can outperform much larger RL-trained checkpoints. Matched ablations indicate that targeted expansion, grounding, structural selection, and parent normalization all contribute, with parent normalization giving the largest isolated gain, while sensitivity analysis shows that deeper structural support is not automatically better. Qualitative cases confirm that the method supervises evidence-grounded decisions and order-sensitive workflow recovery, behaviors that baseline agents fail to exhibit.

Trajectory2Gym improves stateful tool-use results on Tau1 and Tau2 at every tested model scale, with mean gains between 20 and 41 points and broad paired improvements. Post-trained models outperform larger public initializations and re-evaluated agent-training checkpoints, and the largest post-trained model approaches closed-source reference scores. Strong function-calling results alone do not transfer to stateful tasks. Tau1 and Tau2 mean scores improve by 20 to 41 points at every tested scale, and 24 of 25 paired domain-scale comparisons improve. The paired gain is smallest at 1.7B scale; from 4B upward it is 35 to 41 points. A post-trained 4B model reaches 69.17 on Tau2, far above a public 30B-A3B initialization, and a post-trained 30B-A3B model comes within 1.2 points of closed-source reference scores. An 8B Trajectory2Gym model reaches 74.17 on Tau2, at least 28 points above all re-evaluated agent-training checkpoints, including 14B and 32B models. Function-calling skill does not transfer to stateful tasks: an EnvFactory-8B model nearly matches the 8B model on BFCL Overall but trails by 47.5 points on Tau2.

In this BFCL comparison, the reported closed-source models lead overall, with Gemini-3.0-Pro scoring highest and GPT-5.5 next. ToolACE-2-8B is competitive overall but has a much lower multi-turn base score, while Simia Tau-SFT trails by a wide margin because its parallel non-live and multi-turn base scores are near zero. Gemini-3.0-Pro leads overall, followed by GPT-5.5, with both closed-source models ahead of the listed agent-training references. ToolACE-2-8B performs strongly in non-live parallel, multiple, and irrelevance categories but drops sharply in multi-turn base. Simia Tau-SFT has near-zero parallel non-live and multi-turn base results, producing the lowest overall among the reported models.

All four matched component comparisons favor the proposed Trajectory2Gym choices over stage-matched alternatives, with positive mean gains. The gains are directional and not additive because each pair changes a different stage. Parent normalization provides the largest isolated improvement, supporting semantic interaction as the unit of optimization. All four matched comparisons yield positive mean gains, with parent normalization showing the largest isolated gain. Targeted expansion mainly strengthens stateful Tau tasks, decision grounding improves decision-level supervision, and structural selection covers more canonical paths at the same budget.

In this sensitivity run, benchmark mean declines as structural-support depth increases, with the shallowest setting performing best despite having the fewest trajectories and target tokens. The drop is concentrated in Tau2 while BFCL stays relatively stable, and because depth also changes supervision volume the result does not isolate path support from token count. Mean benchmark performance is highest at the shallowest support depth and decreases as depth increases. Tau2 shows the largest decline, while BFCL remains comparatively stable across support depths.

The experiments evaluate Trajectory2Gym on the stateful tool-use benchmarks Tau1 and Tau2, compare function-calling and BFCL behavior, ablate the proposed components, and test structural-support depth. Trajectory2Gym improves stateful tool-use across all model scales and outperforms larger public initializations and agent-training checkpoints, while function-calling skill alone does not transfer to stateful tasks. Closed-source models still lead BFCL overall, and reference agent-training models show notable weaknesses in multi-turn or parallel non-live settings. Ablations show all proposed components help, with parent normalization providing the largest isolated gain, and sensitivity results favor shallow structural support, though depth is confounded with supervision volume.


AI로 AI 구축

아이디어에서 출시까지 — 무료 AI 코코딩, 즉시 사용 가능한 환경, 최적의 GPU 가격으로 AI 개발을 가속화하세요.

AI 협업 코딩
바로 사용 가능한 GPU
최적의 가격

HyperAI Newsletters

최신 정보 구독하기
한국 시간 매주 월요일 오전 9시 에 이번 주의 최신 업데이트를 메일로 발송합니다
이메일 서비스 제공: MailChimp