TrajTok: Technical Report for 2025 Waymo Open Sim Agents Challenge

Zhiyuan Zhang, Xiaosong Jia, Guanyu Chen, Qifeng Li, Junchi YanarXiv 2025 · DOI

Abstract

TrajTok is a hybrid trajectory tokenizer designed for autonomous driving models utilizing the next-token prediction paradigm. By integrating rule-based gridding with data-driven filtering and expansion, TrajTok addresses common pitfalls in purely data-driven tokenization, such as insufficient coverage, asymmetry, and lack of robustness. This approach secured 2nd place in the 2025 Waymo Open Sim Agents Challenge (WOSAC), demonstrating superior performance in realism and map-based metrics.

Introduction

Discretizing continuous trajectories into discrete tokens is a foundational step for applying language modeling techniques to autonomous driving simulators. However, standard data-driven methods like k-disks often suffer from limited generalization to rare maneuvers, physical asymmetry, and sensitivity to dataset noise. TrajTok bridges this gap by combining the structure of rule-based systems with the flexibility of data-driven approaches to create a more robust and representative vocabulary.

Comparison of standard data-driven tokenization (top) vs. TrajTok (bottom), highlighting improvements in symmetry, coverage, and noise robustness.

Methods

The TrajTok pipeline involves four key stages designed to refine the tokenization process:

  1. Data Preparation & Flipping: Trajectories are normalized and flipped along the x-axis. This ensures that the resulting vocabulary is perfectly symmetric, reflecting the physical reality that vehicles can maneuver similarly in both directions.
  2. Gridding: The trajectory space is partitioned into a grid based on the endpoints of the paths.
  3. Filtering & Expanding: A binary map identifies valid regions. The system filters out "noisy" cells (those with very few neighbors) and expands into empty but plausible regions to ensure the model can represent paths not explicitly found in the training dataset.
  4. Generating: Tokens are generated for each valid grid cell. For expanded cells lacking empirical data, synthetic paths are created via curve interpolation to ensure they remain kinematically feasible.

Additionally, the authors employ Spatial-Aware Label Smoothing during training. Unlike standard label smoothing which treats all incorrect predictions as equally bad, this method assigns higher probability to tokens that are spatially proximal to the ground truth, helping the model learn the underlying geometric structure of movement.

Results and Discussion

Evaluated on the Waymo Open Motion Dataset (WOMD) for the 2025 WOSAC, TrajTok achieved a Realism Meta score of 0.7852, ranking 2nd overall. Notably, it outperformed all competitors in map-based metrics with a score of 0.9207, indicating high compliance with environmental constraints.

Performance comparison of TrajTok against other state-of-the-art methods on the WOSAC leaderboard.

Key insights from the challenge include:

  • Symmetry as a Prior: Purely data-driven models often struggle with asymmetric data distributions (e.g., more right turns than left turns). Forcing symmetry improves generalization across diverse driving scenarios.
  • Coverage vs. Distribution: Expanding the token space beyond the training distribution allows the model to "imagine" valid paths it hasn't seen before, which is critical for long-tail safety scenarios.
  • Vocabulary Scaling: Unlike traditional methods that degrade with larger vocabularies due to noise overfitting, TrajTok benefits from high-resolution tokenization (up to 8,000 tokens for vehicles), allowing for finer control in path planning.

Conclusion

TrajTok demonstrates that a hybrid approach to trajectory tokenization can significantly enhance the realism and map-compliance of autonomous driving simulators. By addressing the limitations of purely data-driven methods, it provides a more robust foundation for next-token prediction models in complex urban environments. Future work will focus on automating hyperparameter tuning for varied agent types and optimizing the computational overhead associated with large vocabularies.

Summary updated

Abstract

In this technical report, we introduce TrajTok, a trajectory tokenizer for discrete next-token-prediction based behavior generation models, which combines data-driven and rule-based methods with better coverage, symmetry and robustness, along with a spatial-aware label smoothing method for cross-entropy loss. We adopt the tokenizer and loss for the SMART model and reach a superior performance with realism score of 0.7852 on the Waymo Open Sim Agents Challenge 2025. We will open-source the code in the future.
BibTeX
@misc{zhang2025trajtok,
  author = {Zhiyuan Zhang and Xiaosong Jia and Guanyu Chen and Qifeng Li and Junchi Yan},
  title = {{TrajTok: Technical Report for 2025 Waymo Open Sim Agents Challenge}},
  year = {2025},
  eprint = {2506.21618},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.21618},
}
Figure