Investigation of the Robustness of XAI-Based Federated Learning Against Adversarial Attacks for Smart Grid False Data Detection

Islam Elgarhy, Mahmoud M. Badr, Mohamed M. E. A. Mahmoud, Jianbing Ni, Maazen Alsabaan, Tariq A. Alshawi · IEEE Internet of Things Journal · 2025

Federated Learning (FL) enables decentralized training of machine learning (ML) models, making it a valuable approach for detecting false data in smart power grids (SGs) to enhance grid stability while protecting consumers privacy. However, FL-based ML models remain vulnerable to adversarial attacks during both training and inference phases, which can compromise data security. To address these vulnerabilities, we first investigate the robustness of a novel FL-based false data detection approach using Explainable Artificial Intelligence (XAI), referred to as XAI-based FL detection. This approach utilizes explanations of consumers power consumption data, rather than raw data, during the training process. We assess the robustness of the XAI-based FL detection compared to traditional data-driven FL detection against two types of adversarial attacks: Gradient Inversion attacks in the training phase, where adversaries reconstruct private data from shared gradients, and Evasion attacks in the inference phase, where adversaries subtly modify input data to deceive the detection model. Then, we propose a secure XAI-based FL detector with adversarial training to defend against both attack types. The key idea is that XAI helps mask model gradients during training because XAI-generated explanations remain nearly identical across different samples. Therefore, attackers struggle to accurately reconstruct the original training data, even if they obtain precise explanations using gradient inversion attacks. Additionally, XAI effectively distinguishes between benign and malicious samples. When combined with adversarial training, XAI strengthens model robustness against evasion attacks without compromising accuracy, effectively resolving the trade-off between security and performance. Our proposed detector reduced the success rate of evasion attacks from 94.99% to 29.11 explanations, and further to 0% with adding adversarial training. It also increased the mean square error for gradient inversion attacks from 0.01 to 2.60 in the most severe attack scenarios, making such attacks ineffective.

Read the paper · More papers on PaperTik