Federated Learning for Traffic Flow Prediction With Synthetic Data Augmentation

Fermin Orozco, Hongkai Wen, Pedro Porto De Gusm˜ao, Johan Wahlström, Man Luo

Abstract

Accurate traffic flow prediction is a cornerstone of modern Intelligent Transport Systems (ITS), yet it faces significant challenges due to data fragmentation across various stakeholders and strict privacy regulations like GDPR. While Federated Learning (FL) enables collaborative model training without sharing raw data, the inherent heterogeneity of local datasets (non-IID data) often leads to model divergence and suboptimal performance. This paper introduces FedTPS (Federated Traffic Prediction with Synthetic data augmentation), a novel framework that utilizes federated diffusion models to generate high-fidelity synthetic traffic data. By augmenting local datasets with globally-informed synthetic patterns, FedTPS effectively bridges data gaps and enhances prediction accuracy. Evaluations on large-scale ride-sharing datasets from Chengdu and Xi’an demonstrate that FedTPS consistently outperforms standard FL baselines and state-of-the-art spatio-temporal models.

Introduction

In the era of smart cities, deep learning models for traffic prediction require vast amounts of data to capture intricate spatial and temporal dependencies. However, this data is typically trapped in "silos" owned by ride-sharing companies, city councils, and transit agencies. Centralizing such data is often unfeasible due to commercial sensitivity and privacy laws.

Federated Learning (FL) offers a promising alternative by allowing models to be trained locally at each silo, with only model updates being shared. However, a major hurdle remains: data heterogeneity. For instance, a transit agency in a city center will have vastly different traffic patterns than a ride-sharing service in the suburbs. This non-IID (Independent and Identically Distributed) nature of data can cause global models to perform poorly across diverse local environments. FedTPS addresses this by using generative modeling to harmonize these fragmented data distributions.

Methodology

The FedTPS framework is structured as a two-stage process designed to mitigate the effects of data heterogeneity through synthetic augmentation.

1. Federated Generative Modeling

The first stage involves training a diffusion-based generative model, termed TFDiff, using a federated approach. TFDiff learns the underlying global distribution of traffic patterns across all participating clients without accessing their raw data. Once the global TFDiff model is trained, it is distributed back to the clients. Each client then uses this model to generate a synthetic dataset locally, which reflects the global traffic characteristics.

The FedTPS framework workflow involving federated generative modeling and augmented prediction training.

2. Augmented Prediction Training

In the second stage, clients augment their small, potentially biased local datasets with the high-quality synthetic data generated by TFDiff. This augmented dataset is then used to collaboratively train a traffic flow prediction model.

The paper also proposes a specialized prediction architecture called GATAU (Graph Attention and Temporal Attention Unit). GATAU is designed to capture complex spatio-temporal dynamics through two key components:

  • Multi-Headed Graph Attention (MGAT): Learns multi-channel spatial relationships between different urban regions, allowing the model to identify correlations between non-adjacent areas.
  • Temporal Attention Unit (TAU): Captures both static and dynamic evolutions of traffic over time using a combination of pooling and dilated convolutions.
Architecture of the GATAU module, featuring Multi-Headed Graph Attention (MGAT) and Temporal Attention Unit (TAU).

Experimental Setup

The framework was evaluated using two real-world ride-sharing datasets from the Didi Chuxing GAIA Initiative:

  • Chengdu, China: A city with a ring-road-based network and relatively stable traffic patterns.
  • Xi’an, China: A city with a grid-based network and high variability due to its dense historic core and tourism.

To simulate varying degrees of decentralization, the data was partitioned into 2, 4, 6, and 8 client silos, representing increasing levels of data heterogeneity.

Key Results and Insights

Experimental results highlight the effectiveness of the FedTPS framework across multiple dimensions:

  • Superior Prediction Accuracy: FedTPS consistently outperformed standard FL baselines such as FedAvg, FedOpt, and FedProx. For example, in the Chengdu 2-client scenario, FedTPS achieved an nMAE of 0.1019, a notable improvement over FedAvg's 0.1054.
  • High Generative Fidelity: The TFDiff model proved significantly more effective than traditional generative models like CGAN or CVAE. TFDiff achieved a Mean Absolute Difference (MAD) of 0.14 in Chengdu, compared to 0.53 for CGAN and 0.55 for CVAE, indicating its superior ability to replicate realistic traffic flows.
  • Effective Data Bridging: By sharing a generative model rather than raw data, clients can "fill in the gaps" of their local distributions. This stabilization of the local training process leads to better global model convergence.
  • Model Robustness: The GATAU architecture generally outperformed other state-of-the-art models like STGCN and GWNET, particularly in the more complex Xi’an dataset, thanks to its flexible spatial attention mechanism.

Conclusion

FedTPS demonstrates that federated generative modeling is a powerful tool for overcoming data heterogeneity in decentralized traffic prediction. By using diffusion models to synthesize globally-informed data locally, the framework improves accuracy while strictly adhering to privacy constraints.

Future work will explore the scalability of FedTPS as the number of clients increases, which can challenge the generative model's training efficiency. Additionally, investigating more extreme non-IID scenarios and advanced client selection strategies could further optimize the performance of the generative phase.

Summary updated

BibTeX
@misc{orozco2024federated,
  author = {Fermin Orozco and Hongkai Wen and Pedro Porto De Gusm˜ao and Johan Wahlström and Man Luo},
  title = {{Federated Learning for Traffic Flow Prediction With Synthetic Data Augmentation}},
  year = {2024},
  eprint = {2412.08460},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.08460},
}
Figure