# Gaussian Mixture Modeling for Detecting Integrity Attacks in Smart Grids
## 4 Experimental Set-Up and Results
### Parametrization and Results  
Due to the nature of the proposed solution, the parametrization needs to take place on two sides: (a) each LTI model was of an autoregressive type (this choice can be conveniently altered thanks to the modularity of the proposed framework) while the order was the one with the highest reconstruction capabilities on a validation set \(V_{5}\) taken out of the {3, 4, 5, 6, 7} set; and (b) for the Gaussian modelling part, the number of components was chosen from the set \(\{1,\ldots,30\}\), where the step is 1. Torch framework Torch (2016) was employed for learning the model and during validation. The final number of Gaussian functions was selected after early experimentation while the upper bounds for \(k\)-means and EM iterations were 50 and 100, respectively, with a threshold of 0.001 between subsequent iterations. Special care is needed during the parametrization of the integrity attacks since the attacker knows that the data belonging to the entire network are regularly passing quality checks (see, for example, Torch (2016)). As a consequence, the attack should be smart enough not to initialize the respective alarm type. The goal of the attacker is to have an impact on the overall network without compromising its stability in order to remain undetected. This facilitates information theft, usage of the network components according to his/her interests or any other action favouring the attacker. Based on this requirement, initial experimentations were conducted on the framework of Figure 3 for coming up witha feasible set of integrity attack parameters. The attacks were implemented using the following set of parameters: \(a_{s}\in\{0.02,0.03,0.04,0.05\}\), \(a_{r}\in\{0.02,0.03\}\), \(a_{p}\in\{0.02,0.04\}\) and random \(a=0.3,b=0\). Replay attacks merely involve repetition of previously recorded data, thus there is no parameter to set. The experimental data included a continuous operation of the system for 40,000 samples. The integrity attacks were affecting a randomly chosen bus at various time instances, i.e., at 10,000, 17,000, 23,000, 30,000, and 36,000. The attacks could be of the same or of a different type. The first 5000 samples coming from the nominal system state were employed for learning the probabilistic space shown in Figure 2. The validation set \(V_{5}\) was comprised of the 2000 samples which follow the training ones. The performance of the proposed system was assessed on the rest of the data. The final results are averaged across all types of integrity attacks. Here, it should be noted that each attack scenario, i.e., a case with a specific parameter was executed 50 times. A representative set of integrity attacks is shown in Figure 4.  
The proposed generative modelling approach was contrasted to a discriminative one, i.e., the support vector machine (SVM) technique, which is appropriate for binary classification problems. The fundamental assumption behind the creation of an SVM is that there exists a high-dimensional hyperplane able to separate the two classes. A one-class SVM was trained (using the implementation provided by [38]) on the nominal data using the radial basis function while the LTI parameters were scaled to \([-1,+1]\) in a linear way. The SVM kernel function is a Gaussian radial basis  
\[(k(x_{i},x_{j})=exp(\gamma||x_{i}-x_{j}||^{2}),\gamma>0)\]  
one, while the soft margin parameter and \(\gamma\) were determined though a grid search guided by cross-validation on the training set. The LTI processing layer is based on linear ARX models with orders (2,2,1),and the resulting parameters are used for GMM and SVM learning. The orders were chosen as the ones providing the lowest reconstruction error on the validation set \(V_{5}\). Figure 4: A set of the integrity attacks considered in this work. **Blue** coloured lines denote the nominal datastream while the ones affected by an attack are shown in **black**. The attacks start at \(t=1\) and the dashed vertical line denotes the time instant in which it is detected by the proposed algorithm.