Summary (Overview)

  • Core Contribution: Trajectory2Gym reframes trajectory generation for tool-use agents as the deliberate construction of learnable interaction experience rather than the collection of successful trajectories, based on two coupled requirements: compositional coverage (observation–action dependencies must be represented) and decision grounding (each supervised action must be supported by learner-visible interaction history).
  • Three-Stage Framework: (1) Compositional interaction synthesis targets under-supported capability paths in native environments; (2) Grounded supervision masks decisions by visibility, execution validity, and workflow-order certification; (3) Structural-support learning allocates repeated support per learner scale with parent-normalized SFT.
  • Key Empirical Result: Across five Qwen3 scales (1.7B to 30B-A3B), Trajectory2Gym improves Tau1, Tau2, and BFCL at every scale, raising the three-benchmark equal-weight mean by 16.9–29.8 percentage points over public initializations with SFT only (no RL).
  • Scale-Beating Performance: The post-trained 4B model surpasses the public 30B-A3B initialization on Tau2 (69.17 vs. 28.33); the 8B model has the highest three-benchmark mean of any evaluated checkpoint.
  • Key Findings: Gains concentrate in stateful, multi-turn interaction; parent-normalized SFT provides the largest isolated ablation gain (8.04 points); more structural support is not automatically better (non-monotonic depth sensitivity).

Introduction and Theoretical Foundation

Background and Motivation

The paper addresses a fundamental flaw in standard tool-use agent training: successful trajectories are not necessarily useful supervision. Even successful interactions may:

  • Underrepresent multi-step dependencies (compositional coverage failure)
  • Contain actions unjustified by the agent's decision-time visibility (decision grounding failure)

The authors identify two specific challenges from their candidate pool (34,772 certified candidates):

  • Challenge 1 (Compositional Coverage): 40.9% of trajectories contain at most two supervised decisions; only 10.0% contain a certified decision after an authentic error.
  • Challenge 2 (Decision Grounding): Successful API execution alone does not establish that an action was justified by visible information. A collector may use an unseen identifier, and native tool replay may accept actions that contradict later user confirmations.

Theoretical Formulation

The policy acts from a decision context that includes only agent-visible information:

ct=(x,Tt,V(H<t)),at∼πθ(⋅∣ct),(1)c_{t} = \big(x, \mathcal{T}_{t}, V(H_{<t})\big), \qquad a_{t} \sim \pi_{\theta}(\cdot | c_{t}), \tag{1}

where H<tH_{<t} is the history preceding decision tt, VV projects the history onto the agent-visible subspace, and Tt\mathcal{T}_{t} is the tool schema.

The supervised dataset for learner scale ss is:

Ds={(τi,mi)}i=1Ns,mi∈{0,1}Ti,(2)\mathcal{D}_{s} = \{(\tau_{i}, \mathbf{m}_{i})\}_{i=1}^{N_{s}}, \qquad \mathbf{m}_{i} \in \{0, 1\}^{T_{i}}, \tag{2}

where TiT_i is the number of assistant decisions and mit=1m_{it}=1 marks decision tt as a supervised target.

Two required properties:

  1. Compositional coverage: training data must provide sufficient support for observation–action dependencies and multi-step structures
  2. Decision grounding: each supervised action must be supported by the realized interaction and decision-time context ctc_t

Key Proposition (Collector-Private Uncertainty)

When a demonstrated action depends on collector-private information after conditioning on ctc_t, a policy restricted to ctc_t faces additional uncertainty (characterized formally as Proposition 1 in the paper). This formalizes why execution validity alone is insufficient for supervision eligibility.


Methodology

Stage 1: Compositional Interaction Synthesis

A shared capability vocabulary K\mathcal{K} covers semantic action roles (lookup, error, clarification, retry, confirmation, cancellation, update, etc.). An ordered path p=(κ1,…,κℓ)p = (\kappa_1, \ldots, \kappa_\ell) composes these requirements. A generator GG constructs request and initial state, and a teacher πT\pi_{\mathrm{T}} executes:

(x,s0)∼G(⋅∣p,E),τ∼PE(⋅∣x,s0,πT).(3)(x, s_{0}) \sim G(\cdot | p, \mathcal{E}), \qquad \tau \sim P_{\mathcal{E}}(\cdot | x, s_{0}, \pi_{\mathrm{T}}). \tag{3}

The support count of a path in a selected set S\mathcal{S}:

