UniGen: Unified Modeling of Initial Agent States and Trajectories for Generating Autonomous Driving Scenarios

Reza Mahjourian, Rongbing Mu, Valerii Likhosherstov, Paul Mougin, Xiukun Huang, João V. Messias, Shimon Whiteson · DOI

Abstract

Generating realistic traffic scenarios is a cornerstone of autonomous vehicle (AV) safety validation. Traditional methods often decouple agent placement from trajectory prediction, leading to physically inconsistent scenarios and high collision rates. This paper introduces UniGen, a unified framework that models agent initial states and future trajectories within a single autoregressive process. By conditioning the placement of new agents on the predicted future paths of existing ones, UniGen ensures spatial and temporal consistency. Evaluated on the Waymo Open Motion Dataset (WOMD), UniGen significantly reduces static and dynamic collision rates compared to state-of-the-art baselines, demonstrating a superior ability to synthesize complex, high-fidelity driving environments.

1. Introduction

To safely deploy Autonomous Vehicles (AVs), researchers must test them against "long-tail" or rare safety-critical events. Because these events are infrequent in real-world driving data, simulation becomes the primary tool for safety validation. However, creating realistic simulated traffic remains a significant challenge.

Most existing scenario generation methods split the problem into two disjoint steps: first, they determine the initial states (where to place the cars), and then they use a separate model to predict future trajectories. This "unnatural decomposition" often leads to inconsistencies. For example, a model might place a vehicle in a position where its only logical path results in an immediate collision with another agent. This lack of coordination results in simulated scenarios that appear robotic or physically impossible, undermining the utility of the simulation.

2. The UniGen Framework

UniGen addresses these inconsistencies by treating scenario generation as a unified, iterative process. The core innovation is autoregressive agent injection. Instead of populating a scene simultaneously, UniGen adds agents one by one, ensuring every new agent is fully aware of—and consistent with—the positions and future paths of all existing agents.

2.1 Architecture

The architecture consists of three main components designed to balance global context with local precision:

  1. Shared Scenario Encoder: This module uses a combination of PointPillars to process sparse point data (such as road boundaries and existing agents) and a CoAtNet backbone to create a global embedding of the entire scene.
  2. Agent-Centric Road Layout Encoder: When a new agent is slated for placement, the model extracts a high-resolution "crop" of the road layout from that specific agent's perspective. This allows for higher precision in determining heading and speed relative to specific lane geometries.
  3. Specialized Decoder Heads: The model utilizes three distinct heads to finalize the injection:
  4. Occupancy Predictor: Generates a heatmap indicating valid locations to "inject" a new agent.
  5. Attribute Predictor: Determines the agent’s physical dimensions, initial heading, and velocity.
  6. Trajectory Predictor: Forecasts multiple possible future paths for the new agent.

2.2 Training Strategy

During training, UniGen employs a masking strategy inspired by BERT. The model takes a real-world scenario, hides a subset of agents, and is tasked with "filling in the blanks." Crucially, when adding a new agent, the model conditions its decisions on the future trajectories of the agents already present in the scene. This "future-aware" conditioning ensures that the new agent does not plan a path through space that will be occupied by another vehicle later in the segment.

3. Experimental Setup

The researchers trained and evaluated UniGen using the Waymo Open Motion Dataset (WOMD). This high-fidelity dataset contains over 100,000 real-world driving segments, each 20 seconds long, featuring complex interactions between vehicles, pedestrians, and cyclists. This scale allows the model to learn a wide variety of urban and suburban driving behaviors.

4. Results and Analysis

UniGen was compared against state-of-the-art baselines, including TrafficGen and LCTGen. The results highlight the advantages of a unified modeling approach:

  • Reduced Collision Rates: UniGen achieved a Static Collision Rate (SCR) of 1.13%, a significant improvement over TrafficGen's 12.71%. Its Dynamic Collision Rate (DCR) was 4.63%, nearly half that of LCTGen (8.38%).
  • Distribution Matching: Using Maximum Mean Discrepancy (MMD) to measure how closely generated traffic matches real-world statistics, UniGen outperformed previous models across position, heading, and velocity metrics.
  • Ablation Studies: The "Combined" version of the model—utilizing both agent-centric encoding and trajectory conditioning—performed better than variants that treated these components separately. This confirms that both local context and unified prediction are necessary for realism.

5. Discussion and Future Work

While UniGen represents a significant step forward in scenario generation, several challenges remain. Despite the unified approach, residual collisions still occur in highly crowded or complex scenes, suggesting the model may require higher capacity to grasp multi-agent negotiations.

Furthermore, the autoregressive nature of the model (adding agents sequentially) increases computational costs compared to "one-shot" generators. Finally, while UniGen generates realistic initial scenarios, a logical next step is making these agents fully "reactive" so they can respond dynamically to the AV's own maneuvers in real-time during a simulation. Future research will focus on improving the efficiency of the injection process and integrating reactive behavior modules.

Summary updated

BibTeX
@inproceedings{mahjourian2024unigen,
  author = {Reza Mahjourian and Rongbing Mu and Valerii Likhosherstov and Paul Mougin and Xiukun Huang and João V. Messias and Shimon Whiteson},
  title = {{UniGen: Unified Modeling of Initial Agent States and Trajectories for Generating Autonomous Driving Scenarios}},
  booktitle = {IEEE International Conference on Robotics and Automation},
  year = {2024},
  doi = {10.1109/icra57147.2024.10611115},
}
Figure