Abstract
Generating realistic and interactive traffic trajectories is a cornerstone of autonomous vehicle (AV) development. Current methods often struggle to balance the diversity of real-world driving with the complex social interactions between multiple agents. We present InteractTraj, the first framework capable of generating complex, interactive traffic trajectories—such as overtaking or merging—directly from natural language descriptions. InteractTraj bridges the gap between human intent and realistic multi-agent simulations by translating abstract text into structured, interaction-aware numerical codes. Our framework significantly outperforms previous state-of-the-art methods in both quantitative metrics and human preference studies.
Introduction
Realistic driving simulations are essential for the safe training and rigorous testing of autonomous vehicles. A core challenge in these simulations is the generation of "trajectories"—the precise paths vehicles follow. Existing approaches generally suffer from two major limitations. Rule-based systems provide rigid control but lack the natural diversity found in human driving. Conversely, recent Large Language Model (LLM) based approaches can generate paths from text but often treat vehicles in isolation, failing to capture the "social" dynamics where one agent's actions directly influence another's.
InteractTraj addresses this critical gap by treating interaction as a primary component of the trajectory generation process. By leveraging the reasoning capabilities of LLMs and the geometric precision of transformer-based decoders, it enables the creation of complex traffic scenarios through simple natural language commands.
Methodology: The InteractTraj Architecture
The InteractTraj framework consists of two main components: a Language-to-Code Encoder and a Code-to-Trajectory Decoder.
Language-to-Code Encoder
LLMs are proficient at logical reasoning but often struggle with precise geometric coordinates. InteractTraj utilizes GPT-4 to translate natural language prompts into three distinct types of structured numerical codes:
- Interaction Codes: These capture the relative spatial-temporal relationships between agents (e.g., "Vehicle A is behind and to the left of Vehicle B").
- Vehicle Codes: These define the global intent (e.g., turning vs. stopping) and detailed movement states.
- Map Codes: These describe environmental constraints, such as lane configurations and intersection proximity.
Code-to-Trajectory Decoder
The decoder transforms these structured codes into smooth, realistic trajectories using a two-step interaction-aware feature aggregation strategy:
- Map-to-Agent Fusion: Map data is fused into both vehicle and interaction features to ensure trajectories remain road-compliant.
- Interaction-to-Vehicle Fusion: Interaction features are fused into vehicle features. This step ensures that the generated paths mathematically respect the spatial relationships defined in the interaction codes, such as maintaining safe distances during an overtake.
Experimental Setup and Training
InteractTraj was trained and evaluated using the Waymo Open Motion Dataset (WOMD) and the nuPlan dataset. Due to the lack of large-scale "Text + Trajectory" paired datasets, the authors employed a reconstruction task for training. Numerical codes were extracted from ground-truth trajectories, and the decoder was trained to reconstruct the original paths from these codes. This approach allows the model to learn the underlying physics and social constraints of driving from real-world data.
Key Results and Discussion
InteractTraj demonstrates superior performance over existing baselines like TrafficGen and LCTGen.
Quantitative Performance
On the Waymo dataset, InteractTraj achieved a 15.4% improvement in mean Average Displacement Error (mADE) and an 18.7% improvement in mean Final Displacement Error (mFDE) compared to previous state-of-the-art methods. These results highlight the model's ability to generate trajectories that are not only interactive but also highly accurate relative to real-world benchmarks.
Qualitative Realism and Human Preference
In scenarios involving complex maneuvers like yielding, merging, and following, InteractTraj produced trajectories that closely aligned with the provided text prompts. A user study confirmed these findings:
- 73.7% of participants preferred scenarios generated by InteractTraj over baselines.
- 72.4% of users felt the model successfully fulfilled specific interaction requirements, a significant leap from the 31.5% achieved by the baseline.
Conclusion and Future Work
InteractTraj represents a significant advancement in language-driven traffic simulation. By using intermediate numerical codes, it successfully combines the high-level reasoning of LLMs with the low-level precision required for trajectory generation.
Future work will focus on expanding the model's scope to include diverse agents such as pedestrians and cyclists. Additionally, the authors aim to integrate more flexible, procedurally generated maps and utilize these interactive scenarios to train more robust autonomous driving planners.
Summary updated