A Fraud Detection Method and System Based on Attention Mechanism Graph Neural Network

By transforming raw data into a structured multi-relationship graph and combining it with a label-aware mechanism and a graph neural network based on reinforcement learning, the problems of class imbalance and insufficient dynamic adaptation in fraud detection models are solved, achieving efficient and accurate fraud behavior identification and improved model robustness.

CN121524767BActive Publication Date: 2026-06-30XIAMEN UNIV OF TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIAMEN UNIV OF TECH
Filing Date
2026-01-16
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing fraud detection models suffer from class imbalance and insufficient dynamic adaptation when dealing with comment fraud, making it difficult to identify elaborately disguised fraudulent behavior. Furthermore, traditional GNN models are inefficient when processing large-scale, heterogeneous, and multi-relational data.

Method used

We employ a graph neural network based on an attention mechanism to transform raw data into a structured multi-relation graph. By combining a label-aware mechanism and reinforcement learning, we dynamically adjust the neighbor selection filtering threshold and introduce a sparse attention mechanism and a fusion gating strategy to optimize the information aggregation and propagation process.

Benefits of technology

It significantly improves the accuracy of fraud detection and the generalization ability of the model, enhances the resistance to fraudulent spoofing, reduces computational complexity, and improves the robustness and efficiency of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121524767B_ABST
    Figure CN121524767B_ABST
Patent Text Reader

Abstract

This invention provides a graph neural network fraud detection method and system based on an attention mechanism. The method includes: calculating the semantic similarity between the central node and its neighboring nodes of a specific relation subgraph in a multi-relation graph based on a label-aware mechanism; adaptively adjusting the selection filtering threshold of neighboring nodes using a reinforcement learning mechanism; aggregating the selected neighboring node information to form a first node representation of each specific relation subgraph in the multi-relation graph; dynamically evaluating the importance of each specific relation subgraph to the central node using an attention mechanism and assigning corresponding weights to form a comprehensive second node representation; fusing the first node representation, the second node representation, and the node representation of the previous layer of the GNN to form a final embedded representation; and inputting the final embedded representation into a classifier to identify and judge fraudulent behavior. This invention achieves efficient detection through sparse gating attention and a neighbor selection mechanism based on reinforcement learning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network information security technology, specifically to a graph neural network fraud detection method and system based on an attention mechanism. Background Technology

[0002] With the rapid development of the internet, online reviews have become a crucial basis for consumers to evaluate product quality and make purchasing decisions. Positive or negative reviews significantly impact consumers' purchasing intentions, directly affecting product sales and reputation. Consequently, online fraud is becoming increasingly prevalent in daily life. Fraudsters manipulate product reputation by publishing fake reviews, leading to market unfairness, misleading consumers, and causing economic losses to users and platforms. Therefore, developing effective review fraud detection technology is essential.

[0003] Existing fraud detection research largely focuses on the financial sector, such as credit card fraud and financial statement fraud, while research on comment fraud is relatively limited. Comment fraud, due to its simple process, difficulty in recording, and complex behavioral patterns, presents challenges in extracting anomalous features that effectively distinguish it from legitimate behavior. Current detection models generally face two core challenges: first, a severe class imbalance problem, with fraudulent samples far outnumbering legitimate samples, causing the model to favor the majority class and resulting in low fraud detection rates; second, insufficient dynamic adaptability, making it difficult to quickly adapt to the continuous evolution of fraudulent methods.

[0004] In recent years, Graph Neural Networks (GNNs) have demonstrated significant potential in fraud detection due to their powerful ability to capture relationship patterns. GNNs effectively model the complex interactions between fraudsters and surrounding entities by aggregating neighbor node information to update the target node representation. However, existing GNN models have limitations when facing fraudster camouflage. To evade detection, fraudsters often deliberately make their direct neighbors mostly legitimate users. The homogeneity aggregation mechanism of GNNs fails in this scenario; the aggregation of a large amount of legitimate neighbor information dilutes or even masks the anomalous features of the fraudulent node itself, making it difficult for the model to identify carefully disguised fraudulent behavior. Summary of the Invention

[0005] The purpose of this application is to provide a fraud detection method and system based on attention mechanism graph neural networks to solve the above-mentioned technical problems.

[0006] Firstly, this application proposes a graph neural network fraud detection method based on an attention mechanism, which includes the following steps:

[0007] S1. Convert the original data into a structured multi-relation graph, wherein entities are modeled as nodes, various interactions between entities are modeled as edges, and initial feature representations are assigned to the nodes and edges.

[0008] S2. Based on the label-aware mechanism, calculate the semantic similarity between the central node of a specific relation subgraph in the multi-relation graph and its neighboring nodes; adaptively adjust the selection filtering threshold of the neighboring nodes using a reinforcement learning mechanism; and aggregate the selected neighboring node information to form the first node representation of each specific relation subgraph in the multi-relation graph; wherein, the specific relation subgraph refers to a layer of a single relation type in the multi-relation graph;

[0009] S3. Using an attention mechanism, dynamically evaluate the importance of each specific relation subgraph in the multi-relation graph to the central node, and assign corresponding weights to form a comprehensive second node representation;

[0010] S4. The first node representation, the second node representation, and the node representation of the previous layer of GNN are fused to form the final embedded representation; the final embedded representation is input into the classifier to identify and judge fraudulent behavior.

[0011] In the aforementioned technical solution, raw heterogeneous data is transformed into a structured multi-relationship graph, comprehensively capturing entities and their complex interactions, providing rich context for subsequent analysis, and significantly compensating for the shortcomings of traditional fraud detection methods in utilizing data structures. By hierarchically and dynamically aggregating and fusing multi-relationship information, combined with label awareness and attention mechanisms, the model can accurately identify and capture key fraud patterns from complex relationship networks, thereby significantly improving the accuracy of fraud detection and the model's generalization ability. Furthermore, the introduction of a label awareness mechanism and reinforcement learning-driven adaptive neighbor selection enables the model to effectively address the problem of fraudsters evading detection by disguising their attributes or relationships, significantly enhancing the anti-fraud robustness of the fraud detection model.

[0012] Furthermore, step S2 includes:

[0013] S21. Use a multilayer perceptron to obtain the label perception representation of the central node and its neighboring nodes, and calculate the cosine feature similarity between the central node and the neighboring nodes.

[0014] S22. Based on the cosine feature similarity, sort the neighbor nodes of the center node in descending order, and select the top-k neighbor nodes with the highest cosine feature similarity as the sampling neighbors of the center node by combining the adaptive filtering threshold determined by reinforcement learning.

