| FL(Federated Learning),as an emerging machine learning approach,enables multiple participants to collaboratively train models without sharing their data,thus preserving data privacy.However,in traditional FL,participants need to upload their local model updates to a trusted central node for model aggregation,which may introduce issues such as single point of failure and high communication overhead.In contrast to traditional FL,DFL(Decentralized Federated Learning)eliminates the need for a centrally trusted node and instead distributes the model aggregation and update operations among the participants,reducing communication overhead and mitigating the risk of single point of failure.While DFL offers the aforementioned advantages,it still faces certain challenges encountered in centralized FL,particularly Non-I.I.D(Non-Independent and Identically Distributed)data and privacy security.Regarding data heterogeneity,variations arise due to differences in clients’ devices and diverse data collection methods or geographical origins of the datasets used by different clients.These heterogeneous data can significantly impact the performance of the trained models.In this study,we primarily focus on the heterogeneity of data distribution,indicating that the data collected by these clients are Non-I.I.D.In terms of privacy security,there is a risk of model data leakage since participants need to share model information.These issues severely limit the widespread adoption and application of DFL in real-world scenarios.To address these two problems,this paper proposes the DFedML and DFedMLblockchain algorithms aiming to tackle data heterogeneity and privacy security challenges in DFL The DFedML algorithm improves the computation of the loss function based on the mutual learning algorithm,aiming to enhance model performance in the presence of heterogeneous data.Experimental results regarding the DFedML algorithm demonstrate its significant effectiveness.However,the DFedML algorithm requires direct transmission of local models to neighboring nodes during training,which may lead to model data leakage.Therefore,the DFedML-blockchain algorithm is proposed as an extension of the DFedML method,utilizing blockchain technology to protect model privacy by uploading the model to the blockchain.Additionally,leveraging the characteristics of the blockchain,this paper incorporates a probability matrix W based on logits into the method to optimize the model selection process.Specifically,the optimal model is selected for mutual learning with the local model based on the cosine similarity of the matrices from different clients,thereby reducing the training time of the DFedML-blockchain model.Experimental results demonstrate that this algorithm preserves model privacy and reduces training time while only slightly compromising performance. |