User abnormal review detection method based on spectral domain graph neural network

By constructing KNN and KFN graphs using spectral domain graph neural networks and combining attention mechanisms and loss functions, the problem of detecting mixed abnormal behavior patterns in user comment graph data was solved, achieving efficient abnormal comment recognition.

CN118709064BActive Publication Date: 2025-12-09NANKAI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410768521.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2023-10-18
Filing Date
2024-06-14
Publication Date
2025-12-09
Estimated Expiration
2044-06-14

AI Technical Summary

Technical Problem

Existing graph neural network methods struggle to effectively identify mixed abnormal behavior patterns in user comment graph data, resulting in poor performance in abnormal comment detection.

Method used

We employ a spectral domain graph neural network, constructing KNN and KFN graphs, combining an attention mechanism and a loss function to adaptively learn the vector representation of vertices, and using the aggregated features to identify abnormal comments.

Benefits of technology

In user comment graph data, it can adaptively identify a variety of abnormal behavior patterns, significantly improving anomaly detection capabilities and outperforming existing methods. Especially in cases of label imbalance and fake comments, it has broad applicability and high accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118709064B_ABST
    Figure CN118709064B_ABST
Patent Text Reader

Abstract

The application discloses a user abnormal comment detection method based on a spectral domain graph neural network. First, a fixed point, a vertex feature matrix X and an edge are defined according to a user comment network, and then user comment graph data is established; then, for each vertex, k neighbors with the most similar features and k neighbors with the least similar features are found respectively, and a KNN graph and a KFN graph are constructed respectively; then, a spectral domain graph neural network is used to learn the vector representation of the vertex in the three graphs; then, the three vertex vector representations are aggregated using an attention mechanism, and the aggregated features are used to identify abnormal comments; then, a loss function is used to train the model, and when the accuracy of the predicted category in an iteration is improved on the validation set, the latest vertex vector representation is used to update the KNN graph and the KFN graph until the model converges. The application is not limited by the type of abnormality, has universality, can adaptively identify abnormal vertices, and greatly improves the abnormal detection capability.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of graph data processing under big data, and particularly relates to a user abnormal comment detection method based on a spectral domain graph neural network. BACKGROUND

[0002] With the advent of the big data era, both storage and computing capabilities have been greatly developed. With the development of technology, frequent interaction information of objects has become an important factor to be considered in anomaly detection. A graph is a powerful data structure that not only carries the attributes of objects but also considers the complex interaction relationship between data. Under this background, graph-based anomaly detection is increasingly attracting attention, and it can be widely applied to various application scenarios, such as network security, fraud detection, health monitoring, social network spam detection, and abnormal comment detection in user comment graph data.

[0003] Due to the great success of graph neural networks (GNN) in graph representation and its wide application in graph-related tasks (especially in classification tasks), many GNN-based methods have also been widely applied to graph vertex anomaly detection tasks, because it can be regarded as a binary classification problem. GNN-based anomaly detection mainly utilizes the ability of GNN to aggregate neighbor information to distinguish whether a vertex is abnormal or normal, which highly depends on the homophily of the network, i.e., vertices with consistent classes tend to be connected to each other. However, many abnormal vertices tend to disguise as normal vertices (i.e., intentionally imitate normal vertices in their structure and features), which makes abnormal vertex detection more difficult.

[0004] In the user comment graph data, the comments of users in the platform are modeled as vertices, and the relationship between different comments is modeled as edges. Abnormal comments (i.e., abnormal vertices) mainly refer to fake comments and spam comments, and generally exist in the following three behavior patterns: 1. Structural anomaly, i.e., spam comments are associated with each other internally, or exist in isolation without joining any community; 2. Structural disguise, i.e., spam comments intentionally establish edge association between normal comments in order to avoid being identified; 3. Feature disguise, i.e., spam comments intentionally imitate normal vertices in content in order to avoid being detected.