[0015] In the above technical solution, by utilizing a multilayer perceptron to obtain the label-aware representations of the central node and its neighbors, and calculating the cosine similarity between them, the semantic proximity between nodes can be accurately measured, effectively distinguishing between genuine associations and fraudulent spoofing. Combining reinforcement learning mechanisms to adaptively determine the neighbor selection filtering threshold and perform Top-k sampling allows the model to dynamically select the most informative and relevant neighbors based on data characteristics and learning objectives, avoiding the limitations of fixed sampling strategies and improving the quality and efficiency of information aggregation within relationships. Simultaneously, this step effectively filters out irrelevant or spoofed neighbor node information, reduces noise interference, and ensures that the information obtained from aggregation within relationships is purer and more discriminative, further enhancing the resistance to fraudulent spoofing.

[0016] Furthermore, in GNN's... Layers and Relationships Below, the cosine feature similarity The calculation formula is:

[0017]

[0018] In the formula, The central node; These are the neighboring nodes of the central node; For activation functions; It is a multilayer perceptron; For the first time in GNN The central node of the layer output Label-aware representation; For the first time in GNN Neighbor nodes output by the layer Label-aware representation. Central node. and neighboring nodes Cosine distance between The smaller the value, the more central the node. and neighboring nodes The greater the similarity between them, the more likely they are to be found in each other. .

[0019] The aforementioned technical solution provides a clear mathematical basis for accurately quantifying the label-aware semantic similarity between nodes in graph neural networks at specific layers and relationships, enabling the calculation, comparison, and utilization of abstract semantic associations. This provides a reliable and operable similarity metric for subsequent descending sorting of candidate neighbor nodes and Top-k neighbor selection, ensuring the effectiveness and accuracy of the neighbor selection process based on semantic associations. Furthermore, this formula allows for flexible calculation of similarity at different layers and relationships within the graph neural network, enabling the model to capture multi-level, multi-dimensional, and finer-grained semantic association information, thereby enhancing the richness of node representations.

[0020] Furthermore, step S22 includes employing the Actor-Critic framework to model the process of each layer of the GNN selecting neighbors for a specific relationship as a Markov decision process, by defining the state space. Action space and reward function The system adaptively learns the optimal combination of neighbor selection filtering thresholds, wherein the reward function... Represented as:

[0021]

[0022] In the formula, Candidate neighbor nodes Its current value , For GNN layer; For neighboring nodes In relation Embedded representation below; For relationship The value function under; In relation Below, the average value of all neighboring nodes in previous training rounds; Tolerance parameters are used to avoid mistakenly discarding valuable neighbor nodes; actions Defined as the current relation Next specific candidate neighbors The choice decision, in which This indicates that the neighbor node is selected and retained. , This indicates that the neighboring node is discarded. .

[0023] In the above technical solution, by employing the Actor-Critic reinforcement learning framework, the neighbor selection process of the graph neural network is modeled as a Markov decision process. This allows the model to adaptively learn and optimize its neighbor selection strategy through interaction with the environment, thereby finding the optimal subset of neighbors most beneficial to the task in a complex graph. The designed reward function effectively incentivizes the model to prioritize retaining key neighbors with high value for fraud detection and suppresses the selection of irrelevant or harmful neighbors, thus significantly optimizing the quality and relevance of neighbor information aggregation. Simultaneously, a tolerance parameter is introduced. This allows the model to have a certain degree of flexibility in the neighbor selection process, avoiding the erroneous rejection of potentially valuable neighbors due to excessive penalties, and improving the robustness and generalization ability of the selection strategy.

[0024] Furthermore, the attention mechanism includes a relation gating mechanism. Based on the label-aware representation of the central node for different relations and the features of aggregation within specific relations, the relation gating mechanism is used to calculate relation gating weights. :

[0025]

[0026] In the formula, For GNN Layer relational gating weights; and These are the learnable weights and bias parameters, respectively; For activation functions; As the central node In the Label-aware representation of layers.

[0027] In the aforementioned technical solution, the relation gating mechanism dynamically assesses the importance of each relation in a multi-relationship graph to the central node and assigns corresponding gating weights, enabling the model to intelligently focus on the relation types most relevant to fraudulent behavior. By assigning differentiated weights to different relation types, the effectiveness of information fusion between relations is enhanced, ensuring that more important relations dominate in the final node representation, thereby significantly improving the model's discriminative ability and the efficiency of utilizing heterogeneous relations. Furthermore, the relation gating weights provide a degree of interpretability, intuitively indicating which types of relation connections the model prioritizes in specific decisions or node representation learning, which helps in understanding the model's decision-making basis.

[0028] Furthermore, the attention mechanism includes a sparse attention mechanism, which calculates the attention scores between the central node and neighboring nodes with different relationships, and generates a sparse attention weight distribution through a sparsified Softmax function, wherein the formula for calculating the attention score is:

[0029]

[0030] In the formula, In the first Layer, for the central node and relationships Neighbor nodes in Attention score; and Each is for the central node and neighboring nodes Multilayer perceptron for feature transformation; For feature dimensions; The Soft max function is a sparsified form of the attention weight distribution, which generates a sparse attention weight distribution such that most attention weights are 0, and only a few key neighbor nodes retain non-zero weights.

[0031] In the aforementioned technical solution, a sparse attention mechanism is employed, enabling the model to automatically identify and focus on a few of the most critical neighbors of the central node. This effectively filters out a large amount of irrelevant or redundant neighbor information, significantly improving the efficiency and accuracy of information aggregation. By generating a distribution with most attention weights being zero through a sparsified Softmax function, the computational and storage complexity of GNNs when processing large-scale neighbor nodes is significantly reduced, improving the model's operating efficiency on large-scale graph data. Simultaneously, the sparse non-zero attention weights can intuitively indicate which specific neighbor nodes are most critical to the central node's representation update, thereby enhancing the model's ability to trace key information and its interpretability in decision-making.

[0032] Furthermore, the attention mechanism employs a fusion-gated attention strategy, which includes: in the GNN's... Layer, for the central node The gating weight of each relation is calculated through a relation gating mechanism. The central node is calculated using a sparse attention mechanism. Neighbor nodes with different relationships Attention weights between The fusion representation of the fusion-gated attention strategy is as follows:

[0033]

[0034] In the formula, As the central node In GNN's The final aggregated representation that integrates all relational information; For activation functions; The total number of relations; In the first Layers and Relationships Gating weights; As the central node In relation The set of neighboring nodes; For the first time in GNN A multilayer perceptron that performs value transformation on the features of neighboring nodes; For neighboring nodes In GNN's Layer embedding representation.

