Abstract
While deep learning models have significantly advanced traffic prediction accuracy, their "black-box" nature often leads to overconfident point estimates that lack interpretability. This paper evaluates four "post-hoc" uncertainty quantification (UQ) methods—Deep Ensembles, Monte Carlo Batch Normalization, Test Time Augmentation, and Patch-based Uncertainty—on a massive, image-based traffic dataset. Our findings demonstrate that these methods reliably signal model confidence across diverse cities and temporal shifts. Furthermore, we show that epistemic uncertainty can be repurposed for unsupervised outlier detection to identify anomalous traffic events, such as COVID-19 lockdowns, without manual labeling.
Introduction
Traffic flow is a highly volatile phenomenon influenced by complex interactions between human behavior, weather conditions, and urban infrastructure. Although Deep Neural Networks (DNNs) have improved prediction performance, their lack of reliability measures hinders adoption in safety-critical Intelligent Transportation Systems (ITS). Most existing research relies on sparse "loop-counter" data from fixed sensors. This study addresses the gap by utilizing dense, city-wide image-based traffic data and investigating the transferability of UQ methods: can a model trained on one city or year provide meaningful confidence estimates when applied to a different city or a disrupted timeframe, such as the transition from 2019 to the 2020 pandemic era?
Methodology
The authors categorize uncertainty into two primary types: Epistemic (uncertainty in the model's knowledge) and Aleatoric (inherent noise in the data). To evaluate these, they focus on "post-hoc" methods that do not require retraining the underlying predictive model.
Evaluated UQ Methods
As illustrated in the workflows below, four specific techniques were implemented:
- Deep Ensembles (Ens): Multiple versions of the same model are trained with different initializations; the variance across their predictions represents epistemic uncertainty.
- Monte Carlo Batch Normalization (MCBN): This method exploits the stochasticity of batch normalization layers during inference to generate a distribution of predictions.
- Test Time Augmentation (TTA): Random transformations (e.g., flips, rotations) are applied to input images at test time. The resulting output variance measures aleatoric uncertainty.
- Patch-based Uncertainty: A novel approach where the model processes overlapping spatial patches of the same area to determine how local context shifts influence prediction stability.
Additionally, the authors propose an Unsupervised Outlier Detection framework. By applying a Kernel Density Estimator (KDE) to epistemic uncertainty values from the training set, they can flag test samples with unusually high uncertainty as "outliers," effectively identifying traffic patterns the model has never encountered.
Datasets
The study utilizes the Traffic4cast 2021 dataset from HERE Technologies, which represents traffic as 495x436 gridded images (100m x 100m pixels). Each image contains 8 channels representing volume and speed in four cardinal directions. The scope includes 8 international cities (e.g., Antwerp, Bangkok, Barcelona, Moscow) across 2019 and 2020, providing a rigorous testbed for temporal and spatial transfer.
Key Insights and Results
Uncertainty as a Network Map
Visualizations reveal that uncertainty estimates effectively recover a city's road network. Uncertainty is consistently highest on major expressways and arterial roads, confirming that high-volume, high-speed corridors are the most difficult to predict accurately.
Performance and Calibration
The best results were achieved by combining epistemic and aleatoric methods (TTA + Ens). This "total predictive uncertainty" produced sharp prediction intervals while maintaining a 90% marginal coverage guarantee. Furthermore, a strong Spearman’s rank correlation ($\rho_{sp} > 0.7$) was found between prediction error (MSE) and uncertainty, indicating that the model "knows when it doesn't know."
UQ for Change Detection
High uncertainty proved to be a valuable feature for anomaly detection. The model's "surprisal" (high epistemic uncertainty) successfully flagged the onset of COVID-19 lockdowns in Moscow and Barcelona. In a specific case study, Moscow exhibited significantly higher outlier counts (~8% of pixels) compared to Bangkok or Barcelona (<1%), suggesting more drastic shifts in Moscow's traffic dynamics during the 2020 test period.
Limitations and Future Work
Despite these successes, several challenges remain. Data sparsity is a major hurdle, as up to 70% of grid cells in many cities lack traffic activity, making it difficult to learn patterns in residential areas. Additionally, methods like Deep Ensembles and TTA require multiple forward passes, increasing computational overhead for real-time deployment. Future work will focus on refining unsupervised detectors using labeled anomalous event datasets and optimizing computational efficiency.
Summary updated