[0005] There are different solutions for the behavior patterns of abnormal reviews in graph data. Traditional GNN methods have been widely used in structural anomaly detection. For structural camouflage, recent research has proposed methods to solve them in the spectral domain, because abnormal reviews with structural camouflage correspond to the high-frequency part of the spectral domain, and these abnormal reviews can be identified by a high-frequency filter. For feature camouflage, some researches choose resampling strategies to selectively aggregate neighborhood information, where vertices and edges are selected using a specific balanced sampler to receive information from neighbors with the same label. However, in user review graph data, abnormal reviews usually appear in a mixed behavior pattern of the above three types, and existing anomaly detection methods are only effective for a specific type of behavior pattern. Therefore, it has important research significance and application value to design a general abnormal review detection method based on graph neural network which is not limited by the type of abnormal review behavior pattern, can automatically identify different abnormal behavior patterns and appropriately combine them. SUMMARY

[0006] In view of the deficiencies of the prior art, the technical problem to be solved by the present application is to provide a user abnormal review detection method based on spectral domain graph neural network, which is based on spectral domain graph neural network technology and is suitable for the application scenario of user review network.

[0007] The technical solution of the present application to solve the technical problem is to provide a user abnormal review detection method based on spectral domain graph neural network, characterized in that the method comprises the following steps:

[0008] Step 1, pre-processing the input data: modeling the user's reviews as vertices; modeling the review content and the user's statistical information as feature vectors, and then obtaining the feature matrix X of the vertices; establishing the edges between the vertices corresponding to the reviews according to the interaction relationship between the reviews; the vertices, the feature matrix X and the edges constitute the user review graph data; then dividing all the vertices in the user review graph data into a training set, a validation set and a test set;

[0009] Step 2, using the feature matrix X of the vertices in step 1, finding the k most similar neighbors and the k most dissimilar neighbors for each vertex, respectively, and then constructing a KNN graph according to the k most similar neighbors and a KFN graph according to the k most dissimilar neighbors; the KNN graph represents the near neighbor graph; the KFN graph represents the far neighbor graph;

[0010] Step 3, learning the vector representation of the vertices by spectral domain graph neural network: using a modified band-pass filter in the user review graph data, a modified low-pass filter in the KNN graph and a modified high-pass filter in the KFN graph to learn the vector representation of the vertices in the three graphs of the user review graph data, the KNN graph and the KFN graph, respectively;

[0011] Step 4, the three vertex vector representations obtained in step 3 are aggregated using an attention mechanism to obtain an aggregated vertex vector representation Z;

[0012] Step 5, the real categories Y of all vertices in the training set are predicted using the aggregated vertex vector representation Z obtained in step 4 to identify abnormal vertices, and a loss function is used to perform an iteration on the model;

[0013] Then, it is judged whether the accuracy of the predicted categories on the validation set is improved: when there is no improvement, return to step 3; when there is improvement, return to step 2, and use the aggregated vertex vector Z obtained in step 4 in this iteration to recalculate the KNN graph and KFN graph in step 2;

[0014] Until the model converges, and then the categories of the vertices in the test set of the user review graph data obtained in step 1 are predicted.

[0015] Compared with the prior art, the beneficial effects of the present application are:

[0016] (1) The present application proposes an abnormal review detection algorithm that is not limited by abnormal review behavior patterns, which can adaptively identify abnormal reviews on user review graph data with multiple abnormal behavior patterns at the same time, greatly improving the abnormal detection capability. First, the feature matrix X of the fixed point and the vertex and the edge are defined according to the user review network, and then the user review graph data is established; then, using the feature matrix X, find the k most similar neighbors and the k most dissimilar neighbors for each vertex, respectively, and construct the KNN graph and the KFN graph; then learn the vector representation of the vertex in the three graphs through the spectral domain graph neural network; then aggregate the three vertex vector representations using an attention mechanism, and then use the aggregated features to identify abnormal reviews; then use a loss function to train the model, and when the accuracy of the predicted categories in the validation set is improved in a certain iteration, update the KNN graph and the KFN graph using the latest vertex vector representation until the model converges.

