Secure and decentralized federated learning framework with non-IID data based on blockchain

Heliyon. 2024 Feb 29;10(5):e27176. doi: 10.1016/j.heliyon.2024.e27176. eCollection 2024 Mar 15.

Abstract

Federated learning enables the collaborative training of machine learning models across multiple organizations, eliminating the need for sharing sensitive data. Nevertheless, in practice, the data distributions among these organizations are often non-independent and identically distributed (non-IID), which poses significant challenges for traditional federated learning. To tackle this challenge, we present a hierarchical federated learning framework based on blockchain technology, which is designed to enhance the training of non-IID data., protect data privacy and security, and improve federated learning performance. The framework builds a global shared pool by constructing a blockchain system to reduce the non-IID degree of local data and improve model accuracy. In addition, we use smart contracts to distribute and collect models and design a main blockchain to store local models for federated aggregation, achieving decentralized federated learning. We train the MLP model on the MNIST dataset and the CNN model on the Fashion-MNIST and CIFAR-10 datasets to verify its feasibility and effectiveness. The experimental results show that the proposed strategy significantly improves the accuracy of decentralized federated learning on three tasks with non-IID data.

Keywords: Blockchain; Federated learning; Non-IID data; Privacy preservation; Smart contract.