| Federated learning is a type of distributed machine learning that has gradually become a model,which can effectively solve the problem of aggregating multiple participants’ models without leaving the local data.Federated learning can effectively detect malicious users among multiple participants,but it cannot be effectively applied in social networks due to its fatal flaw,which is an untrusted third-party server.When the third-party server itself is malicious,its level of harm increases sharply,which can disrupt the performance of the entire federated learning and cause significant data privacy and security issues.Therefore,this article uses decentralized federated learning(DFL),which is different from traditional federated learning,to apply anomaly detection algorithms in social networks.In social networks,there are not only no conventional third-party servers,but participants also do not trust uploading models.At the same time,there may be malicious individuals hidden among participants.Under various conditions,this anomaly detection based on decentralized federated learning in social networks is very necessary.This article has made the following innovative work in the decentralized federated learning anomaly detection algorithm based on social networks:(1)Implementation of social networks for decentralized federated learning.Because there is no third-party server in the social network to aggregate the model of each participant,this paper will implement serverless federated learning,namely DFL.In this paper,each participant in the entire social network is regarded as an independent "server".It only conducts federated learning for its own neighborhood participants.It should be noted that compared with traditional federated learning,participants will not be distributed again after receiving the model uploaded by the neighborhood for aggregation,that is,there is no return.(2)Solve the heterogeneity of data held by multiple participants in social networks.Because in social networks,it is impossible to guarantee that all participants belong to the same field,and it is impossible to avoid the situation that the data of both participants are too different.There are different distribution changes among multiple participants,which will greatly reduce the learning performance of the model.Specifically,this paper adopts the affine distribution transfer of participant data structure,and sets up the capture of heterogeneous data between participants in decentralized federated learning,and proposes the DFed SN method to reduce the loss of non-independent identically distributed data during training.The experimental results show that the method has excellent robustness even in the case of different data distribution,and can train and learn the model stably without losing efficiency.(3)Look for participants with abnormal behaviors in social networks.The socalled behavior anomaly refers to the dissemination and transmission of false content,etc.In this paper,the Fed ADSN algorithm is designed based on graph anomaly detection(GAD).If a participant has abnormal behavior,it will get too high abnormal value in the whole decentralized federated learning,thus kicking out the centralized federated learning.The experimental results show that Fed ADSN can accurately find participants with abnormal behaviors in different social networks.(4)The user type can be distinguished in detail by the long and short history gradient.In social networks,users are divided into three categories: malicious users,normal users and untrustworthy users,rather than simply malicious and normal users.The untrustworthy users themselves are good,because the effect of decentralized federated learning is not ideal due to lack of data or fuzzy data,so they may be divided into adversaries.This paper further subdivides the types of users,which can effectively use the unique data of untrusted users instead of discarding them.For detecting user types,this paper proposes DFed HG algorithm,which can accurately identify various types of users for decentralized federated learning.Finally,the performance of each algorithm is verified in the simulation experiment in this paper,and the results are good in terms of accuracy.The anomaly detection in social networks under the decentralized federated learning framework is realized. |