Self-correcting autonomous driving simulation improves traffic realism

REARL: A Closed-loop Autonomous Driving Simulation Enhancement Framework with Real Traffic Data and Large Language Models

Machine Learning

Summary

Simulating realistic traffic is hard because real-world traffic patterns keep changing. The authors created REARL, a system that watches how a traffic simulation evolves and fixes errors using a language-based AI that learns from real traffic data. It compares the simulated traffic to real patterns regularly and tweaks vehicle behavior when things look different. This makes the simulation behave more like actual traffic, helping developers build safer autonomous cars.

What this means in practice

  • For autonomous vehicle developers: Improve traffic simulation accuracy by automatically adjusting vehicle decisions based on real traffic data during training and testing.
  • For traffic simulation engineers: Create simulations that better represent evolving real-world traffic patterns by integrating AI feedback loops with representative scenario data.

Authors

Xiaojun Bi, Jun Jiang, Yiwen Sun, Quanyi Ou, Ke Cheng, Mingjie Bi, Yexin Li

Abstract

Accurate simulation is crucial for autonomous driving development, yet capturing real-world traffic complexity remains challenging. Existing simulators that rely on predefined rules or static data playback struggle with dynamic traffic. CRITICAL uses real traffic data and a large language model (LLM) to adjust the initial simulation configuration, but the simulated distribution still diverges from real traffic as the rollout evolves. We propose REARL, a closed-loop simulation enhancement framework that integrates real traffic data with LLMs. Real traffic data are clustered, and each cluster center is used as a representative scenario that provides typical real-world traffic patterns for the LLM. A timed sliding-window detector then monitors discrepancies in vehicle speed distribution and mean spacing between pairs of vehicles. If a metric exceeds a threshold, the LLM adjusts vehicle decision-making; otherwise the existing controller is kept. The LLM also selects a matching real vehicle from a traffic snapshot and modulates the simulated vehicle with reference to that real action. In a controlled HighD highway setting, compared with the CRITICAL baseline and a PPO-based learning baseline, REARL reduces the Hellinger distance for speed distributions to 0.3067 and the MAPE for mean spacing to 0.8371, while achieving a time headway (THW) of 22.8575 and a lane change rate of 0.0708.