Table of Contents
Fetching ...

Gradient-based Trajectory Optimization with Parallelized Differentiable Traffic Simulation

Sanghyun Son, Laura Zheng, Brian Clipp, Connor Greenwell, Sujin Philip, Ming C. Lin

TL;DR

This work introduces a parallelized, differentiable traffic simulator based on the Intelligent Driver Model (IDM) that can handle up to 2 million vehicles in real time on CPU or GPU. It adds differentiable IDM components and safety bounds to ensure physically plausible vehicle dynamics, enabling gradient-based trajectory optimization for filtering, reconstruction, and prediction. The authors validate the approach on large-scale datasets (e.g., NGSIM, Waymo Open Motion Dataset), showing improvements in physical realism and providing a training-free baseline for trajectory forecasting. The framework offers a scalable computational core for integrating traffic dynamics with learning-based methods, with public code available to facilitate adoption and extension.

Abstract

We present a parallelized differentiable traffic simulator based on the Intelligent Driver Model (IDM), a car-following framework that incorporates driver behavior as key variables. Our vehicle simulator efficiently models vehicle motion, generating trajectories that can be supervised to fit real-world data. By leveraging its differentiable nature, IDM parameters are optimized using gradient-based methods. With the capability to simulate up to 2 million vehicles in real time, the system is scalable for large-scale trajectory optimization. We show that we can use the simulator to filter noise in the input trajectories (trajectory filtering), reconstruct dense trajectories from sparse ones (trajectory reconstruction), and predict future trajectories (trajectory prediction), with all generated trajectories adhering to physical laws. We validate our simulator and algorithm on several datasets including NGSIM and Waymo Open Dataset. The code is publicly available at: https://github.com/SonSang/diffidm.

Gradient-based Trajectory Optimization with Parallelized Differentiable Traffic Simulation

TL;DR

This work introduces a parallelized, differentiable traffic simulator based on the Intelligent Driver Model (IDM) that can handle up to 2 million vehicles in real time on CPU or GPU. It adds differentiable IDM components and safety bounds to ensure physically plausible vehicle dynamics, enabling gradient-based trajectory optimization for filtering, reconstruction, and prediction. The authors validate the approach on large-scale datasets (e.g., NGSIM, Waymo Open Motion Dataset), showing improvements in physical realism and providing a training-free baseline for trajectory forecasting. The framework offers a scalable computational core for integrating traffic dynamics with learning-based methods, with public code available to facilitate adoption and extension.

Abstract

We present a parallelized differentiable traffic simulator based on the Intelligent Driver Model (IDM), a car-following framework that incorporates driver behavior as key variables. Our vehicle simulator efficiently models vehicle motion, generating trajectories that can be supervised to fit real-world data. By leveraging its differentiable nature, IDM parameters are optimized using gradient-based methods. With the capability to simulate up to 2 million vehicles in real time, the system is scalable for large-scale trajectory optimization. We show that we can use the simulator to filter noise in the input trajectories (trajectory filtering), reconstruct dense trajectories from sparse ones (trajectory reconstruction), and predict future trajectories (trajectory prediction), with all generated trajectories adhering to physical laws. We validate our simulator and algorithm on several datasets including NGSIM and Waymo Open Dataset. The code is publicly available at: https://github.com/SonSang/diffidm.

Paper Structure

This paper contains 23 sections, 5 equations, 6 figures, 3 tables.

Figures (6)

  • Figure 1: Computational cost of our traffic simulator. Using either (multi-threaded) CPU or GPU, our simulation takes less than $30$ milliseconds per timestep to process $2$ million vehicles in both (a) forward and (b) backward pass.
  • Figure 2: Trajectory Optimization Problems. For the given data points (red flags), we can fit a simulated trajectory to them by optimizing IDM variables. (a) When data points are dense, we can filter physically inaccurate noises in the original trajectory. (b) When they are sparse, we can reconstruct dense trajectories. (c) We can even predict future trajectories based on the IDM variables.
  • Figure 3: Overall Framework. In our traffic simulator, for each frame, (a) we first collect variables for each vehicle in the scene to use in IDM. These variables include the position ($p_i$) and velocity ($v_i$) of each vehicle, and its relationship to its leading vehicle ($p_{h(i)}, v_{h(i)}$). Since we can apply IDM to each vehicle's variables independently, we can process them in parallel, rather than sequentially. In (b) and (c), the process ordering is depicted with colors and numbers. In (c), we assume there are two computational units that can run in parallel.
  • Figure 4: Distribution of optimized IDM parameters in trajectory reconstruction task. Note that the distribution of each parameter adheres well to the general, real-world scenarios.
  • Figure 5: Qualitative comparison for trajectory filtering task. For comparison, we use the speed (up) and acceleration (down) profiles for a single trajectory in the NGSIM dataset. Estimated acceleration from our method exhibits a more stable pattern than the baseline methods.
  • ...and 1 more figures