Bank abnormal transaction detection equipment method

By strengthening the negative sample contrastive learning algorithm GLEAN, using node-node and node-subgraph comparison, combined with multi-scale comparison network and GCN, it solves the problem of traditional methods being difficult to process large-scale bank transaction data, and achieves more efficient abnormal transactions. Detect and adapt to the needs of complex financial environments.

CN118708987APending Publication Date: 2024-09-27SHENZHEN CHUANYUNGU TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410955252.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

Traditional rule-based or supervised learning methods are difficult to meet the needs of efficient processing of large-scale bank transaction data and accurate identification of abnormal transactions, especially in complex and changing financial environments.

Method used

A contrastive learning anomaly detection algorithm GLEAN that strengthens negative samples is proposed. It uses node-node comparison and node-subgraph comparison as basic modules to generate negative samples through attribute perturbation, capture the context information of nodes, reduce the impact of false negative samples, and pass Multi-scale contrastive networks and graph convolutional neural networks (GCN) learn node and subgraph representations to build anomaly detection models.

Benefits of technology

It improves the efficiency of anomaly detection in bank transaction networks, can more accurately identify abnormal transaction behaviors, reduces data annotation costs, and adapts to the needs of complex financial environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118708987A
    Figure CN118708987A
Patent Text Reader

Abstract

The invention relates to a bank abnormal transaction detection device and method, and belongs to the technical field of computers. The invention aims to solve the problems of sampling deviation and difficult negative sample distinguishing limitation in the existing bank transaction anomaly detection method. According to the technical scheme, the method comprises the steps of collecting related bank transaction data, enhancing the data through attribute disturbance and obtaining difficult-to-negative samples based on similarity ranking, training a contrast learning model by using the data and the difficult-to-negative samples, generating attributes of target nodes in an attribute shielding enhancement view and an original image, and obtaining an attribute shielding enhancement view. And outputting an abnormal transaction behavior according to scores of the comparison learning model and the generation model. The method is mainly used for accurately identifying abnormal behaviors in bank transactions and maintaining financial security and stability. The method has the technical effects that experiments on a plurality of reference data sets show that the method is superior to all baseline methods, the negative influence of sampling deviation can be greatly reduced, high performance is kept in bank transaction network anomaly detection, and the method is more reliable in practical application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0003] The present invention relates to the technical fields of computer network, graphic image processing, computer performance improvement, encryption and decryption, Chinese character input and the like. Background Art

[0005] In today's highly digital and globalized financial environment, anomaly detection of bank transactions is one of the important tasks to maintain financial security and stability. As the number and complexity of transactions processed by banks continue to grow, traditional rule-based or supervised learning methods have been unable to meet the needs of efficient processing of large-scale transaction data and accurate identification of abnormal transactions.

[0006] In this case, self-supervised contrastive learning becomes an effective method to detect abnormal bank transactions. Unlike traditional supervised methods, self-supervised learning does not require a large number of labeled data sets, and can learn abnormal patterns from large-scale unlabeled data, reducing the cost and difficulty of data annotation, so it is more adaptable to the growing number and complexity of bank transactions. Self-supervised contrastive learning can effectively use encoders to capture hidden patterns and abnormal behaviors in data, and construct feature representations by learning similarities and differences between data, thereby identifying abnormal transaction behaviors, that is, comparing normal transactions with potential abnormal transaction samples, extracting useful features from a large amount of unlabeled data, and identifying potential abnormal transaction patterns.

[0007] In summary, the application of self-supervised contrastive learning in bank transaction anomaly detection has broad prospects, which can help banks accurately identify abnormal transaction behaviors in a complex and changing financial environment. Summary of the invention

[0009] The goal of this invention is to propose a contrastive learning anomaly detection algorithm GLEAN that enhances negative samples. The algorithm uses node-node comparison and node-subgraph comparison as basic modules. First, negative samples are generated by attribute perturbation, and difficult negative samples that are difficult to distinguish are selected to introduce node-node comparison to improve the discrimination ability of the model. GLEAN also reconstructs the attributes of the target node in the original view and the attribute-shielded enhanced view to capture the contextual information of the node and reduce the impact of false negative samples. The GLEAN algorithm improves the efficiency of anomaly detection in bank transaction networks by introducing difficult negative samples and reconstructing the attributes of shielded nodes. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0012] Figure 1 is a flow chart of an abnormal transaction detection method provided according to Embodiment 1 of the present invention;

[0013] Figure 2 It is a schematic diagram of contrast learning provided according to an embodiment of the present invention. DETAILED DESCRIPTION

[0015] This paper proposes a contrastive learning anomaly detection algorithm GLEAN based on enhanced negative samples, see Figure 2 To understand the description of the method, GLEAN consists of four parts: hard negative sample generation module, contrastive learning network, generative network and anomaly detection.

[0016] 5.1 Multi-scale Contrastive Network

[0017] GLEAN uses the restarted random walk (RWR) strategy to sample neighbor nodes of the target node to construct a subgraph containing node context information. The RWR algorithm starts with the target node and performs a random walk, returning to the starting node with a certain probability each time. The random walk can capture important neighbor nodes and network structures around the target node. The multi-scale comparison network includes two comparison scales, namely subgraph-node comparison and node-node comparison.