[0035] In the aforementioned technical solution, by organically integrating the relationship gating mechanism with the sparse attention mechanism, dual attention focusing is achieved at both the relationship type level and the neighbor node level within the relationship. This allows the model to simultaneously consider the importance of different relationships and the influence of key neighbors within a relationship, resulting in a more comprehensive attention allocation. Through dynamic weighting and sparsification, the propagation and aggregation process of information in the graph neural network is optimized, ensuring that the model can more efficiently utilize heterogeneous relationship information and effectively avoid information redundancy or overload. The generated fusion representation can more comprehensively and accurately capture complex dependencies and key signals in multi-relationship graphs, providing more discriminative node embeddings for final fraud detection, thereby improving classification performance.

[0036] Furthermore, the final loss function is:

[0037]

[0038]

[0039]

[0040]

[0041] In the formula, This is the final loss function during the model training process; Cross-entropy loss function for node classification tasks; Cross-entropy loss is used to measure label-aware similarity across the entire network. and These are the weight parameters; The L2 norm of all model parameters; As the central node The true label information; For activation functions; For the first time in GNN The layer is applied to the multilayer perceptron into which the nodes are ultimately embedded; As the central node The final embedded representation obtained after processing; For GNN's first Cross-entropy loss for label-aware similarity measurement in layer computation; As the central node In GNN's Layer embedding representation; Features of the final aggregation node within the three relationships; As the central node In the The final aggregated representation that integrates all relational information is obtained through layer fusion; Concat is the feature concatenation operation.

[0042] In the above technical solution, by designing a multi-objective loss function that combines node classification loss, label-aware similarity measurement loss, and L2 regularization, the fraud classification accuracy, node semantic similarity learning ability, and generalization ability of the model can be optimized simultaneously, thereby achieving a more comprehensive performance improvement. The introduction of label-aware similarity measurement loss forces the model to learn node representations with label-discriminating capabilities. Especially in fraud detection scenarios where label data is scarce, this effectively guides the model to distinguish between benign and fraudulent patterns, enhancing the model's semantic recognition ability. The L2 regularization term effectively suppresses overfitting during training, enhances the model's generalization ability and stability on unseen new data, and makes it more reliable in practical applications.

[0043] Secondly, this application proposes a graph neural network model based on sparse gating attention and reinforcement learning. The model includes an intra-relation aggregation module, an inter-relation aggregation module, and a relation fusion module, wherein...

[0044] The relation-based aggregation module is configured to calculate the semantic similarity between the central node of a specific relation subgraph and its neighboring nodes based on a label-aware mechanism, adaptively adjust the filtering threshold for selecting the neighboring nodes using reinforcement learning, and aggregate the selected relation-based neighboring node information to form the first node representation of each specific relation subgraph of the multi-relation graph.

[0045] The relationship aggregation module is configured to use the fusion-gated attention strategy to dynamically evaluate the importance of each specific relationship subgraph in the multi-relationship graph to the central node, assign corresponding weights, and combine a sparse attention mechanism to achieve sparsification of attention weights, so as to form a comprehensive second node representation.

[0046] The relationship fusion module is configured to generate the final embedded representation after completing the aggregation of the modules within the relationship and the modules between the relationships.

[0047] In the above technical solution, the model, through the collaborative work of three modules, can achieve effective aggregation within relationships, dynamic evaluation between relationships, and information fusion, thereby improving the quality of node representation, enhancing the ability to capture complex relationships, and thus improving the accuracy and efficiency of fraud detection.

[0048] Thirdly, this application proposes a graph neural network fraud detection system based on an attention mechanism, the system comprising:

[0049] The data processing and graph construction module is configured to convert raw data into a structured multi-relation graph, wherein entities are modeled as nodes, various interactions between entities are modeled as edges, and initial feature representations are assigned to the nodes and edges.

[0050] The first node representation acquisition module is configured to calculate the semantic similarity between the central node of a specific relation subgraph in the multi-relation graph and its neighboring nodes based on a label-aware mechanism; adaptively adjust the selection filtering threshold of the neighboring nodes using a reinforcement learning mechanism; and aggregate the selected neighboring node information to form the first node representation of each specific relation subgraph in the multi-relation graph; wherein, the specific relation subgraph refers to a layer of a single relation type in the multi-relation graph;

[0051] The second node representation acquisition module is configured to use an attention mechanism to dynamically evaluate the importance of each specific relation subgraph in the multi-relation graph to the central node, and assign corresponding weights to form a comprehensive second node representation;

[0052] The final embedding representation acquisition and classification module is configured to fuse the first node representation, the second node representation, and the node representation of the previous layer of the GNN to form a final embedding representation; and input the final embedding representation into the classifier to identify and judge fraudulent behavior.

[0053] Compared with the prior art, the beneficial results of the present invention are as follows:

[0054] (1) This application can efficiently and accurately identify complex fraudulent behavior. Compared with the limitations of existing technologies in processing large-scale, heterogeneous, and multi-relationship data, this invention intelligently transforms the original heterogeneous data into a structured multi-relationship graph and performs comprehensive initial feature representation, providing rich and accurate contextual information for subsequent deep learning analysis, fundamentally improving data utilization efficiency and the model's ability to understand complex data structures.

[0055] (2) This application calculates the semantic similarity between nodes by introducing a label-aware mechanism and combines reinforcement learning to adaptively adjust the neighbor selection filtering threshold for Top-k sampling. This strategy ensures that the model can accurately identify and focus on the semantically most relevant neighbor information for aggregation, effectively overcoming the limitations of the fixed sampling strategy in traditional methods, and greatly enhancing the model's resistance to fraudster spoofing behavior, thereby improving the quality of node representation and the accuracy of fraud identification.

[0056] (3) In terms of the attention mechanism, this application introduces a fusion-gated attention strategy, which cleverly combines relation gating and sparse attention mechanisms. Compared with single or non-adaptive attention mechanisms, this allows the model to dynamically evaluate the importance of different relations and focus on a few of the most critical neighbor information, effectively filtering redundancy and noise. This multi-level, adaptive attention allocation significantly optimizes the propagation and fusion process of information in the graph neural network, not only improving the discriminative power of the final node representation, but also greatly reducing the computational complexity in large-scale graph data processing and improving the model's operating efficiency.

