Towards secure federated learning for energy forecasting under adversarial attacks
Abstract
Federated learning is increasingly used in energy forecasting, enabling buildings to collaboratively predict load, photovoltaic generation, and prosumption while preserving data privacy. However, this collaborative nature introduces new vulnerabilities, as manipulations by a single participant can propagate across the network. Such attacks can undermine grid balancing, limit flexibility provision, and reduce trust in decentralized energy systems. This work presents a comprehensive study of adversarial threats and defenses in federated energy forecasting. We compare structured manipulations generated with Generative Adversarial Networks against simple random perturbations in two attack scenarios: (i) data poisoning, where corrupted training data degrade global accuracy, and (ii) backdoors, where hidden triggers distort predictions in targeted time windows. Our experiments show that poisoning can increase global forecasting errors by up to 131 %, while backdoors raise local errors by up to 48 %. In both cases, Generative Adversarial Network-based attacks are consistently more effective than random perturbations, with backdoors proving especially challenging to detect due to their localized effect. To mitigate these threats, we evaluate four defense strategies: weighted aggregation, larger participant clusters, local retraining, and their coordinated integration into a secure framework. Results demonstrate that these defenses substantially reduce the impact of attacks, and in some cases even improve baseline accuracy, thereby enhancing the resilience of federated energy forecasting against adversarial manipulation. • Comprehensive analysis of attacks and defenses in federated energy forecasting. • Data poisoning raises global errors by up to 131 %. • Backdoor attacks increase local errors by up to 48 %. • Generative manipulations outperform random perturbations. • Security framework enhances resilience and restores accuracy.
Fields of Study & Subjects
Adversarial Robustness in Machine Learning
Smart Grid Security and Resilience
Privacy-Preserving Technologies in Data
Publication details
- Journal / source
- Energy and AI
- Volume
- 23
- Pages
- 100680–100680
- Publication date
- 1 January 2026
- Language
- EN