LCSim: A Large-Scale Controllable Traffic Simulator

## Abstract

Abstract With the rapid development of urban transportation and the continuous advancement in autonomous vehicles, the demand for safely and efficiently testing autonomous driving and traffic optimization algorithms arises, which needs accurate modeling of large-scale urban traffic scenarios.
Existing traffic simulation systems encounter two significant limitations. Firstly, they often rely on open-source datasets or manually crafted maps, constraining the scale of simulations. Secondly, vehicle models within these systems tend to be either oversimplified or lack controllability, compromising the authenticity and diversity of the simulations.
In this paper, we propose LCSim , a large-scale controllable traffic simulator. LCSim provides map tools for constructing unified high-definition map (HD map) descriptions from open-source datasets including Waymo and Argoverse or publicly available data sources like OpenStreetMap to scale up the simulation scenarios. Also, we integrate diffusion-based traffic simulation into the simulator for realistic and controllable microscopic traffic flow modeling.
By leveraging these features, LCSim provides realistic and diverse virtual traffic environments. Code and Demos are available at https://github.com/tsinghua-fib-lab/LCSim .

## 1 Introduction

As global urbanization progresses, the complexity and diversity of urban transportation systems continue to increase. The driving styles of vehicles in different cities often have distinct characteristics [], leading to high costs associated with testing and deploying related algorithms. For algorithms such as traffic optimization and autonomous driving, which require high levels of safety and reliability, thorough testing and evaluation before actual deployment are crucial []. This necessitates accurately modeling urban microscopic traffic flow through traffic simulation, enabling the safe and efficient assessment of relevant algorithms. Accurate modeling of urban traffic flow poses two main challenges for simulation systems: the need for realistic and controllable vehicle models to replicate the complex and diverse driving behaviors in reality; and the requirement for sufficiently realistic large-scale road network data to support traffic simulation.

