@misc{15920, author = {Qinghua Xu and Shaukat Ali and Tao Yue}, title = {Anomaly Detection with Digital Twin in Cyber-Physical Systems}, abstract = {Cyber-Physical Systems (CPSs) are susceptible to various anomalies during their operations. Thus, it is important to detect such anomalies. Detecting such anomalies is challenging since it is uncertain when and where anomalies can happen. To this end, we present a novel approach called Anomaly deTection with digiTAl twIN (ATTAIN), which continuously and automatically builds a digital twin with live data obtained from a CPS for anomaly detection. ATTAIN builds a Timed Automaton Machine (TAM) as the digital representation of the CPS, and implements a Generative Adversarial Network (GAN) to detect anomalies. GAN uses a GCN-LSTM-based module as a generator, which can capture temporal and spatial characteristics of the input data and learn to produce realistic unlabeled fake samples. TAM labels these fake samples, which are then fed into a discriminator along with real labeled samples. After training, the discriminator is capable of distinguishing anomalous data from normal data with a high F1 score. To evaluate our approach, we used three publicly available datasets collected from three CPS testbeds. Evaluation results show that ATTAIN improved the performance of two state-of-art anomaly detection methods by 2.413\%, 8.487\% and 5.438\% on average on the three datasets, respectively. Moreover, ATTAIN achieved on average 8.39\% increase in the anomaly detection capability with digital twins as compared with an approach of not using digital twins.}, year = {2021}, journal = {2021 14th IEEE Conference on Software Testing, Verification and Validation (ICST)}, publisher = {IEEE}, doi = {10.1109/ICST49551.2021.00031}, }