[0057] (4) This application achieves synergistic optimization of model classification accuracy, semantic learning ability, and generalization ability by designing a multi-objective loss function that combines classification loss, label-aware similarity loss, and L2 regularization, effectively avoiding overfitting and enhancing the robustness of the model. The constructed modular system can automatically execute the entire fraud detection process, transforming advanced theoretical research results into practically deployable solutions, and providing an integrated, efficient, and scalable fraud detection platform, thereby making up for the shortcomings of existing technologies in practical application deployment and maintenance. Attached Figure Description

[0058] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments and, together with the description, serve to explain the principles of the invention. Many anticipated advantages of the embodiments and other embodiments of the invention will be readily recognized as they become better understood through reference to the following detailed description. Elements in the drawings are not necessarily to scale. The same reference numerals refer to corresponding similar parts.

[0059] Figure 1 This is a flowchart of a graph neural network fraud detection method based on an attention mechanism according to an embodiment of this application;

[0060] Figure 2 This is a structural diagram of a graph neural network model based on sparse gated attention with reinforcement learning (SGARL-GNN) according to an embodiment of this application.

[0061] Figure 3 This is a comparison of model metrics for SGARL-GNN, SGARL-GNN / s, and SGARL-GNN / g on the Amazon dataset according to embodiments of this application.

[0062] Figure 4This is a comparison of model metrics for SGARL-GNN, SGARL-GNN / s, and SGARL-GNN / g on the Yelp dataset according to embodiments of this application;

[0063] Figure 5 This is a framework diagram of a graph neural network fraud detection system based on an attention mechanism according to an embodiment of this application. Detailed Implementation

[0064] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0065] refer to Figure 1 , Figure 1 The figure shows a flowchart of a graph neural network fraud detection method based on an attention mechanism according to an embodiment of this application. As shown, the method includes the following steps:

[0066] S101. Convert the original data into a structured multi-relation graph, wherein entities are modeled as nodes, various interactions between entities are modeled as edges, and initial feature representations are assigned to the nodes and edges.

[0067] In some specific embodiments, a multi-relationship graph is a heterogeneous graph composed of interactions between users and their various relationship types. A multi-relationship graph is defined as follows: , Represents a set of nodes , This represents the number of nodes in the multi-relationship graph. Each node... have 3D feature vector ,and Represents the set of all node features. Represents the set of real numbers. express 3D real space. Indicates in Nodes under the relationship and nodes The edges and relationships between them ,in It refers to the number of relations. An edge can be associated with multiple relations, and this is true. Different types of relationships. yes The tag set of each node in the text. Where 1 indicates that the node is a fraudster. This application treats attention-based graph neural network fraud detection as a semi-supervised classification task. Given a multi-relationship graph... and some of the labels are By leveraging the graph structure modeling and node feature learning capabilities of GNNs, and using these known labeled nodes as supervision information, the labels of another set of unlabeled nodes are inferred. This determines whether the entities corresponding to these unknown nodes are fraudsters or non-fraudsters, thereby achieving effective detection of fraudulent behavior in the graph.

[0068] In some specific embodiments, each multi-relation graph has three specific relation subgraphs, which are divided by the multi-relation graph according to relation type. Each specific relation subgraph is isomorphic, that is, it has only one type of node and relation.

[0069] S102. Calculate the semantic similarity between the central node of a specific relation subgraph and its neighboring nodes based on a label-aware mechanism, adaptively adjust the filtering threshold for selecting the neighboring nodes using reinforcement learning, and aggregate the information of the neighboring nodes within the selected relation to form the first node representation of each specific relation subgraph of the multi-relationship graph, wherein the specific relation subgraph is a layer of a specific relation of a single relation in the multi-relationship graph.

[0070] In some specific embodiments, step S102 includes:

[0071] S1021. Use a multilayer perceptron to obtain the label perception representation of the central node and its neighboring nodes, and calculate the cosine feature similarity between the central node and the neighboring nodes.

[0072] S1022. Based on the cosine feature similarity, sort the neighbor nodes of the center node in descending order, and select the top-k neighbor nodes with the highest cosine feature similarity as the sampling neighbors of the center node by combining the adaptive filtering threshold determined by reinforcement learning.

[0073] Specifically, a multilayer perceptron (MLP) is used as the node label predictor for the central node. Its neighboring nodes The cosine feature similarity calculation method is employed. The output of the hidden layer of the label predictor is used. As the central node Label-aware representation, in the GNN's... Layers and Relationships Below, the center node is calculated based on cosine feature similarity. and neighboring nodes The similarities are as follows:

[0074] Formula (1)

[0075] The cosine distance between two nodes is:

[0076] Formula (2)

[0077] in, The activation function used in this application is tanh. It is a multilayer perceptron. For the first time in GNN The central node of the layer output Label-aware representation, For the first time in GNN Neighbor nodes output by the layer Label-aware representation, The smaller the value, the more it indicates and The greater the similarity between nodes, the better. By basing the algorithm on node labels, interference caused by poor node masquerading in real-world scenarios is effectively avoided, reducing the complexity of similarity calculation and providing a stable foundation for subsequent neighborhood filtering.

[0078] To train a similarity metric using direct supervision signals from the labels, where, For activation function, As the central node Tag information, For the first time in GNN The central node of the layer output Label-aware representation, the first GNN of this application The cross-entropy loss of an MLP in a layer is defined as:

[0079] Formula (3)

[0080] This application defines the cross-entropy loss, which is a measure of label-aware similarity across the entire network, as:

[0081] Formula (4)

[0082] Top-k sampling is a dynamic neighbor selection method based on similarity scores, which selects the most relevant neighbor nodes for each target node. This application uses Top-k sampling to filter dissimilar neighborhoods based on different relationships.

[0083] GNN's Layers and Relationships Filtering threshold below This indicates the selection ratio from all neighbors. For example, if it's 1, all neighbor nodes of the central node under the relationship are retained; if it's 0, all neighbor nodes of the central node under the relationship are filtered out and do not participate in the central node's neighborhood information aggregation process. The remaining set of neighbors after filtering is:

[0084] Formula (5)

[0085] First, regarding the central node In relationship The central node retrieves all candidate neighbor nodes from its neighbor list. Secondly, for the central node... and each neighbor node The cosine similarity calculation method (Formula 1) is used to calculate a set of similarity scores. Next, based on Sort the candidate neighbor nodes in descending order. The sorted list of neighbor nodes is then arranged from highest to lowest similarity and will occupy the top position. Neighbors as chosen neighbors, i.e. The remaining nodes will be discarded in the current batch and will not participate in subsequent aggregation processes within the layer.

