Federal map neural network-based false comment detection model training method, detection method and equipment
Through federated graph neural network technology, the features of review nodes are aggregated and an attention mechanism is introduced. Combined with differential privacy technology, the problem of insufficient feature representation capabilities of the false review detection model is solved and the detection accuracy is improved.
Patent Information
- Application Number
- CN202310367719.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-07
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2043-04-07
AI Technical Summary
Existing fake review detection models have limited feature representation capabilities and low detection accuracy.
A false review detection model training method based on federated graph neural network is used to aggregate the characteristics of neighbor users and product nodes of review nodes through GraphSage network and graph convolutional neural network, and an attention mechanism is introduced to fuse features in multiple homogeneous graphs, combined with differential privacy. Technical exchange and aggregation of model parameters.
It enhances the representation of comment features, improves the accuracy of false comment detection, enriches client data information, and improves the detection effect.
Smart Images

Figure CN118780347A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of false comment detection, and in particular to a false comment detection model training method, detection method and device based on a federated graph neural network. Background Art
[0002] Fake review detection is to determine the possibility of a review being true or false. At present, the commonly used fake review detection algorithms mainly include fake review detection algorithms based on language features and behavioral features, fake review detection algorithms based on representation learning, and fake review detection algorithms based on graph structures. Correspondingly, existing fake review detection technology solutions include BERT model, DeepWalk, FedGars, etc.
[0003] In the BERT model, in order to obtain word vectors and text features containing text context semantic information, the BERT model pre-trains a network model through a large number of unlabeled data sets, and implements bidirectional connections through the "bidirectional Transformer" method. However, since different data sets have different sparsity levels, the BERT model will be more time-consuming to pre-process the data before model training. At the same time, the fields involved in the data set, the expression of the text, and the focus of the comments will also have a great impact on the detection effect of the model.
[0004] The core idea of DeepWalk is to combine random walks with the Skip-Gram model to learn network node representations. After obtaining the node sequence through random walks, it is input into the Skip-Gram model in the Word2Vec algorithm, and optimized using random gradients and back propagation to finally obtain the vector representation of the nodes in the network, which is finally applied to the downstream false review detection task. However, DeepWalk's ability to process complex data relationships and balance heterogeneous information is limited.
[0005] FedGars first extracts content and behavior features for each reviewer, then constructs a graph using the relationship between fraudsters and ordinary users, and then aggregates the features of its neighbors for the review nodes in the graph through a two-layer graph convolutional neural network. After enhancing its own feature representation, these features are input into the neural network, trained into a classifier, and finally the review data is classified. However, the algorithm needs to use information about the graph structure and feature representation of nodes in the graph during model training, but the data information contained in most data sets is limited, which means that the model can only use a small amount of information in the process of constructing features for user nodes and product nodes. Summary of the invention
[0006] In view of this, the embodiments of the present invention provide a false review detection model training method, detection method and device based on a federated graph neural network to eliminate or improve one or more defects existing in the prior art and solve the problems of limited feature representation capability and low detection accuracy of the existing false review detection model.
[0007] On the one hand, the present invention provides a method for training a fake review detection model based on a federated graph neural network, characterized in that the method is executed on each client, each client includes an aligned user entity and a product entity, and includes the following steps:
[0008] Obtain a local data set, the local data set containing comments of multiple users on multiple products; label whether the comments of each user on the corresponding product in the local data set are false;
[0009] Obtain an initial neural network model; the initial neural network model is based on a graph neural network, including a GraphSage network and a graph convolutional neural network; input the local data set into the initial neural network model, extract features of user nodes, product nodes and comment nodes, and obtain first user features, first product features and first comment features; use differential privacy to exchange the extracted first user features and first product features with other clients to enhance feature representation and obtain second user features and second product features; use the GraphSage algorithm to aggregate the first comment feature with the second user features and second product features corresponding to its neighboring user nodes and neighboring product nodes to obtain aggregated comment features; construct a homogeneous graph of a preset number of comment nodes through a preset number of different meta-paths using the local data set; in each homogeneous graph, use the graph convolutional neural network to aggregate the features of the comment nodes to obtain a second comment feature; fuse the second comment features obtained by multiple homogeneous graphs based on the attention mechanism to obtain a fused comment feature; concatenate the aggregated comment feature with the fused comment feature to obtain a final feature vector; input the final feature vector of each comment into a preset classifier to obtain a prediction result for each comment;
[0010] In one round of training, the initial neural network model is trained using the local data set, a loss function between the label and the prediction result is constructed, and the parameters of the initial neural network model are iterated using the loss function to obtain an initial detection model;
[0011] The parameters of the initial detection model are uploaded to the central server using differential privacy to generate a shared model; the shared model is obtained by the central server based on the aggregation of parameters of the initial detection models of each client; the parameters of the shared model are received to update the initial detection model, and the next round of repeated training is performed until the initial detection model meets the preset requirements to obtain the final false comment detection model.
[0012] In some embodiments of the present invention, exchanging the extracted first user features and first product features with other clients in a differential privacy manner also includes:
[0013] The first data set and the second data set are defined as adjacent data sets. The first data set and the second data set should satisfy the following requirements:
[0014]
[0015] Wherein, X represents the first data set; X' represents the second data set; x represents a piece of data in the first data set X;
[0016] Define a random perturbation algorithm that satisfies differential privacy for the adjacent data sets, and its corresponding query function should satisfy:
[0017] PR[M(X)∈O]≤e' ε Pr[M(X')∈O]+δ;
[0018] Wherein, M(·) represents the random perturbation algorithm; Pr[·] represents the query function; X represents the first data set; X' represents the second data set; e ’ represents the base of the natural logarithm; ε represents the privacy budget; O represents the query result; δ represents the threshold;
[0019] Based on the above definition, the local gradient L2 norm with the threshold is clipped, and the Laplace differential privacy mechanism with average noise is applied to protect the privacy of the local data set. The calculation formula is:
[0020] g i =clip(g i ,δ)+Laplace(0,λ);
[0021] Among them, g i represents the first user feature and the first product feature that each client needs to exchange with each other; clip(·) represents the clipping function; δ represents the threshold; Laplace(·) represents Laplace; λ represents the noise intensity.
[0022] In some embodiments of the present invention, the first comment feature is aggregated with the second user feature and the second product feature corresponding to its neighbor user node and the neighbor product node using the GraphSage algorithm to obtain the aggregated comment feature, further comprising:
[0023] In the GraphSage network, the aggregated comment feature calculation formula obtained at each layer is:
[0024]
[0025] in, represents the aggregated comment features obtained at the lth layer; W represents the matrix to be trained; e represents the comment node; AGG(·) represents the aggregation function; represents the first comment feature at level l-1; Represents the second user feature of the neighbor user node at the l-1th layer; Indicates the second product feature of the neighboring product node at the l-1th layer.
[0026] In some embodiments of the present invention, the original heterogeneous graph of the local data set is constructed into a homogeneous graph of a preset number of comment nodes through a preset number of different meta-paths, and the meta-paths include at least two comments posted by the same user and both comments belong to the same product.
[0027] In some embodiments of the present invention, in each homogeneous graph, the graph convolutional neural network is used to aggregate the features of the comment nodes to obtain a second comment feature, and the calculation formula of the second comment feature is:
[0028]
[0029] in, represents the second comment feature obtained by the nth homogeneous graph in the l+1th layer of the graph convolutional neural network; σ(·) represents the activation function; A represents the adjacency matrix of the comment; and Used to normalize the adjacency matrix; W represents the second comment feature obtained by the nth homogeneous graph in the lth layer of the graph convolutional neural network; l Represents the weight matrix of the lth layer of the graph convolutional neural network.
[0030] In some embodiments of the present invention, a second comment feature is obtained by fusing multiple homogeneous graphs based on an attention mechanism to obtain a fused comment feature, wherein the attention weight calculation formula of the comment node under each meta-path is:
[0031]
[0032] Among them, αe,n represents the attention weight of comment node e under meta-path n; z n represents the attention vector under meta-path n; Represents the connection of the feature vector of comment node e under all meta-paths;
[0033] Based on the attention weight, the fused comment feature is calculated as follows:
[0034]
[0035] Where E represents the fused review feature; α e,n represents the attention weight of comment node e under meta-path n; Represents the feature vector of comment node e under meta-path n.
[0036] In some embodiments of the present invention, a loss function of the label and the prediction result is constructed, and the loss function calculation formula is:
[0037]
[0038] Wherein, L represents the loss function; k represents the number of reviews; Represents the label; y r,k Indicates the prediction result.
[0039] In some embodiments of the present invention, the central server uses a federated average algorithm to perform weighted average processing on the parameters uploaded by each client, and the calculation formula is:
[0040]
[0041] Among them, R t+1 represents the parameter of the t+1th iteration of the client; m represents the number of the clients; R t represents the parameter of the tth iteration of the client; w i represents the weight of client i.
[0042] On the other hand, the present invention provides a false review detection method based on a federated graph neural network, characterized in that the method is executed on a client and includes the following steps:
[0043] Acquire data to be detected; the data to be detected includes comments of at least one user on at least one product;
[0044] The data to be detected is input into a false comment detection model obtained by the false comment detection model training method based on a federated graph neural network as described in any of the above items to determine whether the corresponding comments in the data to be detected are false comments.
[0045] On the other hand, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the methods mentioned above.
[0046] The beneficial effects of the present invention are at least:
[0047] The present invention provides a false review detection model training method, detection method and device based on a federated graph neural network. The false review detection model is designed based on a graph neural network. The model first uses a GraphSage network to aggregate the features of user nodes and product nodes of the neighbors of the comment node to obtain aggregated comment features; then, multiple homogeneous graphs are constructed from the heterogeneous graph of the local data set by designing different meta-paths, and the features of each comment are aggregated by using a graph convolutional neural network in each homogeneous graph, and the attention mechanism is introduced to fuse the comment features aggregated in multiple homogeneous graphs to obtain fused comment features; finally, the effect of enhancing the comment feature representation and improving the detection accuracy is achieved. At the same time, the present invention designs a false review detection framework based on federated learning, which first exchanges the features of user nodes and product nodes in different dimensions of each client through differential privacy; then, each client locally trains an initial detection model, and uploads the model parameters to a central server for aggregation, and the aggregation results are returned to each client through differential privacy; finally, the effect of enriching the local data set information of each client and improving the detection accuracy based on federated training is achieved.
[0048] Additional advantages, purposes, and features of the present invention will be described in part in the following description, and will become apparent to those skilled in the art after studying the following, or may be learned from the practice of the present invention. The purposes and other advantages of the present invention may be achieved and obtained by the structures specifically indicated in the specification and the accompanying drawings.
[0049] Those skilled in the art will appreciate that the objectives and advantages that can be achieved with the present invention are not limited to the above specific description, and the above and other objectives that can be achieved by the present invention will be more clearly understood from the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of the present application, and do not constitute a limitation of the present invention. In the drawings:
[0051] Figure 1 This is a schematic diagram of the steps of a false review detection model training method based on a federated graph neural network in one embodiment of the present invention.
[0052] Figure 2This is a schematic diagram of the structural flow of a false review detection model training method based on a federated graph neural network in one embodiment of the present invention.
[0053] Figure 3 This is a schematic diagram of the steps of a false review detection method based on a federated graph neural network in one embodiment of the present invention. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0055] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.
[0056] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.
[0057] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.
[0058] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0059] It should be emphasized here that the step marks mentioned below are not intended to limit the order of the steps, but it should be understood that the steps can be executed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be executed simultaneously.
[0060] In order to solve the problems of limited feature representation capability and low detection accuracy of existing false review detection models, the present invention provides a false review detection model training method based on a federated graph neural network, which is executed on each client, and each client contains aligned user entities and product entities, such as Figure 1 As shown, the method includes the following steps S101 to S104:
[0061] Step S101: Obtain a local data set, which includes comments of multiple users on multiple products; and label whether the comments of each user on the corresponding product in the local data set are false.
[0062] Step S102: Obtain an initial neural network model, which is based on a graph neural network, including a GraphSage network and a graph convolutional neural network. Input the local data set into the initial neural network model, extract features of user nodes, product nodes and comment nodes, and obtain first user features, first product features and first comment features; exchange the extracted first user features and first product features with other clients in a differential privacy manner to enhance feature representation, and obtain second user features and second product features; use the GraphSage algorithm to aggregate the first comment feature with the second user features and second product features corresponding to its neighbor user nodes and neighbor product nodes to obtain aggregated comment features; construct a homogeneous graph of a preset number of comment nodes through a preset number of different meta-paths using the local data set; in each homogeneous graph, use a graph convolutional neural network to aggregate the features of the comment nodes to obtain a second comment feature; fuse the second comment features obtained by fusing multiple homogeneous graphs based on the attention mechanism to obtain a fused comment feature; concatenate the aggregated comment feature with the fused comment feature to obtain a final feature vector; input the final feature vector of each comment into a preset classifier to obtain the prediction result of each comment.
[0063] Step S103: In one round of training, the initial neural network model is trained using the local data set, a loss function between the label and the prediction result is constructed, and the parameters of the initial neural network model are iterated using the loss function to obtain an initial detection model.
[0064] Step S104: Upload the parameters of the initial detection model to the central server using differential privacy to generate a shared model; wherein the shared model is obtained by the central server based on the aggregation of the parameters of the initial detection models of each client; receive the parameters of the shared model to update the initial detection model, and perform the next round of repeated training until the initial detection model meets the preset requirements to obtain the final false comment detection model.
[0065] like Figure 2 As shown, this is the overall flow chart of the false review detection model training method based on the federated graph neural network.
[0066] In step S101, a data set for training the model of the present invention is first obtained. The data set is a graph structure data, and the graph contains three types of nodes: users, products, and comments. In the present invention, the data set is stored locally on each client, and is therefore recorded as a local data set. Each client contains aligned user entities and product entities, that is, it contains the same users and products, but has the features of the aligned user entities and product entities in different dimensions.
[0067] In some embodiments, the local data set uses the Amazon2014_Electronics data set, whose graph contains three types of nodes: users, products, and comments.
[0068] In some embodiments, the local data set is divided into a training set and a test set according to a preset ratio, wherein the training set is used to train the parameters of the initial neural network model, and the test set is used to test the performance of the trained detection model. Exemplarily, the preset ratio is 8:2.
[0069] In some embodiments, a label is provided to indicate whether the comments of each user on the corresponding product in the local data set are false. For example, false comments are labeled as 0 and true comments are labeled as 1.
[0070] In step S102, an initial neural network model is obtained and designed. The initial neural network model is based on a graph neural network (GNN), including a GraphSage network and a graph convolutional neural network (GCN).
[0071] The local data set is input into the initial neural network, and the features of the user node, product node and comment node are extracted to obtain the first user feature, the first product feature and the first comment feature. Among them, for the feature extraction of users and products, for example, features can be constructed for each user and product node in the local data set based on the length of the user name, the distribution of the ratings given by the user, the number of times the product is purchased, the distribution of the ratings of the product, etc., and it is assumed that each client has some of these features. For the feature extraction of comments, for example, features can be constructed for them based on the comment text, the number of times the comment is liked or disliked, etc., and the features are shared by the clients.
[0072] The first user features and the first product features extracted in different dimensions are exchanged with other clients in a differential privacy manner to enhance the feature representation and obtain the second user features and the second product features. Specifically:
[0073] First, we define adjacent data sets. For any two data sets X and X', if they satisfy formula (1):
[0074]
[0075] It is considered that the data sets X and X' are adjacent. For example, X is recorded as the first data set and X' is recorded as the second data set. Wherein, x represents a piece of data in the first data set X.
[0076] Secondly, differential privacy is defined. A random perturbation algorithm M acts on adjacent data sets X and X', which can make the query function Pr satisfy formula (2) within the range R:
[0077] Pr[M(X)∈O]≤e' ε Pr[M(X')∈O]+δ; (2)
[0078] It is considered that the random perturbation algorithm M satisfies (ε,δ) differential privacy for adjacent data sets X and X'.
[0079] Where M(·) represents the random perturbation algorithm; Pr[·] represents the query function; X represents the first data set; X' represents the second data set; e ’ represents the base of natural logarithm; ε represents the privacy budget; represents the query result; δ represents the threshold.
[0080] Since the algorithm outputs of adjacent data sets are similar, a smaller privacy budget ε can achieve better privacy protection and lower model overhead. Based on the above definition, the local gradient L2 norm with a threshold δ is clipped, and the Laplace differential privacy mechanism with average noise is applied to protect the privacy of the local data set. For example, the average noise is 0.1, and the corresponding calculation formula is shown in formula (3):
[0081] g i =clip(g i ,δ)+Laplace(0,λ); (3)
[0082] Among them, g i represents the first user feature and the first product feature that each client needs to exchange with each other; clip(·) represents the clipping function; δ represents the threshold; Laplace(·) represents Laplace; λ represents the noise intensity.
[0083] After differential privacy feature exchange, all clients enhance the original feature representations of the aligned user entity and product entity to obtain the second user feature and the second product feature.
[0084] The GraphSage algorithm is used to aggregate the first comment feature with the second user feature and the second product feature corresponding to its neighbor user node and the neighbor product node to obtain the aggregated comment feature. In each layer of the GraphSage network, the calculation formula for the aggregated comment feature is shown in formula (4) and formula (5):
[0085]
[0086] in,
[0087]
[0088] in, represents the aggregated comment features obtained at the lth layer; W represents the matrix to be trained; e represents the comment node; AGG(·) represents the aggregation function; represents the first comment feature at level l-1; Represents the second user feature of the neighbor user node at the l-1th layer; represents the second product feature of the neighbor product node at the t-1th layer; concat(·) represents the concatenation function.
[0089] The local data set is constructed into a homogeneous graph of a preset number of comment nodes through a preset number of different meta-paths. Different meta-paths represent the relationship between different comments. Exemplarily, the present invention designs two meta-paths: eue and eie, where e represents comment, u represents user, and i represents product. eue represents that two comments are posted by the same user, and eie represents that two comments belong to the same product. It is therefore considered that there is a relationship between the two comments, and an edge is established on the homogeneous graph. Two homogeneous graphs can be constructed through the above two meta-paths.
[0090] Based on the above definition, in each client, if n meta-paths are given, n homogeneous graphs can be constructed. In each homogeneous graph, the nodes are represented as comments, and the edges between the nodes indicate whether the two nodes can be connected under the definition of the meta-path.
[0091] In each homogeneous graph, the graph convolutional neural network is used to aggregate the features of the comment nodes to obtain the second comment feature. According to the basic idea of the graph convolutional neural network, the calculation formula of the second comment feature is shown in formula (6):
[0092]
[0093] in, represents the second comment feature obtained by the nth homogeneous graph in the l+1th layer of the graph convolutional neural network; σ(·) represents the activation function; A represents the adjacency matrix of the comment; and Used to normalize the adjacency matrix; W represents the second comment feature obtained by the nth homogeneous graph in the lth layer of the graph convolutional neural network; l Represents the weight matrix of the lth layer of the graph convolutional neural network.
[0094] Based on formula (6), the feature representation of comments in multiple homogeneous graphs is obtained, and then the second comment features obtained by fusing multiple homogeneous graphs based on the attention mechanism are integrated into a unified feature representation, that is, the fused comment feature is obtained.
[0095] First, the attention weight of the comment node in each meta-path is calculated as shown in formula (7):
[0096]
[0097] Among them, α e,n represents the attention weight of comment node e under meta-path n; z n represents the attention vector under meta-path n; Represents the connection of the feature vector of comment node e under all meta-paths.
[0098] Among them, α e,n The higher it is, the more information the meta-path n contains about the comment node e.
[0099] After obtaining the meta-path attention weight, the fused comment feature is calculated in a weighted manner, as shown in formula (8):
[0100]
[0101] Among them, E represents the fusion comment feature; α e,n represents the attention weight of comment node e under meta-path n; Represents the feature vector of comment node e under meta-path n.
[0102] The aggregated comment features are concatenated with the fused comment features to obtain the final feature vector. The final feature vector of each comment is input into the preset classifier to obtain the prediction result of each comment.
[0103] In step S103, in one round of training, the initial neural network model is trained using the local data set to construct a loss function between the label and the prediction result. The calculation formula of the loss function is shown in formula (9):
[0104]
[0105] Where L represents the loss function; k represents the number of reviews; Indicates label; y r,k Indicates the prediction result.
[0106] The loss function is used to derive the gradients of the model and features to obtain the initial detection model of each client.
[0107] In step S104, the parameters of the initial detection model trained by each client are uploaded to the central server, but considering that the client may leak data privacy when uploading, because the neural model may remember the input and reconstruct the input according to the corresponding output. The existing solution is to use homomorphic encryption technology to apply to the uploaded gradient to protect data privacy, but in the scenario of false comment detection, due to the huge amount of data, this method will bring huge storage and communication costs, so the present invention uses differential privacy technology to ensure the privacy security of data and solve the above problems.
[0108] The central server aggregates the model parameters uploaded by each client and uses the FedAvg algorithm to perform weighted average processing on the model parameters of each client. The calculation formula is shown in formula (10):
[0109]
[0110] Among them, R t+1 represents the parameter of the client's t+1th iteration; m represents the number of clients; R t Indicates the parameters of the client's tth iteration; w i represents the weight of client i.
[0111] Each client receives the parameters of the shared model returned by the central server to update the initial detection model and conduct the next round of repeated training until the initial detection model meets the preset requirements to obtain the final false review detection model.
[0112] Step S103 and step S104 are the training methods of federated learning. In the present invention, each client installs the initial neural network model locally, that is, each client trains the same model; each client trains the initial neural network model according to the local data set. Since the local data of each client are different, the trained model has different gradient parameters; each client uploads the parameters of the trained initial detection model to the central server at the same time. After the central server completes the aggregation and update of the gradient, it returns the updated parameters to each client, and each client updates and starts the next round of iteration. Repeat the above steps until the entire training process converges to obtain the false comment detection model of each client.
[0113] The present invention also provides a false review detection method based on a federated graph neural network, such as Figure 3 As shown, the method includes the following steps S201-S202:
[0114] Step S201: Acquire data to be detected, where the data to be detected includes comments of at least one user on at least one product.
[0115] Step S202: Input the data to be detected into the false comment detection model obtained by the false comment detection model training method based on the federated graph neural network as described above to determine whether the corresponding comments in the data to be detected are false comments.
[0116] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a false comment detection model training method based on a federated graph neural network and a false comment detection method based on a federated graph neural network.
[0117] Corresponding to the above method, the present invention also provides a device, which includes a computer device, the computer device includes a processor and a memory, the memory stores computer instructions, the processor is used to execute the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the device implements the steps of the method described above.
[0118] The embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the aforementioned edge computing server deployment method are implemented. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.
[0119] In summary, the present invention provides a false review detection model training method, detection method and device based on a federated graph neural network. The false review detection model is designed based on a graph neural network. The model first uses the GraphSage network to aggregate the features of user nodes and product nodes of the neighbors of the comment node to obtain the aggregated comment features; then, by designing different meta-paths, multiple homogeneous graphs are constructed from the heterogeneous graph of the local data set, and the graph convolutional neural network is used in each homogeneous graph to aggregate the features of each comment, and the attention mechanism is introduced to fuse the comment features aggregated in multiple homogeneous graphs to obtain the fused comment features; finally, the effect of enhancing the comment feature representation and improving the detection accuracy is achieved. At the same time, the present invention designs a false review detection framework based on federated learning, which first exchanges the features of user nodes and product nodes in different dimensions of each client through differential privacy; then, each client locally trains an initial detection model, and uploads the model parameters to the central server for aggregation, and the aggregation results are returned to each client through differential privacy; finally, the effect of enriching the local data set information of each client and improving the detection accuracy based on federated training is achieved.
[0120] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.
[0121] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0122] In the present invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.
[0123] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A false review detection model training method based on a federated graph neural network, characterized in that: The method is executed on each client, each client including an aligned user entity and a commodity entity, and includes the following steps: Obtain a local data set, the local data set containing comments of multiple users on multiple products; label whether the comments of each user on the corresponding product in the local data set are false; Obtain an initial neural network model; the initial neural network model is based on a graph neural network, including a GraphSage network and a graph convolutional neural network; input the local data set into the initial neural network model, extract features of user nodes, product nodes and comment nodes, and obtain first user features, first product features and first comment features; use differential privacy to exchange the extracted first user features and first product features with other clients to enhance feature representation and obtain second user features and second product features; use the GraphSage algorithm to aggregate the first comment feature with the second user features and second product features corresponding to its neighboring user nodes and neighboring product nodes to obtain aggregated comment features; construct a homogeneous graph of a preset number of comment nodes through a preset number of different meta-paths using the local data set; in each homogeneous graph, use the graph convolutional neural network to aggregate the features of the comment nodes to obtain a second comment feature; fuse the second comment features obtained by multiple homogeneous graphs based on the attention mechanism to obtain a fused comment feature; concatenate the aggregated comment feature with the fused comment feature to obtain a final feature vector; input the final feature vector of each comment into a preset classifier to obtain a prediction result for each comment; In one round of training, the initial neural network model is trained using the local data set, a loss function between the label and the prediction result is constructed, and the parameters of the initial neural network model are iterated using the loss function to obtain an initial detection model; The parameters of the initial detection model are uploaded to the central server using differential privacy to generate a shared model; the shared model is obtained by the central server based on the aggregation of parameters of the initial detection models of each client; the parameters of the shared model are received to update the initial detection model, and the next round of repeated training is performed until the initial detection model meets the preset requirements to obtain the final false comment detection model.
2. According to claim 1, the false review detection model training method based on the federated graph neural network is characterized in that: The first user feature and the first product feature extracted are exchanged with other clients in a differential privacy manner, and further include: The first data set and the second data set are defined as adjacent data sets. The first data set and the second data set should satisfy the following conditions: Wherein, X represents the first data set; X' represents the second data set; x represents a piece of data in the first data set X; A random perturbation algorithm is defined to satisfy differential privacy for the adjacent data sets, and its corresponding query function should satisfy: Pr[M(X)∈O]≤e' ε Pr[M(X')∈O]+δ; Wherein, M(·) represents the random perturbation algorithm; Pr[·] represents the query function; X represents the first data set; X' represents the second data set; e' represents the base of the natural logarithm; ε represents the privacy budget; O represents the query result; δ represents the threshold; Based on the above definition, the local gradient L2 norm with the threshold is clipped, and the Laplace differential privacy mechanism with average noise is applied to protect the privacy of the local data set. The calculation formula is: g i =clip(g i ,δ)+Laplace(0,λ); Among them, g i represents the first user feature and the first product feature that each client needs to exchange with each other; clip(·) represents the clipping function; δ represents the threshold; Laplace(·) represents Laplace; λ represents the noise intensity.
3. According to claim 1, the false review detection model training method based on federated graph neural network is characterized in that: The GraphSage algorithm is used to aggregate the first comment feature with the second user feature and the second product feature corresponding to the neighbor user node and the neighbor product node to obtain the aggregated comment feature, further comprising: In the GraphSage network, the aggregated comment feature calculation formula obtained at each layer is: in, represents the aggregated comment features obtained at the lth layer; W represents the matrix to be trained; e represents the comment node; AGG(·) represents the aggregation function; represents the first comment feature at level l-1; Represents the second user feature of the neighbor user node at the l-1th layer; Indicates the second product feature of the neighboring product node at the l-1th layer.
4. According to claim 1, the false review detection model training method based on the federated graph neural network is characterized in that: The original heterogeneous graph of the local data set is constructed into a homogeneous graph of a preset number of comment nodes through a preset number of different meta-paths, wherein the meta-paths at least include two comments posted by the same user and the two comments both belong to the same product.
5. According to claim 1, the false review detection model training method based on federated graph neural network is characterized in that: In each homogeneous graph, the graph convolutional neural network is used to aggregate the features of the comment nodes to obtain a second comment feature, and the calculation formula of the second comment feature is: in, represents the second comment feature of the nth homogeneous graph obtained in the l+1th layer of the graph convolutional neural network; σ(·) represents the activation function; A represents the adjacency matrix of the comment; and Used to normalize the adjacency matrix; W represents the second comment feature obtained by the nth homogeneous graph in the lth layer of the graph convolutional neural network; l Represents the weight matrix of the lth layer of the graph convolutional neural network.
6. According to claim 1, the false review detection model training method based on federated graph neural network is characterized in that: Based on the attention mechanism, multiple homogeneous graphs are fused to obtain the second comment feature, and the fused comment feature is obtained, wherein the attention weight calculation formula of the comment node under each meta-path is: Among them, α e,n represents the attention weight of comment node e under meta-path n; z n represents the attention vector under meta-path n; Represents the connection of the feature vector of comment node e under all meta-paths; Based on the attention weight, the fused comment feature is calculated as follows: Where E represents the fused review feature; α e,n represents the attention weight of comment node e under meta-path n; Represents the feature vector of comment node e under meta-path n.
7. According to claim 1, the false review detection model training method based on federated graph neural network is characterized in that: Construct a loss function of the label and the prediction result, and the loss function calculation formula is: Wherein, L represents the loss function; k represents the number of reviews; Represents the label; y r,k Indicates the prediction result.
8. The false review detection model training method based on federated graph neural network according to claim 1 is characterized in that: The central server uses the federated average algorithm to perform weighted average processing on the parameters uploaded by each client, and the calculation formula is: Among them, R t+1 represents the parameter of the t+1th iteration of the client; m represents the number of the clients; R t represents the parameters of the client's t-th iteration; w i represents the weight of client i.
9. A method for detecting fake reviews based on a federated graph neural network, characterized in that: The method is executed on the client side and includes the following steps: Acquire data to be detected; the data to be detected includes comments of at least one user on at least one product; The data to be detected is input into a false comment detection model obtained by the false comment detection model training method based on a federated graph neural network as described in any one of claims 1 to 8 to determine whether the corresponding comments in the data to be detected are false comments.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Fraudulent user detection model construction method based on graph attention network
CN112417099A
False comment detection model training method, detection method and device
CN112463966A
False user comment detection method and system
CN112732921A
User classification model training method and user detection method
CN115687758A
Computer-based systems configured for detecting, classifying, and visualizing events in large-scale, multivariate and multidimensional datasets and methods of use thereof
US20210034994A1
Cited By
Abnormal comment user detection method and system based on cross-domain graph
CN119167899A
False comment detection method based on federal learning
CN121146125A
A fake review detection method based on federated learning
CN121146125B
