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.
Recent legislations, such as the European General Data Protection Regulation (GDPR), require user data holders to guarantee the individual’s right to be forgotten. This means that user data holders must completely delete user data upon request. However, in the field of machine learning, it is not possible to simply remove these data from the back-end database wherein the training dataset is stored, because the machine learning model still retains this data information. Retraining the model using a dataset with these data removed can overcome this problem; however, this can lead to expensive computational overheads. In order to remedy this shortcoming, we propose two effective methods to help model owners or data holders remove private data from a trained model. The first method uses an elastic weight consolidation (EWC) constraint term and a modified loss function to neutralize the data to be removed. The second method approximates the posterior distribution of the model as a Gaussian distribution, and the model after unlearning is computed by decreasingly matching the moment (DMM) of the posterior distribution of the neural network trained on all data and the data to be removed. Finally, we conducted experiments on three standard datasets using backdoor attacks as the evaluation metric. The results show that both methods are effective in removing backdoor triggers in deep learning models. Specifically, EWC can reduce the success rate of backdoor attacks to 0. IMM can ensure that the model prediction accuracy is higher than 80% and keep the success rate of backdoor attacks below 10%.