[0017] (2) The present application uses known part of the label (abnormal or not) of the comment (vertex) to predict whether the remaining comments are abnormal by training the model, which can solve the problem of abnormal comments disguising as normal comments in features and structures, and has universality for user review graph data widely existing in real data.

[0018] (3) In two real user review graph data sets, the application is significantly better than all existing methods in various indicators of abnormal review identification. Compared with the most advanced anomaly detection algorithm, the application is significantly better than other methods in both weakly supervised and semi-supervised scenarios. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 is a flowchart of the overall detection of the application;

[0020] Figure 2 is a schematic diagram of the behavior pattern of the abnormal review in the graph data of the application;

[0021] Figure 3 is a box plot of the visualization of three graphs by the attention mechanism of the application on the Yelp dataset;

[0022] Figure 4 is a box plot of the visualization of three graphs by the attention mechanism of the application on the Amazon dataset;

[0023] Figure 5 is a comparison line graph of the change of the AUC-ROC index of the application method and the BWGNN method under different training ratios on the Yelp dataset;

[0024] Figure 6 is a comparison line graph of the change of the AUC-PR index of the application method and the BWGNN method under different training ratios on the Yelp dataset;

[0025] Figure 7 is a comparison line graph of the change of the AUC-ROC index of the application method and the BWGNN method under different training ratios on the Amazon dataset;

[0026] Figure 8 is a comparison line graph of the change of the AUC-PR index of the application method and the BWGNN method under different training ratios on the Amazon dataset.

[0027] Figure 9 is the neighbor distribution of the abnormal review identified by the application method on the Yelp dataset. DETAILED DESCRIPTION

[0028] The specific embodiments of the application are given below. The specific embodiments are only used to further illustrate the application and do not limit the protection scope of the claims of the application.

[0029] The application provides a user abnormal review detection method based on spectral domain graph neural network (referred to as method), characterized in that the method comprises the following steps:

[0030] Step 1, preprocessing input data: modeling each review of a user as a vertex; modeling the review content and the statistical information of the user himself as a feature vector, thereby obtaining a feature matrix X of the vertex; establishing edges between vertices corresponding to reviews according to the interaction relationship between the reviews; the vertex, the feature matrix X and the edge constitute the user review graph data; then all vertices in the user review graph data are divided into a training set, a validation set and a test set;

[0031] Preferably, step 1 is specifically: modeling each review of a user as a vertex; using vector representation method to extract the review content and the statistical information of the user himself as a feature vector of a specified dimension as a vector carried by the vertex, thereby obtaining a feature matrix X of the vertex; establishing edges between vertices corresponding to reviews according to the interaction relationship between the reviews; the vertex, the feature matrix X and the edge constitute the user review graph data; then all vertices in the user review graph data are randomly divided into a training set, a validation set and a test set according to a proportion.

[0032] Preferably, in step 1, the review content includes pictures and texts; the interaction relationship between the reviews includes that the review times are close (in this embodiment, the time interval of the review times is within 1 month), the review contents are similar (the repetition degree is greater than or equal to 80%), the review scores are the same or the review objects are the same.

[0033] Step 2, using the feature matrix X of the vertex in step 1, obtaining the similarity between any two vertices; then according to the similarity, finding k nearest neighbors and k farthest neighbors of each vertex respectively, and then constructing a KNN graph (K Nearest Neighbor graph, a neighbor graph, which means finding K vertices with the most similar feature vectors for each vertex to establish edges as neighbors) according to the k nearest neighbors and constructing a KFN graph (K Farthermost Neighbor graph, a far neighbor graph, which means finding K vertices with the least similar feature vectors for each vertex to establish edges as neighbors) according to the k farthest neighbors.

[0034] Preferably, step 2 is specifically:

[0035] S2.1, using the feature matrix X of the vertex, calculating the Euclidean distance S between any two vertices i,j :

[0036]

[0037] In formula (1), S i,j represents the Euclidean distance between vertex i and vertex j; x i is the feature of vertex i; x j is the feature of vertex j; d represents the dimension of the feature, x i,d and x j,ddenotes the value of vertex i and vertex j in the dth dimension;

