V2XSynth: An LLM-Driven, Retrieval-Augmented Framework for Realistic
V2X Scenario Synthesis

LLM + RAG CARLA SPaT / MAP / BSM Open-Source

1Texas A&M University 2University of Wisconsin–Madison 3University of Wyoming   * corresponding author
Simplified V2XSynth architecture

Abstract

V2XSynth compiles natural-language scenario intents into fully parameterized CARLA simulations that are communication-aware. An LLM-orchestrated compiler performs retrieval-augmented synthesis over a validated knowledge backbone unifying agent behavior priors, spatial/map context, and empirical V2X profiles (SPaT/MAP/BSM). Retrieved Scenic behavior snippets, spatial configurations, and communication modules are assembled into executable scripts with automated context selection (signal richness, network centrality). The resulting scenarios emit joint mobility–messaging telemetry and support structured exploration of V2X-induced faults (latency, jitter, loss, decode delay), revealing how communication degradation propagates into safety outcomes such as signal violations, coordination inconsistencies, and collisions.

LLM-Orchestrated Compiler

Dual-role Interpreter/Agent that decomposes intent and binds retrieved templates into Scenic+Python for CARLA.

Validated Knowledge Fusion

Unified stores across behavior, spatial/map, and V2X comms with early constraint checks to avoid incoherent scenes.

Automated V2X Synthesis

Infrastructure-aware placement (signal density + centrality), realistic degradations, and closed-loop refinement from telemetry.

Method Overview

The pipeline comprises four stages: Scenario InterpreterValidationRetrieval & AssemblyExecution & Refinement. From a structured spec S=(V,R,P,E,M), the Agent queries behavior, map, and V2X stores; then composes Scenic behaviors and communication modules into an executable script \alpha for CARLA. Telemetry drives iterative refinement to mine edge cases.

Overview of V2XSynth architecture
Overview of V2XSynth orchestration and retrieval-augmented code generation.

Scenario Gallery

A gallery of synthesized V2X scenes generated directly from natural-language prompts. Each panel overlays mobility (agents, lanes, signals) with messaging activity to make V2I (blue) and V2V (red) interactions explicit. See captions for the exact prompts.

Daytime urban arterial traffic
Prompt: “Daytime urban arterial traffic.”
Dense, high-conflict traffic at a signalized intersection
Prompt: “Dense, high-conflict traffic at a signalized intersection.”
Congested traffic under rainy conditions with degraded visibility
Prompt: “Congested traffic under rainy conditions with degraded visibility.”
Normal nighttime urban traffic with few vehicles
Prompt: “Normal nighttime urban traffic with few vehicles.”

Infrastructure (RSU) Perspectives

From the RSU vantage point, we visualize SPaT/MAP broadcasts and received BSMs over time to uncover timing skew, coverage gaps, and inconsistencies that can lead to miscoordination. These views complement the scenario gallery by exposing communication-layer causes behind observed behaviors.

RSU-mounted infrastructure perspectives across synthesized V2X scenarios
RSU-mounted infrastructure perspectives across synthesized V2X scenarios. Temporal snapshots illustrate SPaT/MAP broadcasts and BSM receptions overlaid on vehicle motion and intersection geometry, facilitating diagnosis of broadcast timing, coverage asymmetries, and discrepancies between transmitted signal state and observed agent behavior.

Communication ↔ Safety

We model a spatially aware V2X substrate over the map, translating RSSI into latency and delivery rates to reveal zones where information arrives stale or is lost. Scenarios sweeping jitter, loss, and decode delay expose causal propagation into safety metrics (CR, red-light violations, TTC minima).

RSSI, latency, and delivery landscapes over map
RSSI → Latency/Delivery landscapes on Town03 illustrating communication stress zones.

Evaluation

SafeBench-style critical scenarios. Lower is better for CR; higher is better for OS.

Algorithm CR ↓ OS ↑
Straight ObstacleLane ChangingUnprotected LeftAvg Straight ObstacleLane ChangingUnprotected LeftAvg
LC0.1200.5100.0000.2100.8270.6840.9540.822
AS0.2300.4300.0500.2700.7840.6660.9370.796
AT0.1400.3000.0000.1500.8490.8030.9480.867
CS0.0300.1100.1000.0800.9050.9060.9030.905
V2XSynth0.0230.0890.0000.0690.8970.8980.9540.915

Ablations and comms→safety sweeps are in the paper; code releases include scripts to reproduce tables and plots.

BibTeX

@article{wu2025v2xsynth,
  title   = {V2XSynth: An LLM-Driven, Retrieval-Augmented Framework for Realistic V2X Scenario Synthesis},
  author  = {Wu, Keshu and Zhang, Hao and Li, Pei and Gan, Rui and You, Junwei and Tu, Zhengzhong and Zhou, Yang},
  journal = {arXiv preprint arXiv:XXXX.XXXXX},
  year    = {2025}
}