Abstract:False data injection attack (FDIA) poses a serious threat to the security and stability of cyber-physical power systems. To address the limitations of the existing FDIA detection algorithms, ones that fail to precisely locate the attacked positions, an FDIA detection and localization algorithm based on elite cosine variation fusion of the seahorse optimization algorithm optimized deep extreme learning machine (DELM) is proposed. First, the algorithm combines the extreme learning machine and an auto-encoder to obtain the DELM with strong feature expression ability. Then, the bias and input weight of the DELM are optimized by the seahorse optimization, to improve the algorithmic index instability. Meanwhile, the elite cosine variation algorithm is introduced in the predation stage to further improve the convergence and accuracy of the DELM. Finally, system measurement data are used as input features to obtain the bus state labels using DELM, to realize the localization of the contaminated state variables. Through a large number of simulation comparative analyses in the IEEE 14-bus and 57-bus systems, it is verified that the proposed algorithm has obvious advantages in the detection and localization performance, such as accuracy, precision, recall, and F1 score, and it can achieve the precise localization of an FDIA.