Source-linked AI summary
Detection of False Data Injection Attacks in Smart Grid: A Secure Federated Deep Learning Approach
Yang Li, Xinhao Wei, Yuanzheng Li, Zhaoyang Dong, Mohammad Shahidehpour
TL;DR
FDIA detection in smart grids has received limited attention to privacy preservation, while centralized processing faces growing data and exposure concerns. The paper proposes SecFed-Transformer, combining edge-node Transformers, federated learning, and Paillier encryption. Experiments on IEEE 14-bus and 118-bus systems report detection accuracy above 90% for strong and weak attacks, with performance exceeding CNN and LSTM baselines.
Problem
FDIAs threaten smart-grid security, while privacy preservation in FDIA detection remains limited and centralized processing exposes client data.
Method
The method deploys Transformer detectors at edge nodes, collaboratively trains them through federated learning with local data, and encrypts exchanged weights using Paillier cryptosystem.
Results
Detection accuracy exceeds 90% for both strong and weak attacks, and the proposed method always exceeds CNN and LSTM accuracy.
Takeaways & Limitations
The experiments indicate that secure federated learning can support collaborative FDIA detection while keeping local training data private.
Takeaways & Limitations
The method assumes attackers have complete system information and does not yet address multi-cyber attacks or dropped packets.
Abstract
from arXiv · showhide
As an important cyber-physical system (CPS), smart grid is highly vulnerable to cyber attacks. Amongst various types of attacks, false data injection attack (FDIA) proves to be one of the top-priority cyber-related issues and has received increasing attention in recent years. However, so far little attention has been paid to privacy preservation issues in the detection of FDIAs in smart grid. Inspired by federated learning, a FDIA detection method based on secure federated deep learning is proposed in this paper by combining Transformer, federated learning and Paillier cryptosystem. The Transformer, as a detector deployed in edge nodes, delves deep into the connection between individual electrical quantities by using its multi-head self-attention mechanism. By using federated learning framework, our approach utilizes the data from all nodes to collaboratively train a detection model while preserving data privacy by keeping the data locally during training. To improve the security of federated learning, a secure federated learning scheme is designed by combing Paillier cryptosystem with federated learning. Through extensive experiments on the IEEE 14-bus and 118-bus test systems, the effectiveness and superiority of the proposed method are verifed.
ABBREVIATION
The paper frames FDIA detection as a smart-grid cybersecurity problem involving state estimation, centralized-processing limits, and privacy-preserving distributed learning. It introduces a Transformer and federated-learning approach to address these challenges.
- Motivation: FDIAs threaten smart-grid operation within increasingly interconnected cyber-physical power systems.The paper links this threat to smart grids’ open communication environment and complex information-physical coupling.
- Research gap: Traditional centralized detection methods struggle with smart grids’ explosive growth in data volume.The paper notes that distributed detection has consequently emerged, although distributed FDIA studies remain limited.
- Research gap: Federated learning enables collaborative modeling without sharing clients’ original data.Clients upload model weights for aggregation while retaining local data, reducing exposure relative to centralized training.
- Contributions: The proposed approach deploys Transformer detectors at power-system nodes to extract electrical-feature relationships through self-attention.This transforms centralized detection into distributed detection and uses local edge-node data collection, storage, and detection.
- Contributions: Paillier encryption protects federated-learning weight exchanges from being used to infer original data information.The paper combines the cryptosystem with federated learning to construct the SecFed scheme.
B. False Data Injection Attack
The paper describes AC-system FDIAs as coordinated measurement manipulations that alter estimated states while preserving consistency with power-flow relationships. Such attacks can evade conventional residual-based bad-data detection.
- Attack construction: An AC-system FDIA changes selected state vectors by manipulating corresponding measurement vectors under power-flow constraints.Changing a state value affects correlated measurements, so stealthy attacks require coordinated modification of a set of measurements.
- Power-system constraints: Power-flow equations connect real and reactive injections, branch flows, voltage magnitudes, and phase angles across buses.The notation includes bus and branch admittances and θij = θi − θj.
- Attack construction: The attack vector is constructed from deviations in state quantities and added to the real measurement vector.The compromised measurement vector is represented as zα = z + α, while the attacked state becomes x′ + l.
- Stealthiness: The attacked residual can remain equal to the original residual, allowing the FDIA to bypass conventional bad-data detection.The paper states that the residual values do not change and the compromised data’s 2-norm remains unchanged in such cases.
III. PROPOSED METHOD
The proposed method combines secure federated learning, a Transformer-based detector, and a federated-learning framework. The paper presents these components in sequence as the SecFed-Transformer workflow.
- Method overview: The SecFed-Transformer workflow first describes the secure federated scheme, then the Transformer detector, and finally the federated-learning framework.This sequence organizes the proposed method’s scheme, model, and collaborative-training components.
A. Proposed SecFed Scheme
SecFed coordinates local Transformer training while keeping client data local and encrypting exchanged model weights. Clients train, encrypt, aggregate, decrypt, and update models under shared assumptions about initialization and computation.
- Scheme design: SecFed enables multiple clients to co-train a FDIA detector while retaining training data locally.The scheme combines federated learning with the Paillier cryptosystem.
- Local training: Each client locally trains a Transformer-based FDIA detection model using its own data.Local training follows initialization of model and federated-learning parameters.
- Secure exchange: Clients encrypt completed model weights before uploading them to the cloud.Encryption is applied to each client’s local Transformer weights using the public key.
- Secure exchange: The cloud aggregates encrypted client weights and returns the aggregated ciphertext to clients.Aggregation operates on received ciphertexts rather than unencrypted model weights.
- Model update: Clients decrypt the aggregated ciphertext, obtain updated weights, and update their local deep-learning models.The process repeats through federated communication rounds under the scheme’s training workflow.
- Assumptions: The analysis assumes common initialization, identical hyperparameters and optimization algorithms, and similar client computing power.Dropped packets are not considered, although the paper notes realistic settings should address them.
B. Distributed Detector Based on Transformer
The proposed detector uses a Transformer to classify stealthy FDIAs from electrical measurements, extracting relationships among quantities with positional encoding, self-attention, and encoder components.
- Detector formulation: The detector formulates stealthy FDIA detection as binary classification using node power injections and branch power flows as inputs.The output indicates whether an FDIA occurs, represented by the detection indicator β.
- Transformer architecture: The Transformer architecture combines positional encoding, encoder blocks, and a sigmoid layer for classification.Each encoder block contains multi-head self-attention, Add&Norm layers, and a feedforward neural network.
- Transformer architecture: Positional encoding records feature positions so the model can learn intrinsic patterns under normal and compromised conditions.The encoding uses sample position φ, dimension d, and even or odd feature dimensions.
- Transformer architecture: Multi-head self-attention extracts potential relationships among electrical quantities to distinguish true values from false ones.The self-attention output reflects the degree of correlation between electrical quantities.
- Transformer architecture: Add&Norm combines residual connections with layer normalization, while the feedforward module uses fully connected and dropout layers.Residual connections address gradient-related training problems, and dropout is used to prevent overfitting.
- Transformer architecture: The sigmoid layer maps the Transformer output to the final FDIA classification result.It uses two fully connected layers, with a sigmoid activation on the last one.
C. Proposed Framework Based on Federated Learning
The SecFed framework combines federated learning with the Paillier cryptosystem for collaborative FDIA-detector training while retaining client data locally and encrypting uploaded weights.
- Federated learning: Federated learning collaboratively models data from multiple clients without exchanging their original data.Client data remain locally stored while model weights are uploaded for aggregation and updating.
- SecFed framework: Paillier cryptography is combined with federated learning to secure communication among multiple edge devices during collaborative training.The resulting approach is called secure federated learning.
- SecFed components: The cloud server initializes and distributes the global model, aggregates client weights, and repeats communication until convergence.It sends the global model after each communication round and aggregates uploaded weights.
- SecFed components: Each client trains a Transformer-based local FDIA detector using measurement data gathered at its corresponding power-system node.The method can also use WAMS data or mixed WAMS and SCADA data.
- SecFed components: The trustee generates public and private keys, encrypts client-uploaded weights, and decrypts weights distributed by the server.These operations are based on the Paillier cryptosystem.
IV. EXAMPLE ANALYSIS
The experiments evaluate SecFed-Transformer using comparisons with common deep-learning and traditional detection methods, and assess robustness under different noise levels.
- Experimental evaluation: The experiments evaluate the performance of the SecFed-Transformer method.The evaluation includes data generation, implementation details, comparisons, and robustness analysis.
- Comparative evaluation: SecFed-Transformer is compared with CNN and LSTM detectors under the secure federated-learning scheme.Traditional algorithms are also compared using different metrics.
- Robustness evaluation: Model robustness is assessed by observing accuracy under different noise conditions.The noise analysis appears as the final experimental evaluation.
A. Data Generation
The study generates normal and stealthy compromised data for IEEE 14-bus and 118-bus systems, using fixed train-test sizes and node-local measurements for horizontal federated learning.
- Data generation: Normal data are generated for IEEE 14-bus and IEEE 118-bus systems with mean equal to base load and variance equal to one-tenth of base load.These data represent uncompromised operating conditions.
- Attack data: The dataset includes stealthy FDIAs under strong and weak attacks because unstealthy attacks can be detected by the BDD.Attack samples are categorized by attack strength.
- Dataset settings: Each attack case contains 10,000 normal and 10,000 compromised training samples, plus 1,000 normal and 1,000 compromised test samples.The same class-balanced counts are specified for each attack case.
- Dataset settings: Horizontal federated learning is used because each client must have consistent data features.Each client receives bus data from a node and branch data connected to that bus.
- Implementation: The implementation uses Matlab with MATPOWER for data generation and Python with TensorFlow 2.5 for federated deep learning.Simulations run on an Intel i9-10900k CPU, GTX3090 GPU, and 32 GB RAM.
- Hyperparameters: The Transformer uses learning rate 0.0001, three encoder blocks, minibatch 128, Adam, binary cross-entropy, and at most 9 federated communication rounds.Local epochs are 400 for strong attacks and 1000 for weak attacks.
C. Detection Results
Across IEEE 14-bus and 118-bus experiments, the proposed federated detector improves with communication rounds and outperforms CNN and LSTM under weak and strong attacks. Its performance is approximately equivalent to the ideal centralized model while addressing communication delay and privacy leakage.
- Accuracy, precision, recall, and F1-score for bus 2 at R=6 were 0.9965, 0.9995, 0.9938, and 0.9966 under weak attacks.
- Accuracy, precision, recall, and F1-score for bus 3 at R=6 were 0.9230, 0.9855, 0.8883, and 0.9344 under weak attacks.
- The proposed method achieved more than 90% detection accuracy under both strong and weak attacks and performed better under strong attacks.The paper attributes the stronger-attack advantage to more pronounced differences between normal and compromised data.
- The proposed model achieved accuracy, precision, recall, and F1-score of 1.0000, 1.0000, 0.9998, and 0.9999, compared with 0.9625, 1.0000, 0.9257, and 0.9614 for the local model.Its performance was approximately equivalent to the ideal model, while SecFed addressed communication delay and privacy leakage.
- On the IEEE 118-bus system, results were roughly similar to those on the IEEE 14-bus system, with the proposed model significantly outperforming CNN and LSTM in detection accuracy.
D. The Effect of Measurement Noises
The experiment adds Gaussian measurement noise at 1%–4% of true values and evaluates its effect on FDIA detection. Accuracy decreases for all models as noise increases, while the proposed method remains more robust than CNN and LSTM.
- Gaussian noises representing power-system measurement noise were added to individual client data at levels ranging from 1% to 4% of the true value.
- Accuracy decreases for CNN, LSTM, and Transformer as measurement noise increases.The comparison uses bus 4 accuracy and is shown in Fig. 8.
- Increasing noise makes normal and compromised data harder to distinguish because unnoised data are increasingly drowned out by noise.
- The proposed method performs significantly better than CNN and LSTM under measurement noise, indicating greater robustness than these alternatives.
APPENDIX
The appendix describes a Paillier-based secure federated-learning procedure for transforming, encrypting, aggregating, decrypting, and averaging client model weights. It specifies key generation, weight preprocessing, ciphertext aggregation, and parameter recovery.
- Paillier key generation selects large primes p and q, computes n and λ, and chooses a random integer g.The public key is (n, g), while the private key is (λ, µ).
- The decryption constant is computed as µ = (L(g^λ mod n^2))^-1, with L(x) = (x−1)/n and gcd used for the maximum common divisor.
- The encryption procedure preprocesses local weights into positive integers before encrypting them with a randomly selected positive integer r.The transformation is ˆx = f(x) = 10^8 × (x + s), where s exceeds the absolute minimum weight.
- Each client uploads encrypted weights, and the cloud server aggregates the received ciphertext parameters.
- The server distributes aggregated weights to clients, which decrypt the received ciphertext using the private key.
- The decrypted client parameters are averaged as m̄_d = m_d/K before calculating updated weights.