[0086] To avoid reliance on manually labeled data and to adaptively learn the optimal combination of neighbor selection filtering thresholds, this application introduces a reinforcement learning model based on the Actor-Critic framework. This model primarily models the process of selecting neighbors for a specific relation in each layer of the GNN as a Markov decision process. Specifically, the reinforcement learning module is defined as a tuple. , where: state space ,state In GNN's Layer, targeting the central node and relationships When selecting neighbors, the main components include the central node. In the current layer Embedded representation Candidate In the current layer Embedded representation Action space ,action Defined as the current relation Next specific candidate neighbors The decision-making process, specifically the set of actions, is as follows: , This indicates that the neighbor node is selected and retained. ; This indicates that the neighboring node is discarded. Reward function , indicating that an action is being performed (i.e., for a certain neighbor node) (Making a decision to keep or discard), the reward function is defined as:

[0087] Formula (6)

[0088] in, Candidate neighbor node The current value is calculated as follows: ,in For GNN layer, yes In relation Embedded representation below, For relationship The value function under this framework, in the Actor-Critic framework, is typically estimated by the Critic network. In the relationship Below, the average value of all neighboring nodes in previous training rounds is used, and this value generally increases as training progresses. This is a tolerance parameter used to avoid mistakenly discarding valuable neighbor nodes. When an action... If the reward is greater than 0, it indicates that the action is worth encouraging, and the policy network parameters will be adjusted to increase the likelihood of the action; if the reward is less than 0, it indicates that the action may need to be suppressed. When the action... If the reward is greater than 0, it indicates that discarding the node is reasonable; if the reward is less than 0, it indicates that a valuable node may have been mistakenly discarded. To address this, a tolerance parameter is set to provide a positive reward in this case, encouraging the retention of the node, and vice versa. Finally, if the decision is made to retain the neighboring node... Through relationships With the central node If a connection is made, it will be added to the selected set of neighbors. .

[0089] S103. Using an attention mechanism, dynamically evaluate the importance of each specific relation subgraph in the multi-relation graph to the central node, and assign corresponding weights to form a comprehensive second node representation.

[0090] In some specific embodiments, the contribution of neighborhood features of different relations to the representation of the central node varies significantly. To dynamically assign weights to each relation, an attention mechanism based on relation gating is introduced. Layers, based on the central node Label-aware representation and relationships Calculate a relation gating weight based on the characteristics of neighboring nodes. :

[0091] Formula (7)

[0092] in, and These are learnable weights and bias parameters. It is the activation function (using the Sigmoid function). yes In the Layer-based label-aware representation. The gating weights reflect the relationships... For the central node The value represents the importance of the symbol, and its range is between 0 and 1. The closer the value is to 1, the stronger the relation. For the central node The more important a relation is, the greater the weight its neighbor features will be given in the aggregation process; conversely, the closer the weight is to 0, the smaller the contribution of the relation to the central node, and the weaker the influence of its neighbor features will be. In this way, the relation gating mechanism can dynamically adjust the contribution of different relations in the aggregation process, making the model pay more attention to the key relations related to the central node, thereby improving the accuracy and robustness of node representation.

[0093] In some specific embodiments, the attention mechanism is a sparse attention mechanism, designed to focus on key neighbors and reduce computational complexity. This application employs a sparse attention mechanism to compute the center node. Neighbor nodes with different relationships Attention weights between them. In the first... Layer, for the central node and relationships Neighbor nodes in Calculate the attention score:

[0094] Formula (8)

[0095] in, and It is for the central node respectively and neighboring nodes Multilayer perceptron for feature transformation It is the feature dimension. It is a sparsified soft max function that generates a sparse distribution of attention weights, such that most attention weights are 0, with only a few key neighbor nodes retaining non-zero weights. This not only reduces invalid computation but also allows the model to focus more on important neighbor nodes, improving the model's efficiency and performance.

[0096] In some specific embodiments, a fusion-gated attention strategy is proposed by combining relation gating and sparse attention mechanisms. Specifically, in the first... Layer, for the central node First, the gating weight of each relation is calculated using a relation gating mechanism. Then, the central node is calculated using a sparse attention mechanism. Neighbor nodes with different relationships Attention weights between The final fusion is represented as:

[0097] Formula (9)

[0098] in, As the central node In GNN's The final aggregated representation that integrates all relational information; For activation functions; The total number of relations; In the first Layers and Relationships Gating weights; As the central node In relation The set of neighboring nodes; For the first time in GNN A multilayer perceptron that performs value transformation on the features of neighboring nodes; For neighboring nodes In GNN's Layered embedding representation. In this way, not only can weights be dynamically assigned to each relation, but key neighbors can also be effectively focused, reducing computational complexity and thus achieving efficient feature fusion between relations.

[0099] S104. The first node representation, the second node representation, and the node representation of the previous layer of GNN are fused to form the final embedded representation; the final embedded representation is input into the classifier to identify and judge fraudulent behavior.

[0100] In some specific embodiments, node representations generated under different relationships are fused:

[0101] Formula (10)

[0102] in, As the central node In GNN's Layer embedding representation; As the central node In GNN's Layer embedding representation; Features of the final aggregation node within the three relationships; As the central node In the The final aggregated representation integrates all relational information; Concat is the feature concatenation operation. This approach fully utilizes information from different relations to generate node representations with rich semantics, providing strong support for subsequent fraud detection tasks.

[0103] In some specific embodiments, the central node The final embedding is represented as , which is the output of the last layer of the attention-based graph neural network. The loss function of the GNN in the node classification task is defined as the cross-entropy loss function:

[0104] Formula (11)

[0105] Together with the loss function for node classification and the loss function for similarity measurement in formula (4), the final loss function of the attention-based graph neural network is defined as follows:

[0106] Formula (12)

[0107] in, and These are weight parameters, and It is the L2 norm of all model parameters.

[0108] Continue to refer to Figure 2 , Figure 2 The diagram illustrates the structure of a graph neural network model based on sparse gated attention with reinforcement learning (SGARL-GNN) according to an embodiment of this application. Figure 2 As shown, neighboring nodes are distinguished. For each central node, its neighboring nodes are divided into three categories: fraudulent neighbors, benign neighbors, and unlabeled neighbors. For unlabeled neighboring nodes, the SGARL-GNN architecture is used to determine whether the central node is a fraudulent node or a benign node. Figure 2The overall architecture of SGARL-GNN is described, comprising three key modules: intra-relation aggregation, inter-relation aggregation, and relation fusion. The intra-relation aggregation module calculates semantic similarity based on the label-aware scores of nodes and their neighbors, and samples neighbors using an adaptive threshold. The inter-relation aggregation module dynamically assigns weights to each relation by fusing sparse attention and gating mechanisms, thereby enhancing the model's focus on important relations. The relation fusion module, after aggregating the intra-relation and inter-relation modules, generates the final node representation. Wherein:

