LANGTRAJ: Diffusion Model and Dataset for Language-Conditioned Trajectory Simulation

Wei-Jer Chang, Wei Zhan, Masayoshi Tomizuka, Manmohan Chandraker, Francesco Pittaluga

TL;DR

This paper introduces LANGTRAJ, a novel diffusion model that simulates realistic, multi-agent traffic scenarios guided by natural language instructions. It addresses the challenge of creating controllable and diverse traffic simulations for autonomous vehicle (AV) testing by directly conditioning diffusion models on language during training, a departure from prior methods that relied on post-hoc guidance.

What Problem Does This Paper Address?

Developing and testing autonomous vehicles (AVs) requires robust simulation environments that can generate a wide range of realistic and challenging scenarios. Traditional methods often rely on manually designed scenarios or domain-specific rules, which are limited in scalability and flexibility. While diffusion models have shown promise in generating complex data distributions, controlling their output, especially for nuanced interactive behaviors in traffic, has been a significant hurdle. Existing approaches often require complex, post-training guidance functions, which can be cumbersome and computationally expensive. The core problem is enabling intuitive, flexible, and scalable control over multi-agent traffic simulations, particularly for generating safety-critical or counterfactual scenarios, using natural language.

Methods

The paper introduces LANGTRAJ, a language-conditioned diffusion model for trajectory simulation. Its architecture comprises:

  • Scene Encoder: A query-centric network combined with Graph Neural Networks (GNNs) to model spatiotemporal relationships between agents and their environment (HD maps, agent histories). This encoder operates in a scene-independent local coordinate system for symmetry.
  • Language Encoder: This module processes natural language prompts, rephrasing agent roles (e.g., "target agent," "other agent") for explicit conditioning. It integrates the language embedding with the scene context to produce agent-specific embeddings.
  • Text-Conditioned Diffusion Model: The core denoiser, which uses multiple transformer blocks with various attention mechanisms (Query-centric, Agent-Context Cross-Attention, Text Cross-Attention) to jointly predict future agent behaviors. It learns to denoise noisy trajectories by integrating scene context and language conditioning.

A key methodological contribution is a novel closed-loop training strategy for diffusion models. This strategy aims to improve realism and stability by allowing the model to experience its own generated predictions during training, mitigating distribution shifts common in open-loop training. It involves generating multiple candidate trajectories, selecting the best one based on a distance metric, executing it, and then computing the loss against the ground truth.

Datasets

  • INTERDRIVE: A newly introduced, large-scale dataset specifically designed for language-conditioned traffic simulation. It comprises:
  • Human-labeled annotations of agent-agent interactions (merging, yielding, passing) from the Waymo Motion and NuPlan datasets.
  • Heuristically generated labels for single-agent behaviors.
  • The dataset aims to provide rich, diverse, and interactive labels for training models.
  • Waymo Motion Dataset (WOMD): Used for training and evaluation.
  • NuPlan Dataset: Used for annotation of INTERDRIVE.
  • ProSim-Instruct-520k: Used for training and evaluation.

Key Insights and Ideas

  • Direct Language Conditioning is Key: The paper argues that directly conditioning diffusion models on language during training is more effective for intuitive control than relying on post-hoc LLM-based guidance functions. This allows the model to learn the semantics of interactive behaviors directly from the data.
  • Closed-Loop Training for Diffusion Models: Applying closed-loop training to diffusion models, which are inherently iterative, is challenging due to computational cost. The proposed method offers a way to improve realism and stability by letting the model "see" its own outputs during training, bridging the gap between training and inference.
  • INTERDRIVE's Focus on Interaction: The creation of INTERDRIVE highlights the importance of datasets specifically annotated for nuanced agent-agent interactions, which are crucial for realistic multi-agent simulation and are often underspecified in general trajectory datasets.
  • Language Enables Safety-Critical Scenarios: The ability to condition on language allows for the generation of rare, safety-critical scenarios that might not be present in standard datasets, enabling more comprehensive AV testing.

Key Results

  • Improved Controllability: LANGTRAJ achieved a significant reduction in minADE (13.6% on INTERDRIVE, 12.8% on ProSim-Instruct-520k) when conditioned on language, demonstrating better alignment with textual instructions compared to unconditional models.
  • Realistic Simulations: The model achieved competitive meta-realism scores (e.g., 0.72 on INTERDRIVE), indicating that generated trajectories are distributionally similar to real-world data.
  • Safety-Critical Scenario Generation: LANGTRAJ successfully generated safety-critical scenarios with collision rates as high as 40%, outperforming LLM-based guidance methods in terms of collision rate and other metrics.
  • Competitive Performance: LANGTRAJ performed competitively against state-of-the-art diffusion-based approaches on benchmarks like the Waymo Sim Agents Challenge.
  • Closed-Loop Training Benefits: Closed-loop training with teacher forcing improved map adherence and meta-realism, while also stabilizing training and preventing unrealistic behaviors.

Limitations and Future Work

  • Computational Cost of Closed-Loop Training: While the proposed closed-loop training strategy is more efficient than naive approaches, it still involves iterative processes that can be computationally intensive.
  • Teacher Forcing for Stability: The paper notes that without teacher forcing in closed-loop training, vehicles might exhibit unrealistic behaviors (e.g., driving off-road). This suggests that a hybrid approach, where some agents follow ground truth, is beneficial for stability.
  • Future Work: The authors suggest that their approach is well-suited for scalable, controllable AV simulation, enabling safety-critical testing and interactive scenario design. The combination of natural language conditioning and diffusion models opens avenues for more sophisticated and intuitive simulation tools. The dataset and model could be further extended to cover more complex interactions and scenarios.

Summary updated

BibTeX
@inproceedings{chang2025langtraj,
  author = {Wei-Jer Chang and Wei Zhan and Masayoshi Tomizuka and Manmohan Chandraker and Francesco Pittaluga},
  title = {{LANGTRAJ: Diffusion Model and Dataset for Language-Conditioned Trajectory Simulation}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
  url = {https://openreview.net/forum?id=kuEEzsrm71},
}
Figure