# Inverting the Fundamental Diagram and Forecasting Boundary Conditions: How Machine Learning Can Improve Macroscopic Models for Traffic Flow

arXiv: https://arxiv.org/abs/2303.12740 · HTML: https://mlsanity.com/paper/2303.12740/

## Key facts

- Cited by 1 papers in the map (data through 14 Oct 2026).
- Builds on 11 of its 71 references that are in the map.
- First posted on arXiv 21 Mar 2023.

## Builds on (most cited first, 11 of 11)

- [Deep Learning for Spatio-Temporal Data Mining: A Survey](https://mlsanity.com/paper/1906.04928/) (2019)
- [A Physics-Informed Deep Learning Paradigm for Car-Following Models](https://mlsanity.com/paper/2012.13376/) (2020)
- [A Physics-Informed Deep Learning Paradigm for Traffic State and Fundamental Diagram Estimation](https://mlsanity.com/paper/2106.03142/) (2021)
- [Macroscopic Traffic Flow Modeling with Physics Regularized Gaussian Process: A New Insight into Machine Learning Applications](https://mlsanity.com/paper/2002.02374/) (2020)
- [Deep Learning for Road Traffic Forecasting: Does it Make a Difference?](https://mlsanity.com/paper/2012.02260/) (2020)
- [Physics-informed Learning for Identification and State Reconstruction of Traffic Density](https://mlsanity.com/paper/2103.13852/) (2021)
- [Incorporating Kinematic Wave Theory into a Deep Learning Method for High-Resolution Traffic Speed Estimation](https://mlsanity.com/paper/2102.02906/) (2021)
- [Short-term Traffic Prediction with Deep Neural Networks: A Survey](https://mlsanity.com/paper/2009.00712/) (2020)
- [A destination-preserving model for simulating Wardrop equilibria in traffic flow on networks](https://mlsanity.com/paper/1409.0350/) (2014)
- [Macroscopic Traffic Flow Modeling with Physics Regularized Gaussian Process: Generalized Formulations](https://mlsanity.com/paper/2007.07762/) (2020)
- [Multistep traffic speed prediction: A deep learning based approach using latent space mapping considering spatio-temporal dependencies](https://mlsanity.com/paper/2111.02115/) (2021)

## Built on by (most cited first, 1 of 1)

- [Detection of Anomalous Vehicular Traffic and Sensor Failures Using Data Clustering Techniques](https://mlsanity.com/paper/2504.00881/) (2025)

## Abstract (arXiv)

In this paper, we aim at developing new methods to join machine learning techniques and macroscopic differential models for vehicular traffic estimation and forecast. It is well known that data-driven and model-driven approaches have (sometimes complementary) advantages and drawbacks. We consider here a dataset with flux and velocity data of vehicles moving on a highway, collected by fixed sensors and classified by lane and by class of vehicle. By means of a machine learning model based on an LSTM recursive neural network, we extrapolate two important pieces of information: 1) if congestion is appearing under the sensor, and 2) the total amount of vehicles which is going to pass under the sensor in the next future (30 min). These pieces of information are then used to improve the accuracy of an LWR-based first-order multi-class model describing the dynamics of traffic flow between sensors. The first piece of information is used to invert the (concave) fundamental diagram, thus recovering the density of vehicles from the flux data, and then inject directly the density datum in the model. This allows one to better approximate the dynamics between sensors, especially if an accident happens in a not monitored stretch of the road. The second piece of information is used instead as boundary conditions for the equations underlying the traffic model, to better reconstruct the total amount of vehicles on the road at any future time. Some examples motivated by real scenarios will be discussed. Real data are provided by the Italian motorway company Autovie Venete S.p.A.
