Fraud detection method based on graph neural network

By using self-supervised learning and subgraph sampling methods, high-dimensional embedding representations are generated and model parameters are optimized, solving the problem of identifying fraudulent nodes in fraud detection using graph neural networks and improving detection accuracy and robustness.

CN119005247AInactive Publication Date: 2024-11-22CHONGQING JIAOTONG UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411107625.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-11-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing graph neural networks struggle to effectively identify fraudulent nodes in fraud detection, especially under class imbalance problems and fraudster spoofing behaviors, where they perform poorly and cannot accurately distinguish between normal and fraudulent nodes.

Method used

A self-supervised learning self-discrimination method is adopted to enhance node representation learning, generate high-dimensional embedding representations, and learn the differences between normal nodes and fraudulent nodes through subgraph sampling and node detection modules. The model parameters are optimized by combining multi-view feature fusion and accurate loss calculation.

Benefits of technology

It improves the accuracy and generalization ability of fraud detection, can efficiently process large-scale graph data, enhances the robustness and generalization performance of the model, and accurately identifies fraudulent nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119005247A_ABST
    Figure CN119005247A_ABST
Patent Text Reader

Abstract

The invention discloses a fraud detection method based on a graph neural network, and the method comprises the steps: inputting to-be-detected graph data into a trained fraud detection model, and outputting a prediction label of each node; the method comprises the following training steps: enhancing node representation learning through self-distinguishing to generate high-dimensional embedded representation; in the node detection module, performing sub-graph sampling on each node to obtain a corresponding sub-graph; generating a corresponding prediction label value for each sub-graph; calculating the predicted label value of the node through the predicted label values of all the sub-graphs containing the node; calculating a prediction label of the node through the prediction label value of the node; calculating training loss and optimizing parameters by combining the predicted label value of each node with the real label of the node; and repeating training iteration until the node detection module converges or reaches a preset iteration round. According to the method, node representation learning is enhanced through self-distinguishing of self-supervised learning, and differences between normal nodes and fraud nodes are learned by generating sub-graphs for the nodes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet big data and fraud detection, and in particular to a fraud detection method based on graph neural network. Background Art

[0002] In an era of rapid digital development, smart devices such as computers and mobile phones are becoming increasingly popular, and Internet services have quietly penetrated into all levels of society. Social media, e-commerce platforms, blogs, industrial and financial networks, and other networks have emerged, and the amount of data has expanded rapidly. These networks have become a breeding ground for fraudulent information and behavior, and fraudsters can easily hide in massive amounts of data.

[0003] With the continuous development of the Internet, there are more and more opportunities for fraudsters to use the Internet for commercial interests, and these behaviors have caused great harm to society and life. Despite the existence of anti-fraud systems, fraud is difficult to prevent and detect; due to the concealment, unpredictability and multiple disguises of fraud, fraudsters often disguise themselves as ordinary users to spread false information or obtain personal privacy, bypassing anti-fraud systems. Therefore, fraud detection has become an important topic that needs to be studied urgently.

[0004] Since graphs can simulate real-world relationships very well, researchers use GNN (graph neural network) for fraud detection. Graph-based anomaly detection methods are one of the most commonly used techniques for identifying fraudulent behavior. For example, FRAUDER (Fraud Detection Double Antibody) uses an encoder that is independent of the graph structure to learn different representations of fraudulent nodes and adjacent normal nodes, thereby identifying fraudulent nodes and normal nodes. For another example, Semi-GNN starts from the multi-perspective information of the node, uses hierarchical attention to aggregate information between different perspectives of the node, learns the interactions between different nodes and the relationships between different perspectives, and then classifies them.

[0005] However, in fraud detection tasks, the number of fraudsters is far less than the number of normal users. Taking the Amazon dataset as an example, only 9.5% of users are fraudsters, while the rest are normal users. The class imbalance problem causes existing fraud detection algorithms to overfit most classes and ignore the characteristics of minority classes, resulting in poor detection results. In addition, in real life, fraudsters usually connect many normal users to commit fraud. The lack of necessary connections between fraud nodes may cause fraudster information to be hidden in normal information. Researchers call this behavior fraudster camouflage behavior.

[0006] Since the effectiveness of graph neural networks depends on the homogeneity assumption, that is, nodes with similar distances have similar information, simple graph neural networks can easily conceal fraudulent information after aggregating information from adjacent nodes, making it difficult to identify fraudulent nodes, which is one of the difficulties in fraud detection tasks. Therefore, how to solve the fraudster disguise problem and learn the difference between normal nodes and fraudulent nodes is a technical problem that needs to be solved urgently. Summary of the invention

