# Optimizing CNN-LSTM for the Localization of False Data Injection Attacks in Power Systems
## 1 Introduction
The literature [14] integrates the spatial characteristics of the data with the topological information of the power systems to propose a GNN-based detection method capable of effectively detecting FDIAs even when the system's topology evolves. To cope with the diversity and uncertainty of FDIAs, the literature [15] introduces an FDIA detection method based on deep reinforcement learning, modeling the power system as a reinforcement learning environment by using the deep reinforcement learning algorithm to train the agent to make decisions, and the agent observes the current state to select actions and judge whether an FDIA exists according to the environmental feedback. Moreover, the literature [16] presents a method for detecting large-scale FDIAs using an autoencoder. This method first generates normal measurement vectors employing an adversarial network, then compares the discrepancies between the attacked and the normal vectors using an algorithmic analysis to accurately pinpoint the location of the attack. Despite the progress achieved by the current methods for detecting FDIAs in power systems, they still encounter several challenges when applied in real-world scenarios. Most methods only study whether there is an attack in the system but cannot accurately locate the attacked position, which limits a rapid response and the effective handling of the attack, and only a few methods can achieve the positioning of the attacked data. For example, [7] studied the use of CNNs through a multi-label classification method, classifying each element in the processing vector in two types, i.e., attack exists or does not exist, to identify the specific attacked node position. At the same time, most methods only extract features from a single spatial or temporal dimension when processing data. However, when an FDIA occurs in the power system, the measured data show a strong correlation of time and space, and the feature extraction of a single dimension may lead to an insufficient detection accuracy of the model. At present, many studies have explored improving the model performance by combining spatial and temporal features, such as [17], where researchers used the CNN-LSTM model to extract spatial and temporal features in a video, significantly improving the performance of video classification. Similarly, in [18], a neural network framework combining a CNN and LSTM was proposed to extract temporal and spatial features of data for short-term user load forecasting. In addition, research in [19] also shows that the CNN-LSTM model has a significant advantage in extracting the spatial and temporal features of dynamic gestures, achieving an effective recognition of dynamic gestures. However, deep learning-based positioning methods face the problem of difficult hyperparameter selection especially when the model forms an ensemble, as the parameters of the entire model will accumulate, and if the hyperparameters are not selected properly, the model will not be able to provide good results. For example, [20] studied the optimization of hyperparameters for an ensemble deep learning network based on AdaBoost using a genetic algorithm, and [21] studied the optimization of structural parameters for a combination model consisting of Support Vector Machine (SVM) and Gated Recurrent Unit Network (GRU-LSTM) using Particle Swarm Optimization (PSO). By using optimization algorithms to select hyperparameters, the performance of the model is improved. In response to the aforementioned challenges and building upon the existing research, this paper introduces a method for locating FDIAs in power systems by optimizing the hyperparameters of the CNN-LSTM model using a genetic algorithm. This approach treats the localization of FDIAs in power systems as a multi-label classification problem, utilizing the CNN-LSTM model to extract the temporal and spatial features of power system data. It distinguishes between compromised and normal measurement values, thereby achieving the localization of the attacked data.