[0038] S2.2, according to the Euclidean distance S between any two vertices i,j , get the similarity between any two vertices, and then build KNN graph and KFN graph:

[0039] The Euclidean distance S between a vertex and the k vertices with the smallest i,j The k vertices with the smallest are the k most similar neighbors of the vertex; and the vertex and the k neighbors are constructed into a bidirectional graph, i.e., a KNN graph.

[0040] The Euclidean distance S between a vertex and the k vertices with the largest i,j The k vertices with the largest are the k most dissimilar neighbors of the vertex; and the vertex and the k neighbors are constructed into a bidirectional graph, i.e., a KFN graph.

[0041] Step 3, learning the vector representation of the vertex by using the spectral domain graph neural network: using the modified band-pass filter in the user review graph data, using the modified low-pass filter in the KNN graph, and using the modified high-pass filter in the KFN graph to learn the vector representation of the vertex in the user review graph data, the KNN graph and the KFN graph;

[0042] Preferably, in step 3, the modified band-pass filter is used in the user review graph data to learn the vector representation Z of the vertex in the user review graph data f , as shown in formula (2):

[0043] The modified band-pass filter refers to adding a layer of learnable parameters Φ k in the approximation process of the Laplacian matrix:

[0044]

[0045] In formula (2), Z f is the vector representation learned by the vertex from the user review graph data; W p,q is a classic band-pass filter, i.e., a Beta wavelet transform, W p,q is composed of a series of filters W k,C-k , C is a constant, k is 0, 1, 2, …, C; I is an identity matrix, D f is the degree matrix of the user review graph data, A f is the adjacency matrix of the user review graph data, Φ k is a learnable parameter, and X is the feature matrix of all vertices.

[0046] Preferably, in step 3, the modified low-pass filter is used in the KNN graph to learn the vector representation Z of the vertex in the KNN graph knnAs shown in formula (3):

[0047]

[0048] In formula (3), Z knn is the vector representation learned by the vertex from the KNN graph; C is a constant, k is 0, 1, 2, …, C; I is the unit matrix, D knn is the degree matrix of the KNN graph, A knn is the adjacency matrix of the KNN graph, and the learnable parameter Φ k will adapt the all-pass filter to a low-pass filter according to the needs of the vertex.

[0049] Preferably, in step 3, the corrected high-pass filter is used in the KFN graph to learn the vector representation Z kfn of the vertex in the KFN graph.

[0050]

[0051] In formula (4), Z kfn is the vector representation learned by the vertex from the KFN graph; C is a constant, k is 0, 1, 2, …, C; I is the unit matrix, D kfn is the degree matrix of the KFN graph, A kfn is the adjacency matrix of the KFN graph, and the learnable parameter Φ k will adapt the all-pass filter to a high-pass filter according to the needs of the vertex.

[0052] Step 4, aggregate the three vertex vector representations obtained in step 3 using an attention mechanism to obtain an aggregated vertex vector representation Z.

[0053] Preferably, in step 4, the aggregation using the attention mechanism includes personalized aggregation and same aggregation.

[0054] Preferably, in step 4, the personalized aggregation is that the vertex vector representations of the three graphs are aggregated into an aggregated vertex vector representation Z according to different attention weights, and the specific method is as follows: first, the attention weight value of vertex i in the user comment graph data is obtained Similarly, the attention weight value of vertex i in the KNN graph is obtained and the attention weight value of vertex i in the KFN graph is obtained Then, respectively, the softmax normalization is performed to obtain the attention coefficients of vertex i in the three graphs and Then, the vector representation of vertex i in the user comment graph data obtained in step 3 is the vector representation of vertex i in the KNN graph is and the vector representation of vertex i in the KFN graph is Weighted addition, get the vector representation Z of the aggregated vertex i i ; similarly, get the vector representation of each aggregated vertex; finally, concatenate the vector representation of each aggregated vertex to get the matrix Z of the aggregated vertex vector representation.

[0055] Preferably, in step 4, the attention weight value of vertex i in the user review graph data is obtained according to formula (5)

[0056]

