Abstract
RealGen introduces a Retrieval Augmented Generation (RAG) framework for autonomous vehicle (AV) simulation. By retrieving and combining behaviors from a database of real-world traffic snippets, it generates highly realistic, controllable, and diverse driving scenarios. This approach addresses the "memorization" limitations of traditional generative models, particularly in handling long-tail scenarios and complex multi-agent interactions.
What Problem Does This Paper Address?
To safely deploy autonomous vehicles, simulations must be behaviorally accurate. Current data-driven simulators often face a "memorization" problem where they attempt to learn the entire distribution of human driving from a fixed dataset. This leads to two primary failures:
- The Long-Tail Gap: Models struggle with rare scenarios (e.g., crashes or complex U-turns) that are underrepresented in training data.
- Lack of Control: It is difficult to specify precise multi-agent interactions (e.g., "three cars interacting at a specific intersection in this specific way").
Methods
RealGen treats scenario generation as an "in-context learning" problem. Instead of generating from scratch, it finds similar real-world examples based on user-provided templates or tags and "stitches" them together.
Key technical components include:
- Scenario Autoencoder: A hierarchical transformer-based model encoding agent trajectories, road maps, and initial positions into a compressed latent space.
- Permutation-Invariant Contrastive Learning: Uses Wasserstein distance ($W_2$) in the loss function to treat scenarios as distributions of behaviors, ensuring the model is invariant to agent ordering.
- The Combiner: A module using Multi-Head Attention (MHA) to fuse behaviors from $K$ retrieved scenarios, aligning them with the target map and poses.
- Two-Stage Retrieval: Allows users to provide "templates" or "tags" (e.g., "Left Turn") to retrieve high-quality matches from an unlabeled database.
Datasets
The framework was evaluated using the nuScenes dataset, processed via the trajdata package. The researchers focused on the 11 agents closest to the ego-vehicle. For "tag" evaluation, 1,349 scenarios were manually labeled with categories like U-Turn, Overtaking, and Lane Change.
Key Insights and Ideas
- RAG for Physics: Traffic scenarios are modular; behaviors like "left turns" or "pedestrian crossings" can be extracted from different real-world recordings and combined into new, valid scenarios.
- Distribution-Based Similarity: Wasserstein distance enables a semantic understanding of traffic, focusing on the distribution of behaviors rather than raw coordinates.
- Gradient-Free Editing: Scenarios can be edited simply by swapping retrieved examples, avoiding re-training or complex optimization.
Key Results
RealGen significantly improves realism and controllability:
- Realism: Achieved a Mean Average Displacement Error (mADE) of 1.54, outperforming the LCTGen baseline (4.76).
- Controllability: Preferred in human A/B testing over 80% of the time, reaching 100% for "Straight" driving scenarios.
- Safety-Critical Generation: Successfully synthesized unseen crash scenarios using NHTSA report templates.
- Downstream Utility: Models trained with RealGen-augmented data showed lower error rates and fewer collisions in trajectory prediction tasks.
Limitations and Future Work
Current behavior encoding could more deeply integrate the intricate coupling between maps and behaviors (e.g., how specific curb shapes influence turns). Future work will focus on expanding feature representations and scaling the database to include more diverse global driving environments.
Summary updated