# Towards a cybersecure and privacy enhanced smart grid: A blockchain enabled federated learning framework

**Authors:** Fatima Tariq, Fatima Anjum, Xiaochun Cheng, Shazia Javed, Khursheed Aurangzeb, Nadia Kanwal, Hasan Tahir, Hasan Tahir, Hasan Tahir

PMC · DOI: 10.1371/journal.pone.0342454 · PLOS One · 2026-03-02

## TL;DR

This paper introduces a secure and privacy-preserving framework for smart grids using blockchain and federated learning to protect user data while maintaining accurate energy forecasting.

## Contribution

The novel contribution is a dual-layer blockchain architecture combined with federated learning and differential privacy to enhance privacy and security in smart grids.

## Key findings

- The proposed framework achieved central differential privacy by adding Gaussian noise to aggregated model parameters.
- Random Forest achieved high forecasting accuracy with MAE of 0.153 and MAPE of 0.085 on real-world electricity consumption data.
- The system provided traceability and anonymity through salted cryptographic hashes in a dual-layer blockchain design.

## Abstract

In smart grids, data collection is carried out through smart meters and devices of the Internet of Things, which are installed in the home, allowing to predict the demand for electricity and optimize the distribution of energy. Although the smart grids improve efficiency of operations for end users, they simultaneously present pronounced challenges regarding user privacy and security at the system level. In the context of conventional centralized machine learning, paradigms risk breaching the raw data of consumers, while decentralized paradigms often lack strong mechanisms for verifying identity or ensuring traceability. Existing federated learning systems often lack client level differential privacy, secure aggregation, and decentralized identity protection, leaving them vulnerable to privacy leakage and inference attacks. Blockchain based solutions typically expose model updates or use single layer identifiers. This paper introduces a secure and privacy preserving architecture that combines a dual layer blockchain architecture, federated learning (FL) and central differential privacy (DP) to thoroughly solve these challenges. The proposed system includes a dual layer blockchain system that ensures secure and tamper resistant logging of client interactions and protects client identities by storing salted cryptographic hashes. This design provides both traceability and anonymity, and thus maintains the integrity of participation while obfuscating sensitive identifiers. Privacy is guaranteed by storing raw data in client devices and sending only model updates for central aggregation. At the server side, Gaussian noise is added to the aggregated model parameters to achieve central DP, so as to reduce the risks of inference attacks on user data. Implementation of the proposed framework was performed based on Flower to test the PRECON (Pakistan Residential Electricity CONsumption) dataset, which consists of real-world household electricity consumption data. Multiple machine learning models were benchmarked and out of all the models, Random Forest performed best with the performance metrics of Mean Absolute Error (MAE) of 0.153, Mean Absolute Percentage Error (MAPE) of 0.085 and Mean Squared Error (MSE) of 0.143. The results showed that the proposed framework improved data privacy, preserved the forecasting accuracy and security in smart grid environments.

## Full-text entities

- **Genes:** FLT3LG (fms related receptor tyrosine kinase 3 ligand) [NCBI Gene 2323] {aka FL, FLG3L, FLT3L, IMD125}, TFDP2 (transcription factor Dp-2) [NCBI Gene 7029] {aka DP2}
- **Diseases:** IID (MESH:D020243), AI (MESH:C538142), FL (MESH:D007859), Salt Hashing (MESH:D013651), poisoning (MESH:D011041), ORCID iD (MESH:C535742)
- **Chemicals:** DP (-), salt (MESH:D012492)
- **Species:** Homo sapiens (human, species) [taxon 9606]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12952658/full.md

## Figures

14 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12952658/full.md

## References

52 references — full list in the complete paper: https://tomesphere.com/paper/PMC12952658/full.md

---
Source: https://tomesphere.com/paper/PMC12952658