Federated learning optimization method based on user hierarchical clustering
Federated learning can generalize all local user data to achieve the purpose of protecting user data privacy by training a global model by distributed machine learning.Due to differences in user behaviors and environments,data heterogeneity is caused,and the performance of user local models is often much higher than that of global models.In response to the above problems,this paper proposes a federated learning method based on user hierarchical clustering.This paper designs a federated learning convergence evaluation method to determine the degree of convergence of the global model;when the global model converges,clustering user operations can more accurately find users with a higher degree of similarity;through the cosine similarity level hierarchical clustering,the clustering method aggregates similar users through clustering operations,thereby reducing the impact of data heterogeneity.In addition,this paper also uses a larger depth model WideResNet to improve the accuracy of the user's local training.This paper uses the data sets EMNIST and CIFAR10 to adjust the angle between user data,and conducts cluster federated learning experiments for two types of users and three types of users respectively.The experimental results show that compared with the traditional federated learning algorithm FedAvg,the training accuracy of federated learning after clustering is improved by about 10%.