[0109] The relational aggregation module uses a multi-relationship graph as its "data input," which includes a central node (yellow) and its different types of neighboring nodes (fraudulent neighbors in red, benign neighbors in blue, and unmarked neighbors in green), as well as the relationships between them in different colors. After data input, the first step is "label awareness," where the model uses node label information (or pseudo-labels) to guide similarity calculation, helping to distinguish between fraudulent and benign connections. The "reinforcement learning" process then adaptively learns how to select the most valuable neighbors. The diagram illustrates different relationships (...). The subgraphs of each relation are processed separately. For each specific relation subgraph, the central node aggregates selected neighbor information from its neighbors in the current relation based on label-aware similarity and a filtering threshold determined by reinforcement learning, thereby generating a node representation for the corresponding relation. In other words, it is the "first node representation" of each specific relation subgraph in a multi-relation graph, capturing the local information of a node under a single relation.

[0110] The inter-relation aggregation module takes the node representations of each relation as input from the intra-relation aggregation module. It first passes through a relation gating mechanism to determine which relations are different (e.g., ...). Different gating weights are assigned to the central node based on its importance. Then, sparse attention is used to calculate the attention score between the central node and the aggregated representations from different relations. A sparsified Softmax function is employed, ensuring that only the few most relevant relations are assigned non-zero attention weights, thus focusing on key relations. Finally, through this fusion-gated attention strategy, information from all relations is weighted and aggregated to form a more comprehensive "second node representation." This indicates that information from different relational dimensions is integrated.

[0111] The relation fusion module merges the representations obtained in the first two steps. It combines the node representations from each relation obtained in "Step 1 Relational Aggregation". And the comprehensive relation representation obtained from "Step 2 relation aggregation" Even including the node representation of the previous layer of the GNN. They were all pieced together. This forms the final node representation. This is the model's "final embedding representation," which is the final integration of multi-level and multi-dimensional information of nodes. It has extremely strong discriminative power and is then input into a classifier to identify and judge whether a user is a "benign user" or a "fraudulent user."

[0112] The SGARL-GNN model proposed in this application achieves efficient detection through a sparse gated attention and reinforcement learning-based neighbor selection mechanism. First, it utilizes label-aware neighbor sampling to filter similar neighbors based on the semantic distance of the node prediction distribution. Second, it dynamically adjusts the neighbor sampling thresholds for each relationship through reinforcement learning, achieving adaptive neighbor selection. Finally, it introduces sparse gated attention to enhance key signal capture while reducing computational complexity, accurately capturing fraudulent features and improving generalization ability. Experimental results show that in the social network fraud detection task, SGARL-GNN significantly outperforms the CARE-GNN model, improving the AUC value by 6.82% on the Amazon dataset and 3.71% on the Yelp dataset, validating the effectiveness of SGARL-GNN in multi-relationship graph fraud detection.

[0113] Example