[0007] In view of the above-mentioned deficiencies of the prior art, the technical problem to be solved by the present invention is: how to provide a fraud detection method based on graph neural network, enhance the node representation learning through self-differentiation of self-supervised learning to generate a high-dimensional embedding representation of each node in the graph data, and use the high-dimensional embedding representation containing rich information to solve the fraudster's disguise problem; at the same time, by generating subgraphs for nodes to learn the differences between normal nodes and fraudulent nodes, thereby improving the accuracy of fraud detection.

[0008] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0009] A fraud detection method based on graph neural network, comprising:

[0010] S1: Obtain the image data to be detected;

[0011] S2: Input the graph data to be detected into the trained fraud detection model and output the predicted label of each node in the graph data;

[0012] The process steps when training a fraud detection model are as follows:

[0013] S201: using the graph data as training data and the true label of each node as input of the fraud detection model;

[0014] S202: Utilize the self-differentiation of the self-supervised learning module to enhance the node representation learning and generate a high-dimensional embedding representation of each node in the graph data;

[0015] S203: taking the high-dimensional embedding representation of all nodes in the graph data as the input of the node detection module;

[0016] S204: In the node detection module: perform subgraph sampling on each node to obtain a corresponding subgraph; generate a corresponding predicted label value for each subgraph; for each node, calculate the predicted label value of the node through the predicted label values ​​of all subgraphs containing the node; calculate the predicted label of the node through the predicted label value of the node;

[0017] S205: Calculate the training loss by combining the predicted label value of each node with its true label, and reversely optimize the parameters of the node detection module;

[0018] S206: Repeat steps S201 to S205 until the node detection module converges or reaches a preset iteration round;

[0019] S3: The predicted label of each node in the graph data to be detected is used as its fraud detection result.

[0020] Preferably, in step S202, the processing steps of the self-supervised learning module are as follows:

[0021] S2021: Use graph data as input to the self-supervised learning module;

[0022] S2022: Perform structure-independent encoding on nodes in the graph data according to node attributes to generate initial embedding of the nodes;

[0023] S2023: For each node, calculate the perspective node representation of the node at each perspective through the neighbor nodes of the node at each perspective;

[0024] S2024: For each node, calculate the view-level attention coefficient corresponding to each view of the node;

[0025] S2025: For each node, the perspective node representations of the node under each perspective are combined through the perspective-level attention coefficients corresponding to each perspective of the node to generate a high-dimensional embedding representation of the node.

[0026] Preferably, in step S2022, the initial embedding of the node is calculated by the following formula:

[0027] h i =σ(x i W e );

[0028] Where: h i Represents node v i The initial embedding of x i Represents node v i The feature vector of ; σ represents the nonlinear activation function; W e represents the learnable weight matrix.

[0029] Preferably, in step S2023, the node v is calculated by the following formula: i The viewpoint node under viewpoint r represents:

[0030]

[0031] Where: Represents node v i The viewpoint node representation under viewpoint r; Represents node v i Its neighbor nodes under view r The attention coefficient between Represents node v i The set of neighbor nodes at view r; h k Represents node v i The set of neighbor nodes The initial embedding of the kth neighbor node in ;

[0032] The attention coefficient is calculated by the following formula:

[0033]

[0034] Where: Represents node v i and its neighbor nodes at view r The attention coefficient between j Represents the neighbor node v rj The initial embedding of and represents the learnable attention parameter matrix.

[0035] Preferably, in the self-supervised learning module, the node v is transformed into i The viewpoint node representation of the L-1th layer of the graph convolution layer at each viewpoint is mapped to a high-dimensional space to generate a node v i The view node representation of the Lth layer of graph convolution layer at each view point;

[0036] The formula is:

[0037]

[0038] Where: Respectively represent the node v i The view nodes of the Lth and L-1th graph convolutional layers at view r are represented; MLP stands for multi-layer perceptron.

[0039] Preferably, in step S2024, the view-level attention coefficient corresponding to the view is calculated by the following formula:

[0040]

[0041] Where: Represents node v i The view-level attention coefficient at view r; m represents the node v i The total number of viewing angles; Represents node v i The view node representation at the Lth graph convolutional layer under view r; Represents node v i The view node representation at the Lth graph convolutional layer under view k; represents the learnable perspective weight vector.

[0042] Preferably, in step S2025, the high-dimensional embedding representation of the node is calculated by the following formula:

[0043]

[0044] Where: h i ′ represents node v i The high-dimensional embedding representation of i The total number of viewing angles; Represents node v i View-level attention coefficient at view r; Represents node v i The view node representation of the Lth graph convolutional layer under view r; || represents the connection operation.

