Online Traffic Density Estimation using Physics-Informed Neural Networks

Dennis Bogatov Wilkman, Kateryna Morozovska, Karl Henrik Johansson, Matthieu Barreau

TL;DR

This paper introduces a framework for real-time traffic density estimation by adapting Physics-Informed Neural Networks (PINNs) for online, iterative learning. By embedding the Lighthill-Whitham-Richards (LWR) traffic model directly into the neural network's loss function, the system can accurately reconstruct traffic states from sparse probe vehicle data and adapt to changing road conditions (like weather or accidents) that baffle traditional estimation methods.

What Problem Does This Paper Address?

Efficient traffic management is essential for reducing global energy consumption and enabling autonomous transport. However, knowing the exact "density" of traffic (how many cars are in a specific stretch of road at a specific time) is difficult.

Traditional methods rely on expensive fixed infrastructure like cameras or road sensors. A modern alternative is using "probe vehicles"—cars that transmit their own GPS and speed data. The challenge is that this data is often sparse and noisy. While Physics-Informed Neural Networks (PINNs) have shown promise in "filling the gaps" by ensuring estimates obey the laws of physics, they are typically slow and designed for offline use. This paper tackles the hurdle of making PINNs work online and in real-time, specifically handling "model mismatch" where the assumed physics (like the speed limit) changes unexpectedly.

Methods

The authors propose an online framework that treats the PINN as a continuous estimator. Key technical contributions include:

  • Iterative Learning with "Warm Startups": Instead of retraining the network from scratch every time new data arrives, the authors use a moving time window. They apply a mathematical transformation to the network's first-layer bias to "shift" the previously learned knowledge into the new time window, significantly speeding up convergence.
  • Physics Integration: The model uses the Lighthill-Whitham-Richards (LWR) model, a partial differential equation (PDE) that treats traffic like a fluid. The PINN is trained to minimize both the error relative to actual vehicle data and the "physics residual" (how much the estimate violates the LWR equation).
  • Online Model Identification: The framework doesn't just estimate density; it simultaneously learns parameters like the free-flow velocity ($v_f$). This allows the model to "realize" if the traffic flow characteristics have changed due to external factors.
  • Predictive Buffering: To handle the computational lag of neural network training, the model trains on a window $[T - \delta_d, T]$ and produces a prediction for a future window, ensuring an estimate is always available when the computation finishes.

Datasets

The researchers evaluated their framework using two primary sources:

  1. Greenshield Model Simulations: Synthetic data generated by solving the LWR equations using finite difference methods. This provided a "ground truth" to test how well the model handles sudden changes in free-flow velocity.
  2. SUMO (Simulation of Urban MObility): A high-fidelity, microscopic traffic simulator. Unlike the simplified PDE models, SUMO simulates individual vehicle behaviors and interactions, providing a more realistic and complex "black box" environment to test the PINN’s robustness.

Key Insights and Ideas

  • The "Closed-Loop" Advantage: In scenarios with perfect model knowledge, traditional open-loop observers perform well. However, when the model is wrong (e.g., the actual speed of traffic drops but the observer doesn't know why), the PINN acts like a closed-loop observer. It adapts its internal physics parameters to match the data, leading to much lower estimation errors.
  • The Training Time Paradox: In standard machine learning, more training iterations usually mean better accuracy. In an online setting, the authors found a "sweet spot." If you train for too many iterations, the computation takes too long, and the resulting estimate is based on "stale" data, actually increasing the real-time error.
  • Physics as a Regularizer: The physics constraint allows the network to maintain a realistic traffic "shape" even in areas of the road where no probe vehicles are currently present, effectively "interpolating" the traffic state using fluid dynamics.

Key Results

  • Adaptability: When the free-flow velocity was suddenly halved in simulations, the PINN successfully identified the new velocity and reduced its Current Estimated Error (CEE) rapidly, while traditional observers saw their error spike and stay high.
  • SUMO Performance: On high-fidelity SUMO data, the PINN maintained a stable error rate (CEE $\approx 0.01$). It successfully identified "tails" of traffic jams even when probe vehicle data was intermittent.
  • Efficiency: The "warm startup" method allowed the model to reach convergence with fewer iterations, making real-time deployment feasible on standard hardware.

Limitations and Future Work

The authors acknowledge several areas for improvement:

  • Convergence Speed: While faster than standard PINNs, the gradient descent process is still slower than simple filters (like Kalman Filters).
  • Uncertainty: The current model provides a "best guess" but doesn't quantify how certain it is about a specific area of the road. Future work could involve Bayesian PINNs to provide confidence intervals.
  • Dynamic Weighting: The model currently treats all data points equally. The authors suggest that weighting measurements differently based on their age or the reliability of the probe vehicle could further improve accuracy.

Summary updated

BibTeX
@inproceedings{wilkman2025online,
  author = {Dennis Bogatov Wilkman and Kateryna Morozovska and Karl Henrik Johansson and Matthieu Barreau},
  title = {{Online Traffic Density Estimation using Physics-Informed Neural Networks}},
  booktitle = {CDC},
  year = {2025},
  doi = {10.1109/cdc57313.2025.11312033},
}
Figure