A method for detecting anomalies in risky goods based on a graph neural network pre-trained model
By constructing a complex network topology graph and abnormal node propagation model of an e-commerce platform, and combining the pre-training and fine-tuning of a deep graph neural network, the overfitting problem of risky product detection on the e-commerce platform is solved, improving detection capability and anti-interference ability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-04
- Publication Date
- 2026-03-13
AI Technical Summary
Existing technologies are prone to overfitting when detecting risky products on e-commerce platforms, and fail to effectively utilize the correlation information between product nodes and other types of nodes, resulting in insufficient detection capabilities.
We employ a graph neural network pre-training method, constructing a complex network topology graph between goods and users, using anomalous node propagation for data augmentation, and building a deep graph neural network model for unsupervised pre-training and supervised fine-tuning. Combined with a self-supervised learning strategy, we fully learn the features of graph data.
It effectively reduces overfitting, improves the model's ability to detect risky goods, and enhances its resistance to interference and detection accuracy.
Smart Images

Figure CN115759182B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of graph deep learning, and in particular relates to a supervised anomaly node detection method based on pre-training. Background Technology
[0002] On e-commerce platforms, products are one of the most important elements. Risk product detection aims to identify counterfeit and prohibited goods on the platform, playing a crucial role in maintaining the health of platform content and protecting consumer rights.
[0003] Like other risk control fields, risk product detection faces the challenge of countering and evolving risks, such as the deliberate concealment of risky content in products. Utilizing the various graph relationship data widely available on platforms can provide more evidence and increase the attack costs for black market and gray market actors. Therefore, we are holding a large-scale e-commerce graph risk product detection challenge. Challengers need to use large-scale, heterogeneous graph data from real-world scenarios, containing noise and missing data, as well as highly imbalanced samples, to detect risky products.
[0004] E-commerce data of this type often has characteristics such as high noise in node attribute information and complex graph network structure. Traditional methods only consider training product node data with given labels. Such methods are prone to serious overfitting and do not take into account the influence of other types of nodes related to product nodes. Therefore, we propose an e-commerce risk product anomaly detection method based on graph neural network pre-training. In this method, abnormal information is propagated through abnormal product nodes, expanding the information of other types of nodes associated with product nodes. Finally, pre-training allows the graph network model to fully learn the feature space of graph data, which greatly reduces overfitting and improves the model's ability to detect abnormal product information. Summary of the Invention
[0005] The present invention aims to overcome the above-mentioned shortcomings of the prior art and provide an e-commerce risky product anomaly detection method based on graph neural network pre-training.
[0006] The objective of this invention is achieved through the following technical solution:
[0007] An anomaly detection method for risky products in e-commerce based on graph neural network pre-training includes:
[0008] S110: Acquire e-commerce data and construct a complex network topology diagram between products and users;
[0009] S120: Obtain new abnormal and normal nodes through the abnormal node propagation method for data augmentation;
[0010] S130: Build deep graph neural network models that support unsupervised pre-training data and downstream supervised training fine-tuning;
[0011] S140: Perform unsupervised pre-training on the graph neural network model;
[0012] S150: The pre-trained model is fine-tuned downstream for supervised training;
[0013] S160: Infer the product node to be tested from the downstream trained model;
[0014] Furthermore, in step S110, e-commerce data is acquired, and a complex network topology diagram between products and users is constructed, specifically including:
[0015] S1101: Input e-commerce node attribute data and connection relationship data between nodes;
[0016] S1102: Obtain the attribute data H of all nodes in the e-commerce graph network data, the connection information between nodes, that is, the edge information edge_index, and the edge category information ege_type, and construct the complete graph network data G = (H, edge_index, ege_type).
[0017] Furthermore, in step S120, new abnormal and normal nodes are obtained through the abnormal node propagation method for data augmentation, specifically including:
[0018] S1201: Retrieve the set of product nodes with the label "abnormal" among the product nodes with given label information. item-anomaly ;
[0019] S1202: Retrieve the set of neighboring nodes of other types that are one hop away from the item node. a and node b ;
[0020] S1203: via node item-anomaly Propagate abnormal nodes if a and b and node item-anomaly If the item nodes in the set are connected, then a and b are considered abnormal; otherwise, they are considered normal. Therefore, obtain the set of abnormal and normal nodes related to a and b. a-anomaly node a-normal node b-anomaly node b-normal Construct a labeled training dataset of type a nodes. a and node b .
[0021] node a =nodea-anomaly +node a-normal (1)
[0022] node b =node b-anomaly +node b-normal (2)
[0023] Furthermore, in step S130, a deep graph neural network model is built to support unsupervised pre-training data and downstream supervised training fine-tuning, specifically including:
[0024] S1301: Using RGCNConv as the base graph convolutional model, we perform depth stacking, stacking 5 layers to obtain a large-depth model. To avoid problems such as gradient explosion or vanishing due to excessive model depth, we normalize the node representations using LayerNormalization after performing convolution calculations on RGCNConv in each layer. At the same time, to avoid overfitting, the node representations are activated by ReLU after normalization and then randomly deactivated by a certain proportion through Dropout layers.
[0025] H l =RGCNConv(H l-1 , edge_index, edge_type) (3)
[0026] H l =LayerNorm(H l (4)
[0027] H l =Dropout(ReLU(H l (5)
[0028] S1302: In the unsupervised pre-training and supervised fine-tuning parts, two output ports are designed to perform two tasks respectively. The unsupervised pre-training method uses the simplest node feature attribute loss reconstruction for calculation. The supervised fine-tuning part needs to map the node feature dimension to a 2-class classification to determine whether the node is normal or abnormal. Therefore, the MLP is obtained. 0 The node feature representation H of the last layer output 4 Mapping to and original feature H 0 Reconstruct node features using the same dimension;
[0029] Z = MLP 0 (H 4 (6)
[0030] Loss rec =(ZH 0 ) 2 (7)
[0031] S1303: Utilize MLP to transform the output node representation dimensions. 1 Mapping to 2, supervised training is performed for binary classification of abnormal and normal cases, and the loss function adopts the cross-entropy loss function for multi-class classification.
[0032] preds=MLP 1 (Z) (8)
[0033] Loss preds =-∑ i P(i)logQ(i) (9)
[0035] Further, in step S140, the graph neural network model is pre-trained in an unsupervised manner, specifically including:
[0036] S1401: Set the training epoch to approximately 500 and prepare the product node set. item Other types of nodes that are directly connected to the product node a and node b ;
[0037] S1402: Import the nodes into the model for training, ensuring that the item node is trained last. The training process is as follows:
[0038] model=PreTraining(model, node a (10)
[0039] model=PreTraining(model, node b (11)
[0040] model=PreTraining(model, node item (12)
[0041] Furthermore, in step S150, the pre-trained model undergoes downstream fine-tuning for supervised training, specifically including:
[0042] S1501: Node item 20% of the data is allocated as the validation set nodes based on label distribution. item-val The remaining 80% are training set nodes. item-train ;
[0043] S1502: Move node item-train node a and node b We then incorporated the results into the downstream training for fine-tuning. The training process is as follows:
[0044] model=FinetuneTraining(model, node a (13)
[0045] model=FinetuneTraining(model, node b (14)
[0046] model=FinetuneTraining(model, node item-train (15)
[0047] Recording at the Kth epoch, at node item-val Once the optimal score is achieved, subsequent epochs will be at node item-val If the score suddenly starts to drop, stop training.
[0048] S1503: Move node item-train node a and node b The entire model is then trained and fine-tuned downstream, and then trained for K+1 epochs before being saved.
[0049] Further, in step S160, the downstream trained model is used to infer the product node to be tested, specifically including:
[0050] S1601: Load the product node dataset to be tested and construct the corresponding graph data node set. item-test ;
[0051] S1602: Load the model saved after the downstream has been fully trained for K+1 epochs;
[0052] S1603: Model to node item-test Perform inference and output the anomaly score for each node.
[0053] The beneficial effects of this invention are as follows: The method for detecting anomalies in e-commerce risky products based on graph neural network pre-training provided by this invention involves acquiring e-commerce data to construct a complex heterogeneous graph network between products and users; acquiring new abnormal and normal nodes for data augmentation through anomaly node propagation; building a deep graph neural network model that supports unsupervised pre-training data and downstream supervised training fine-tuning; performing unsupervised pre-training on the graph neural network model; performing downstream fine-tuning on the pre-trained model for supervised training; and using the downstream trained model to infer the nodes of the products to be tested. This invention utilizes a self-supervised learning strategy, allowing the model to fully learn the node feature information of large-scale graph data, avoiding noise interference, and improving the model's resistance to interference. Simultaneously, the data augmentation using anomaly node propagation enriches the information content of the data and improves the model's ability to detect risky products. Attached Figure Description
[0054] Figure 1 This is a flowchart of the e-commerce risky product anomaly detection method based on graph neural network pre-training according to the present invention. Detailed Implementation
[0055] The present invention will be further described below with reference to the accompanying drawings and embodiments. These drawings are simplified schematic diagrams, illustrating only the basic structure of the present invention, and therefore only show the components relevant to the present invention.
[0056] like Figure 1 As shown, this invention discloses a community detection method based on contrastive learning. It includes the following steps:
[0057] S110: Acquire e-commerce data and construct a complex network topology diagram between products and users, including:
[0058] S1101: Input e-commerce node attribute data and connection relationship data between nodes;
[0059] S1102: Obtain the attribute data H of all nodes in the e-commerce graph network data, the connection information between nodes, that is, the edge information edge_index, and the edge category information ege_type, and construct the complete graph network data G = (H, edge_index, ege_type).
[0060] S120: Obtain new abnormal and normal nodes through the abnormal node propagation method for data augmentation.
[0061] include:
[0062] S1201: Retrieve the set of product nodes with the label "abnormal" among the product nodes with given label information. item-anomaly ;
[0063] S1202: Retrieve the set of neighboring nodes of other types that are one hop away from the item node. a and node b ;
[0064] S1203: via node item-anomaly Propagate abnormal nodes if a and b and node item-anomaly If the item nodes in the set are connected, then a and b are considered abnormal; otherwise, they are considered normal. Therefore, obtain the set of abnormal and normal nodes related to a and b. a-anomaly node a-normal node b-anomaly node b-normal Construct a labeled training dataset of type a nodes. a and node b .
[0065] node a =node a-anomaly +node a-normal (1)
[0066] node b =node b-anomaly +node b-normal (2)
[0067] S130: Build a deep graphical neural network model that supports unsupervised pre-training data and downstream supervised training fine-tuning. Includes:
[0068] S1301: Using RGCNConv as the base graph convolutional model, we perform depth stacking, stacking 5 layers to obtain a large-depth model. To avoid problems such as gradient explosion or vanishing due to excessive model depth, we normalize the node representations using LayerNormalization after performing convolution calculations on RGCNConv in each layer. At the same time, to avoid overfitting, the node representations are activated by ReLU after normalization and then randomly deactivated by a certain proportion through Dropout layers.
[0069] H l =RGCNConv(H l-1 , edge_index, edge_type) (3)
[0070] H l =LayerNorm(H l (4)
[0071] H l =Dropout(ReLU(H l (5)
[0072] S1302: In the unsupervised pre-training and supervised fine-tuning parts, two output ports are designed to perform two tasks respectively. The unsupervised pre-training method uses the simplest node feature attribute loss reconstruction for calculation. The supervised fine-tuning part needs to map the node feature dimension to a 2-class classification to determine whether the node is normal or abnormal. Therefore, the MLP is obtained. 0 The node feature representation H of the last layer output 4 Mapping to and original feature H 0 Reconstruct node features using the same dimension;
[0073] Z = MLP 0 (H 4 (6)
[0074] Loss rec =(ZH 0 ) 2 (7)
[0075] S1303: Utilize MLP to transform the output node representation dimensions. 1 Mapping to 2, supervised training is performed for binary classification of abnormal and normal cases, and the loss function adopts the cross-entropy loss function for multi-class classification.
[0076] preds=MLP 1 (Z) (8)
[0077] Loss preds =-∑ i P(i)logQ(i) (9)
[0078] S140: Unsupervised pre-training of the graph neural network model. This includes:
[0079] S1401: Set the training epoch to approximately 500 and prepare the product node set. item Other types of nodes that are directly connected to the product node a and node b ;
[0080] S1402: Import the nodes into the model for training, ensuring that the item node is trained last. The training process is as follows:
[0081] model=PreTraining(model, node a (10)
[0082] model=PreTraining(model, nodeb) (11)
[0083] model=PreTraining(model, node item (12)
[0084] S150: The pre-trained model undergoes downstream fine-tuning for supervised training. This includes:
[0085] S1501: Node item 20% of the data is allocated as the validation set nodes based on label distribution. item-val The remaining 80% are training set nodes. item-train ;
[0086] S1502: Move node item-train node a and node b We then incorporated the results into the downstream training for fine-tuning. The training process is as follows:
[0087] model=FinetuneTraining(model, node a (13)
[0088] model=FinetuneTraining(model, node b (14)
[0089] model=FinetuneTraining(model, node item-train (15)
[0090] Recording at the Kth epoch, at node item-val Once the optimal score is achieved, subsequent epochs will be at node item-val If the score suddenly starts to drop, stop training.
[0091] S1503: Move node item-train node a and node b The entire model is then trained and fine-tuned downstream, and then trained for K+1 epochs before being saved.
[0092] S160: Infers the product nodes to be tested from the downstream trained model. This includes:
[0093] S1601: Load the product node dataset to be tested and construct the corresponding graph data node set. item-test ;
[0094] S1602: Load the model saved after the downstream has been fully trained for K+1 epochs;
[0095] S1603: Model to node item-test Perform inference and output the anomaly score for each node.
[0096] In summary, this invention provides an anomaly detection method for risky goods in e-commerce based on graph neural network pre-training. It acquires e-commerce data to construct a complex heterogeneous graph network between goods and users; uses anomaly node propagation to acquire new anomaly and normal nodes for data augmentation; builds a deep graph neural network model supporting unsupervised pre-training data and downstream supervised training fine-tuning; performs unsupervised pre-training on the graph neural network model; performs downstream fine-tuning on the pre-trained model for supervised training; and uses the downstream trained model to infer the nodes of the goods to be tested. This invention utilizes a self-supervised learning strategy, allowing the model to fully learn the node feature information of large-scale graph data, avoiding noise interference and improving the model's robustness. Simultaneously, the data augmentation using anomaly node propagation enriches the data's information content and enhances the model's ability to detect risky goods.
[0097] Based on the above-described preferred embodiments of the present invention, and through the foregoing description, those skilled in the art can make various changes and modifications without departing from the inventive concept. The technical scope of this invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.
[0098] This invention is not limited to the embodiments described above. All other embodiments obtained by those skilled in the art without creative effort, using the same or similar methods as the embodiments described above, are within the protection scope of this invention.
Claims
1. A risk commodity anomaly detection method based on a graph neural network pre-training model, characterized in that, Comprise the following steps: S110: Obtain e-commerce data, build a complex network topology graph between commodities and users; S120: Obtain new abnormal nodes and normal nodes through an abnormal node propagation method for data enhancement; S130: Build a deep graph neural network model, support unsupervised pre-training data and downstream supervised training fine-tuning; Specifically comprising: S1301: Stack 5 layers based on RGCNConv as the basic graph convolution model to obtain a deep model; To avoid the problem of gradient explosion or disappearance caused by too deep model, the node representation is normalized after the convolution calculation of each layer RGCNConv, and to avoid overfitting, the normalized node representation is activated by ReLU and then randomly inactivated by Dropout layer with a certain proportion; H l = RGCNonv(H l-1 , edge_index, edge_type) (3) H l = Layernorm(H l ) (4) H l = Dropout(ReLU(H l )) (5) S1302: In the unsupervised pre-training and supervised fine-tuning part, two output ports are designed to perform two tasks respectively. The unsupervised pre-training method adopts the simplest node feature attribute loss reconstruction for calculation. The supervised fine-tuning part needs to map the node feature dimension to 2 classification to judge whether the node is normal or abnormal. Therefore, the MLP is obtained 0 The node feature representation H 4 output by the last layer is mapped to the same dimension as the original feature H 0 for node feature loss reconstruction. Z = MLP 0 (H 4 ) (6) Loss rec = (Z - H 0 ) 2 (7) S1303: The output node representation dimension is utilized by MLP 1 Mapping to 2, performing abnormal and normal binary classification supervised training, and using a multi-class cross-entropy loss function as the loss function; preds = MLP 1 (Z) (8) Loss preds = -∑ i P(i) log Q(i) (9) S140: Unsupervised pre-training of the graph neural network model; S150: Fine-tune the pre-trained model for supervised training; S160: Infer the commodity nodes to be tested by the downstream trained model.
2. The method of claim 1, wherein the method comprises: Step S110 includes: obtaining e-commerce data, building a complex network topology graph between commodities and users; Specifically comprising: S1101: Input e-commerce node attribute data and connection relationship data between nodes; S1102: Obtain attribute data H of all nodes of e-commerce graph network data, connection information between nodes, i.e. edge information edge_index, edge type information ege_type, and build complete graph network data G=(H, edge_index, ege_type).
3. The method of claim 1, wherein the method comprises: Step S120 includes: obtaining new abnormal nodes and normal nodes through an abnormal node propagation method for data enhancement, specifically comprising: S1201: Obtain a set of commodity nodes with abnormal labels in the commodity nodes with given label information node item-anomaly ; S1202: Obtain the one-hop other-type neighbor node set node of the commodity type node item a and node b ; S1203: Propagate abnormal nodes by node item-anomaly If a and b and node item-anomaly are connected in item nodes in the set, then a and b are considered abnormal, otherwise normal, then get the abnormal and normal node sets node a-anomaly , node a-normal , node b-anomaly , node b-normal , node a and node b ; node a = node a-anomaly + node a-normal (1) node b = node b-anomaly + node b-normal (2).
4. The method of claim 1, wherein the method comprises: Step S140 includes: unsupervised pre-training of the graph neural network model, specifically comprising: S1401: Set the epoch of training to 500, and prepare the commodity node set node item Other types of node set node directly connected with commodity node a And node b ; S1402: Import nodes into the model for training respectively, ensure that the item node is trained last, and the training process is as follows: model = PreTraining(model, node a ) (10) model = PreTraining(model, node b ) (11) model = PreTraining(model, node item ) (12).
5. The method of claim 1, wherein the method comprises: Step S150 includes: fine-tune the pre-trained model for supervised training, specifically comprising: S1501 : divide the node item 20% as the validation set node item-val , and the remaining 80% as the training set node item-train ; S1502: Bring node item-train , node a and node b into downstream training fine-tuning, and the training process is as follows: model = FinetuneTraining(model, node a ) (13) model = FinetuneTraining(model, node b ) (14) model = FinetuneTraining(model, node item-train ) (15) Record the score at the Kth epoch, at node item-val the optimal score is reached, and the score starts to drop suddenly at node item-val after the Kth epoch, then stop training; S1503: Bring node item-train , node a and node b together for full training in downstream training fine-tuning, directly train for K+1 epochs, and save the model.
6. The method of claim 1, wherein the method comprises: Step S160 includes: infer the commodity nodes to be tested by the downstream trained model, specifically comprising: S1601: Load the commodity node dataset to be tested, and build the corresponding graph data node set node item-test ; S1602: Load the model saved after K+1 epochs of full training downstream; S1603: The model performs inference on the node item-test and outputs an anomaly score for each node.
Citation Information
Patent Citations
Semi-supervised graph representation learning method based on fusion of transfer learning and deep learning and device thereof
CN112990295A
System and method for multi-modal graph-based personalization
US20180247224A1