[0045] Preferably, in step S204, the predicted label value of the node is calculated by the following formula:

[0046]

[0047] Where: S i Represents node v i The predicted label value of Represents node v i The predicted label value of the corresponding j-th subgraph; J represents the node v i The total number of corresponding subgraphs.

[0048] Preferably, in step S204, the predicted label of the node is calculated by the following formula:

[0049] y i '=sigmoid(S i );

[0050] Where: y i ' represents node v i The predicted label of S i Represents node v i The predicted label value of ; sigmoid represents the sigmoid activation function.

[0051] Preferably, in step S205, the training loss of the node detection module is calculated by the following loss function:

[0052]

[0053] Where: L ssl represents the training loss of the node detection module; y i Represents node v i The true label of S iRepresents node v i The predicted label value of ; N represents the number of nodes.

[0054] Compared with the prior art, the fraud detection method based on graph neural network in the present invention has the following beneficial effects:

[0055] The fraud detection model (SGL-GNN) of the present invention first uses self-supervised learning to enhance the node representation learning and generate high-dimensional embedding representations of each node in the graph data before training the node detection module (Semi-GNN) by self-differentiation. First, the self-supervised learning module prompts the model to distinguish the differences between nodes through internally generated tasks (such as node attribute prediction, context prediction, etc.) in the absence of clear supervision signals, and learns more fine-grained node features, which not only contains local information of the nodes, but also incorporates the global structural information of the graph, making the embedding representation of the nodes richer and more accurate, thereby using high-dimensional embedding representations containing rich information to solve the fraudster disguise problem. Secondly, through self-differentiation, the model can learn more general graph structure features and relationships between nodes, which helps the model to maintain good performance when facing unseen graph structures or nodes, thereby improving the generalization ability of the fraud detection model. Finally, the high-quality node embedding representation enables the model to more accurately capture the subtle differences between fraud nodes and normal nodes, and effectively identify fraud nodes even when there is noise or anomalies in the data, thereby improving the accuracy of fraud detection.

[0056] The present invention, on the basis of extracting high-dimensional embedding representation of nodes, trains node detection module (Semi-GNN) through high-dimensional embedding representation of nodes, and performs subgraph sampling on each node, generates corresponding predicted label value for each subgraph, calculates the predicted label value of the node through the predicted label value of all subgraphs containing the node, and calculates the predicted label of the node through the predicted label value of the node. First, through subgraph sampling, the amount of calculation of graph neural network can be significantly reduced, especially for large-scale graph data, by taking each node and its related subgraph as input, the model can run on a smaller local graph, thereby improving processing efficiency. Secondly, by performing subgraph sampling on each node, the model can observe each node from different subgraph perspectives to learn the difference between normal nodes and fraudulent nodes, and capture the features of nodes in different contexts. This multi-perspective feature fusion makes the model have a higher tolerance for errors in node representation, thereby enhancing the robustness of the model. Finally, by integrating the prediction results of multiple subgraphs to calculate the final predicted label of the node, the performance of the node in different subgraphs can be comprehensively considered, reducing the prediction deviation caused by a single subgraph, helping to more accurately identify fraudulent nodes and improve the accuracy of fraud detection.

[0057] The present invention calculates the training loss by combining the predicted label value of each node with its true label, and reversely optimizes the parameters of the node detection module. First, by calculating the loss between the predicted label and the true label, and back-propagating the loss to optimize the model parameters, the gap between the model prediction results and the actual situation can be gradually reduced, thereby improving the fitting ability of the node detection module (Semi-GNN). Secondly, accurate loss calculation and effective parameter optimization enable the model to more accurately learn the boundary between fraudulent nodes and normal nodes, thereby showing higher accuracy and recall on test data, which is crucial for fraud detection tasks in practical applications. Finally, by continuously optimizing model parameters to adapt to the feature representation of different nodes, the model can learn more generalized rules and knowledge, so that it can still maintain good performance when facing new or unknown graph structures, thereby enhancing the generalization performance of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to make the purpose, technical solution and advantages of the invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings, in which:

[0059] Figure 1 This is a logical block diagram of the fraud detection method based on graph neural network;

[0060] Figure 2 The overall system framework for the fraud detection model. DETAILED DESCRIPTION

[0061] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but only represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of the present invention.

[0062] The following is a further detailed description through specific implementation methods:

[0063] Example:

[0064] This embodiment discloses a fraud detection method based on a graph neural network.

[0065] like Figure 1 As shown, a fraud detection method based on graph neural network includes:

