Federated Learning for Traffic Flow Prediction with Synthetic Data Augmentation

Fermin Orozco, Pedro Porto Buarque de Gusmão, Hongkai Wen, Johan Wahlström, Man Luo · OpenReview

This paper introduces FedTPS (Federated Traffic Prediction with Synthetic data augmentation), a framework designed to improve traffic flow forecasting in decentralized environments. By combining federated diffusion models for data augmentation with a novel graph-based prediction architecture, the authors tackle the dual challenges of data privacy and dataset heterogeneity.

TL;DR

FedTPS uses federated diffusion models to generate high-fidelity synthetic traffic data, which augments local client datasets to overcome data scarcity and "non-IID" (heterogeneous) data issues. The authors also propose GATAU, a novel prediction model that integrates Graph Attention with Temporal Attention to capture complex urban traffic dynamics more effectively than standard convolutional approaches.

What Problem Does This Paper Address?

Accurate traffic prediction is vital for Modern Intelligent Transport Systems (ITS), but training deep learning models requires massive amounts of data. In the real world, this data is often trapped in "silos" owned by different stakeholders (e.g., ride-sharing companies, city councils, and transit agencies) who cannot share raw data due to privacy regulations like GDPR or commercial sensitivity.

Federated Learning (FL) allows these entities to train a global model collaboratively without sharing raw data. However, FL faces two major hurdles in this context:

  1. Data Heterogeneity (Non-IID): Different organizations operate in different parts of a city or have different fleet sizes, leading to skewed data distributions that degrade global model performance.
  2. Data Scarcity: Individual clients may not have enough local data to train complex spatio-temporal models effectively.

Methods

The authors propose a two-stage federated framework:

  1. Federated Generative Stage: Clients collaboratively train a Traffic Flow Diffusion model (TFDiff). This model learns the global distribution of traffic patterns across the entire city without ever seeing the raw data from other clients. Once trained, the global TFDiff model is sent back to clients, who use it to generate synthetic traffic data.
  2. Federated Prediction Stage: Clients augment their private, local datasets with this synthetic data. They then collaboratively train a traffic prediction model (like the proposed GATAU) using standard FL aggregation (FedAvg).
The two-stage FedTPS framework: (1) training the generative model and (2) training the prediction model with augmented data.

The GATAU Model

To improve prediction, the authors introduce the Graph Attention and Temporal Attention Unit (GATAU). While previous models like the Temporal Attention Unit (TAU) use CNNs to capture local spatial relationships, GATAU adds a Multi-Head Graph Attention (MGAT) module. This allows the model to learn relationships between distant regions of a city that might be connected by major arteries or similar land-use patterns, rather than just immediate neighbors.

Fig. 3: General model architecture comparison of TAU and GATAU.

Datasets

The framework was evaluated using the Didi Chuxing GAIA Initiative dataset, featuring ride-sharing trajectories from two Chinese cities during November 2016:

  • Chengdu: Known for its ring-road structure and stable traffic patterns.
  • Xi’an: Features a dense historic core and a grid-based road network with higher variability.

The researchers partitioned these datasets to emulate 2, 4, 6, and 8 clients, creating realistic data skews to test the framework's robustness against heterogeneity.

Key Insights and Ideas

  • Generative Models as Privacy-Preserving Bridges: Instead of sharing raw data, sharing a generative model allows clients to benefit from the "global knowledge" of the entire network. The synthetic data acts as a proxy that makes local datasets more representative of the global distribution.
  • Diffusion > GANs/VAEs: The study found that diffusion models (TFDiff) significantly outperformed Conditional GANs and VAEs in capturing the temporal correlations inherent in traffic data.
  • Spatial Context Matters: The GATAU model's ability to learn cross-region relationships (via graph attention) proved particularly beneficial in the complex, grid-based environment of Xi'an compared to the simpler ring-road structure of Chengdu.
  • Convergence Speed: While synthetic data augmentation didn't necessarily raise the absolute performance ceiling of the models, it significantly accelerated convergence during the early rounds of federated training.

Key Results

  • Superior Performance: FedTPS consistently outperformed standard FL baselines (FedAvg, FedOpt, FedProx) across both cities.
  • High Fidelity: The TFDiff model achieved a Structural Similarity Index (SSI) of 0.97 and a Temporal Correlation (TC) of 0.92, indicating the synthetic data was nearly indistinguishable from real traffic patterns.
  • Model Accuracy: In the Xi'an 8-client case, GATAU trained with FedTPS achieved an nMAE of 0.2057, outperforming the standard TAU model (0.2255) and other baselines like STGCN and DCRNN.
Visual comparison of real traffic heatmaps vs. those generated by the federated TFDiff model.

Limitations and Future Work

  • Scalability vs. Quality: The authors noted that as the number of clients increases, the quality of the generated synthetic data slightly decreases because the global model struggles to generalize across more diverse silos.
  • Communication Overhead: While cross-silo FL usually has high bandwidth, the two-stage process (training a generative model then a prediction model) increases the total number of communication rounds.
  • Future Directions: The authors suggest exploring FedTPS in "highly non-IID" settings where data distributions are even more extreme than those found in the Didi dataset.

Summary updated

BibTeX
@misc{orozco2024federated,
  author = {Fermin Orozco and Pedro Porto Buarque de Gusmão and Hongkai Wen 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