[0018] 5.1.1 Subgraph-Node Comparison

[0019] In order to learn the node and subgraph representation in the latent space, a graph convolutional neural network (GCN) layer is introduced to obtain the embedded representation of the node by aggregating and propagating the feature information of the node in the subgraph. During the learning process, the attributes of the target node in the subgraph are masked, that is, set to 0, which helps to reduce the influence of the target node's own features on the representation learning of other nodes in the subgraph. In the process of learning the representation, it relies more on the feature information of the neighboring nodes around the target node, so as to better support the anomaly detection task.

[0020]

[0021] in is the adjacency matrix of the node, is the degree matrix, , is the adjacency matrix of the subgraph with self-loops, is the identity matrix, is a trainable parameter matrix.

[0022] After applying GCN, the subgraph embedding vector is obtained using the readout function, so that the dimension of the subgraph vector is consistent with the node, and the subgraph is calculated. The nodes represent the average value of the vector, It is the first A vector representation of each node.

[0023]

[0024] For the embedded representation of each target node, using the weight matrix learned by GCN, the characteristics of the target node can be mapped to a high-dimensional latent space.

[0025]

[0026] in Shared with GCN.

[0027] In order to measure the abnormality of a node and its corresponding subgraph, a function based on bilinear transformation is used to quantify the node representation. The subgraph in which it is located is represented Is there an abnormal relationship between The definition is as follows,

[0028]

[0029] is the learnable parameter matrix, is the logistic sigmoid function. For the sampled positive sample pair, the similarity between the target node and its sampled subgraph should be maximized, that is, On the contrary, for the sampled negative sample pairs, the similarity between the target node and the random subgraph should be minimized, that is, .

[0030] 5.1.2 Node-to-node comparison

[0031] In order to mine the information of a single node in the transaction network, node-node comparison is performed to capture anomalies. First, a new GCN is used to obtain the representation of the subgraph. , even after the attributes of the target node are masked, GCN can still learn the embedding representation of the target node, and the last vector representation of the subgraph embedding is the embedding of the target node h i ' ( l ) = H i ' ( l ) [1,:] . We use a multi-layer perceptron (MLP) to transform the node features into Mapped into the same embedding space as GCN, different embedding representations of the same node constitute positive sample pairs.

[0032]

[0033] Shared with GCN, is the PReLU activation function, followed by a discriminant score The abnormality of a single node is measured from the perspective of different representations of the node.

[0034] 5.1.3 Loss Function

[0035] The Jensen-Shannon divergence is used to train the subgraph-node comparison network. The goal of the loss function is to minimize the difference between the node-subgraph similarity output by the model and the true label. is the discriminant score of the positive sample pair, is the discriminant score of the negative sample pair.

[0036]

[0037] The loss function for node-node comparison also uses Jensen-Shannon divergence and is expressed as By mining the consistency information between nodes and subgraphs and the characteristics of individual nodes, the overall loss function of the contrastive network is constructed as follows:

[0038]

[0039] It is a tuning parameter used to flexibly balance the importance contribution of node-subgraph comparison and node-node comparison during training.

[0040] 5.2 Hard Negative Sample Generation

[0041] In order to explore the potential of hard negative samples, we first use the graph enhancement strategy of attribute perturbation to obtain nodes that can be used as negative samples, that is, to perturb the attribute matrix The enhanced graph is rearranged row by row to generate an enhanced view. While maintaining the same topological structure as the original graph, the enhanced graph exchanges the attributes of the nodes and gives different context information to each node. The matrix after attribute perturbation is expressed as :

[0042]

[0043] in is a string containing 1 to Randomly ordered list.

[0044] To evaluate the difficulty of each negative sample in the augmented graph, we can quantify it by calculating the cosine similarity between the negative sample in the augmented view and the positive sample in the original view. and its positive sample , for any negative sample in the enhanced view ,use To represent the positive sample With negative samples The difficulty between.

[0045]

[0046] in , These are all representations learned by the GCN encoder. is the representation of the positive sample obtained from the original view, is the representation of negative samples obtained from the enhanced view. To select the hard negative samples. If Φ is close to 0, it means that the negative sample is easy to distinguish from the positive sample, while Φ is close to 1, it means that the negative sample may be a false negative sample, which may bring negative effects. The values ​​of are sorted, the samples at both ends are removed, and the remaining samples are selected as hard negative samples. In order to limit the difficulty range of hard negative samples, the two hyperparameters and Used to set the lower and upper limits of difficulty.

[0047] Take the difficult negative samples as negative samples for node-node comparison and use formula (1.6) to calculate the similarity between nodes. , the node-node contrast loss can be updated as:

[0048]

[0049] 5.3 Attribute Refactoring

[0050] In the node-subgraph comparison, the subgraph contains the contextual information of the node. However, the use of attribute perturbation will change the characteristics of the nodes in the subgraph, making the subgraph no longer accurately represent the local information of the node. In order to deal with the problem of sampling bias, we propose a new strategy, which is to mask the node attributes and reconstruct the target node. The core operation of feature masking is to transform the node feature matrix Some attributes in are set to 0, and the attribute matrix after feature masking is ,