[0066] S1: Obtain the image data to be detected;

[0067] S2: Input the graph data to be detected into the trained fraud detection model (hereinafter referred to as SGL-GNN), and output the predicted label of each node in the graph data (i.e., 1 for normal and 0 for abnormal); the fraud detection model is built based on the graph neural network;

[0068] like Figure 2 As shown, the processing steps when training a fraud detection model are as follows:

[0069] S201: using the graph data as training data and the true label of each node as input of the fraud detection model;

[0070] S202: Utilize the self-differentiation of the self-supervised learning module to enhance the node representation learning and generate a high-dimensional embedding representation of each node in the graph data;

[0071] S203: taking the high-dimensional embedding representation of all nodes in the graph data as the input of the node detection module;

[0072] S204: In the node detection module: perform subgraph sampling on each node to obtain a corresponding subgraph; generate a corresponding predicted label value for each subgraph; for each node, calculate the predicted label value of the node through the predicted label values ​​of all subgraphs containing the node; calculate the predicted label of the node through the predicted label value of the node;

[0073] S205: Calculate the training loss by combining the predicted label value of each node with its true label, and reversely optimize the parameters of the node detection module;

[0074] S206: Repeat steps S201 to S205 until the node detection module converges or reaches a preset iteration round;

[0075] S3: The predicted label of each node in the graph data to be detected is used as its fraud detection result.

[0076] It should be noted that the fraud detection model in this embodiment includes a self-supervised learning module and a node detection module, wherein the node detection module is an existing Semi-GNN (Semi-supervised Graph Neural Network), which is a semi-supervised graph neural network model that exhibits powerful capabilities when processing graph structure data containing labeled and unlabeled data. The node detection module (Semi-GNN) combines the semi-supervised learning characteristics of the graph neural network (GNN), and can make full use of a large amount of unlabeled data in the case of a small amount of labeled data to improve the generalization ability and performance of the model.

[0077] In the training phase, the high-dimensional embedding representation of the node is extracted through the self-supervised learning module and input into the node detection module (Semi-GNN) for training. The parameter optimization of the self-supervised learning module in the training phase is completed through the existing graph neural network (GNN) training method. In the testing (application) phase, the self-supervised learning module no longer participates in the extraction of high-dimensional embedding representation, but directly inputs the graph data into the trained node detection module (Semi-GNN) and outputs the predicted label of each node.

[0078] The fraud detection model (SGL-GNN) of the present invention first uses self-supervised learning to enhance the node representation learning and generate high-dimensional embedding representations of each node in the graph data before training the node detection module (Semi-GNN) by self-differentiation. First, the self-supervised learning module prompts the model to distinguish the differences between nodes through internally generated tasks (such as node attribute prediction, context prediction, etc.) in the absence of clear supervision signals, and learns more fine-grained node features, which not only contains local information of the nodes, but also incorporates the global structural information of the graph, making the embedding representation of the nodes richer and more accurate, thereby using high-dimensional embedding representations containing rich information to solve the fraudster disguise problem. Secondly, through self-differentiation, the model can learn more general graph structure features and relationships between nodes, which helps the model to maintain good performance when facing unseen graph structures or nodes, thereby improving the generalization ability of the fraud detection model. Finally, the high-quality node embedding representation enables the model to more accurately capture the subtle differences between fraud nodes and normal nodes, and effectively identify fraud nodes even when there is noise or anomalies in the data, thereby improving the accuracy of fraud detection.

[0079] The present invention, on the basis of extracting high-dimensional embedding representation of nodes, trains node detection module (Semi-GNN) through high-dimensional embedding representation of nodes, and performs subgraph sampling on each node, generates corresponding predicted label value for each subgraph, calculates the predicted label value of the node through the predicted label value of all subgraphs containing the node, and calculates the predicted label of the node through the predicted label value of the node. First, through subgraph sampling, the amount of calculation of graph neural network can be significantly reduced, especially for large-scale graph data, by taking each node and its related subgraph as input, the model can run on a smaller local graph, thereby improving processing efficiency. Secondly, by performing subgraph sampling on each node, the model can observe each node from different subgraph perspectives to learn the difference between normal nodes and fraudulent nodes, and capture the features of nodes in different contexts. This multi-perspective feature fusion makes the model have a higher tolerance for errors in node representation, thereby enhancing the robustness of the model. Finally, by integrating the prediction results of multiple subgraphs to calculate the final predicted label of the node, the performance of the node in different subgraphs can be comprehensively considered, reducing the prediction deviation caused by a single subgraph, helping to more accurately identify fraudulent nodes and improve the accuracy of fraud detection.