[0057] In formula (5), is a shared attention vector; tanh is the hyperbolic tangent activation function; and represents the weight matrix; is the vector representation of vertex i in the user review graph data obtained in step 3; x i is the feature of vertex i;

[0058] Preferably, in step 4, the attention coefficient of vertex i in the user review graph data is obtained by performing softmax normalization As shown in formula (6):

[0059]

[0060] Preferably, in step 4, the personalized aggregation weighted addition is as shown in formula (7):

[0061]

[0062] Preferably, in step 4, the same aggregation is: when the attention weights of all vertices in a graph are the same, the attention weight of each vertex is no longer calculated, and only the attention weights of different graphs are distinguished. The specific method is as follows: first, get the attention coefficient α of the vertex in the graph j j ; Then, since the attention coefficients of the vertices in the same graph are the same, the attention coefficients of the vertices in the user review graph data, KNN graph and KFN graph are calculated respectively; then weighted addition, get the vector representation Z of the aggregated vertex.

[0063] Preferably, in step 4, the attention coefficient α of the vertex on the graph j is obtained according to formula (8) j :

[0064] α j = q T · tanh (W t Z j T +b t ) (8)

[0065] In formula (8), j represents different kinds of graphs, i.e., user review graph data, KNN graph and KFN graph; W t is a weight matrix; Z j represents the vector representation of the vertex obtained in step 3 in graph j; q T and b T are shared attention vectors;

[0066] Preferably, in step 4, the same aggregated weighted addition is shown as formula (9):

[0067] Z = å j a j Z j (9)

[0068] Step 5, using the aggregated vertex vector representation Z obtained in step 4, the true class Y of all vertices in the training set is predicted by a linear classifier to identify abnormal reviews, and a loss function is used to iterate the model once;

[0069] Then, it is judged whether the accuracy of the predicted class of the linear classifier on the validation set is improved: when the accuracy of the predicted class of the linear classifier on the validation set is not improved, return to step 3; when the accuracy of the predicted class of the linear classifier on the validation set is improved, return to step 2, and use the aggregated vertex vector Z obtained in step 4 in this iteration to recalculate the KNN graph and KFN graph in step 2;

[0070] Until the model converges (i.e., reaches a specified number of iterations or the loss function becomes minimum), then the class of the vertex in the test set (i.e., the vertex of unknown class) of the user review graph data obtained in step 1 is predicted by the linear classifier.

[0071] Preferably, in step 5, the true class Y of all vertices in the training set is predicted by a linear classifier to identify abnormal reviews; the linear classifier is shown as formula (10):

[0072]

[0073] In formula (10), is the predicted class of all vertices in the training set; Z is the aggregated vertex vector representation, which is a trainable linear matrix; W is a trainable weight matrix; b is a trainable weight.

[0074] Preferably, in step 5, the loss function uses a weighted cross-entropy loss function as shown in formula (11):

[0075]

[0076] In equation (11), γ is the proportion of abnormal comments; y i For the true class of vertex i in the training set, Let i be the predicted class of vertex i in the training set.

[0077] Preferably, in step 5, when predicting the category of a vertex, the linear classifier outputs 0 or 1 for each vertex to represent the category of the comment, where a vertex with a category of 1 is an abnormal comment.

[0078] The present invention also provides a computer device, including a memory and a processor. The memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the user abnormal comment detection method based on the spectral domain graph neural network.

[0079] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the user anomaly comment detection method based on a spectral domain graph neural network.

[0080] Example 1

[0081] In this embodiment, the effectiveness of the method of the present invention is first verified: abnormal reviews are detected on two widely used public user review graph datasets, Yelp and Amazon, respectively, that is, the label (normal or abnormal) of each review is predicted; Figure 2 Examples illustrate the abnormal comment behavior patterns in the user comment graph data in Example 1: 1. Abnormal comment A mimics normal comments in terms of features and structure; 2. Abnormal comment B models normal comments in terms of structure, but its features are inconsistent with surrounding comments; 3. Abnormal comment C is isolated and does not join any community.