[0051]

[0052] in is the mask matrix and the feature matrix With the same shape, represents the Hadamard product, if the node No. elements are masked or discarded, then ,otherwise .

[0053] Since the sampling process may introduce bias and there are a certain number of abnormal nodes in the graph, which will affect the representation of the target node in the latent space, we reconstruct the original attributes of the target node in the original view and the enhanced view to keep the representation of the target node consistent in different views, so as to maintain the model's ability to distinguish abnormal samples from normal samples, thereby reducing the impact of false negative samples and abnormal nodes caused by sampling. The reconstruction loss of the local view in the original view is defined as the difference between the reconstructed feature vector and the original feature vector:

[0054]

[0055] It is a GCN-based decoder. It is the representation of the target node obtained by aggregating the information of neighboring nodes using GCN, enhancing the reconstruction loss in the view and The calculation method is the same, and the overall loss of the reconstruction module is defined as follows,

[0056]

[0057] 5.4 Anomaly Detection

[0058] Joint contrastive learning module loss With the loss of the generative learning module , taking advantage of them comprehensively, the loss function of the GLEAN model is:

[0059]

[0060] By adjusting , you can adjust the contribution ratio of the generative learning module. The discriminant scores of the contrast learning module can reflect the abnormality of the node. The higher the reconstruction error score in the generative learning module, the more likely the node is abnormal. The final abnormal score is a weighted combination of the two scores, and the weight is determined by the parameter Control. In the anomaly detection stage, the discriminant scores of hard negative samples are not directly used in the calculation of anomaly scores, because they are mainly used for optimization in the training process rather than directly affecting the detection results.

[0061]

[0062] In the contrastive learning module, the anomaly score of a node is calculated by comparing the anomaly scores of the nodes. Anomaly score compared to node-subgraph Joint decision: , the anomaly scores in different comparison scales are given by It is calculated that and Represent the similarity scores between the target node and the positive sample and the negative sample respectively. The reconstruction error score of the node is: , Is a node Representations learned by GCN.

Claims

1. A method for detecting abnormal bank transactions, characterized in that: The following steps are involved: - Use the restarted random walk (RWR) strategy to sample the neighbor nodes of the target node and build a subgraph containing node context information; - Perform subgraph-node comparison and node-node comparison. The subgraph-node comparison uses a graph convolutional neural network (GCN) to learn node and subgraph representations, shields the attributes of the target node in the subgraph, uses a readout function to obtain the subgraph embedding vector, and measures the abnormality of the node and subgraph through a bilinear transformation function. The node-node comparison uses a new GCN to obtain the subgraph representation, uses a multi-layer perceptron (MLP) to map the node features to the same embedding space as the GCN, constructs positive sample pairs, and measures the abnormality of a single node. - Generate negative samples through attribute perturbation. Specifically, the attribute matrix is ​​rearranged row by row to generate an enhanced view, the attributes of the nodes are exchanged, the difficulty of negative samples is evaluated based on the cosine similarity between the negative samples in the enhanced view and the positive samples in the original view, and the difficult negative samples are selected; - Mask the node attributes and reconstruct the target node, set some attributes in the node feature matrix to 0, and reconstruct the original attributes of the target node in the original view and enhanced view.

2. The bank abnormal transaction detection method according to claim 1, characterized in that: In the subgraph-node comparison, the embedding representation of the node is calculated by the following formula: ; in is the adjacency matrix of the node, is the degree matrix, , is the adjacency matrix of the subgraph with self-loops, is the identity matrix, is a trainable parameter matrix; ; It is the first The vector representation of the nodes; ; in Shared use with GCN; ; is the learnable parameter matrix, is the logistic sigmoid function; ; Shared with GCN, is the PReLU activation function; ; is the discriminant score of the positive sample pair, is the discriminant score of the negative sample pair; ; is a tuning parameter.

3. The bank abnormal transaction detection method according to claim 1, characterized in that: In the subgraph-node comparison, the subgraph embedding vector is calculated by the following formula: ; in is a string containing 1 to Randomly ordered lists; ; in , These are all representations learned by the GCN encoder. is the representation of the positive sample obtained from the original view, is the representation of negative samples obtained from the enhanced view; 。 4. The bank abnormal transaction detection method according to claim 1, characterized in that: The attribute reconstruction is defined by the following formula: ; ; 。 5. The bank abnormal transaction detection method according to claim 1, characterized in that: In the anomaly detection, the following formula is used for calculation: ; ; In the contrastive learning module, the anomaly score of a node is calculated by comparing the anomaly scores of the nodes. Anomaly score compared to node-subgraph Joint decision: , the anomaly scores in different comparison scales are given by It is calculated that and Represent the similarity scores between the target node and the positive sample and the negative sample respectively.

Citation Information

Cited By

  • Import and export behavior attribute graph anomaly detection method and device, computer equipment and computer program product

    CN120875962A

  • Import and export behavior attribute graph anomaly detection method and device, computer device and computer program product

    CN120875962B