TOOL-USE AGENTS / RESEARCHTRAJECTORY → EXPERIENCE → LEARNING

Trajectory2Gym

BUILD THE INTERACTION.

Learn from
grounded
decisions.

Make the dependencies visible.
Make each action learnable.

OBSERVERECOVERCONFIRM Grounded target VISIBLE HISTORY → CERTIFIED DECISION
+16.9–29.8 pp

Three-benchmark mean gain

5 model scales

Qwen3 · 1.7B to 30B-A3B

1 epoch of SFT

Parent-normalized training

Conceptual method illustration
Poster PNG ↓

Decision-Grounded Compositional Interaction Synthesis for Tool-Use Agents

Code, training scripts, examples, and tests are available on GitHub. ↗

Yihao Hu1,2,* Zhihao Wen2,* Yitong Lin3,2 Siyuan Lu1 Pan Wang4 Wei Wu2,† Jiang-Ming Yang2 Tao Lin1,†

1Westlake University2Ant International3Zhejiang University4University of Science and Technology of China

* Equal contribution   † Corresponding authors

A successful action.
But a useful lesson?

A tool call can execute perfectly while ignoring the user's latest request. Training should preserve the dependencies that make a decision justified.

FROM THE PAPER'S CONSTRUCTED EXAMPLE

“Actually, just the lamp.”

  1. 01 The user first requests a larger bottle and a dimmer lamp.
  2. 02 The catalog exposes valid replacement options.
  3. 03 The user confirms only the lamp exchange.

Both candidate exchanges can execute. Only one respects the confirmed request.

Exchange the lampKeep the original bottle
Keep
Exchange both itemsReplace the bottle as well
Reject

Grounding checks visible evidence; workflow certification checks the confirmed scope and required order.

Paraphrased schematic from Figure 1; the second candidate is constructed. This interaction illustrates supervision selection.
Read the full abstract +
Successful tool-use trajectories are not necessarily useful supervision. Even successful interactions may underrepresent multi-step dependencies or contain actions that are unjustified by the information visible to the agent at decision time. We identify two coupled requirements for effective trajectory supervision: compositional coverage, so that important observation–action dependencies are represented, and decision grounding, so that each supervised action is supported by the learner-visible interaction history. We introduce Trajectory2Gym, which constructs executable interactions around under-supported compositional structures and derives supervision only from grounded decisions in their realized executions. Structural-support selection allocates the resulting experience, while parent-normalized supervised fine-tuning preserves the semantic interaction as the unit of training weight. This reframes trajectory generation as the deliberate construction of learnable interaction experience, rather than the collection of successful trajectories. Across five Qwen3 scales, Trajectory2Gym improves Tau1, Tau2, and BFCL at every tested scale, increasing the equal-weight three-benchmark mean by 16.9–29.8 percentage points. The gains are strongest in stateful and multi-turn interaction, where later decisions depend on earlier observations and feedback. Our results suggest that 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.
Paper teaser showing the shared request, catalog and confirmation, and contrasting execution-only filtering with Trajectory2Gym.
Execution success alone cannot certify a useful training target. Figure 1 · Click to enlarge

Build. Ground.
Allocate. Learn.

Construct under-supported interactions, certify decisions in their realized executions, and distribute learning across semantic trajectories.

01

Construct interactions

Target under-supported capability paths and execute the resulting tasks in native environments. Make discovery, recovery and cross-step dependencies part of the experience.

02

Certify decisions

Check visible evidence, execution validity and workflow completion. Keep authentic errors as context while supervising the grounded recovery that follows.

03

Allocate support

Select certified trajectories to preserve task breadth and cover capability paths. Balance repeated support with a scale-dependent target.

04

Normalize by parent

Give each semantic interaction equal training weight, independent of how many examples it renders into. Train with one epoch of supervised fine-tuning.

The paper's three-stage pipeline: compositional interaction synthesis, grounded supervision, and structural-support learning with parent-normalized training.
The complete Trajectory2Gym pipeline. Figure 2 · Click to enlarge

Every scale.
All three benchmarks.

Paired comparisons against each Qwen3 initialization, under the same task population, native interface, decoding and scorer.

Qwen3 initialization+ Trajectory2Gym

Stateful interaction · Tau2

Pass@1 (%), equal-weight domain average. Higher is better.

Tau2 scores from Table 1 of the manuscript.
Qwen3 scaleInitialization+ Trajectory2GymGain (pp)
1.7B23.3337.50+14.17
4B19.1769.17+50.00
8B25.0074.17+49.17
14B25.0080.83+55.83
30B-A3B28.3384.17+55.84

Author-reported manuscript results. Each task is run once. Scale-conditioned training views differ; these gains measure the complete recipe. Tau1 Airline uses a seen-task, transductive setting.

+8.04 points

Training weight matters.

Parent normalization delivers the largest mean gain among the four stage-matched 8B ablations, with trajectories, rendered examples and target masks unchanged.

942 more paths

Broader structural coverage.

Structural selection covers more canonical paths than random selection at the same 14,819-parent budget and equal target tokens.

Read the ablation context +

Each matched ablation is a single run. A few-point change is directional, and gains from different stages are not additive. The targeted-expansion pair changes candidate supply without fixing the target-token budget. The support-depth sensitivity experiment changes both support and data volume. See the full paper for protocols and limitations.

Use the evidence.
Respect the order.

On the paper's Retail workflow, the address must change while the order is pending, before editing its items. Correct individual calls still need the right sequence.

Same-task Retail case: Simia overlooks available address evidence, MUA-RL changes the items before the address, and Trajectory2Gym confirms and completes both updates in the required order.
Three independently generated interactions, abridged for display. Native rewards: 0 / 0 / 1 · Paper case study

Explore the work.

Explore the paper, implementation, training workflow, and project materials.

Build on this work.

BibTeX for the project manuscript.

@misc{hu2026trajectory2gym,
  title = {Trajectory2Gym: Decision-Grounded
    Compositional Interaction Synthesis
    for Tool-Use Agents},
  author = {Hu, Yihao and Wen, Zhihao and
    Lin, Yitong and Lu, Siyuan and Wang, Pan and
    Wu, Wei and Yang, Jiang-Ming and Lin, Tao},
  year = {2026},
  howpublished = {Project manuscript},
  url = {https://yihaohu0118.github.io/Trajectory2Gym-page/}
}
Open full-size image ↗