Existing simulation methods often have shortcomings in these two aspects. On one hand, vehicle modeling in simulation systems are typically categorized into three types: log-replay [, , ], rule-based (e.g. IDM []) simulation [, , , , , , , , ], and learning-based methods [, , , , , , ]. Log-replay lacks interaction, making it unable to create a closed-loop testing environment for vehicles. Rule-based simulations are often too simplistic and fail to replicate real vehicle behaviors accurately, while learning-based simulations usually lack controllability and struggle to model different driving styles accurately. CTG [] has proposed a controllable traffic simulation method based on diffusion, but its scene is limited to the nuScenes [] dataset, and the simulation environment has not been made open-source. On the other hand, many simulation systems rely on public datasets that only contain fragmented scenarios [, , ], limiting the scale of simulations. Metadrive [] offers manual map creation tools, but this method is challenging to apply to large-scale urban scenarios. SUMO [] provides map construction tools based on public data sources like OpenStreetMap (OSM)(^1^11[https://www.openstreetmap.org/](https://www.openstreetmap.org/)), but its modeling of traffic flow is overly simplistic, extra efforts are needed to improve map formats and enhance vehicle modeling.

We propose LCSim, a Large-scale, Controllable traffic Simulator to address the abovementioned challenges. Our contributions are listed below:
We provide an automated HD map generation and vehicle OD (origin-destination) flow process based on the MOSS toolchain []. This innovative approach enables researchers to reconstruct traffic scenarios from open-source datasets or create HD maps directly from public data sources such as OSM, employing latitude and longitude region delineation. By enhancing the scalability of simulations, our methodology offers new possibilities for analyzing complex traffic patterns. Our simulation framework, LCSim, incorporates a vehicle behavior model based on diffusion, allowing for realistic and controllable traffic simulations. By manipulating parameters such as vehicle target speed, maximum acceleration, and time headway, LCSim accurately captures diverse driving styles and characterizes traffic flows. We conducted a series of experiments to validate LCSim’s functionality. Firstly, we trained the diffusion model on the Waymo open dataset [] and verified its performance on the validation set. Subsequently, we observed significant differences in vehicle behavior styles by comparing vehicle behavior data between Waymo and an internal dataset from SenseTime (^2^22[https://www.sensetime.com/](https://www.sensetime.com/)). We demonstrated that LCSim can simulate different vehicle styles by imposing control conditions on the diffusion process, accurately modeling the two distinct vehicle behavior patterns mentioned above. Moreover, we conducted training of single-agent reinforcement learning in different style simulation scenarios, showcasing the benefits of a multi-style simulation environment for training autonomous driving algorithms. Finally, we presented an application case of large-scale controllable traffic simulation based on LCSim.

## 2 Related Work

Traffic Simulators.
The development of traffic simulators has a history of over a decade. Initially, researchers do simulations based on synthetic traffic scenarios and rule-based vehicle models [, , , , ]. However, these simulators’ rule-based models were often too simplistic, unable to model real and diverse vehicle behaviors accurately. With the continuous advancement of autonomous driving, an increasing number of open-source datasets containing real-world traffic scenarios have been released in recent years [, , , , ]. Consequently, many simulators based on these open-source datasets have emerged [, , , , ]. They utilize log-replay to rebuild realistic traffic scenarios and incorporate rule-based models to enable interactive simulations. Building upon this foundation, DriverGym [] provides a learning-based vehicle model based on Simnet [], while ScenarioNet [] integrates various open-source datasets and offers reinforcement learning-based vehicle models. However, these traffic simulators based on open-source datasets often only simulate fragmented scenarios based on the provided data, and their simulation scale is limited to the scope of the dataset. Metadrive [] presents a scenario-creation tool based on the combination of map elements. However, this approach faces challenges when it comes to constructing large-scale urban road networks. Furthermore, to our best knowledge, no open-source simulators currently provide controllable vehicle models to simulate multi-style vehicle behaviors in the real world.

Learning-based Traffic Simulation.
Various learning-based vehicle simulation methods have emerged with the increasing availability of open-source traffic scenario datasets in recent years. Among them, imitation learning is often employed to learn expert actions from the dataset, thereby achieving realistic traffic simulation [, , , , , ]. However, this approach is often plagued by causal confusion [] and distribution shift []. Reinforcement learning methods, on the other hand, address the distribution shift issue effectively by interacting with the simulation environment to learn driving behaviors [, , , , ]. However, the design of reward functions and the construction of the simulation environment are often complex. As generative models have advanced, many researchers have started to utilize the generation of vehicle behavior sequences for simulation purposes [, , , , , , ]. Among these approaches, CTG [] utilizes a diffusion model to achieve controllable vehicle simulation. However, the code for CTG has not been made open-source. Following their idea, we trained our diffusion model based on the Waymo open dataset []. By generating vehicle behavior sequences, we were able to achieve controllable traffic simulation.

**Table 1: Comparison of related traffic simulators. LCSim provides automated tools for map and origin-destination (OD) generation and controllable vehicle models, supporting multi-style traffic simulation within any given geographic region.**
|  | Map Tools | Long-term | Rule-based<br>Agent | Data-driven<br>Agent | Controllability |
| --- | --- | --- | --- | --- | --- |
| SUMO [] | ✔ | ✔ | ✔ |  |  |
| nuPlan-devkit [] |  | ✔ | ✔ |  |  |
| DriverGym [] |  |  | ✔ | ✔ |  |
| Nocturne [] |  |  | ✔ |  |  |
| MetaDrive [, ] | ✔<br>✗ | ✔ | ✔ | ✔ |  |
| Waymax [] |  |  | ✔ |  |  |
| Limsim [] |  | ✔ | ✔ |  |  |
| TrafficSim [] |  |  |  | ✔ |  |
| SimNet [] |  |  |  | ✔ |  |
| CTG [] |  |  |  | ✔ | ✔ |
| LCSim (ours) | ✔ | ✔ | ✔ | ✔ | ✔ |

## 3 System Design

Figure: Figure 1: The basic architecture of LCSim.
Refer to caption: x1.png

### 3.1 Diffusion Model

Scene Encoder.
For accurately modeling the behavior of traffic participants, feature representations of scene information including map elements and historical states of traffic participants are required as conditions for the diffusion model. Following [, ], we utilize a spatial-temporal attention mechanism to model the scene features, taking in map polygons and historical states of compute scene embedding for each vehicle in the scenario.

Diffusion Process.
We use the vehicle’s velocity and heading angle sequences as the generation target for the Diffusion model. Similar to QCNet [], we employ an attention-based architecture for the diff decoder, which is utilized in the denoising process. The decoder takes the input data with noise and Fourier embeddings of the noise level as query values and performs cross-attention with the scene embeddings, resulting in denoised data as the output. The training process of the diffusion model follows Nvidia’s EDM architecture [].

Guide Functions.
Similar to CTG [], we apply a loss function to the denoised results and backpropagate the gradients to guide the generation process of the diffusion model. In our experiments, the control objectives include the vehicle’s maximum acceleration, target velocity, time headway, and relative distance to the preceding car during car-following, and generating adversarial behavior by controlling nearby vehicles to approach the current vehicle. More details about how these loss functions are calculated can be found in the appendix.

### 3.2 Simulation Architecture

LCSim performs discrete-time simulation based on a given time interval. Figure 1 illustrates the basic components of a simulation step. Each simulation step can be divided into two stages:

- •
Prepare Stage: During this stage, the simulator prepares the observation data for each vehicle, as depicted by the blue box in Figure 1. The observation data comprises three components: scene information observed by the vehicle, including road network topology and surrounding vehicles; vehicle embedding information computed by the scene encoder of the diffusion model, which encodes the scene information; and vehicles’ future action sequences either generated by the diffusion model conditioned on the scene encoding and guide function or given from the driving logs from open source dataset. Our diffusion model is trained on the Waymo dataset[] and can generate vehicle action sequences for the future 8 seconds. During the simulation process, we employ a recurrent generation approach based on a specified step interval.
- •
Update Stage: In this stage, each vehicle’s action is calculated by its policy based on the observation data, and these actions are used to update the vehicles’ states.

We have implemented five different policies to support traffic simulation in various scenarios:

- •
ExpertPolicy: The vehicles strictly follow the given action sequences to proceed.
- •
BicycleExpertPolicy: Based on the expert policy, we impose kinematic constraints on the vehicle’s behavior using a bicycle model to prevent excessive acceleration and steering.
- •
LaneIDMPolicy: Under this policy, vehicles ignore the action sequences and proceed along the center line of their current lane. The vehicle’s acceleration is calculated using the IDM model and lane-changing behavior is generated using the Mobil model.
- •
TrajIDMPolicy: Vehicles move along the trajectories computed based on the action sequence, but their acceleration is controlled by the IDM Mode to prevent collisions.
- •
RL-based Policy: A PPO [] agent trained based on our simulator, its observation space contains the scene embedding and the action sequence. The action space consists of acceleration and steering values.

More details about action calculation and parameters of each policy can be found in the appendix.

### 3.3 Map & OD Generator

Figure: Figure 2: The process of map generation.
Refer to caption: x2.png

We have defined a unified map and vehicle Origin-Destination (OD) format based on Protobuf. Additionally, we have developed format conversion tools designed for the Waymo and Argoverse datasets. Our map and OD generator were implemented based on the MOSS toolchain []. Figure 2 illustrates the process of generating an HD map based on OSM. We crawl OSM data in GeoJSON format within a specified latitude and longitude range. This data includes road network information. We then complete the topological connections between road segments and add lane markings and drivable areas based on traffic rules. The final output is an HD map following the unified format we defined.

For OD generation, We provide a random vehicle OD generation tool similar to SUMO []. Additionally, we have integrated the OD generation algorithm based on deep generative models from the MOSS [] toolchain. This algorithm leverages deep learning techniques to generate OD pairs that closely resemble real-world traffic patterns.

## 4 Experiments

We conducted a series of experiments to validate LCSim’s functionality. First We show how the diffusion model within LCSim is constructed and its ability to conduct realistic and controllable traffic simulations, then we conducted reinforcement learning training within different styles of scenarios generated by LCSim.

### 4.1 Diffusive Simulation Construction

Datasets.
We trained our diffusion model on the Waymo Open Motion Dataset [], which contains 500+ hours of driving logs collected from seven different cities in the United States. The dataset is further divided into scene segments of 20s and 9s. In this experiment, we utilized the 9s segments for training, using the initial 1s as the historical context, and let the model generate future 8s sequences of vehicle behaviors. Subsequently, we utilized the generated data for traffic simulation. The diffusion model was trained on the training set and evaluated for its simulated performance on the validation set.

Metrics & Settings.
We propose two evaluation metrics to validate the Diffusive Simulation’s authenticity. The generated vehicle behavior sequences must first adhere to the fundamental traffic rules. Within the 8s simulated scenarios, we calculate the probabilities of collision occurrence and vehicles driving off the road. These probabilities are then compared to the corresponding ones derived from the real log data in the Waymo dataset. In this calculation process, we filter out vehicles parking outside the boundaries of the road in the scene. Secondly, to assess the fidelity of the simulation, we compare the distribution of vehicle behaviors in both the real dataset and the simulated data. We compute the Kullback-Leibler (KL) divergence between these distributions. The vehicle behaviors considered in this analysis include acceleration, velocity, and time headway (THW). In the calculation process, we filter out vehicles that remain static throughout the entire scene segment. The time headway is only taken into account when the current vehicle is detected to be engaged in a car-following behavior.
In both the simulation based on the Waymo driving log and the diffusion model, we employed the BicycleExpertPolicy to ensure that vehicle behavior adhered to kinematic constraints, thus mitigating the impact of noise in trajectory data.
To handle the impact of randomness in the generation process, we conducted repeated experiments and reported the mean and error bars of the results. The calculation of probability distributions utilized all the data generated from the repeated experiments. More details of the experiment can be found in the appendix.

**Table 2: Evaluation results of diffusive traffic simulation.**
|  | Collision (%) | Off-Road (%) | KL-Divergence |  |  |
| --- | --- | --- | --- | --- | --- |
|  |  | ACC | VEL | THW |  |
| Waymo | 2.664 ($\pm$ 0.000) | 1.521 ($\pm$ 0.000) | - |  |  |
| Diffusive Sim | 2.916 ($\pm$ 0.160) | 1.602 ($\pm$ 0.112) | 0.0197 | 0.0136 | 0.0465 |

Figure: Figure 3: The comparison of vehicle behaviors in the Waymo dataset and diffusive simulation.
Refer to caption: x3.png

Results.
Table 2 presents the quantitative results, which shows that the simulated results in terms of collision and off-road probabilities closely align with the statistics derived from the Waymo dataset. This indicates that our diffusion model, based on its ability to learn from real-world vehicle behaviors, successfully captures the fundamental traffic rules that govern vehicle movements. Regarding the distribution of vehicle behaviors, as depicted in Figure 3, the consistency between the simulated vehicle behavior distributions generated by our model and the statistical results from real driving logs can be observed. This consistency highlights the model’s ability to learn the characteristics of vehicles in the dataset. Taken together, these findings indicate that our diffusion model is capable of conducting realistic traffic simulations based on real-world scenarios.

### 4.2 Aligning Vehicle Behavior Characteristics

SenseTime Driving Dataset.
SenseTime driving dataset comprises about 400 hours of vehicle driving logs collected from vehicles based on SenseAuto(^3^33[https://www.senseauto.com/](https://www.senseauto.com/)) in the Beijing Yizhuang area. The data is presented in a format similar to vehicle trajectories in the Waymo dataset. We conducted statistical analysis on the dataset, focusing on metrics such as acceleration, relative distance, and time headway during the car following process. This analysis allowed us to derive the driving behavior characteristics of vehicles in the Yizhuang area.

In Figure 4, we compared the behavioral characteristics of vehicles in the SenseTime dataset with those in the Waymo dataset. The comparison included metrics such as vehicle acceleration, relative distance, and time headway during car following. Since vehicle driving speeds are often related to the specific driving environment (e.g., road congestion, lane speed limits) rather than the behavioral characteristics of vehicles, we did not include speed in the comparison. It can be observed that there are significant differences in the behavioral characteristics of vehicles between these two datasets collected from different regions. Vehicles in the Yizhuang area exhibit a more "gentle" driving style, showing a preference for using smaller accelerations during acceleration and braking processes. Additionally, they maintain larger relative distances and headway times during the following process compared to vehicles in the Waymo dataset.

Figure: Figure 4: The differences in vehicle behavior between Waymo and SenseTime datasets.
Refer to caption: x4.png

As our diffusion model is trained on the Waymo dataset, without imposing any control conditions on the generation process, the vehicle behavior characteristics in the simulation remain consistent with the Waymo dataset, as shown in Figure 3. By applying constraints such as max acceleration, relative distance, and time headway during car-following in the generation process, we can align the vehicle behavior characteristics produced by the diffusive simulation with those collected in the SenseTime driving dataset. The comparison of the two distributions can be seen in Figure 5. This demonstrates that our simulator can model vehicles with diverse driving styles, thereby providing different styles of traffic simulation environments. Details about the guide function we use here can be found in the appendix.

Figure: Figure 5: The comparison of vehicle behaviors in the SenseTime dataset and guided diffusive simulation.
Refer to caption: x5.png

### 4.3 Multi-Style RL Training

We constructed a single-agent reinforcement learning environment based on the Waymo dataset with our guided diffusive simulation to further investigate the impact of traffic environments with different driving styles on driving policy learning. Below are the training settings and results:

Settings.
To validate the simulation model’s capability in unseen scenarios, we constructed a reinforcement learning environment based on the validation set of the Waymo dataset. We selected 4,400 scenarios from the validation set and further divided them into a training set containing 4,000 scenarios and a test set containing 400 scenarios. We trained a PPO [] agent on the training set and evaluated its performance on the test set. The agent’s observation space consisted of scene embedding generated by the diffusion model’s scene encoder and the vehicle’s reference route. The route was either based on real trajectories from the driving logs or accumulated action sequences generated by the diffusion model in different training environments. On the test set, we tested four metrics of the agent: collision rate, off-road rate, average route progress rate (We project the current position of vehicles onto the Frenet coordinates of the route and calculate the ratio of the completed length to the total length.), and scene success rate (i.e., successfully reaching the destination without collisions or driving off-road). We also provided the average reward value per episode. The vehicle behaviors of the test set are based on Waymo driving logs. Detailed RL training settings can be found in the appendix.

Styles of Training Environments.
We created four distinct driving environments on the training set:
In the first environment, vehicles base their actions on real trajectories from the Waymo driving logs.
The second environment utilizes the diffusion model without guide functions, which maintains consistency with the Waymo dataset in terms of vehicle behavior styles. With the diffusion model’s nature, it generates diverse vehicle trajectories under the same initial conditions, exposing the agent to a broader range of traffic scenarios during training.
The third environment follows the driving style observed in the SenseTime driving dataset, emphasizing a more "gentle" driving behavior compared to the Waymo-based environment.
Furthermore, an adversarial driving environment is implemented by guiding nearby vehicles closer to the agent, creating a training scenario with a higher potential for collisions. Details about the configuration of guiding functions for each environment are available in the appendix.

**Table 3: Evaluation results of RL agents.**
|  | Collision Rate (%) | Off-Road Rate (%) | Route Progress (%) | Success  Rate (%) | Reward |
| --- | --- | --- | --- | --- | --- |
| Waymo | 15.71 ($\pm$ 0.56) | 4.24 ($\pm$ 0.20) | 84.98 ($\pm$ 0.53) | 51.31 ($\pm$ 0.56) | 7.41 ($\pm$ 0.10) |
| Diff | 12.06 ($\pm$ 0.28) | 3.01 ($\pm$ 0.12) | 84.76 ($\pm$ 0.35) | 52.75 ($\pm$ 0.50) | 8.59 ($\pm$ 0.14) |
| Diff w/ gentle | 32.28 ($\pm$ 0.52) | 3.52 ($\pm$ 0.08) | 59.06 ($\pm$ 0.42) | 21.52 ($\pm$ 0.18) | 0.50 ($\pm$ 0.06) |
| Diff w/ adv | 8.72 ($\pm$ 0.23) | 15.49 ($\pm$ 0.42) | 83.88 ($\pm$ 0.43) | 33.53 ($\pm$ 0.27) | 5.05 ($\pm$ 0.05) |

Results.
As shown in Table 3, the results show that the agent trained in the diffusive simulation environment with the same driving style as Waymo outperformed the agent trained based on Waymo driving logs across various metrics. This suggests that the diffusion model can generate diverse traffic scenarios based on initial conditions, contributing to the learning of driving policy. The performance of the agent trained in the environment using the driving style of the SenseTime dataset was not good in relatively more aggressive environments. The difference between the learned behavior style of the agent and the testing environment led to an increase in collision rate, and the agent’s tendency towards a more "gentle" behavior style compared to the given route also led to a low route progress rate. On the other hand, training the agent in a more adversarial environment resulted in a lower collision rate. However, the agent’s proactive avoidance of nearby vehicles led to an increase in the off-road rate.

### 4.4 City-Scale Traffic Flow Construction

Figure: Figure 6: City-scale traffic flow simulations in Jinan and Shenzhen.
Refer to caption: x6.png

We showcased the scalability of LCSim with city-scale simulations on real-world traffic flow in two metropolises.

Datasets.
We used two vehicle trajectory datasets[, , ] each with one-day-long city-scale trajectories of the entire fleet recovered from daily urban traffic camera videos in Jinan and Shenzhen city. Both of the dataset involves over one million trajectories and one thousand square kilometers of urban area.

Settings.
Compared with GPS-based trajectories, the trajectories recovered from traffic cameras are temporally sparser, where only the arrival time at road intersection is specified [], which is thus taken as the travel schedule of each agent in LCSim with a series of trips between intersections with corresponding departure time and arrival time.
We showed that by simulating the driving behaviors of vehicles given their schedules, using the arrival time at a specific position as guidance, LCSim can effectively replicate real-world city-scale traffic conditions.

Results.
Figure6 shows, in Jinan and Shenzhen, the spatial distribution of simulated road flow and speed, as well as the probability distribution of the arrival time error which is the deviation of the simulated arrival time of each trip compared with that of the ground truth trajectory data.
As can be seen, the arrival time error is mainly distributed around zero with over 90% of trips having arrival time errors less than 20 seconds. LCSim also produced reasonable traffic conditions with coherence between the road network structure, flow, and speed.

## 5 Conclusion

We proposed LCSim, a large-scale, controllable diffusion-based traffic simulator. With an automated HD map generation and vehicle OD flow process, LCSim is capable of conducting large-scale traffic simulations on any selected region. With the integration of the diffusion model and guide functions, LCSim can simulate different styles of vehicle behaviors.

Limitations.
LCSim has two main limitations. Firstly, the simulator is implemented in Python using a single-threaded CPU, which limits its performance potential. Although parallel simulation using multiple processes is currently employed as a solution, it does not fundamentally address the issue. One potential approach to overcome this limitation is to develop a multi-threaded version of the simulator using C++ and deploy the Diffusion model in C++, which is a potential direction for future work.
Secondly, the simulator currently provides visualization only from a top-down perspective and lacks the rendering of realistic perceptual data. Integrating image generation based on Diffusion into the simulation is one of the planned future developments to address this limitation.

## Appendix

In the appendix, we provide more details about the experiments discussed in the main text. Section  A introduces the implementation details of the diffusion model and the specific content and form of the guide function. Section B details the implementation of the system and showcases the visualization of scenarios in the simulator. Section C covers the relevant content of the SenseTime driving dataset, while Section D delves into the detailed experimental configurations for multi-style reinforcement learning experiments.
Code and Demos are available at [https://github.com/tsinghua-fib-lab/LCSim](https://github.com/tsinghua-fib-lab/LCSim).

## Appendix A Diffusion Model

The process of the diffusion model generating vehicle action sequences is shown in Figure 7. With the road network topology and vehicle historical states as input, the model generates future action sequences for the vehicle through a denoising diffusion process.

Due to the relevant regulations of the Waymo Open Motion Dataset (WOMD) [], we cannot provide the parameters of the model trained on it. In this section, we introduce the implementation details of the diffusion model and the hyperparameters used for training and inference in detail to ensure that the relevant experimental results can be easily reproduced.

Figure: Figure 7: The process of generating vehicle action sequences by diffusion model.
Refer to caption: x7.png

### A.1 Problem Formulation

Similar to [], we denote a traffic scenario as $\mathbf{\omega}=(M,A_{1:T})$, where $M$ contains the information of a High-Definition (HD) map and $A_{1:T}=[A_{1},...,A_{T}]$ is the state sequence of all traffic participates.
Each element $m_{i}$ of $M=\{m^{1},...,m^{N_{m}}\}$ represents the map factor like road lines, road edges, centerline of lanes, etc.
And each element $a_{i}^{t}$ of $A_{t}=\{a_{t}^{1},...,a_{t}^{N_{a}}\}$ represents the state of the ith traffic participate at time step t including position, velocity, heading, etc.

Given the map elements $M=\{m^{1},...,m^{N_{m}}\}$ and the historical states of agents $A_{t_{c}-T_{h}:t_{c}}$, where $T_{h}$ is the number historical steps and $0<T_{h}<t_{c}$, the model generates the future states of agents in the scenario $A_{t_{c}:t_{c}+T_{f}}$, where $T_{f}$ is the number of future steps.

### A.2 Model Architecture

Scene Encoder.
We implemented our scene encoder based on MTR [] and QCNet []. As mentioned before, at each time step $t_{c}$, the input to the scene encoder includes the map elements $M=\{m^{1},...,m^{N_{m}}\}$ and the historical states of agents $A_{t_{c}-T_{h}:t_{c}}$. First, we construct a heterogeneous graph $G=(V,E)$ based on the geometric relationships among input features. The node set $V$ contains two kinds of node $v^{a}$ and $v^{m}$ and the edge set $E$ consists of three kinds of edge $e^{a\to a}$, $e^{a\to m}$ and $e^{m\to m}$. Connectivity is established between nodes within a certain range of relative distances.
For nodes like $v_{i}^{a}$ and $v_{j}^{m}$, their node features contain attributes independent of geographical location like lane type, agent type, agent velocity, etc.
The position information of nodes is stored in the relative form within the edge features like $e_{ij}^{a\to m}=[\mathbf{p}_{j}^{m}-\mathbf{p}_{i}^{a},\mathbf{\theta}_{j}^{m}
-\mathbf{\theta}_{i}^{a}]$, where $\mathbf{p}$ and $\mathbf{\theta}$ are position vector and heading angle of each node at current time step $t_{c}$. For each category of elements in the graph, we use an MLP to map their features into the latent space with dimension $N_{h}$ to get the node embedding $\mathbf{v}^{a}_{i,t}(t_{c}-T_{h}\leq t\leq t_{c})$, $\mathbf{v}_{j}^{m}$ and edge embedding $\mathbf{e}_{ij}^{a\to a}$, $\mathbf{e}_{ij}^{a\to m}$, $\mathbf{e}_{ij}^{m\to m}$. Then we apply four attention mechanisms in Table 4 to them to get the final scene embedding. The scene embedding consists of two components: the map embedding with a shape of $[M,N_{h}]$, and the agent embedding with a shape of $[A,T_{h},N_{h}]$.

**Table 4: The attention mechanisms of scene encoder.**
|  | Query | Key | Value |
| --- | --- | --- | --- |
| Agent Temporal | $\mathbf{v}^{a}_{i,t_{c}}$ | $\mathbf{v}^{a}_{i,t}$ | $\mathbf{v}^{a}_{i,t}\oplus Pos(t-t_{c})$ |
| Agent-Map | $\mathbf{v}^{a}_{i,t_{c}}$ | $\mathbf{v}_{j}^{m}$ | $\mathbf{v}_{j}^{m}\oplus\mathbf{e}_{ij}^{a\to m}$ |
| Agent-Agent | $\mathbf{v}^{a}_{i,t_{c}}$ | $\mathbf{v}^{a}_{j,t_{c}}$ | $\mathbf{v}_{j,t_{c}}^{a}\oplus\mathbf{e}_{ij}^{a\to a}$ |

Figure: Figure 8: The architecture of diffusion decoder.
Refer to caption: x8.png

Diffusion Decoder.
Figure 8 shows the whole architecture of the diffusion decoder. Similar to [], we implemented a DETR-like decoder to model the joint distribution of multi-agent action sequences. Denote the generation target as $\boldsymbol{x}\in\mathbb{R}^{A\times T_{f}\times N_{a}}$, which represents future $T_{f}$ steps’ actions of agents in the scenario.
Firstly, noise $\boldsymbol{z}\sim\mathcal{N}\left(\mathbf{0},\sigma^{2}\right)$ is added to the input sequence. Subsequently, the action sequence with noise for each agent is mapped to a latent space via an MLP, serving as the query embedding for that agent. The query is then added to the Fourier Embedding with noise level $\sigma$, similar to positional encoding, to inform the model about the current noise level. Next, the query vector undergoes cross-attention with map embeddings, embeddings of other agents in the scenario, and the historical state embedding of the current agent, resulting in a fused agent feature vector incorporating environmental information. Following this, self-attention is applied to the feature vectors of each agent to ensure the authenticity of interaction among the action sequences generated for each agent. Finally, the feature vectors from the latent space are mapped back to the agent’s action space via an MLP to obtain the de-noised agent action sequence.

### A.3 Training Details

**Table 5: Model parameters**
| Parameter | Value |
| --- | --- |
| Input Size | 2 |
| Output Size | 2 |
| Embedding Size | 128 |
| Num Historical Steps | 10 |
| Num Future Steps | 80 |
| Num Polygon Types | 20 |
| Num Freq Bands | 64 |
| Map Encoder |  |
| Hidden Dim | 64 |
| Num Layers | 5 |
| Num Pre Layers | 3 |
| Agent Encoder |  |
| Time Span | 10 |
| a2a Radius | 50 |
| pl2a Radius | 50 |
| Num Layers | 2 |
| Num Heads | 8 |
| Head Dim | 64 |
| Dropout | 0.1 |
| Diff Decoder |  |
| Output Head | False |
| Num t2m Steps | 10 |
| pl2m Radius | 150 |
| a2m Radius | 150 |
| Num Layers | 2 |
| Num Recurrent Steps | 2 |
| Num Heads | 8 |
| Head Dim | 64 |
| Dropout | 0.1 |

Training Target.
Diffusion model estimates the distribution of generation target $\boldsymbol{x}\sim p(\boldsymbol{x})$ by sampling from $p_{\boldsymbol{\theta}}(\boldsymbol{x})$ with learnable model parameter $\boldsymbol{\theta}$. Normally we have $p_{\boldsymbol{\theta}}(\boldsymbol{x})=\frac{-f_{\boldsymbol{\theta}}(
\boldsymbol{x})}{Z_{\boldsymbol{\theta}}}$ , and use max-likelihood $\max_{\boldsymbol{\theta}}\sum_{i=1}^{N}\log{p_{\boldsymbol{\theta}}(
\boldsymbol{x}_{i})}$ to get parameter $\boldsymbol{\theta}$. However, to make the max likelihood training feasible, we need to know the normalization constant $Z_{\boldsymbol{\theta}}$, and either computing or approximating it would be a rather computationally expensive process, So we choose to model the score function $\nabla_{\boldsymbol{x}}\log{p_{\boldsymbol{\theta}}(\boldsymbol{x};\sigma)}$ rather than directly model the probability density, with the score function, one can get data sample $\boldsymbol{x}_{0}\sim p_{\boldsymbol{\theta}}(\boldsymbol{x})$ by the following equation []:

$$ $\begin{array}[]{r}\boldsymbol{x}_{0}=\boldsymbol{x}(T)+\int_{T}^{0}-\dot{ \sigma}(t)\sigma(t)\nabla_{\boldsymbol{x}}\log p_{\boldsymbol{\theta}}( \boldsymbol{x}(t);\sigma(t))dt\quad\text{ where }\boldsymbol{x}(T)\sim\mathcal {N}\left(\mathbf{0},\sigma_{\max}^{2}\boldsymbol{I}\right)\end{array}$ (1) $$

On this basis, we add a condition $\boldsymbol{c}$ composed of scene embeddings and use our model to approximate the score function $\nabla_{\boldsymbol{x}}\log p_{\boldsymbol{\theta}}(\boldsymbol{x};\boldsymbol
{c},\sigma)\approx\left(D_{\boldsymbol{\theta}}(\boldsymbol{x};\boldsymbol{c},
\sigma)-\boldsymbol{x}\right)/\sigma^{2}$, which leads to the training target []:

$$ $\mathbb{E}_{\boldsymbol{x},\boldsymbol{c}\sim\chi_{c}}\mathbb{E}_{\sigma\sim q (\sigma)}\mathbb{E}_{\boldsymbol{\epsilon}\sim\mathcal{N}\left(\mathbf{0}, \sigma^{2}\boldsymbol{I}\right)}\left\|D_{\boldsymbol{\theta}}(\boldsymbol{x}+ \boldsymbol{\epsilon};\boldsymbol{c},\sigma)-\boldsymbol{x}\right\|_{2}^{2}$ (2) $$

$\chi_{c}$ is the training dataset combined with embeddings computed by the scene encoder, and $q(\sigma)$ represents the schedule of the noise level added to the original data sample.
For better performance, we introduce the precondition as described in [] to ensure that the input and output of the model both follow a standard normal distribution with unit variance:

$$ $D_{\boldsymbol{\theta}}(\boldsymbol{x};\boldsymbol{c},\sigma)=c_{\text{skip }} (\sigma)\boldsymbol{x}+c_{\text{out }}(\sigma)F_{\boldsymbol{\theta}}\left(c_{ \text{in }}(\sigma)\boldsymbol{x};\boldsymbol{c},c_{\text{noise }}(\sigma)\right)$ (3) $$

Here, $F_{\boldsymbol{\theta}}(\cdot)$ represents the original output of the diffusion decoder. In the experiment, we used the magnitude and direction of vehicle speed as the target for generation.

Experiment Setting.
We trained our diffusion model on the Waymo Open Motion Dataset (WOMD) []. Each traffic scenario in the dataset has a duration of 9 seconds. We used the map information and the historical state of the previous 1 second as input to the model and generated future vehicle action sequences for the next 8 seconds.
The training was conducted on a server with 4 $\times$ Nvidia 4090 GPUs. We set the batch size for training to 16 and trained with the OneCycleLR learning rate schedule for 200 epochs. The entire training process lasted approximately 20 days.
The detailed parameters of the model and the training process are shown in Table 6 and Table 6.

### A.4 Guide Functions

Following [, ], we calculate the cost function $\mathcal{L}:\mathbb{R}^{A\times T_{f}\times N_{a}}\mapsto\mathbb{R}$ based on the intermediate results of the generation process and propagate gradients backward to guide the final generation outcome.
In our experiments, the control objectives include the vehicle’s maximum acceleration, target velocity, time headway, and relative distance to the preceding car during car-following, and generating adversarial behavior by controlling nearby vehicles to approach the current vehicle. Denote vehicle $i$ at timestep $t$ has states $acc_{i,t},v_{i,t},x_{i,t},y_{i,t},heading_{i,t}$, and $dis_{t}(i,j)$ computes the relative distance between vehicle $i$ and vehicle $j$ at timestep $t$ when vehicle $i$ is followed by vehicle $j$ on the same lane. Table 7 shows the details of the cost functions.

**Table 7: The cost functions used in the guided generation process.**
| Guide Target | Cost Function |
| --- | --- |
| max acceleration | $\sum_{i=1}^{A}\sum_{t=1}^{T_{f}}\max(0,|acc_{i,t}|-acc_{max})$ |
| target velocity | $\sum_{i=1}^{A}\sum_{t=1}^{T_{f}}\parallel v_{i,t}-v_{target}\parallel_{2}^{2}$ |
| time headway | $\sum_{t=1}^{T_{f}}\sum_{i\neq j}\mid\frac{dis_{t}(i,j)}{\parallel v_{j,t}<br>\parallel_{2}^{2}}-thw_{target}\mid\quad\text{where $i$ is followed by $j$ at<br>$t$}$ |
| relative distance | $\sum_{t=1}^{T_{f}}\sum_{i\neq j}\mid dis_{t}(i,j)-dis_{target}\mid\quad\text{<br>where $i$ is followed by $j$ at $t$}$ |
| goal point | $\sum_{i=1}^{A}\sum_{t=1}^{T_{f}}\parallel(x_{i,t},y_{i,t})-(x_{goal_{i,t}},y_{<br>goal_{i,t}})\parallel_{2}^{2}$ |
| no collision | $\sum_{t=1}^{T_{f}}\sum_{i\neq j}\mathbb{I}[\parallel(x_{i,t},y_{i,t})-(x_{j,t}<br>,y_{j,t})\parallel_{2}^{2}\leq\epsilon]$ |
| no off-road | $\sum_{i=1}^{A}\sum_{t=1}^{T_{f}}\mathbb{I}[\parallel(x_{i,t},y_{i,t})-(x_{<br>\text{off-road}},y_{\text{off-road}})\parallel_{2}^{2}\leq\epsilon]$ |

## Appendix B Simulation System

### B.1 Scenario Generator

We defined a unified map and vehicle Origin-Destination (OD) format based on Protobuf(^4^44[https://github.com/tsinghua-fib-lab/LCSim/blob/main/lcsim/protos](https://github.com/tsinghua-fib-lab/LCSim/blob/main/lcsim/protos)).
Additionally, we have developed format conversion tools designed for the Waymo and Argoverse datasets, the conversion results can be seen in Figure 9.

Figure: Figure 9: Traffic scenarios from WOMD (blue box) and Argoverse (yellow box).
Refer to caption: x9.png

### B.2 Policy Details

We implemented five different policies to support traffic simulation in various scenarios:

- •
ExpertPolicy: The vehicles strictly follow the given action sequences to proceed.
- •
BicycleExpertPolicy: Based on the expert policy, we impose kinematic constraints on the vehicle’s behavior using a bicycle model to prevent excessive acceleration and steering. By default, we set max acceleration to 6.0 $m/s^{2}$ and max steering angle to 0.3 $rad$.
- •
LaneIDMPolicy: Under this policy, vehicles ignore the action sequences and proceed along the center line of their current lane. The vehicle’s acceleration is calculated using the IDM model and lane-changing behavior is generated using the Mobil model.
- •
TrajIDMPolicy: Vehicles move along the trajectories computed based on the action sequence, but their acceleration is controlled by the IDM Mode to prevent collisions.
- •
RL-based Policy: A PPO [] agent trained based on our simulator, its observation space contains the scene embedding and the action sequence. The action space consists of acceleration and steering values. The training environment of this agent is the second one, enabling diffusive simulation with Waymo-style vehicle behavior.

For the IDM model in these policies, the default configuration is that $acc_{max}=5m/s^{2},thw=2.0s,v_{target}=20m/s$.

## Appendix C SenseTime Driving Dataset

### C.1 Dataset Overview

SenseTime driving dataset comprises about 426.26 hours of vehicle driving logs collected from vehicles based on SenseAuto(^5^55[https://www.senseauto.com/](https://www.senseauto.com/)) in the Beijing Yizhuang area and the whole dataset is split into 765 scenarios. The data is presented in a format similar to vehicle trajectories in the Waymo dataset with a sampled rate of 10 Hz. However, the road networks of the scenarios are not provided in this dataset, so we can not train our model on it, but due to the sufficient duration of the data, we can analyze the behavioral characteristics of vehicles within the data collection area. This analysis provides a reference for constructing driving scenarios with different styles.

Understandably, due to confidentiality regulations, the complete dataset cannot be released. However, we will share the statistical distribution data of vehicle behaviors obtained from the dataset.

### C.2 Vehicle Behavior Analysis

We conducted statistical analysis on the dataset, focusing on metrics such as max acceleration, usual brake acceleration, velocity, relative distance, relative velocity, and time headway during the car following process, Figure 10 shows the results. This analysis allowed us to derive the driving behavior characteristics of vehicles in the Yizhuang area.

Figure: Figure 10: The analysis of SenseTime driving dataset.
Refer to caption: x10.png

## Appendix D Multi-Style Reinforcement Learning

We constructed single-agent reinforcement learning experiments based on the Waymo traffic scenarios with our guided diffusive simulation to see the influence of styles of scenarios on policy learning.

### D.1 Reinforcement Learning Setup

We constructed a reinforcement learning environment based on the validation set of the Waymo dataset. 4,400 scenarios are selected from the validation set and further divided into a training set containing 4,000 scenarios and a test set containing 400 scenarios. We trained a PPO [] agent on the training set and evaluated its performance on the test set.

Observation Spec.
Observation of the agent consists of two parts:

- •
Scene Embedding: Embedding computed by scene encoder of the diffusion model with size of $[N_{h}]$, by applying cross attention to map polygons and agent states, this feature contains information about surrounding vehicles, road elements, and the vehicle’s own historical states. In this experiment, we use $N_{h}=128$ following the setup of the diffusion model.
- •
Route: We sampled the vehicle’s trajectory points within the next 1 second at a frequency of 10Hz and projected them into a relative coordinate system based on the vehicle’s current position and orientation. The shape of the route data is $[10,2]$, representing the reference path of the vehicle’s forward movement. If the vehicle behavior in the driving environment is generated by a diffusion model, then this path will be accumulated from the behavior sequences generated by the model for the vehicle.

Action Spec.
We let the agent directly control the throttle and steering angle of the vehicle. The agent’s output is a two-dimensional vector with a range $[-1,1]$. This vector is multiplied by the maximum range of acceleration and steering angle, resulting in the final vehicle action. In this experiment, the maximum acceleration and steering angle of the vehicle are set to 6.0 and 0.3, respectively.

Rollout Setting.
To let the agent explore every scenario in the training set, we randomly divided the 4000 scenes in the training set into 20 parts, each containing 200 different scenarios. We used 20 parallel threads to rollout episodes, with each thread pre-loading and pre-calculating map embeddings for 200 different training scenarios. During the rollout process, after the current episode ends, the environment automatically switches to the next scenario, and this cycle continues iteratively.

Reward Function.
Our goal is to make the vehicle progress along the given route while avoiding collisions and staying within the road. Therefore, we provide the following formula for the reward:

$$ $R=R_{forward}+P_{collision}+P_{road}+P_{smooth}+R_{destination}.$ (4) $$

The meanings of elements in the formula are as follows:

- •
$R_{forward}$: A dense reward to encourage the vehicle to drive forward along the given route. We project the current position and last position of the vehicle onto the Frenet coordinate of the route and calculate $d_{t},d_{t-1},s_{t},s_{t-1}$, the value of the reward would be $0.1\times((s_{t}-s_{t-1})-(d_{t}-d_{t-1}))$.
- •
$P_{collision}$: Penalty for collision, When the vehicle collides, the value will be $-10$, and the current episode terminates; otherwise, the value is 0 0.
- •
$P_{road}$: Penalty for driving off the road, when this happens, the value will be $-5$, and the current episode terminates; otherwise, the value is 0 0.
- •
$P_{smooth}$: Following [], we implemented $P_{smooth}=min(0,1/v_{t}-|a[0]|)$ to avoid a large steering value change between two timesteps.
- •
$R_{destination}$: When an episode ends, we check if the vehicle has reached the destination of the given route, which means the distance to the endpoint of the route is within $2.5$ meters. If yes, the reward value is $10$; otherwise, it’s $-5$.

### D.2 Multi-Style Environments Building

We build four kinds of environments with different driving styles using cost functions in Table 7:

- •
The original Waymo driving environment, in this environment, vehicles base their actions on real trajectories from the Waymo driving logs.
- •
The Waymo-style environment with diffusive simulation. This environment utilizes the diffusion model without guide functions, the vehicle behaviors are consistent with the Waymo dataset. With the diffusion model’s nature, it generates diverse vehicle trajectories under the same initial conditions, exposing the agent to a broader range of traffic scenarios during training.
- •
The SenseTime-style environment with guided diffusive simulation. This environment follows the driving style observed in the SenseTime driving dataset, emphasizing a more "gentle" driving behavior compared to the Waymo-based environment. In this environment, we use cost functions on max acceleration with $acc_{max}=3m/s^{2}$, and on time headway with $thw_{target}=2.5s$.
- •
The adversarial environment. This environment is implemented by guiding nearby vehicles closer to the vehicle controlled by the RL agent. For vehicles in front of or alongside the main vehicle, we guide their action generation with $dis_{target}=0$ to the main vehicle, thereby encouraging more sudden braking and cutting-in behaviors, increasing the aggressiveness of the environment.

## Peer Reviews

confidence: 4
contribution: 1
initial_rating: 3
presentation: 2
questions: See weakness part, I hope the authors can calrify these issues.
soundness: 2
strengths: - The integration of a diffusion-based motion planner allows for more realistic and diverse vehicle behaviors compared to traditional rule-based models. 
- The unified data format for scenario construction from multiple sources (including Waymo, Argoverse, and OpenStreetMap) is a contribution, potentially enabling more comprehensive and varied simulation environments. 
- The authors' implementation of guide functions for controlling vehicle behaviors adds a layer of flexibility that could be valuable for testing autonomous driving algorithms under different conditions.
summary: This paper introduces LCSim.The authors claim it as a large-scale controllable traffic simulator designed to address the growing need for robust benchmarking of autonomous driving algorithms. 

LCSim's key innovations lie in its unified data format for constructing traffic scenarios from multiple sources and its integration of a diffusion-based vehicle motion planner. 

Authors claim the simulator supports large-scale traffic simulation by combining data from various datasets like Waymo, Argoverse, and OpenStreetMap, while offering controllable vehicle behavior modeling through guide functions. LCSim provides a Gym-like environment interface for reinforcement learning and can simulate different driving styles and behaviors.
weaknesses: My main concern lies in some overclaims and potential misrepresentations. 

1. Firstly, the authors repeatedly refer to LCSim as a "simulation system" in both the title and contributions. However, a true traffic simulator should support "*closed-loop*" operations where vehicles run according to generated trajectories and continuously replan as the scenario changes. Despite the authors' claims, neither the manuscript nor the anonymous website demonstrates actual simulation effects, only showing one-time multi-vehicle joint  motion planning. If LCSim is indeed a simulator, the authors should particularly showcase experiments and results of continuous simulation over an extended period in a closed-loop setting.

2. Secondly, the authors emphasize that LCSim is "large-scale" and present experiments in Section 4.4. However, the Method section lacks explanation on how LCSim supports city-scale simulation, such as handling trajectory generation for hundreds or thousands of vehicles simultaneously, or supporting city-level road network operations and construction. The proposed diffusion-based motion planner seems unable to generate trajectories for so many vehicles in a city simultaneously, raising several unaddressed technical questions. 
Section 4.4 only presents some city road network renderings and figures of road speed and arrival times, further adding to the confusion about how the authors implemented details such as "travel schedule of each agent in LCSim with a series of trips between intersections with corresponding departure time and arrival time" (line 466).

3. Lastly, even if considered as a multi-vehicle planner/predictor work, this paper *does not achieve state-of-the-art performance*. The two methods compared in Table 2 are from 2021 and outdated. When considering recent works from the Waymo SimAgent challenge (https://waymo.com/open/challenges/), such as BehaviorGPT (Collision 0.74, Off-Road 0.90) and MPS (Collision 0.96, Off-Road 0.93), we see that they significantly outperform LCSim (Collision 4.118, Off-Road 1.518).

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 3
questions: * Open source code: Thank you for providing a link to the open sourced code + demos. I have tried to open the link but it would not load. Can you verify that everything works as intended?
* Baselines for diffusion planner: The baselines are both from 2021. Are there more recent methods this could be compared to? Can the motion planner also be used for sim agents and evaluated on the WOMD sim agent challenge?
* Difficult to read Figures 4, 5, 6: Orange + blue and orange alone look very similar and differences in the distributions are difficult to discern visually. Can you make these more readable?
* Lack of related work: How does your unified data format compare to ASAM OpenDRIVE?
soundness: 3
strengths: * Simulator that supports several data formats: The authors developed a simulator based on a unified data format that supports several datasets that are otherwise not directly compatible to each other.
* Diffusion model beats baselines: The diffusion motion planner model beats TrafficSim and SimNet baselines.
* Dataset comparison: An interesting comparison between behaviors in WOMD and private datasets with differences in agent driving styles is provided.
* Well written: The paper is generally well written and easy to follow.
* Experiment details: The appendix contains relevant experiment details.
summary: This work proposes LCSim, a large-scale controllable traffic simulator. The authors define a unified data format for traffic scenarios and tools to construct them from various data sources, e.g. WOMD and Argoverse. Furthermore, they design the simulator as well as a diffusion-based vehicle motion planner, which enables realistic and diverse traffic behaviors. The simulator provides an OpenAI Gym interface for RL and the authors use it to train RL agents with different driving styles and evaluate agents trained on WOMD and their own private dataset and compare them to each other.
weaknesses: * Lack of significant novelty: Various simulators for traffic simulation exist (as shown in Table 1). The paper argues to develop a new simulator with a unified data format. However, instead of unifying all simulators it risks developing yet another simulator (https://xkcd.com/927/). The diffusion-based motion policy also lacks significant novelty and is similar to CTG.
* Single-threaded, slow simulator: Compared to Waymax (thank you for providing this comparison!), LCSim is slow and not accelerator-compatible.
* Simulator comparison: The simulator comparison in Table 1 does not seem totally fair. For example, Waymax does support data-driven and controllable agents, even though it does not provide one out of the box. Hence, the last sentence in Related Work that LCSim presents the first open-source traffic simulator with a controllable learning-based vehicle model is also too strong.
* Lack of related work: The unified data format that is provided is not compared to other formats, e.g. ASAM OpenDrive, that try to provide data format standards. 
* Lack of strong baselines for diffusion planner: The baselines are both from 2021.

---

confidence: 4
contribution: 2
initial_rating: 3
presentation: 4
questions: - The guide function penalizes and provides soft constraints but it cannot guarantee safety - are there any hard safety constraints that need to be provided?
- Line 183: "all map information is placed within a single junction" - What is the reason?
- Algo 1: t_i is increasing, but line 7 checks for t_{i+1} not equal to 0. Will never be 0.
soundness: 3
strengths: - The diffusion-based motion planner for agents trained on WOMD provides a scalable and flexible way to model future actions of the agents 
- The guided loss function provides a stable method for driving behavior of the agents
- The results provided are pretty comprehensive
summary: The authors present a data-driven traffic simulator LCSim that has the characteristics of being large-scale, able to assimilate diverse data sources and perform controllable actions. LCSim takes as input a scenario and first inputs the map information and the historical information of all the agents into a scene encoder. The diffusion decoder then is responsible for providing future T_f steps of the agents in the scenario. The diffusion model uses a guided loss function with the following loss components: max acceleration, target velocity, time headway, relative distance, goal point, no collision, no off-road. The authors show comparisons between a private driving dataset and WOMD dataset and also the private dataset and the simulation dataset. The histograms show that the simulation can more closely follow the private dataset. The authors also trained a few RL agents on the simulation and provided metrics of the trained agents. The authors also provided city-scale scenario simulations.
weaknesses: - Three contributions are mentioned and I am not sure all of these are novel - First contribution is a unified data format for traffic scenarios. The authors do not mention OpenScenario which has been used as an unified data format. Also the third contribution is just mentioning the benchmarking the authors did for the paper, which does not count as a novel contribution. 
- The purpose of creating an unified data format is vague and the different sources were not used in the later motion planning part. 
- The diffusion-based motion planner is trained on WOMD - no reason is given why it is chosen and why it fares well when tested against a dataset collected in China.

---

confidence: 5
contribution: 3
initial_rating: 8
presentation: 3
questions: 1. Is PCA used to do dimension reduction like MotionDiffuser?
2. Are all trajectories generated jointly instead of doing ego-centric motion prediction for all agents one by one?
3. The diffusion policy can be used to control not only the background agents but the ego car as well like what the RL agent did. Did the authors observe some interesting differences between the RL policy and diffusion policy when using it to control the ego car? Maybe the RL agents incur less infractions, since it is trained in closed-loop but the diffusion agent is basically doing behavior cloning?
soundness: 3
strengths: **Impact**

Traffic simulation is important for the self-driving industry. Though real-world data helps improve the realism of background agents, none of the existing simulated agents can be controlled to show specific behaviors, driving styles, or even out-of-distribution ones that don't exist in the training data, i.e. collision. The use of diffusion in recent years shows the promise to solve this problem. Though using diffusion to generate traffic agents is not new, this work is the first one to try building a simulator with diffusion-based background agents and yields some new conclusions. 

**Soundness**

The experiments are comprehensive and show some interesting conclusions:
1. The generated agents' trajectories match the distribution of the Waymo Dataset (test) very well
2. By adding guidance, the generated agents' collision/off-road rate can be further improved
3. DiffusionAgents trained with Waymo data can match the distribution of another dataset collected in Beijing by only adjusting the guidance function (without retraining), which is amazing.
4. Adjusting the guidance of background agents can produce different styles of traffic. Training single-RL agent in different styles of traffic produces different RL agent behavior. For example, RL agent will be conservative when the surrounding diffusion agents are with a guidance to drive close to them.
5. City-level traffic simulation shows the model can capture the traffic feature for different cities in terms of arrival time error, which further confirms its ability to model the data distribution.

Given the results, I believe the claim of a "controllable and realistic simulator" is well-supported. 

**Quality**

As an open-sourced machine learning system work, the code/documentation quality of this work is good and easy to follow.
summary: This paper proposes a new simulator in which diffusion policies control the background agents. One benefit is that we can adjust the background agents' behaviors while keeping their realism. The experiments are solid and demonstrate the effectiveness of this simulator in simulating traffic and training RL agents. As a system paper, the delivered software is of good quality with documentation.
weaknesses: 1. More qualitative results can be provided, especially the adversarial attack ones. It is tricky to generate reasonable adversarial behaviors rather than stupid rear collisions which is unavoidable for the ego car.
2. The conclusion of Table 3 seems to have Incorrect references, i.e. the third one is "with adv" not "with gentle". 
3. What is the decision interval or simulation frequency? Would the closed-loop simulation performance change accordingly if the decision interval is changed? It seems to be an important hyperparameter for closed-loop simulation in the Waymo Sim Agent paper.
4. Is it possible to test open-sourced driving software in this simulator, like autoware? If it can be used to find misbehavior in open-sourced AD systems by adjusting background agents' behaviors, its impact can be enhanced.