[0082] The basic statistical attributes and anomaly statistics of the dataset used are shown in Table 1. In Table 1: γ f Indicating the degree of feature imitation in abnormal comments, γ s Indicating the degree of structural imitation in abnormal comments, γ c S represents the average percentage of vertices of the same category as the vertex among the neighbors of the abnormal comment, and S represents the smoothness of the user comment graph data.

[0083] Table 1

[0084] Dataset name Number of vertices Number of edges Proportion of anomalies f ]]> ​ gamma s ]] c ]]> ​ S Yelp 45954 8097302 14.50% 98.80% 75.80% 18.40% 7506.17 Amazon 11944 9557648 6.90% 68.70% 27.90% 7.20% 14134.28

[0085] As can be seen from Table 1, the anomalies of user comment graph data datasets in the real world vary greatly in different datasets. The method of this invention utilizes an adaptive aggregation method, which can perform well on various types of datasets.

[0086] Then, three commonly used evaluation indicators F1-Macro (macro average F1, the average of normal and abnormal review F1), AUC-ROC (Area under ROC curve, the area under the ROC curve) and AUC-PR (Area under PR curve, the area under the PR curve) are used, each group of experiments is repeated 10 times, the average value and standard deviation of the three indicators of the method of the application and other commonly used methods (namely GCN, GAT, GIN, GraphSAGE, PC-GNN, CAREGNN, GraphConsis, AMNET, BWGNN) on two data sets are calculated, as shown in Tables 2-3:

[0087] Table 2

[0088]

[0089] Table 3

[0090]

[0091] As can be seen from Tables 2-3, compared with the currently commonly used and better performing methods (namely GCN, GAT, GIN, GraphSAGE, PC-GNN, CAREGNN, GraphConsis, AMNET, BWGNN), the performance of the method of the application is improved to varying degrees under different experimental settings, with a maximum of 10%. The above comparison results fully demonstrate that the method of the application has achieved excellent results in the graph anomaly detection task.

[0092] Figure 3 and Figure 4 respectively show the evaluation results on the two real data sets of Yelp and Amazon. From Figure 3 and Figure 4 It can be seen that the average attention weight of the KFN graph is much higher than that of the other two graphs, which shows that the KFN graph first proposed by the application has very high attention weight and plays an important role in anomaly detection.

[0093] Figures 5-8 In the figure, the solid line represents the average value of five runs, and the shadow represents the standard deviation. From Figures 5-8 It can be seen that under any training ratio setting, the method of the application achieves better results than the most advanced method BWGNN in the art, and is superior to the BWGNN method in weak supervision (1% training) and semi-supervised (40% training).

[0094] Example 2

[0095] In this embodiment, the Yelp user review graph data set is taken as an example, and the rhombus represents the abnormal review, and the circle represents the normal review. The abnormal review 6012 is the abnormal review identified by the method of the present application, and the one-hop neighbors (i.e. directly connected) and two-hop neighbors (i.e. one neighbor apart) of the review are sampled to obtain the neighbor distribution of the abnormal review 6012 Figure 9 The color of the vertex (review) represents the degree of similarity of the features of the review and the abnormal review 6012, and the color of the edge represents the degree of structural similarity between the two adjacent vertices (reviews). It can be found that the abnormal review 6012 mimics the normal reviews 5918, 5958 and 5961 in terms of features, and mimics the normal reviews 5958, 5918, 5945 and 5965 in terms of structure. The method proposed in the present application can effectively identify the abnormal reviews with feature and structure camouflage behavior patterns in the user review graph data.

[0096] The unmentioned parts of the present application apply to the prior art.

Claims