[0080] The present invention calculates the training loss by combining the predicted label value of each node with its true label, and reversely optimizes the parameters of the node detection module. First, by calculating the loss between the predicted label and the true label, and back-propagating the loss to optimize the model parameters, the gap between the model prediction results and the actual situation can be gradually reduced, thereby improving the fitting ability of the node detection module (Semi-GNN). Secondly, accurate loss calculation and effective parameter optimization enable the model to more accurately learn the boundary between fraudulent nodes and normal nodes, thereby showing higher accuracy and recall on test data, which is crucial for fraud detection tasks in practical applications. Finally, by continuously optimizing model parameters to adapt to the feature representation of different nodes, the model can learn more generalized rules and knowledge, so that it can still maintain good performance when facing new or unknown graph structures, thereby enhancing the generalization performance of the model.

[0081] In the specific implementation process, in step S202, the processing steps of the self-supervised learning module are as follows:

[0082] S2021: Use graph data as input to the self-supervised learning module;

[0083] S2022: Perform structure-independent encoding on nodes in the graph data according to node attributes to generate initial embedding of the nodes;

[0084] S2023: For each node, calculate the perspective node representation of the node at each perspective through the neighbor nodes of the node at each perspective;

[0085] S2024: For each node, calculate the view-level attention coefficient corresponding to each view of the node;

[0086] S2025: For each node, the perspective node representations of the node under each perspective are combined through the perspective-level attention coefficients corresponding to each perspective of the node to generate a high-dimensional embedding representation of the node.

[0087] Specifically, fraudulent nodes and normal nodes have different characteristics, but they are closely related in topological structure. Directly aggregating neighbor node information will smooth the potential characteristics of fraudulent nodes. Therefore, before information aggregation, the nodes are first structure-independently encoded according to their attributes, that is, the structural information of the nodes is not considered when encoding the node attributes.

[0088] In this embodiment, the initial embedding of the node is calculated by the following formula:

[0089] h i =σ(x i W e );

[0090] Where: h i Represents node v i The initial embedding of x i Represents node v i ; σ represents a nonlinear activation function, which performs a nonlinear transformation on node attributes; W e represents the learnable weight matrix.

[0091] Specifically, since nodes have different rich features, aggregating the features of adjacent nodes under different perspectives can make it easier to distinguish fraudulent nodes from normal nodes and reduce the misjudgment of fraudulent nodes. Based on a multi-level attention mechanism, the present invention fuses the information between the node layer and different perspective layers respectively, and learns the connection between nodes under different relationships.

[0092] In this embodiment, the node v is calculated by the following formula: i The viewpoint node under viewpoint r represents:

[0093]

[0094] Where: Represents node v i The viewpoint node representation under viewpoint r; Represents node v i Its neighbor nodes under view r The attention coefficient between Represents node v i The set of neighbor nodes at view r; h k Represents node v iThe set of neighbor nodes The initial embedding of the kth neighbor node in ;

[0095] The attention coefficient is calculated by the following formula:

[0096]

[0097] Where: Represents node v i and its neighbor nodes at view r The attention coefficient between j Represents the neighbor node v rj The initial embedding of and represents the learnable attention parameter matrix.

[0098] Specifically, in order to obtain more comprehensive node information, it is necessary to fuse information from different perspectives to obtain higher-order semantic information. Since the node representations obtained from different perspectives are in different spatial domains, direct fusion is difficult to capture the correlation between different perspectives in low-dimensional space.

[0099] Therefore, in the self-supervised learning module, the node v is transformed into i The viewpoint node representation of the L-1th layer of the graph convolution layer at each viewpoint is mapped to a high-dimensional space to generate a node v i The view node representation of the Lth layer of graph convolution layer at each view point;

[0100] The formula is:

[0101]

[0102] Where: Respectively represent the node v i The view nodes of the Lth and L-1th graph convolutional layers at view r are represented; MLP stands for multi-layer perceptron.

[0103] Specifically, different perspectives represent different contributions to fraud detection. The present invention proposes a perspective-level attention mechanism. The perspective-level attention coefficient corresponding to the perspective is calculated by the following formula:

[0104]

[0105] Where: Represents node v i The view-level attention coefficient at view r; m represents the node v i The total number of viewing angles; Represents node v i The view node representation at the Lth graph convolutional layer under view r; Represents node v i The view node representation at the Lth graph convolutional layer under view k; represents the learnable perspective weight vector.

[0106] Specifically, the high-dimensional embedding representation of the node is calculated by the following formula:

[0107]

