Deep Learning Based Network Security Data Sampling and Anomaly Prediction in Python

Deep Learning Based Network Security Data Sampling and Anomaly Prediction in Python

Abstract:

Irregularities in the use of electrical energy could result in failure of power grids and blackouts. Anomaly detection is required not only for ensuring grid safety, but also to prevent illegal hacking. Long-term data are recorded for such anomaly detection. However, due to the nonlinear characteristics of the time series data, correlation regression becomes difficult when using non-deep learning techniques. To address this issue, we use Long-Short Term Memory (LSTM) recurrency techniques. We experiment with two datasets from two different smart meters, which are sampled once every 30 seconds for one month. A total of 120,000 data samples were used for training and 40,000 data samples for testing. From the experiment results, the testing accuracy, True-Positive Rate, and False Positive Rate were 0.92, 0.81, and 0.50, respectively. Further, to demonstrate that the LSTM model can actually be designed at the network edge, we implemented the model and the trained weights on a Raspberry Pi platform. The inference time for each sample was 935 μs, which is short enough for realizing edge-based anomaly detection.