Open-source Cyber-Physical Systems (CPS) dataset is rare, thus having a tool that can generate quality (temporal-preserved) synthetic dataset is needed. TimeGAN is a tool that can generate temporal-preserve dataset. This repository will apply TimeGAN towards two multivariate time-series cyber-physical systems, BATADAL and SWaT, using Tensorflow.
TimeGAN contains four components: Embedding function, Recovery function, Generator and Discriminator. There are three training phases of TimeGAN
-
- An Autoencoder (contains of Embedding and Recovery functions) is trained with the real dataset to get a very good feature-map function that reconstruct high-dim > low-dim > high-dim data.
-
- A Supervisor model in latent-space is trained using supervised learning to learn the temporal dependency of the real data in low-level latent-space.
-
- TimeGAN is then jointly trained with all components train together with three losses:
- Reconstruction Loss of Recovery function in high-dim.
- Supervised Loss of the Supervisor model in latent-space.
- Classification Loss of the Discriminator as both regression and binary.
python 3.7.13
numpy = 1.21.6
tensorflow = 2.4.1
matplotlib
sklearn = 1.0.2
pip install datagene
pip install pystan
pip install pydot
conda install -c conda-forge google-colab
conda install -c anaconda portpicker
conda install -c anaconda jinja2
conda install -c anaconda requests
conda install -c conda-forge charset-normalizer
conda install zipp
conda install typing-extensions
Training Notebooks:
Evaluating Notebooks:
Yoon, Jinsung, Daniel Jarrett, and Mihaela Van der Schaar. "Time-series generative adversarial networks." Advances in Neural Information Processing Systems 32 (2019).
Goh, Jonathan, et al. "A dataset to support research in the design of secure water treatment systems." International conference on critical information infrastructures security. Springer, Cham, 2016.
Taormina, Riccardo, et al. "Battle of the attack detection algorithms: Disclosing cyber attacks on water distribution networks." Journal of Water Resources Planning and Management 144.8 (2018): 04018048.