Abstract
Despite the wide implementation of machine learning (ML) techniques in traffic flow modeling recently, those data-driven approaches often fall short of accuracy in the cases with a small or noisy dataset. To address this issue, this study presents a new modeling framework, named physics regularized machine learning (PRML), to encode classical traffic flow models (referred as physical models) into the ML architecture and to regularize the ML training process. More specifically, a stochastic physics regularized Gaussian process (PRGP) model is developed and a Bayesian inference algorithm is used to estimate the mean and kernel of the PRGP. A physical regularizer based on macroscopic traffic flow models is also developed to augment the estimation via a shadow GP and an enhanced latent force model is used to encode physical knowledge into stochastic processes. Based on the posterior regularization inference framework, an efficient stochastic optimization algorithm is also developed to maximize the evidence lowerbound of the system likelihood. To prove the effectiveness of the proposed model, this paper conducts empirical studies on a real-world dataset which is collected from a stretch of I-15 freeway, Utah. Results show the new PRGP model can outperform the previous compatible methods, such as calibrated pure physical models and pure machine learning methods, in estimation precision and input robustness.
Introduction
Traffic management relies heavily on Traffic State Estimation (TSE)—the ability to accurately predict flow, speed, and density across a road network. Historically, researchers have been split into two camps: those using classical physical models based on fluid dynamics and those using modern, data-driven machine learning (ML).
Physical models, such as the Lighthill-Whitham-Richards (LWR) or Aw-Rascle-Zhang (ARZ) models, are theoretically sound but often too rigid to capture real-world fluctuations and require tedious manual calibration. Conversely, ML models like Neural Networks or standard Gaussian Processes (GPs) are flexible but act as "black boxes." They are data-hungry and tend to overfit or fail completely when training data is scarce or highly corrupted. This paper introduces a "best of both worlds" approach: the Physics Regularized Gaussian Process (PRGP), which embeds the laws of traffic physics directly into the architecture of a GP to create a model that is more accurate than pure physics and far more robust than pure machine learning.
The PRML Framework
The core innovation is the Physics Regularized Machine Learning (PRML) framework. It uses classical traffic flow equations to "guide" a Gaussian Process through several key mechanisms:
- Augmented Latent Force Model (LFM): Standard LFMs are limited to linear equations. The authors propose an augmented version that uses auto-differentiation to handle the complex, nonlinear partial differential equations (PDEs) found in traffic physics.
- The Shadow GP: A secondary "shadow" GP represents the physical equations. This shadow GP acts as a regularizer during the training process.
- Soft Constraints: Instead of forcing the model to follow physics perfectly, physical laws are treated as a "soft constraint" during Bayesian inference. This allows the model to prioritize data where it is reliable and lean on physics where data is noisy or missing.
Robustness to Flawed Data
Traffic data is notoriously messy due to sensor failures and transmission noise. To test the robustness of the PRGP, the authors used real-world data from the I-15 freeway in Utah, pulled from the Performance Measurement System (PeMS). They created a "noised" dataset where 50% of the training data was replaced with flawed values (adding 100 veh/5min of random noise).
As shown in the figure above, standard ML models are highly sensitive to outliers. In panel (a), the dashed line representing "ML with all data" is significantly diverted from the accurate data points by the flawed data (blue squares). In contrast, panel (b) shows that the PRML framework remains stable; the dashed line stays close to the accurate data trend, effectively "ignoring" the noise by relying on the underlying physical regularities encoded in the model.
Key Insights and Results
The PRGP models (specifically the one using the ARZ physical model) showed dominant performance across several metrics:
- Superior Accuracy: In clean data scenarios, the ARZ-PRGP achieved a Flow RMSE of 34.75, compared to 39.74 for a pure GP and over 100 for standard Multilayer Perceptrons.
- Extreme Robustness: When 50% of the data was corrupted, the pure GP’s error exploded (MAPE of 135%). Meanwhile, the PRGP models remained stable, keeping the error under 10%.
- Physics as a "Prior": The study proved that physics shouldn't be a hard rule, but a strong suggestion. By using physics as a regularizer, the model can fill in gaps where data is missing while still adapting to empirical realities that physical models might miss.
- Explainability: Unlike "black box" ML, the PRGP is more interpretable because it is tied to physical parameters like "relaxation time," allowing researchers to better understand the model's logic.
Conclusion
The PRGP framework represents a significant step forward in bridging the gap between theoretical traffic physics and modern data science. While Gaussian Processes face challenges in computational scaling for city-wide grids, the robustness and accuracy demonstrated on freeway stretches make this a viable tool for real-time traffic management. Future work will explore extending this framework to microscopic models and applying similar physics-regularization to other ML architectures like Random Forests or Support Vector Machines.
Summary updated