Trajectory2Gym: Decision-Grounded Compositional Interaction Synthesis for Tool-Use Agents

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

Westlake University · Ant International

Published October 24, 2026 · on the feed October 27, 2026 · ▲ 368 · arXiv 2610.33568

AgentsLLM training & RLVision & multimodal Full code arXiv ↗Hugging Face ↗

The 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.

The Brief

2:28

A short podcast summary of the paper. Written and voiced by AI.

Transcript

Trajectory2Gym. Decision-Grounded Compositional Interaction Synthesis for Tool-Use Agents. By Yihao Hu and seven others, from Westlake University and Ant International. Published on the twenty-fourth of October. Its code repository is worked out: about ninety-five source files, with a readme and a licence.

A tool-use trajectory that succeeds is not automatically good supervision. A successful interaction may underrepresent the multi-step dependencies an agent needs to learn. It may also contain actions that nothing in the agent's view justified at the moment they were taken. Training on such an action teaches the learner to make a move it had no visible reason to make.

The paper names two coupled requirements for supervision that works. The first is compositional coverage: the important dependencies between observations and actions have to be represented. The second is decision grounding: every action that is supervised has to be supported by the interaction history the learner can see. Trajectory2Gym is built to satisfy both. It reframes trajectory generation as deliberately constructing interaction experience that can be learned from, instead of collecting trajectories that happened to succeed.

It starts from compositional structures that are under-supported and constructs executable interactions around them. Supervision is then derived only from the grounded decisions in the executions that actually result. Two further pieces shape training. Structural-support selection decides how the resulting experience is allocated. And parent-normalised supervised fine-tuning keeps the semantic interaction as the unit that carries training weight.

The order of operations matters. Rather than generating many trajectories and filtering for success afterwards, the method decides first which structures need more support, builds interactions to supply it, and then keeps only the decisions that the visible history can justify. What reaches the learner has been chosen for what it can teach, not for whether the episode ended well.

The evaluation covers five Qwen3 scales and three benchmarks: Tau1, Tau2 and BFCL. Trajectory2Gym improves all three at every scale tested. The equal-weight mean across the three benchmarks rises by between sixteen point nine and twenty-nine point eight percentage points, depending on scale. The gains are largest in stateful and multi-turn interaction, the settings where later decisions depend on earlier observations and feedback.

Where the gains concentrate matches the diagnosis. Long, stateful interactions are where dependencies matter and where an unjustified action is easiest to slip in. The authors' conclusion is that scaling tool-use agents is not only a matter of more successful trajectories, but of interactions whose dependencies are represented and whose decisions can be learned from what the agent can see.

Paper Quest · 7 chapters · about 41 min

Play this paper

Learn it by doing: make the calls the authors made, guess the result before you see it, and defend it in a viva graded on your own words. Chapter 1 is right here.

Chapter 1 🧩 · The problem

Your agent's logs are full of successes. The trouble is what those successes teach.

You are building training data for a tool-use agent that handles customer support: look up an account, read orders, confirm with the user, then cancel or swap items.

The road ahead

  1. 1 · The problem ~7 min An episode that finished its task can still teach a tool-use agent badly, because success does not say what each step teaches.
  2. 2 · What came before ~3 min
  3. 3 · The key idea ~9 min Build training data for what it teaches: cover the important step-to-step dependencies, and train only on actions the agent's visible history justifies.
  4. 4 · Choose your own research ~3 min
  5. 5 · Build the method ~8 min Trajectory2Gym finds missing structures, builds and runs interactions for them, certifies grounded targets, selects experience by support, then trains with parent-normalized fine-tuning.
  6. 6 · The experiment ~6 min You’ll guess: Across five Qwen3 sizes, what was the smallest rise in the equal-weight mean of the three benchmarks after training on Trajectory2Gym data?
  7. 7 · The viva ~5 min Three questions from the examiners, answered in your own words. Win it for the paper’s trophy.
Join free to play the whole quest ›

Free, with Google or an email address. Your stars and progress are kept.

KipQuest: the day’s AI research, as podcasts and quests. All papers Android app Privacy Contact Episodes are written and voiced by AI from each paper. Summaries can contain mistakes: the paper is the source.