Out of the Past: An AI-Enabled Pipeline for Traffic Simulation from Noisy, Multimodal Detector Data and Stakeholder Feedback

Rex Chen, Karen Wu, John McCartney, Norman Sadeh, Fei Fang

TL;DR

This paper introduces an end-to-end AI pipeline that constructs highly realistic, city-scale traffic simulations by combining computer vision tracking, quadratic optimization, and large language models (LLMs). By calibrating noisy sensor data and translating qualitative stakeholder feedback into mathematical constraints, the framework accurately replicates real-world traffic patterns without relying on flawed heuristics.

What Problem Does This Paper Address?

Creating realistic traffic simulations is vital for urban planning and training autonomous systems, yet modeling traffic "demand" (where cars go and in what volumes) remains a major bottleneck.

Existing methods suffer from two main flaws:

  1. Coarse Data or Blind Trust: They either rely on coarse household activity surveys or treat physical traffic detectors (like loop detectors and traffic cameras) as absolute ground truth. In reality, these sensors are incredibly noisy and prone to systematic undercounting or overcounting.
  2. Suboptimal Heuristics: Converting isolated intersection counts into full vehicle routes across a network typically relies on simplistic heuristics or randomized sampling, which fail to capture true traffic dynamics.

This paper addresses these gaps by building a pipeline that explicitly models data noise and integrates human expertise to refine the simulation.

Methods

The authors propose a three-step pipeline to transform raw, noisy data into a high-fidelity simulation:

Figure 1: Our pipeline for generating a traffic simulation from multimodal detector data.
  1. Computer Vision-Based Vehicle Counting: Instead of relying on built-in camera detection zones (which often undercount bumper-to-bumper traffic), the authors apply YOLOv11 for object detection paired with BoT-SORT for vehicle tracking. They introduce spatiotemporal denoising and frame-blending filters to handle video pixelation and dropped frames from unstable RTSP streams.
  2. Optimization-Based Route Generation: Rather than randomly sampling routes, the pipeline enumerates all feasible shortest-path routes. It then formulates a Quadratic Integer Program (QIP) to solve for the exact route frequencies. Crucially, the optimization doesn't force an exact match to sensor counts; instead, it uses calibrated upper and lower bounds to account for sensor error, alongside regularization terms to ensure smooth traffic flow over time.
  3. LLM Agent Refinement: To incorporate domain knowledge from human experts (e.g., traffic engineers), the pipeline uses an LLM agent (Claude 3.7 Sonnet). The agent takes qualitative natural language feedback (e.g., "I would expect this intersection to be pretty packed at this time of day"), queries the simulation data using tools, and automatically synthesizes valid Python code (cvxpy constraints) to update the QIP. An automated verification loop checks the code for syntax, mathematical feasibility, and semantic correctness.

Datasets

The pipeline was evaluated using a real-world testbed in Strongsville, Ohio, modeling a high-traffic road network connected to interstates I-71 and I-80.

  • Sensor Data: 24 hours of continuous data captured on Friday, September 6, 2024, across 36 intersections.
  • Video Data: Raw video footage from 74 camera locations.
  • Network Base: OpenStreetMap data converted into a SUMO (Simulation of Urban MObility) network.

Key Insights and Ideas

  • Commercial Sensors Systematically Fail in Heavy Traffic: Widely deployed image-processing systems like AutoScope rely on static detection zones. When traffic is heavy, consecutive vehicles trigger the zone continuously without a break, causing severe undercounting. The tracking-based CV approach successfully decouples vehicle counting from traffic density.
  • Embracing Uncertainty in Optimization: By treating sensor data as intervals (bounds) rather than absolute truths, the QIP avoids overfitting to faulty data and allows secondary data sources to resolve ambiguities.
  • LLMs as Code-Generating Translators: The paper demonstrates that LLMs excel at translating vague, qualitative human observations into precise, quantified optimization constraints, effectively acting as a bridge between human intuition and rigorous math.

Key Results

  • Counting Accuracy: The tracking-based CV method achieved an error of less than 2 vehicles per minute against manual ground-truth counts. In contrast, the baseline commercial system (AutoScope) exhibited errors exceeding 3 vehicles per minute in 14 out of 16 evaluated video segments.
  • Optimization Efficiency: The QIP successfully managed 18,496 variables, finding feasible solutions in under 0.5 seconds per 15-minute time segment, demonstrating strong scalability for mid-sized networks.
  • LLM Reliability: On synthetic feedback, the LLM agent achieved 100% syntactic correctness and an 87% success rate for both feasibility and semantic correctness. When deployed with real stakeholder feedback and the self-reflection loop active, it achieved a 100% success rate across all verification metrics.
Figure 2: Demonstration of our vehicle tracking method on camera detector footage from intersection 8 (US 42 & Echo Rd) in Strongsville, Ohio. (a) Raw footage, showing two vehicles actuating a detection zone in the center lane. (b) Footage with preprocessing filters applied, and bounding boxes and tracks for counted vehicles annotated. The colored lines represent manually labeled stop bar positions.

Limitations and Future Work

  • Combinatorial Explosion: Exhaustively enumerating routes works for a medium-sized city like Strongsville, but the route space scales exponentially. For larger megacities, the authors suggest clustering networks into geographic subregions.
  • Batch vs. Streaming: The current pipeline operates offline on historical 24-hour blocks. Transitioning this into a real-time streaming pipeline would allow live traffic simulation updates.
  • Heterogeneous Data: Future iterations could benefit from integrating alternative data streams, such as crowd-sourced traffic reports (e.g., Waze), weather conditions, and local business schedules.

Summary updated

BibTeX
@misc{chen2025out,
  author = {Rex Chen and Karen Wu and John McCartney and Norman Sadeh and Fei Fang},
  title = {{Out of the Past: An AI-Enabled Pipeline for Traffic Simulation from Noisy, Multimodal Detector Data and Stakeholder Feedback}},
  year = {2025},
  eprint = {2505.21349},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.21349},
}
Figure