1. A method for detecting user abnormal reviews based on spectral domain graph neural network, characterized in that, The method comprises the following steps: Step 1, preprocessing input data: modeling the user's comments as vertices; modeling the comment content and the statistical information of the user himself as a feature vector, thereby obtaining the feature matrix X of the vertex; establishing the edges between the vertices corresponding to the comments according to the interaction relationship between the comments; the vertex, the feature matrix X and the edge constitute the user comment graph data; then all the vertices in the user comment graph data are divided into a training set, a validation set and a test set; Step 2, using the feature matrix X of the vertex in step 1, find the k most similar neighbors and the k most dissimilar neighbors for each vertex respectively, and then construct a KNN graph according to the k most similar neighbors and a KFN graph according to the k most dissimilar neighbors; the KNN graph represents the near neighbor graph; the KFN graph represents the far neighbor graph; Step 3, learning the vector representation of the vertex through the spectral domain graph neural network: using the modified band-pass filter in the user comment graph data, using the modified low-pass filter in the KNN graph and using the modified high-pass filter in the KFN graph to learn the vector representation of the vertex in the three graphs of the user comment graph data, the KNN graph and the KFN graph; Step 4, using the attention mechanism to aggregate the three vertex vector representations obtained in step 3 to obtain the aggregated vertex vector representation Z; Step 5, using the aggregated vertex vector representation Z obtained in step 4 to predict the real category Y of all vertices in the training set to identify abnormal vertices, and then using a loss function to iterate the model once; Then judge whether the accuracy of the predicted category on the validation set is improved: when there is no improvement, return to step 3; when there is improvement, return to step 2, and use the aggregated vertex vector Z obtained in step 4 in this iteration to recalculate the KNN graph and the KFN graph in step 2; Until the model converges, then predict the category of the vertices in the test set of the user comment graph data obtained in step 1.

2. The user abnormal review detection method based on the spectral domain graph neural network according to claim 1, characterized in that, Step 1 is specifically: modeling each comment of the user as a vertex; using a vector representation method to extract the comment content and the statistical information of the user himself into a feature vector of a specified dimension as the vector carried by the vertex, thereby obtaining the feature matrix X of the vertex; establishing the edges between the vertices corresponding to the comments according to the interaction relationship between the comments; the vertex, the feature matrix X and the edge constitute the user comment graph data; then all the vertices in the user comment graph data are randomly divided into a training set, a validation set and a test set according to a proportion.

3. The user abnormal review detection method based on the spectral domain graph neural network according to claim 1, characterized in that, Step 2 is specifically: S2.1, using the feature matrix X of the vertices, compute the Euclidean distance S between any two vertices i,j : In formula (1), S i,j represents the Euclidean distance between vertex i and vertex j; x i is a feature of vertex i; x j is a feature of vertex j; d represents the dimension of the feature, x i,d and x j,d represent the value of vertex i and vertex j in the dth dimension; S2.2, According to the Euclidean distance between any two vertices S i,j , Get the similarity between any two vertices, and then build KNN graph and KFN graph: Euclidean distance S to a certain vertex i,j The smallest k vertices, the k most similar neighbors of the vertex; then the vertex and the k neighbors are constructed into a KNN graph Euclidean distance S with a vertex i,j The largest k vertices, the k neighbors of the vertex with the least similar features; and then the vertex and the k neighbors are constructed into a KFN graph.

4. The user abnormal review detection method based on the spectral domain graph neural network according to claim 1, characterized in that, In step 3, the corrected band-pass filter is used in the user review graph data to learn the vector representation Z of the vertex in the user review graph data f As shown in equation (2): The modified bandpass filter refers to adding a layer of learnable parameters Φ in the approximation process of the Laplacian matrix k : In formula (2), Z f is a vector representation learned by the apex from the user review graph data; W p,q is a Beta wavelet transform, W p,q is composed of a series of filters W k,C-k , C is a constant, and k is 0, 1, 2, …, C. I is the identity matrix, D f is the degree matrix of the user review graph data, A f is the adjacency matrix of the user review graph data, Φ k is a learnable parameter; using the corrected low-pass filter in the KNN graph to learn the vector representation Z of the vertex in the KNN graph knn as shown in equation (3): In formula (3), Z knn is a vector representation learned by the vertex from the KNN graph; C is a constant, and k is 0, 1, 2, …, C. I is the identity matrix, D knn is the degree matrix of the KNN graph, A knn is the adjacency matrix of the KNN graph, the learnable parameters Φ k will adapt the all-pass filter to a low-pass filter depending on the requirements of the vertex using the corrected high-pass filter in the KFN graph to learn the vector representation Z of the vertices in the KFN graph kfn as shown in equation (4): In formula (4), Z kfn is a vector representation learned from the KFN graph; C is a constant, k is 0, 1, 2, …, C; I is a unit matrix, D kfn is a degree matrix of the KFN graph, A kfn is an adjacency matrix of the KFN graph, and the learnable parameter Φ k will adapt the all-pass filter to a high-pass filter according to the needs of the vertex.