nS(p)=∑τ∈S1[p(τ)=p].(4)n_{\mathcal{S}}(p) = \sum_{\tau \in \mathcal{S}} \mathbf{1}[p(\tau) = p]. \tag{4}

Key properties:

  • Paths are targeted when support falls below the scale's target (deficit-driven synthesis)
  • Uniform random selection misses rare paths (Proposition 3: a path represented once is missed with probability 1−B/N1 - B/N)
  • Paths are certified only when action/observation dependencies appear in the executed log
  • Teacher hints and private events never enter the student trace

Stage 2: Grounded Supervision

Target Eligibility: Distinguishes native execution validity et∈{0,1}e_t \in \{0,1\} from decision-time grounding vt∈{0,1}v_t \in \{0,1\}, with local eligibility:

gt=etvt.(5)g_{t} = e_{t} v_{t}. \tag{5}
  • For a tool call: et=1e_t = 1 requires authenticated non-error execution; vt=1v_t = 1 requires tool availability to the agent and identifier-like arguments supported by preceding visible information
  • Rejected calls and authentic errors remain visible context (no imitation loss); the grounded recovery becomes a target

Workflow Completion Mask:

mt=Rτ1[qτ⪯Aτ]gt,(6)m_{t} = R_{\tau} \mathbf{1}[q_{\tau} \preceq A_{\tau}] g_{t}, \tag{6}

where RτR_\tau is native terminal success, qτq_\tau is the task's ordered requirements, AτA_\tau is the canonicalized sequence of relevant operations, and ⪯\preceq denotes ordered subsequence inclusion. Only trajectories with ∑tmt>0\sum_t m_t > 0 enter the eligible pool.

Stage 3: Structural-Support Learning

Structural Selection: For scale ss, target depth dsd_s (distinct trajectories per canonical path) grows with learner scale (1, 2, 3, 4, 8 from 1.7B to 30B-A3B). The deficit:

δs(p;S)=[ds−nS(p)]+.(7)\delta_{s}(p; \mathcal{S}) = \left[d_{s} - n_{\mathcal{S}}(p)\right]_{+}. \tag{7}

Selection starts from a certified core, adds completing exemplars, closes uncovered atoms/paths, then reduces deficits—exactly maximizing capped support ∑pmin⁡(nS(p),ds)\sum_p \min(n_{\mathcal{S}}(p), d_s) under cardinality budget (Proposition 2).

Parent-Normalized SFT: Each trajectory's contribution is weighted at the parent level:

ℓθ(τ)=−1Nτ∑u=1Nτlog⁡πθ(yu∣hu),LSFT(θ)=1∣Ds∣∑τ∈Dsℓθ(τ).(8)\ell_{\theta}(\tau) = -\frac{1}{N_{\tau}}\sum_{u=1}^{N_{\tau}} \log \pi_{\theta}(y_u \mid h_u), \qquad \mathcal{L}_{\mathrm{SFT}}(\theta) = \frac{1}{|\mathcal{D}_s|}\sum_{\tau \in \mathcal{D}_s} \ell_{\theta}(\tau). \tag{8}

This prevents long multi-turn interactions from dominating the loss via rendering multiplicity (Proposition 4 shows per-example averaging weights a parent proportionally to its rendered children count).


Empirical Validation / Results

Experimental Setup

  • Models: Qwen3 scales (1.7B, 4B, 8B, 14B, 30B-A3B) from public initialization, one epoch of full-parameter parent-normalized SFT
  • Benchmarks: Tau1, Tau2, BFCL (Task Success / Function Calling)
  • Data: 11.6k–19.9k trajectories per scale
  • Evidence standard: Paired comparison with own initialization, same task population, native interface, decoding, simulator, scorer

Table 1: Tau1/Tau2 Results (Pass@1, %)

ModelTau1 Avg.Tau2 Avg.MeanΔ
Qwen3-1.7B8.5223.3315.93—
+ Trajectory2Gym34.4337.5035.97+20.04
Qwen3-4B24.2219.1721.70—
+ Trajectory2Gym44.2269.1756.70+35.00
Qwen3-8B27.8725.0026.44—
+ Trajectory2Gym51.1374.1762.65+36.21
Qwen3-14B32.0425.0028.52—
+ Trajectory2Gym58.0480.8369.44+40.92
Qwen3-30B-A3B44.3928.3336.36—
+ Trajectory2Gym66.7884.1775.47+39.11

Key comparisons: Post-trained 4B (Tau2: 69.17) > public 30B-A3B (Tau2: 28.33); post-trained 30B-A3B (Tau2: 84.17) within 1.2 points of closed-source references (84.76, 85.31). 24 of 25 paired domain comparisons improve.

