| The emergence of recommendation systems has effectively solved problems such as information overload and decision-making difficulties on digital platforms.However,some illegal merchants,in order to seek their own illegal interests,have hired a large number of gray industry technical personnel to inject a large number of poisoning attacks into the recommendation system by taking advantage of the openness of the recommendation system.Compared with traditional attack methods,poisoning attacks mainly target the recommendation systems constructed based on deep learning models,which have stronger concealment and greater difficulty in detection.In order to detect these attacks,domestic and foreign researchers have conducted a lot of research.However,with the continuous updating of poisoning attack models,existing detection methods have problems such as weak feature generalization ability,weak robustness,and poor quality of generated candidate groups,making it difficult to efficiently distinguish subtle differences between real users and attack users.To address these issues,this article proposes two poisoning attack detection methods based on contrastive learning.Firstly,to address the issue of weak feature generalization ability and low robustness in existing detection methods,this paper proposes a poisoning attack detection method based on graph contrastive learning.This detection method calculates the overall suspiciousness of users by analyzing their historical rating behavior and builds a weighted suspicious user relationship graph based on this.Data augmentation is performed on the suspicious user relationship graph using two data augmentation methods based on edge suspiciousness and node feature dimension suspiciousness,resulting in generated graphs from two perspectives: topology and attributes.A GNN encoder with shared parameters is used to perform contrastive learning on the generated graphs from both perspectives,obtaining low-dimensional feature representations of user nodes.A multilayer perceptron classifier is then used to detect poisoning attack users.Secondly,in response to the problem of poor quality of candidate groups caused by the inability of existing detection methods to utilize candidate group-guided graph neural network model training,this paper proposes a poisoning attack detection method based on graph contrastive deep clustering.This detection method comprehensively analyzes recommended datasets and calculates user collaboration degree to construct a weighted user relationship graph.The Louvain community detection algorithm is used to obtain the initial partition number of candidate groups,and the graph contrastive learning model with clustering layers is used to align and optimize the low-dimensional feature representation and clustering information of users,thereby obtaining stronger low-dimensional feature representation of users and high-quality candidate poisoning groups.A mean pooling layer is used to obtain the group feature representation,and a multi-layer perceptron is combined to build a group classifier for detecting poisoning attack groups.Finally,experiments were conducted on the Amazon and Automotive datasets.The experimental results show that the proposed method outperforms the existing four detection methods in both poisoning attack models and traditional masquerade attack models. |