5. The method of claim 1, wherein the method further comprises: In step 4, the aggregation method using the attention mechanism includes personalized aggregation and same aggregation.

6. The user abnormal review detection method based on the spectral domain graph neural network according to claim 5, characterized in that, In step 4, the specific method for personalized aggregation is as follows: First, obtain the attention weight value of vertex i in the user comment graph data. Similarly, the attention weight value of vertex i in the KNN graph can be obtained. And the attention weight value of vertex i in the KFN graph Then, softmax normalization is performed on each of the three graphs to obtain the attention coefficients of vertex i in each graph. and Then, represent the vector of vertex i obtained in step 3 in the user comment graph data. Vector representation of vertex i in the KNN graph and the vector representation of vertex i in the KFN graph The weighted sum is used to obtain the vector representation z of vertex i after aggregation. i Similarly, we obtain the vector representation of each vertex after aggregation; finally, we concatenate the vector representations of each vertex after aggregation into a matrix to obtain the aggregated vertex vector representation Z.

7. The user abnormal review detection method based on the spectral domain graph neural network according to claim 6, characterized in that, In Step 4, the attention weight value of vertex i in the user review graph data is obtained according to formula (5) In formula (5), is a shared attention vector; tanh is the hyperbolic tangent activation function; and denotes a weight matrix; is the vector representation of vertex i in the user review graph data obtained in step 3; x i is a feature of vertex i; In step 4, softmax normalization is performed to obtain the attention coefficient of vertex i in the user review graph data As shown in equation (6): In step 4, the weighted addition of personalized aggregation is shown in formula (7): 8.The user abnormal review detection method based on spectral domain graph neural network according to claim 5, characterized in that, In step 4, the specific method of the same aggregation is as follows: first, the attention coefficient a of the vertex in figure j is obtained j ; then, since the attention coefficients of the vertices in the same graph are the same, the attention coefficients of the vertices in the user comment graph data, the KNN graph and the KFN graph are further calculated respectively; then, weighted addition is performed to obtain the aggregated vertex vector representation Z.

9. The user abnormal review detection method based on the spectral domain graph neural network according to claim 8, characterized in that, In step 4, the attention coefficient a of the vertex on the graph j is obtained according to formula (8) j : a j = q T tanh(W t Z j T +b t ) (8) In formula (8), j represents different kinds of graphs; W t is a weight matrix; Z j represents the vector representation of the vertex obtained in step 3 in graph j; q T and b T are shared attention vectors; In step 4, the weighted addition of same aggregation is shown in formula (9): Z = ∑ j α j Z j (9).

10. The method of claim 1, wherein the method further comprises: In step 5, the real category Y of all vertices in the training set is predicted by a linear classifier to identify abnormal vertices; the linear classifier is shown in formula (10): In formula (10), is the predicted class of all vertices in the training set; Z is the aggregated vertex vector representation, is a trainable linear matrix; W is a trainable weight matrix; b is a trainable weight; In step 5, the loss function employs a weighted cross-entropy loss function As shown in equation (11): In formula (11), γ is the proportion of abnormal vertices; y i is the real class of vertex i in the training set, is the predicted class of vertex i in the training set; In step 5, among the predicted categories of the vertices, the linear classifier outputs 0 or 1 for each vertex to represent the category of the point, wherein the vertex with a category of 1 is an abnormal vertex.

Citation Information

Patent Citations

  • Fraudulent user detection model construction method based on graph attention network

    CN112417099A

  • Online social network spam comment user detection method

    CN116304311A