Table 2: BFCL Results (Overall, %)

ModelOverallΔ
Qwen3-1.7B55.88—
+ Trajectory2Gym66.48+10.60
Qwen3-4B62.92—
+ Trajectory2Gym74.85+11.93
Qwen3-8B67.30—
+ Trajectory2Gym78.62+11.32
Qwen3-14B72.01—
+ Trajectory2Gym79.68+7.67
Qwen3-30B-A3B77.58—
+ Trajectory2Gym80.93+3.35

Gains concentrate in Multi-turn Base (rises 7–41 points). Every post-trained model from 4B exceeds GPT-5.5's reported Multi-turn Base (60.00). The 30B model's 80.93 Overall numerically exceeds Gemini-3.0-Pro's 79.97.

Table 3: Ablation Study (Qwen3-8B)

SettingTau1Tau2BFCLMeanGain
Existing pool vs. + Targeted expansion51.00→58.6175.83→81.6780.39→77.6169.08→72.63+3.55
Loose targets vs. + Decision grounding48.13→51.1371.67→74.1775.86→78.6265.22→67.97+2.75
Random vs. + Structural selection51.13→57.0074.17→75.8379.40→78.8168.23→70.55+2.32
Row averaging vs. + Parent normalization49.52→51.1352.50→74.1777.79→78.6259.94→67.97+8.04

Table 4: Support-Depth Sensitivity (Qwen3-8B)

DepthTrajectoriesTarget tokensTau1Tau2BFCLMean
213,98618.02M55.6182.5078.7472.28
314,81919.42M57.0075.8378.8170.55
415,80520.61M54.0075.0079.3169.44

Finding: Performance is non-monotonic in support depth—the shallowest setting wins despite fewer data. Structural support is an allocation problem, not a scaling rule.


Theoretical and Practical Implications

Theoretical Implications

  1. Success gates, does not license, supervision: The paper formalizes why outcome-filtered trajectory training is insufficient—success certifies episode completion, not what the episode teaches or whether each action was justified by visible evidence.
  2. Three independent levels of data design: (a) which interaction structures are available, (b) which decisions are eligible for imitation, (c) how much optimization mass each interaction receives. These can vary independently even with similar trajectory counts.
  3. Decoupling execution validity from decision grounding: Native execution validity (ete_t) and decision-time grounding (vtv_t) are formally distinct (gt=etvtg_t = e_t v_t); both are required for supervision eligibility.

Practical Implications

  1. Data construction beats data collection: Targeted synthesis of under-supported paths yields gains that outcome filtering alone cannot provide, across all scales.
  2. Authentic errors are context, not targets: Rejected calls with authentic errors remain visible context without imitation loss; the grounded recovery that follows becomes a target—preserving recovery reasoning without rewarding failure.
  3. Per-scale allocation matters: Larger learners benefit from more realizations per path (dsd_s growing from 1 to 8), but there is an optimal depth—more repetition is not automatically better.
  4. Rendering format should not affect optimization weight: Parent-normalized training makes a semantic interaction the unit of training weight, independent of how many rendered children it produces.

Conclusion

Main Takeaways

The central claim is that what a trajectory teaches is decided not by its outcome, but by the dependencies it realizes and the decisions its visible history can justify. Trajectory2Gym operationalizes this through:

  1. Compositional interaction synthesis: Builds the interactions a pool lacks (targeted expansion on deficit structures)
  2. Grounded supervision: Certifies targets one decision at a time via visibility, execution, and workflow-order checks
  3. Structural-support learning: Allocates repeated support per learner scale with parent-normalized training weight

Key Results Summary

  • Standard SFT (no RL) on constructed interactions improves all three benchmarks at all five scales (16.9–29.8 points on the three-benchmark mean)
  • Gains are strongest in stateful and multi-turn tasks where compositional dependencies matter most
  • Parent normalization provides the largest isolated gain (8.04 points)
  • The post-trained 4B model exceeds the public 30B-A3B initialization on stateful tasks

Future Directions

  • Extending decision-level certification to on-policy rollouts (RL settings)
  • Application to web, software, and terminal agents
  • Tracking structural coverage and decision eligibility alongside data volume in future pipelines
  • Keeping training weight of an interaction independent of its rendering format

Broader Lesson

"Scaling tool-use agents depends not only on collecting more successful trajectories, but on constructing interactions whose dependencies are represented and whose decisions are learnable from the agent's visible history."

Related papers