[0108] Where: h i ′ represents node v i The high-dimensional embedding representation of i The total number of viewing angles; Represents node v i View-level attention coefficient at view r; Represents node v i The view node representation of the Lth graph convolutional layer under view r; || represents the connection operation.

[0109] During the specific implementation, sub-graph sampling is performed in the following ways:

[0110] 1) Random Sampling: Node sampling: randomly select a part of the nodes as the node set of the subgraph, and then include all or part of the edges of these nodes as the edge set of the subgraph. Edge sampling: randomly select a part of the edges, and then include the endpoints of these edges as the node set of the subgraph.

[0111] 2) Importance-based sampling: nodes are selected based on their degree, centrality, or other importance metrics, and then these nodes and their associated edges are included as subgraphs.

[0112] 3) Sampling based on graph structure: Algorithms such as ClusterGCN divide the original graph into multiple densely connected subgraphs (clusters) through clustering methods, and then select one or several clusters as subgraphs each time training.

[0113] During the specific implementation process, in the fraud detection task, fraudsters usually connect to normal users to disguise themselves, and the number of fraud nodes is far less than that of normal nodes. Therefore, directly aggregating neighbor nodes can easily conceal the characteristics of fraudsters. The above features processed by the self-supervised learning module (SGL) will be sent to the node detection module (Semi-GNN) for training. Since normal nodes and fraudulent nodes have different behavior patterns and characteristics, the present invention uses node subgraphs as new learning samples, and learns to distinguish different interaction modes between nodes and their subgraphs by constructing node and subgraph pairs. Fraudulent node and subgraph pairs are called negative samples, and normal node and subgraph pairs are called positive samples. Through the above model training, each pair of node and subgraph pairs can obtain a predicted label value S i The comparison goal of the model is to make Si As close as possible to label y i .

[0114] Specifically, the predicted label value of the node is calculated by the following formula:

[0115]

[0116] Where: S i Represents node v i The predicted label value of Represents node v i The predicted label value of the corresponding j-th subgraph; J represents the node v i The total number of corresponding subgraphs.

[0117] In the specific implementation process, the score of a normal node tends to 0, and the score of a fraudulent node tends to 1. Compared with a normal node, the discrimination score of a fraudulent node is larger, so the predicted label of the node (that is, the probability of judging whether a node is a fraudulent node) is calculated by the following formula:

[0118] y i '=sigmoid(S i );

[0119] Where: y i ' represents node v i The predicted label of S i Represents node v i The predicted label value of ; sigmoid represents the sigmoid activation function.

[0120] In the specific implementation process, this embodiment uses the standard cross entropy loss objective function. The training loss of the node detection module is calculated by the following loss function:

[0121]

[0122] Where: L ssl represents the training loss of the node detection module; y i Represents node v i The true label of S i Represents node v i The predicted label value; N represents the number of nodes. It should be noted that since y i 'It is S i An activation function is used, and its range is between 0 and 1 (that is, the normal node score tends to 0, and the fraud node score tends to 1). In order to ensure the calculation effect of the loss function, this embodiment uses S i Participate in the calculation of training loss, because there is no limit on S i The value range of .

[0123] In order to better illustrate the advantages of the technical solution of the present invention, this embodiment discloses the following experiment.

[0124] 1. Dataset

[0125] This embodiment conducts comparative experiments on widely used public datasets, namely the Yelpchi dataset and the Amazon dataset. The Yelpchi dataset collects hotel and restaurant reviews on the Yelp website. The review nodes in the Yelpchi dataset have 100-dimensional features, including the following three relationships: 1) RUR connects reviews posted by the same user; 2) RSR connects reviews under the same product with the same star rating; 3) RTR connects reviews under the same product posted in the same month. The Amazon dataset consists of product reviews under the instrument category on the Amazon website. The nodes in the Amazon dataset graph are users with 100-dimensional features, including the following three relationships: 1) UPU connects users who have browsed at least the same product; 2) USU connects users who have at least one same review within a week; 3) UVU connects users with the top 5% TE-IDF (term frequency inverse document frequency) similarity. The statistics of the two datasets are shown in Table 1, where the label similarity is the average label similarity between the fraud node and its first-order neighboring nodes. As can be seen from Table 1, except for the RUR relationship in the Yelpchi dataset, the label similarities between the fraudulent nodes and their adjacent nodes in other relationships are very low, which indicates that there is generally connectivity between the fraudulent nodes and the normal nodes in the graph, and the fraudulent nodes lack the necessary connectivity, which is a data feature.

[0126] Table 1 Dataset statistics

[0127]

[0128] 2. Experimental comparison method