[0114] In this study, the SGARL-GNN algorithm was implemented using Python 3.11 and PyTorch 2.3. To improve training efficiency and avoid overfitting, mini-batch training and undersampling techniques were employed to train SGARL-GNN. Specifically, in each mini-batch, the same number of negative instances as the number of positive instances were randomly selected. This application used a uniform embedding size (64), batch size (1024 for Yelp, 256 for Amazon), learning rate (0.01), and similarity loss weights (...) for all models. L2 regularization weights ( All experiments used a 40% training ratio.

[0115] This application uses two publicly available datasets commonly used in fraud detection. Table 1 lists various statistics for the Yelp and Amazon datasets, including the number of nodes, edges, fraud rate, relationship category, and relationship description.

[0116] Table 1 Dataset Information

[0117]

[0118] The Yelp dataset was collected from an internal dataset released by Yelp.com, the largest business review website in the United States. In addition to containing information about the relationship between users and products, the dataset also contains various metadata, including the text content of the reviews, timestamps, and star ratings.

[0119] The Amazon dataset contains over 34,000 consumer reviews, from which 11,949 product reviews under the musical instrument category were extracted as the Amazon dataset used in this application. Users with a useful vote rate greater than 80% are labeled as benign users, and users with a useful vote rate less than 20% are labeled as fraudulent users.

[0120] To verify the effectiveness of the SGARL-GNN method proposed in this application, seven graph neural network models and their improved methods were compared: GCN, GraphSAGE, GAT, Graph-SAINT, GraphConsis, CARE-GNN, and PC-GNN. Table 2 shows the detection performance of all compared methods, which demonstrates that the SGARL-GNN method outperforms all the compared methods, proving its effectiveness.

[0121] Table 2. Comparison of fraud detection performance between the model in this application and seven existing models.

[0122]

[0123] In Table 2, Indicates recall rate, AUC (Area Under the ROC Curve) represents the area under the Receiver Operating Characteristic Curve (ROC). A higher AUC value indicates better classification performance. It is used to evaluate the overall performance of binary classification models. The ROC curve is plotted with the false positive rate (FPR) on the x-axis and the true positive rate (TPR) on the y-axis. In the formula, This indicates the number of discrete points (or thresholds) used to plot the ROC curve. This indicates the first position on the ROC curve. The false positive rate (FPR) corresponding to each point. The calculation formula is , This indicates the first position on the ROC curve. The true probability ratio (TPR) corresponding to each point. The calculation formula is . In the formula, , This represents the sample that was predicted as a positive example. This represents a sample that is predicted as a positive example even if it is a negative example. This represents a sample that is predicted as a negative example when it is a positive example. This indicates a sample that is predicted as a counterexample. Compared to classic graph neural network models GCN, GAT, and Graph-SAG, the SGARL-GNN method in this application achieves a significant improvement in detection performance. This is mainly because these classic graph neural network models are not specifically designed for fraud scenarios, thus failing to achieve optimal detection results. In the Amazon dataset, the AUC of this application's model is 13.8% higher than that of the GCN model; in the Yelp dataset, the AUC of this application's model is 20.07% higher than that of the GCN model. GraphSAINT and PC-GNN, graph neural network fraud detection models based on class imbalance processing, outperform classic graph neural network models but are weaker than the SGARL-GNN model in this application. In the Amazon dataset, the AUC of this application's model is 1.86% higher than that of the PC-GNN model; in the YelpChi dataset, the AUC of this application's model is 0.03% higher than that of the PC-GNN model. GraphConsis and CARE-GNN are models proposed to address the possibility of spoofing or noise in the dataset. The SGARL-GNN model incorporates sparse attention and gating mechanisms, enabling it to better suppress noise and identify fraudsters' spoofing. On the Amazon dataset, the model's AUC is 6.82% higher than the CARE-GNN model; on the Yelp dataset, the model's AUC is 3.71% higher than the CARE-GNN model.

[0124] Furthermore, ablation experiments were conducted to verify the effectiveness of two key modules of the SGARL-GNN model. This application constructs two variant models, SGARL-GNN / s and SGARL-GNN / g. SGARL-GNN / s uses only the reinforcement learning module and gating mechanism module in the complete SGARL-GNN method, omitting the sparse attention module. SGARL-GNN / g uses only the reinforcement learning module and sparse attention module in the complete SGARL-GNN method, omitting the gating mechanism module. Experimental results are shown in Table 3.

[0125] Table 3 Comparison of fraud detection performance of the SGARL-GNN model and its two variants

[0126]

[0127] As shown in Table 3, the experimental results clearly demonstrate that both modules play a crucial role in improving model performance, with the complete model achieving the best performance on most metrics. This indicates that the sparse attention module and the gating mechanism module work together to enhance the model's fraud detection capability. Figure 3 and Figure 4 , Figure 3 and Figure 4 The comparison of Amazon dataset model metrics and Yelp dataset model metrics according to embodiments of this application are shown respectively. Figure 3 , Figure 4 As shown, SGARL-GNN / s significantly outperforms the full model on both datasets. On the Amazon dataset, the full model's AUC is 1.97% higher than the SGARL-GNN / s variant; on the Yelp dataset, the full model's AUC is 4.41% higher. This clearly demonstrates the crucial role of the sparse attention module in focusing key information and suppressing noise interference; removing it leads to a decrease in the model's ability to capture fraudulent patterns. Secondly, SGARL-GNN / g also exhibits performance degradation on both datasets. On the Amazon dataset, the full model's AUC is 1.92% higher than the SGARL-GNN / g variant; on the Yelp dataset, the full model's AUC is 4.62% higher. This indicates that the gating mechanism module is indispensable for effectively fusing information and dynamically adjusting information flow; removing it impairs the model's performance in complex scenarios.

[0128] Continue to refer to Figure 5 As an implementation of the above method, in a second aspect, this application provides an embodiment of a framework diagram 500 for a graph neural network fraud detection system based on an attention mechanism. This system embodiment is similar to... Figure 1 Corresponding to the illustrated method embodiment, this system can be specifically applied to various electronic devices. The system 500 includes a data processing and graph construction module 501, a first node representation acquisition module 502, a second node representation acquisition module 503, and a final embedded representation acquisition and classification module 504, all interconnected, wherein:

[0129] The data processing and graph construction module 501 is configured to convert the raw data into a structured multi-relation graph, wherein entities are modeled as nodes, various interactions between the entities are modeled as edges, and initial feature representations are assigned to the nodes and the edges.

[0130] The first node representation acquisition module 502 is configured to calculate the semantic similarity between the central node of a specific relation subgraph in the multi-relation graph and its neighboring nodes based on a label-aware mechanism; adaptively adjust the selection filtering threshold of the neighboring nodes using a reinforcement learning mechanism; and aggregate the selected neighboring node information to form the first node representation of each specific relation subgraph in the multi-relation graph; wherein, the specific relation subgraph refers to a layer of a single relation type in the multi-relation graph;

[0131] The second node representation acquisition module 503 is configured to use an attention mechanism to dynamically evaluate the importance of each specific relation subgraph in the multi-relation graph to the central node, and assign corresponding weights to form a comprehensive second node representation;

[0132] The final embedding representation acquisition and classification module 504 is configured to fuse the first node representation, the second node representation, and the node representation of the previous layer of GNN to form a final embedding representation; and input the final embedding representation into a classifier to identify and judge fraudulent behavior.

[0133] Although the principles of the present invention have been described in detail above with reference to preferred embodiments, those skilled in the art should understand that the above embodiments are merely illustrative explanations of the implementation of the present invention and are not intended to limit the scope of the present invention. The details in the embodiments do not constitute a limitation on the scope of the present invention. Any obvious changes, such as equivalent transformations or simple substitutions, based on the technical solutions of the present invention without departing from the spirit and scope of the present invention fall within the protection scope of the present invention.

Claims

1. An attention mechanism-based graph neural network fraud detection method, characterized in that, The method is applied to online comment fraud detection, and the method includes: S1. Convert the original data into a structured multi-relation graph, wherein entities are modeled as nodes, various interactions between entities are modeled as edges, and initial feature representations are assigned to the nodes and edges. The multi-relation graph is a heterogeneous graph composed of user interactions and their multi-relation types. S2. Based on a label-aware mechanism, the semantic similarity between the central node and its neighboring nodes in a specific relation subgraph of the multi-relationship graph is calculated using the label information of the nodes to distinguish between fraudulent and benign connections. A reinforcement learning mechanism is used to adaptively adjust the selection filtering threshold of the neighboring nodes to select the most valuable neighbors. The selected neighboring node information is then aggregated to form the first node representation of each specific relation subgraph in the multi-relationship graph. Here, the specific relation subgraph refers to a layer of a single relation type in the multi-relationship graph, and the neighboring nodes include fraudulent neighbors, benign neighbors, and unlabeled neighbors. S3. Using an attention mechanism, dynamically evaluate the importance of each specific relation subgraph in the multi-relationship graph to the central node, and assign corresponding weights to achieve focus on key relationships, so as to form a comprehensive second node representation; S4. The first node representation, the second node representation, and the node representation of the previous layer of GNN are fused to form the final embedded representation; the final embedded representation is input into the classifier to identify and determine whether the user is a benign user or a fraudulent user. The attention mechanism comprises a relation gating mechanism, based on the label-aware representation of the center node and the features aggregated within a specific relation, the relation gating weight is calculated by using the relation gating mechanism : wherein is the GNN's relationship gate weight for layer and are learnable weight and bias parameters, respectively is an activation function is the center node the label-aware representation for layer the label-aware representation for layer The attention mechanism includes a sparse attention mechanism, which calculates the attention scores between the central node and its neighboring nodes with different relationships, and generates a sparse attention weight distribution through a sparsified Softmax function. The formula for calculating the attention score is as follows: wherein, is the first layer, is the second layer, is the attention score of the center node and the neighbor node in the relationship is the first layer, is the second layer, is the center node, is the neighbor node, is the feature dimension, is the sparse Soft max function. The attention mechanism employs a fusion-gated attention strategy, which includes: in the GNN... Layer, for the central node The gating weight of each relation is calculated through a relation gating mechanism. The central node is calculated using a sparse attention mechanism. Neighbor nodes with different relationships Attention weights between The fusion representation of the fusion-gated attention strategy is as follows: In the formula, As the central node In GNN's The final aggregated representation that integrates all relational information; For activation functions; The total number of relations; In the first Layers and Relationships Gating weights; As the central node In relationship The set of neighboring nodes; For the first time in GNN A multilayer perceptron that performs value transformation on the features of neighboring nodes; Neighboring nodes In GNN's Layer embedding representation.

2. The graph neural network fraud detection method based on attention mechanism according to claim 1, characterized in that, Step S2 includes: S21. Use a multilayer perceptron to obtain the label perception representation of the central node and its neighboring nodes, and calculate the cosine feature similarity between the central node and the neighboring nodes. S22. Based on the cosine feature similarity, sort the neighbor nodes of the center node in descending order, and select the top-k neighbor nodes with the highest cosine feature similarity as the sampling neighbors of the center node by combining the adaptive filtering threshold determined by reinforcement learning.

3. The graph neural network fraud detection method based on attention mechanism according to claim 2, characterized in that, In GNN's Layers and Relationships Below, the cosine feature similarity The calculation formula is: In the formula, The central node; These are the neighboring nodes of the central node; For activation functions; It is a multilayer perceptron; For the first time in GNN The central node of the layer output Label-aware representation; For the first time in GNN Neighbor nodes output by the layer Label-aware representation.

4. The graph neural network fraud detection method based on attention mechanism according to claim 2, characterized in that, Step S22 includes employing the Actor-Critic framework to model the process of each layer of the GNN selecting neighbors for a specific relationship as a Markov decision process, by defining the state space. Action space and reward function The system adaptively learns the optimal combination of neighbor selection filtering thresholds, wherein the reward function... Represented as: In the formula, Candidate neighbor nodes Its current value , For GNN layer; Neighboring nodes In relationship Embedded representation below; For relationship The value function under; In relation Below, the average value of all neighboring nodes in previous training rounds; Tolerance parameters are used to avoid mistakenly discarding valuable neighbor nodes; actions Defined as the current relation Next specific candidate neighbors The choice decision, in which This indicates that the neighbor node is selected and retained. , This indicates that the neighboring node is discarded. .

5. The graph neural network fraud detection method based on attention mechanism according to claim 1, characterized in that, The final loss function is: In the formula, This is the final loss function during the model training process; Cross-entropy loss function for node classification tasks; Cross-entropy loss is used to measure label-aware similarity across the entire network. and These are the weight parameters; The L2 norm of all model parameters; As the central node The true label information; For activation functions; For the first time in GNN The layer is applied to the multilayer perceptron into which the nodes are ultimately embedded; As the central node The final embedded representation obtained after processing; For GNN's first Cross-entropy loss for label-aware similarity measurement in layer computation; As the central node In GNN's Layer embedding representation; The final aggregation node features within the three relationships; As the central node In the The final aggregated representation that integrates all relational information is obtained through layer fusion; Concat is the feature concatenation operation.

6. A graph neural network fraud detection system based on an attention mechanism, characterized in that, The system is used for online comment fraud detection, and the system includes: The data processing and graph construction module is configured to convert raw data into a structured multi-relation graph, wherein entities are modeled as nodes, various interactions between entities are modeled as edges, and initial feature representations are assigned to the nodes and edges. The multi-relation graph is a heterogeneous graph composed of user interactions and their multi-relation types. The first node represents the acquisition module, configured based on a label-aware mechanism. It uses node label information to guide the calculation of the semantic similarity between the central node and its neighboring nodes in a specific relation subgraph of the multi-relationship graph, distinguishing between fraudulent and benign connections. It adaptively adjusts the selection filtering threshold of the neighboring nodes using a reinforcement learning mechanism to select the most valuable neighbors. The selected neighboring node information is then aggregated to form the first node representation of each specific relation subgraph in the multi-relationship graph. Here, the specific relation subgraph refers to a layer of a single relation type in the multi-relationship graph, and the neighboring nodes include fraudulent neighbors, benign neighbors, and unlabeled neighbors. The second node represents the acquisition module, which is configured to use an attention mechanism to dynamically evaluate the importance of each specific relationship subgraph in the multi-relationship graph to the central node, and assign corresponding weights to achieve focus on key relationships in order to form a comprehensive second node representation; The final embedding representation acquisition and classification module is configured to fuse the first node representation, the second node representation, and the node representation of the previous layer of GNN to form the final embedding representation; the final embedding representation is input into the classifier to identify and determine whether the user is a benign user or a fraudulent user; The attention mechanism includes a relation gating mechanism. Based on the label-aware representation of the central node for different relations and the features of aggregation within specific relations, the relation gating mechanism is used to calculate relation gating weights. : In the formula, For GNN Layer relational gating weights; and These are the learnable weights and bias parameters, respectively; For activation functions; As the central node In the Layer label-aware representation; The attention mechanism includes a sparse attention mechanism, which calculates the attention scores between the central node and its neighboring nodes with different relationships, and generates a sparse attention weight distribution through a sparsified Softmax function. The formula for calculating the attention score is as follows: In the formula, In the first Layer, for the central node and relationships Neighbor nodes in Attention score; and Each is for the central node and neighboring nodes Multilayer perceptron for feature transformation; For feature dimensions; A sparsed Soft max function; The attention mechanism employs a fusion-gated attention strategy, which includes: in the GNN... Layer, for the central node The gating weight of each relation is calculated through a relation gating mechanism. The central node is calculated using a sparse attention mechanism. Neighbor nodes with different relationships Attention weights between The fusion representation of the fusion-gated attention strategy is as follows: In the formula, As the central node In GNN's The final aggregated representation that integrates all relational information; For activation functions; The total number of relations; In the first Layers and Relationships Gating weights; As the central node In relationship The set of neighboring nodes; For the first time in GNN A multilayer perceptron that performs value transformation on the features of neighboring nodes; Neighboring nodes In GNN's Layer embedding representation.