When Swarm Learning meets energy series data: A decentralized collaborative learning design based on blockchain

Lei Xu, Yulong Chen, Yuntian Chen, Longfeng Nie, Xuetao Wei, Liang Xue, Dongxiao ZhangarXiv 2024 · DOI · arXiv

Introduction

The energy sector, encompassing diverse domains from solar farms to oil fields, generates vast quantities of "series data"—time-based or space-based sequences critical for predictive modeling. However, this data is frequently siloed within individual organizations due to stringent legal, security, and privacy constraints. This paper proposes a decentralized collaborative learning framework that leverages blockchain-based Swarm Learning (SL) to enable cross-organizational model training without compromising data sovereignty.

The Collaborative Learning Trilemma

Organizations currently face a difficult choice between three suboptimal learning paradigms. Local Learning preserves privacy but suffers from poor performance due to data scarcity. Centralized Learning offers high performance but introduces massive security risks and data monopolies. Federated Learning (FL) improves upon these by sharing model weights rather than raw data, yet it still relies on a central server. This central aggregator represents a single point of failure and a potential target for malicious actors or "curious" service providers attempting to reverse-engineer private data from shared gradients.

Comparison of learning paradigms across performance, data accessibility, privacy, and network structure.

Decentralized Swarm Learning Architecture

To address these vulnerabilities, the authors introduce a Swarm Learning framework integrated with the Fisco Bcos blockchain platform. By replacing the traditional central server with a decentralized blockchain, the network ensures that no single entity controls the aggregation process.

The proposed Swarm Learning framework integrating energy sites, organizations, and a blockchain network for decentralized model aggregation.

Key components of this architecture include:

  • Decentralized Aggregation: Smart contracts automatically execute the logic for uploading, averaging, and downloading model parameters, removing the need for a trusted third party.
  • Consensus Mechanism: The blockchain ensures all participating nodes agree on the model's state, making the training process transparent, traceable, and immutable.
  • Workflow: Local nodes train models on private data, upload gradients to the blockchain, and then download aggregated global weights for subsequent training rounds.

Experimental Validation and Model Architectures

The framework was validated across three real-world energy scenarios using advanced model architectures:

  1. Photovoltaic Power Generation (PVPG): Utilizing a Transformer architecture to forecast hourly load data from 18 solar plants in Ningbo, China.
  2. Gas Well Production: Implementing Gated Recurrent Units (GRU) for daily production data from 24 gas wells in Western China.
  3. Geophysical Well Logs: Using GRU models to regress shear wave transit time (DTSM) based on 36 logging curves from Dakota, USA.

Results and Discussion

The experimental results demonstrate that Swarm Learning consistently outperforms local training. In the PVPG forecasting task, the SL scheme achieved superior performance in 100% of cases for external datasets. Statistical analysis via the Mann-Whitney U test confirmed that SL results are significantly better than local training across all three energy domains.

Furthermore, the study highlights a critical security-efficiency trade-off. While the blockchain introduces communication overhead—making training approximately an order of magnitude slower than standard FL—it provides unique resilience. Qualitative analysis shows that SL is the only method capable of simultaneously handling malicious server breakdowns, incorrect parameter integration, and parameter leakage.

Conclusion

This research presents a robust solution for collaborative machine learning in the energy sector. By merging Swarm Learning with blockchain, the framework achieves high-performance modeling while ensuring data privacy and system resilience. Future work will focus on addressing communication latency through off-chain storage solutions and exploring non-IID data scenarios where data quality varies significantly between organizations.

Summary updated

Abstract

Machine learning models offer the capability to forecast future energy production or consumption and infer essential unknown variables from existing data. However, legal and policy constraints within specific energy sectors render the data sensitive, presenting technical hurdles in utilizing data from diverse sources. Therefore, we propose adopting a Swarm Learning (SL) scheme, which replaces the centralized server with a blockchain-based distributed network to address the security and privacy issues inherent in Federated Learning (FL)'s centralized architecture. Within this distributed Collaborative Learning framework, each participating organization governs nodes for inter-organizational communication. Devices from various organizations utilize smart contracts for parameter uploading and retrieval. Consensus mechanism ensures distributed consistency throughout the learning process, guarantees the transparent trustworthiness and immutability of parameters on-chain. The efficacy of the proposed framework is substantiated across three real-world energy series modeling scenarios with superior performance compared to Local Learning approaches, simultaneously emphasizing enhanced data security and privacy over Centralized Learning and FL method. Notably, as the number of data volume and the count of local epochs increases within a threshold, there is an improvement in model performance accompanied by a reduction in the variance of performance errors. Consequently, this leads to an increased stability and reliability in the outcomes produced by the model.
BibTeX
@misc{xu2024when,
  author = {Lei Xu and Yulong Chen and Yuntian Chen and Longfeng Nie and Xuetao Wei and Liang Xue and Dongxiao Zhang},
  title = {{When Swarm Learning meets energy series data: A decentralized collaborative learning design based on blockchain}},
  year = {2024},
  eprint = {2406.04743},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.04743},
}
Figure