This repository contains the implementation of the Federated-LSTM-DSTGCRN model, proposed in the manuscript:
"Federated Dynamic Modeling and Learning for Spatiotemporal Data Forecasting", Thien Pham, Angelo Furno, FaΓ―cel Chamroukhi, Latifa Oukhellou, arXiv:2503.04528. March 2025
This project brings Federated Learning to spatiotemporal forecasting, making it more accurate, and privacy-friendly. To keep things robust and efficient, we introduce a Client-Side Validation mechanism, in which, clients check updates before applying them, so only the best improvements make it into the model. This means better accuracy, faster convergence, and no junk updates.
This model is built for real-world spatiotemporal forecasting tasks like multimodal transport demand and OD matrix prediction, all while maintaining data privacy and decentralization.
Due to privacy constraints, we are unable to share OD data in this repository. However, we do provide datasets for multimodal transport demand, including Chicago taxi, New York taxi, and New York bike data, as well as weather data for the corresponding locations.
git clone https://github.com/nhat-thien/Federated-LSTM-DSTGCRN
cd Federated-LSTM-DSTGCRN
Ensure you have Python 3.8+ installed. Then, install the required dependencies:
pip install -r requirements.txt
- Place your dataset in the
DATA/
folder. - Ensure it follows the required format for training.
Modify the following files to set up your experiment:
TestCase.py
β Define the test case and dataset configurations.Hyperparameters.py
β Set the base model and federated learning scheme.
Execute the training script:
python Experiments.py
π Federated-LSTM-DSTGCRN
βββ π DATA/ # Folder for datasets
βββ π FL_HELPERS/ # Handle the federated learning
βββ π MODELS/ # The models
βββ Hyperparameters.py # Configuration for base model & FL scheme
βββ TestCase.py # Define test cases
βββ Experiments.py # Implement the experiment(s)
βββ requirements.txt # Dependencies
βββ README.md # Project documentation
If you use this repository in your research, please cite:
@misc{pham2025federateddynamicmodelinglearning,
title={Federated Dynamic Modeling and Learning for Spatiotemporal Data Forecasting},
author={Thien Pham and Angelo Furno and FaΓ―cel Chamroukhi and Latifa Oukhellou},
year={2025},
eprint={2503.04528},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2503.04528},
}