[0129] In order to evaluate the fraud detection performance of the model, this experiment selected GCN and several state-of-the-art methods for comparative experiments.

[0130] GCN: Graph Convolutional Network performs convolution operations on node embeddings in the spatial domain, that is, aggregating neighbor information to represent nodes.

[0131] FdGars: This method detects fake comment accounts based on GCN, designs features based on the semantic characteristics of comments, and further encodes node features through GCN.

[0132] GraphCosis: This method solves the problem of inconsistent neighborhoods in fraud detection, namely the fraudster disguise problem, by balancing the distance and label information of neighbor nodes.

[0133] CARE-GNN: This method uses reinforcement learning to design an adaptive threshold for filtering neighboring nodes, thereby solving the problem of fraudster disguise.

[0134] FRAUDER: This method is a fraud detection algorithm based on graph neural network. By designing the node information aggregation mechanism and loss function, it achieves dual resistance to graph inconsistency and category imbalance problems.

[0135] 3. Comparative experiment

[0136] Due to the class imbalance problem in fraud detection, three widely used unbiased class metrics were selected in this experiment: AUC, Recall-macro, and F1-macro. AUC is the area under the receiver operator characteristic (ROC) curve, which indicates that the ranking of a randomly selected fraud node is much higher than the predicted probability of a normal node. Recall-macro evaluates the ratio of detected fraud nodes to normal nodes as a non-weighted average of the percentage of the actual number of nodes. The F1 score is a trade-off between recall and precision, while F1-macro is the non-weighted average of the F1 scores of normal and fraud nodes.

[0137] Table 2 Comparison of experimental results

[0138]

[0139] The SGL-GNN model of the present invention achieved the best results on both datasets, which shows that the SGL-GNN model can effectively solve the node inconsistency and class imbalance problems in fraud detection tasks and learn the potential learning patterns of fraud nodes. The reason why GCN performs poorly is that its effectiveness in classification tasks relies on the homogeneity assumption, that is, nodes have similar characteristics to their neighbors, but this assumption does not hold in fraud detection tasks. Therefore, GCN is not effective in fraud detection tasks.

[0140] 4. Node feature embedding similarity analysis

[0141] In order to verify that the SGL-GNN model can learn differentiated representations of normal nodes and fraudulent nodes, this experiment designed an experiment to evaluate the similarity between adjacent nodes. Tables 3 and 4 respectively show the average cosine similarity between normal nodes and fraudulent nodes and their first-order neighboring nodes with different relationships on the selected dataset. P1 represents the node output after the output of the structure-independent attribute encoder, and P2 represents the node representation after the hierarchical attention mechanism aggregation.

[0142] Table 3 Experimental results on the AMAON dataset

[0143]

[0144]

[0145] Table 4 Experimental results on the YELPCHI dataset

[0146]

[0147] Taking the Amazon dataset under the UPU relationship as an example, when the fraudulent node connects to the normal node for disguise, the similarity between the fraudulent node and its first-order neighboring nodes is as high as 0.6907. However, after model training, P1 and P2 are reduced to 0.0690 and 0.0691 respectively, while the similarity of normal nodes does not change much, which shows that SGL-GNN can effectively learn the difference between the fraudulent node and its normal neighboring nodes. It can be seen that SGL-GNN effectively learns the difference between the fraudulent node and its normal neighboring nodes, providing strong support for subsequent fraud detection. Under the RUR relationship of the Yelpchi dataset, the trained P1 and P2 are slightly higher than other relationships. This is because under this relationship, the label similarity between the fraudulent node and its first-order neighboring nodes is 0.9511, that is, there are more connections between fraudulent nodes, but due to the instability of the behavior of fraudulent nodes, fraudulent nodes can also learn differentiated representations from each other, and their similarity with first-order neighboring nodes is also high after training. The similarity of first-order neighboring nodes will also be reduced to a certain extent.

[0148] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit the technical solution. Those skilled in the art should understand that those modifications or equivalent substitutions of the technical solution of the present invention that do not depart from the purpose and scope of the technical solution should be included in the scope of the claims of the present invention.

Claims

