# A Survey on Machine-Learning Based Security Design for Cyber-Physical Systems
## 5 Potential Research Directions
### Dataset Generation for Learning Malicious Behavior  
Unlike intelligent CPS applications, such as object detection using ML techniques with massive amounts of image data, adapting an ML technique for cyber-physical security is difficult in practice due to the lack of anomalous data for the CPS. Enormous amounts of fault and attack data are required to train the ML-based anomaly detector; however, there are limits to the ability to generate anomalous data such as car accident data and CPS faults in medicine, which involve human casualties [102; 144]. Moreover, for unknown attack vectors and attack techniques, it is impossible to learn anomalous data that cause physical damage. Due to the lack of anomalous data collections for training, ML-based detectors provide poor accuracy and can generate false alarms.  
The generative adversarial network (GAN) is an ML framework and consists of two neural network models: the generator and the discriminator. Figure 8 illustrates the learning processes of the two different learning models in the GAN. The generator makes malicious signals with a generation function \(G\) and random noise \(z\) to deceive the discriminator. The discriminator, with the classification function \(D\), identifies legitimate signals from a database and malicious signals from the generator. The identification result from the discriminator, whether successfully classified or not, is back-propagated to both neural network models for training, and the neural network model is updated. From the iterations of malicious signal generation, the discrimination, and the back propagation, the malicious signal from the generator becomes more sophisticated. The learning process as illustrated in Figure 8 is finished when the discriminator no longer classifies the legitimate signals and the maliciously generated signals with the generating function \(G\). A well-designed generator can be utilized to create malicious cyber-physical attack signals to train ML-based anomaly detectors.  
Multi-variable anomaly detection with a GAN model is proposed in [145], where an LSTM-RNN model is adopted as both a generator and discriminator in order to consider the time-varying characteristics of the physical system. The proposed GAN model is evaluated with a novel metric related to discrimination and anomaly reconstruction from two complex physical system datasets. Besides the generated anomaly signal, a GAN-based anomaly detection strategy that considers real-time requirements is proposed in [146]. In terms of GAN-based anomaly detection, the authors in [146] adopt fog computing to reduce the latency in anomaly detection, which is five times faster than the latency in [145]. In [147], the GAN modeling method is proposed for the analysis of cyber-physical security requirements, including integrity and availability, for production systems. The training of the proposed GAN model utilizes signal and energy information exchanged between the cyber-domain and the physical domain. The authors in [147] evaluate the performance of the security analysis with the proposed GAN modeling method in a 3D printer testbed environment.  
Figure 8: Structure of generative adversarial network (GAN) learning.  
A GAN-assisted network IDS is proposed in [148] to achieve a high-accuracy anomaly detection rate on a network with insufficient abnormal data. An evaluation with the KDD'99 dataset [149] shows that the proposed GAN-based IDS outperforms a standalone IDS in terms of its precision, recall, and F1-score. In [150], a hierarchical GAN framework is proposed for network intrusion detection in large-scale distributed networks with an auto-encoder model. The GAN training process on the local network gateway transmits a parametric model to the centralized network controller, which benefits from saving communication overheads rather than duplicating raw traffic. From the received models, the centralized network controller learns a global anomaly detection model.