1. A fraud detection method based on graph neural network, It is characterized in that include: S1: Obtain the image data to be detected; S2: Input the graph data to be detected into the trained fraud detection model and output the predicted label of each node in the graph data; The process steps when training a fraud detection model are as follows: S201: using the graph data as training data and the true label of each node as input of the fraud detection model; S202: Utilize the self-differentiation of the self-supervised learning module to enhance the node representation learning and generate a high-dimensional embedding representation of each node in the graph data; S203: taking the high-dimensional embedding representation of all nodes in the graph data as the input of the node detection module; S204: In the node detection module: perform subgraph sampling on each node to obtain a corresponding subgraph; generate a corresponding predicted label value for each subgraph; for each node, calculate the predicted label value of the node through the predicted label values ​​of all subgraphs containing the node; calculate the predicted label of the node through the predicted label value of the node; S205: Calculate the training loss by combining the predicted label value of each node with its true label, and reversely optimize the parameters of the node detection module; S206: Repeat steps S201 to S205 until the node detection module converges or reaches a preset iteration round; S3: The predicted label of each node in the graph data to be detected is used as its fraud detection result.

2. The fraud detection method based on graph neural network as claimed in claim 1, Features: In step S202, the processing steps of the self-supervised learning module are as follows: S2021: Use graph data as input to the self-supervised learning module; S2022: Perform structure-independent encoding on nodes in the graph data according to node attributes to generate initial embedding of the nodes; S2023: For each node, calculate the perspective node representation of the node at each perspective through the neighbor nodes of the node at each perspective; S2024: For each node, calculate the view-level attention coefficient corresponding to each view of the node; S2025: For each node, the perspective node representations of the node under each perspective are combined through the perspective-level attention coefficients corresponding to each perspective of the node to generate a high-dimensional embedding representation of the node.

3. The fraud detection method based on graph neural network as claimed in claim 2, Features: In step S2022, the initial embedding of the node is calculated by the following formula: h i =σ(x i W e ); Where: h i Represents node v i The initial embedding of x i Represents node v i The feature vector of ; σ represents the nonlinear activation function; W e represents the learnable weight matrix.

4. The fraud detection method based on graph neural network as claimed in claim 2, Features: In step S2023, the node v is calculated by the following formula i The viewpoint node under viewpoint r represents: Where: Represents node v i The viewpoint node representation under viewpoint r; Represents node v i Its neighbor nodes under view r The attention coefficient between Represents node v i The set of neighbor nodes at view r; h k Represents node v i The set of neighbor nodes The initial embedding of the kth neighbor node in ; The attention coefficient is calculated by the following formula: Where: Represents node v i and its neighbor nodes at view r The attention coefficient between j Represents the neighbor node v rj The initial embedding of and represents the learnable attention parameter matrix.

5. The fraud detection method based on graph neural network as claimed in claim 2, Features: In the self-supervised learning module, the node v is transformed into i The viewpoint node representation of the L-1th layer of the graph convolution layer at each viewpoint is mapped to a high-dimensional space to generate a node v i The view node representation of the Lth layer of graph convolution layer at each view point; The formula is: Where: Respectively represent the node v i The view nodes of the Lth and L-1th graph convolutional layers at view r are represented; MLP stands for multi-layer perceptron.

6. The fraud detection method based on graph neural network as claimed in claim 2, Features: In step S2024, the view-level attention coefficient corresponding to the view is calculated by the following formula: Where: Represents node v i The view-level attention coefficient at view r; m represents the node v i The total number of viewing angles; Represents node v i The view node representation at the Lth graph convolutional layer under view r; Represents node v i The view node representation at the Lth graph convolutional layer under view k; represents the learnable perspective weight vector.

7. The fraud detection method based on graph neural network as claimed in claim 2, Features: In step S2025, the high-dimensional embedding representation of the node is calculated by the following formula: Where: h i ′ represents node v i The high-dimensional embedding representation of i The total number of viewing angles; Represents node v i View-level attention coefficient at view r; Represents node v i The view node representation of the Lth graph convolutional layer under view r; || represents the connection operation.

8. The fraud detection method based on graph neural network as claimed in claim 1, Features: In step S204, the predicted label value of the node is calculated by the following formula: Where: S i Represents node v i The predicted label value of Represents node v i The predicted label value of the corresponding j-th subgraph; J represents the node v i The total number of corresponding subgraphs.

9. The fraud detection method based on graph neural network as claimed in claim 1, Features: In step S204, the predicted label of the node is calculated by the following formula: y′ i =sigmoid(S i ); Where: y i ' represents node v i The predicted label of S i Represents node v i The predicted label value of ; sigmoid represents the sigmoid activation function.

10. The fraud detection method based on graph neural network as claimed in claim 1, Features: In step S205, the training loss of the node detection module is calculated by the following loss function: Where: L ssl represents the training loss of the node detection module; y i Represents node v i The true label of S i Represents node v i The predicted label value of ; N represents the number of nodes.

Citation Information

Cited By

  • Fraud detection method, device and system based on graph neural network

    CN119809663A

  • Graph neural network fraud detection method and system based on attention mechanism

    CN121524767A