Method and apparatus for risk identification

Through joint training of feature extraction and comparative learning of semantic-free and semantic data samples, interpretable risk identification results are generated, which solves the problems of lack of semantic information and low efficiency of human annotation in the existing technology, and improves the accuracy of risk identification. and efficiency.

CN114529191BActive Publication Date: 2024-10-22ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210142895.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-16
Publication Date
2024-10-22
Estimated Expiration
2042-02-16

AI Technical Summary

Technical Problem

Existing risk identification methods lack semantic information guidance in the clustering process, resulting in uninterpretable results. Supervised solutions require a lot of manpower for labeling, which has limitations and inefficiency.

Method used

Using a joint training method, combining unsemantic and semantic training data samples, generating unsemantic and semantic feature vectors through feature extraction and contrastive learning, using the contrastive learning loss function and the similarity loss function of the clustering results for model training, and generating Interpretable risk identification results.

Benefits of technology

It improves the accuracy and efficiency of risk identification, enhances the fine-grained classification of risk types by the model, and can provide interpretive results of risk categories in non-semantic data samples.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114529191B_ABST
    Figure CN114529191B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method and apparatus for risk identification. A method for risk identification, comprising: obtaining a semantic-free training data sample and a semantic training data sample related to a risk instance; using the semantic-free training data sample and the semantic training data sample to jointly train a first risk identification model and a second risk identification model, comprising: using a first feature extraction module and a second feature extraction module to perform feature extraction on the semantic-free training data sample and the semantic training data sample to generate a semantic-free training feature vector and a semantic training feature vector respectively; and performing comparative learning on the semantic-free training feature vector and the semantic training feature vector so that the loss function of the comparative learning converges.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of the Internet, and in particular to a method and device for risk identification using a neural network. Background Art

[0002] With the development of Internet technology, various network businesses have developed rapidly, such as online shopping, online transactions, etc. Network risk control has become increasingly important.

[0003] The current solutions for risk identification include unsupervised solutions and supervised solutions. The unsupervised solution uses non-semantic information such as user characteristics and historical behaviors as input, and uses an unsupervised clustering algorithm to directly cluster instances. Its disadvantage is that it only considers the internal similarity between features during clustering, and lacks the guidance of labels with semantic information. Therefore, the clustering results do not have explanatory information, and the results are difficult to be directly used by the business. The supervised solution extracts a series of semantic labels from the semantic information involved in the risk instance through annotation, automatic or semi-automatic methods, uses the characteristics of the risk business and the corresponding labels as input, and trains a supervised machine learning model. Its disadvantage is that it requires more manpower to analyze auxiliary information for labeling, and manual labeling may have certain limitations.

[0004] Therefore, there is an urgent need for efficient and accurate risk identification solutions. Summary of the invention

[0005] In order to solve the above technical problems, the present invention provides a method for risk identification, comprising:

[0006] Obtaining non-semantic training data samples and semantic training data samples related to risk instances;

[0007] Using the non-semantic training data samples and the semantic training data samples to jointly train the first risk identification model and the second risk identification model;

[0008] The first risk identification model includes a first feature extraction module and a first clustering module, the second risk identification model includes a second feature extraction module and a second clustering module, and the joint training includes:

[0009] Using the first feature extraction module and the second feature extraction module to perform feature extraction on the non-semantic training data sample and the semantic training data sample respectively to generate a non-semantic training feature vector and a semantic training feature vector; and

[0010] The semantic-free training feature vector and the semantic-based training feature vector are subjected to contrastive learning so that a loss function of the contrastive learning converges.

[0011] Optionally, the contrastive learning comprises:

[0012] Processing the semantic-free training feature vector using a first mapping module to generate a mapped semantic-free training feature vector;

[0013] Processing the semantic training feature vector using a second mapping module to generate a mapped semantic training feature vector; and

[0014] The semantic-free training feature vector is compared and learned with the mapped semantic training feature vector, and the semantic training feature vector is compared and learned with the mapped semantic-free training feature vector.

[0015] Optionally, the objectives of the contrastive learning include:

[0016] reducing the distance between the semantic-free training feature vectors and the mapped semantic-based training feature vectors associated with the same risk instance and increasing the distance between the semantic-free training feature vectors and the mapped semantic-based training feature vectors associated with different risk instances, and

[0017] The distance between the semantic training feature vectors and the mapped non-semantic training feature vectors related to the same risk instance is reduced, and the distance between the semantic training feature vectors and the mapped non-semantic training feature vectors related to different risk instances is increased.

[0018] Optionally, the contrastive learning comprises:

[0019] Converging a contrastive learning loss function between the semantic training feature vector and the mapped semantic-free training feature vector; and

[0020] A contrastive learning loss function between the semantic-free training feature vector and the mapped semantic training feature vector is converged.

[0021] Optionally, the contrastive learning loss function includes an infoNCE loss function and a triplet loss function.

[0022] Optionally, the method further comprises:

[0023] The non-semantic training feature vector is input into the first clustering module to generate a first clustering result; and the semantic training feature vector is input into the second clustering module to generate a second clustering result.

[0024] Optionally, the method further comprises:

[0025] A similarity loss function between the first clustering result and the second clustering result is converged.

[0026] Optionally, the method further comprises:

[0027] Converging the loss function of the first clustering result; and

[0028] The loss function of the second clustering result is made to converge.

[0029] Optionally, the method further comprises:

[0030] Converging the first risk identification model and the total loss function of the risk identification model, wherein the total loss function is a result of a weighted sum of:

[0031] A contrastive learning loss function between the semantic training feature vector and the mapped semantic-free training feature vector;

[0032] a contrastive learning loss function between the semantic-free training feature vector and the mapped semantic training feature vector;

[0033] A similarity loss function between the first clustering result and the second clustering result;

[0034] The loss function of the first clustering result; and

[0035] The loss function of the second clustering result.

[0036] Optionally, the method further comprises:

[0037] determining a risk category label vector for the second clustering result; and

[0038] The risk category label vector is applied to the first clustering result.

[0039] Another aspect of the present disclosure provides a device for risk identification, comprising:

[0040] a first risk identification model, the first risk identification model comprising a first feature extraction module and a first clustering module, the first feature extraction module receiving a non-semantic training data sample related to a risk instance and performing feature extraction on the non-semantic training data sample to generate a non-semantic training feature vector;

[0041] a second risk identification model, the second risk identification model comprising a second feature extraction module and a second clustering module, the second feature extraction module receiving a semantic training data sample related to the risk instance and performing feature extraction on the semantic training data sample to generate a semantic training feature vector;

[0042] A contrastive learning module, which is used to use the non-semantic training data samples and the semantic training data samples to jointly train the first risk identification model and the second risk identification model, wherein the contrastive learning module is used to perform contrastive learning on the non-semantic training feature vector and the semantic training feature vector so that the loss function of the contrastive learning converges.

[0043] Optionally, the contrastive learning module is further configured to:

[0044] Processing the semantic-free training feature vector using a first mapping module to generate a mapped semantic-free training feature vector;

[0045] Processing the semantic training feature vector using a second mapping module to generate a mapped semantic training feature vector; and

[0046] The semantic-free training feature vector is compared and learned with the mapped semantic training feature vector, and the semantic training feature vector is compared and learned with the mapped semantic-free training feature vector.

[0047] Optionally, the objectives of the contrastive learning include:

[0048] reducing the distance between the semantic-free training feature vectors and the mapped semantic-based training feature vectors associated with the same risk instance and increasing the distance between the semantic-free training feature vectors and the mapped semantic-based training feature vectors associated with different risk instances, and

[0049] The distance between the semantic training feature vectors and the mapped non-semantic training feature vectors related to the same risk instance is reduced, and the distance between the semantic training feature vectors and the mapped non-semantic training feature vectors related to different risk instances is increased.

[0050] Optionally, the contrastive learning module is further configured to:

[0051] Converging a contrastive learning loss function between the semantic training feature vector and the mapped semantic-free training feature vector; and

[0052] A contrastive learning loss function between the semantic-free training feature vector and the mapped semantic training feature vector is converged.

[0053] Optionally, the contrastive learning loss function includes an infoNCE loss function and a triplet loss function.

[0054] Optionally, the first clustering module performs clustering processing on the semantic-free training feature vector to generate a first clustering result; and

[0055] The second clustering module performs clustering processing on the semantic training feature vector to generate a second clustering result.

[0056] Optionally, the apparatus further comprises a similarity learning module, which is used to converge a similarity loss function between the first clustering result and the second clustering result.

[0057] Optionally, the device further comprises:

[0058] A first clustering learning module, which is used to converge the loss function of the first clustering result; and

[0059] The second clustering learning module is used to converge the loss function of the second clustering result.

[0060] Optionally, the device further comprises:

[0061] A total training module, which is used to converge the total loss function of the first risk identification model and the second risk identification model, wherein the total loss function is a result of the weighted sum of the following items:

[0062] A contrastive learning loss function between the semantic training feature vector and the mapped semantic-free training feature vector;

[0063] a contrastive learning loss function between the semantic-free training feature vector and the mapped semantic training feature vector;

[0064] A similarity loss function between the first clustering result and the second clustering result;

[0065] The loss function of the first clustering result; and

[0066] The loss function of the second clustering result.

[0067] Optionally, the device further comprises:

[0068] A risk category label determination module is used to determine a risk category label vector for the second clustering result; and apply the risk category label vector to the first clustering result.

[0069] One aspect of the present disclosure provides a device for risk identification, comprising:

[0070] Processor; and

[0071] a memory arranged to store computer executable instructions which, when executed, cause the processor to:

[0072] Obtaining semantic-free training data samples and semantic-based training data samples related to risk instances;

[0073] Using the non-semantic training data samples and the semantic training data samples to jointly train the first risk identification model and the second risk identification model;

[0074] The first risk identification model includes a first feature extraction module and a first clustering module, the second risk identification model includes a second feature extraction module and a second clustering module, and the joint training includes:

[0075] Using the first feature extraction module and the second feature extraction module to perform feature extraction on the non-semantic training data sample and the semantic training data sample respectively to generate a non-semantic training feature vector and a semantic training feature vector; and

[0076] The semantic-free training feature vector and the semantic-based training feature vector are subjected to contrastive learning so that a loss function of the contrastive learning converges.

[0077] The present disclosure utilizes the rich semantics in semantic data samples to help the neural network model perform better fine-grained division of semantic-free data samples, so as to enhance the accuracy of the model in dividing risk types. Furthermore, the present disclosure utilizes the risk category semantics in semantic data samples to determine the risk category label vector corresponding to the clustering result vector, thereby being able to give the clustering result an explanation of the risk category when using semantic-free data samples for prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] Figure 1 is a diagram of an apparatus for risk identification according to aspects of the present disclosure.

[0079] Figure 2 is a training diagram for risk identification according to aspects of the present disclosure.

[0080] Figure 3 is a flow chart of a method for risk identification according to aspects of the present disclosure.

[0081] Figure 4 is a flow chart of a method for joint training according to aspects of the present disclosure.

[0082] Figure 5 is a flow chart of a method for contrastive learning according to aspects of the present disclosure.

[0083] Figure 6is a diagram of an apparatus for risk identification according to aspects of the present disclosure.

[0084] Figure 7 is a diagram of an electronic device for risk identification according to various aspects of the present application. DETAILED DESCRIPTION

[0085] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0086] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0087] The present disclosure proposes a solution for risk identification. The solution of the present disclosure can determine the risk category of a risk instance. In this article, a risk instance refers to a risk object to be classified, such as a transaction, an event, a user, a group, etc.

[0088] The present disclosure utilizes non-semantic data samples in combination with semantic data samples to jointly train a risk identification neural network model.

[0089] Non-semantic data samples refer to data samples that do not have semantics related to risk categories, such as endogenous data samples of applications, that is, data left by risk instances when operating within the application. For example, basic user information (e.g., gender, age, etc.), account information, historical behavior information, relationship graphs between users, etc.

[0090] Semantic data samples refer to data samples with semantics about risk categories, such as exogenous data samples of applications, that is, descriptive information with semantic attributes about risk instances obtained from sources other than applications. For example, information provided by users to applications (e.g., complaints) may include feedback information obtained through channels such as telephone and the Internet. Such information may include semantics about risk categories. For example, feedback information obtained through the Internet or telephone may include text, images, voice, etc. with semantics about risk categories.

[0091] On the one hand, clustering the semantic-free data samples of risk instances to identify the risk category of the risk instance usually uses an unsupervised algorithm to directly cluster the risk instances. However, the unsupervised algorithm lacks the guidance of labels with semantic information, and the clustering results may not meet the expectations of risk category identification. The results also do not have the explanatory information of the category description label, making it difficult to be directly used by the business.

[0092] On the other hand, clustering the semantic data samples of risk instances to identify the risk category of the risk instance can be done by extracting labels through manual rules. A series of semantic labels are extracted from feedback information (e.g., feedback text, images, tables, etc.) through manual annotation, automatic or semi-automatic methods. These labels are merged and cleaned to obtain labels that can effectively describe the risk category of the risk instance, thereby transforming the unsupervised solution into a supervised solution. The advantage of this method is that it is highly controllable and the output of the model can be controlled by manual labeling. However, its disadvantage is that more manual analysis of auxiliary information is required to determine the labels. In addition, manual determination of labels may have certain limitations, and may ignore some implicit risk semantics, or add some additional label patterns that do not contribute much to the business. In addition, semantic data samples are generally small and insufficient for model training.

[0093] In response to the above problems, the present disclosure proposes a semi-supervised deep learning network for risk identification. It uses a small number of semantic data samples and non-semantic data samples to jointly train the risk identification model for non-semantic data samples (also referred to as the first risk category model in this article), thereby improving the effectiveness of the risk identification model in predicting risk categories, thereby better and more accurately clustering. Furthermore, the present disclosure uses semantic data samples to provide semantic information for the clustering results, and applies the semantic information to the clustering results of non-semantic data source samples to make them interpretable. From a general perspective, the present disclosure provides a semi-supervised learning solution that helps to mine corresponding risk category patterns from a large number of non-semantic data samples by using a small number of semantic data samples.

[0094] Figure 1 is a diagram of an apparatus for risk identification according to the present disclosure.

[0095] like Figure 1 As shown, the apparatus 100 for risk identification includes two branches: a non-semantic branch and a semantic branch. The non-semantic branch may include a first feature extraction module 102, a first mapping module 106, and a first clustering module 110. The semantic branch may include a second feature extraction module 104, a second mapping module 108, and a second clustering module 112.

[0096] The inputs of the semantic-free branch and the semantic-based branch are the semantic-free training data samples and the semantic-based training data samples, respectively. During the training process, the semantic-based branch is used to jointly train the semantic-free branch, so that the semantic-free branch can more accurately identify the type of risk instances during the prediction process.

[0097] The non-semantic training data sample may be input into the first feature extraction module 102 to extract the non-semantic training feature vector e1.

[0098] The non-semantic training data samples may be multimodal data samples, for example, may include numerical data, sequence data, graph data, and the like.

[0099] Numerical data may include attributes of the risk instance itself, such as transaction amount, transaction scenario (e.g., transaction scenario A, B, C, etc. within the application), user statistics (e.g., the number of night transactions that occurred in the past week, etc.), and other discrete numerical data.

[0100] The sequence type data may include historical behavior data of users involved in the risk instance (eg, active and passive parties in the transaction).

[0101] Graph-type data may be data of a relationship network that represents the relationships between multiple users, for example, a network diagram of the flow of funds in a transaction.

[0102] For semantic-free training data of different modalities, a suitable neural network model can be used to extract feature vectors.

[0103] For example, numerical data can use Wide&Deep, DeepFM and other models to extract feature vectors, sequence data can use recurrent neural network (RNN), Transformer / Informer, convolutional neural network (CNN) and other models to extract feature vectors, graph data can use GNN, GCN and other graph network models to extract feature vectors.

[0104] A plurality of branches may be provided in the first feature extraction module to respectively extract feature vectors for different types of data samples.

[0105] Likewise, the semantic training data samples may be input into the second feature extraction module 104 to extract the semantic training feature vector e2.

[0106] The semantic training data samples may also be multimodal data samples, for example, they may include text data, image data, and structured data.

[0107] The text data may be text of feedback information, including descriptive information of the risk instance, which may include a risk category description (eg, text description) about the risk instance.

[0108] The image data may be feedback information in the form of pictures, for example, pictures uploaded by users (for example, may include screenshots of risky websites).

[0109] Structured data may be, for example, feedback information in a tabular form, such as information filled in by a user when reporting a case, customer feedback handled by customer service, and may also include a risk category description about the risk instance (for example, the risk category options involved in the risk instance).

[0110] Similarly, for semantic training data of different modalities, a suitable neural network model can be used to extract feature vectors.

[0111] For example, structured data can use Wide&Deep, DeepFM and other models to extract feature vectors, text data can use Transformer, Bert, TextCNN, LSTM and other conventional NLP models to extract feature vectors, image data can use ResNet and other models to extract feature vectors.

[0112] Likewise, a plurality of branches may be provided in the second feature extraction module to respectively extract feature vectors for different types of data samples.

[0113] The non-semantic branch may further include a first mapping module 106. The first mapping module 106 is used to map the non-semantic training feature vector e1 to the semantic training feature vector space domain to generate a corresponding vector e1', also referred to as a mapped non-semantic training feature vector.

[0114] The semantic branch may further include a second mapping module 108. The second mapping module 108 is used to map the semantic training feature vector e2 to the semantic-free training feature vector space domain to generate a corresponding vector e2', also referred to as a mapped semantic training feature vector.

[0115] Both the first mapping module 106 and the second mapping module 108 may be multi-layer perceptrons (MLPs).

[0116] The contrast learning module 114 performs contrast learning on the feature vector of the first branch and the feature vector of the second branch.

[0117] The non-semantic training data samples and the semantic data training samples associated with the same risk instance (eg, user, transaction, etc.) may constitute a positive sample pair. The non-semantic training data samples and the semantic data training samples associated with different risk instances may constitute a negative sample pair.

[0118] The goals of contrastive learning include reducing the distance between the non-semantic training feature vectors and the mapped semantic training feature vectors associated with the same risk instance and expanding the distance between the non-semantic training feature vectors and the mapped semantic training feature vectors associated with different risk instances, as well as reducing the distance between the semantic training feature vectors and the mapped non-semantic training feature vectors associated with the same risk instance and expanding the distance between the semantic training feature vectors and the mapped non-semantic training feature vectors associated with different risk instances.

[0119] During the training process, the contrastive learning module 114 may determine a contrastive learning loss function loss between the semantic-free training feature vector e1 and the mapped semantic training feature vector e2′. c1 The contrastive learning module 114 can also determine a contrastive learning loss function loss between the semantic training feature vector e2 and the mapped semantic-free training feature vector e1′. c2 .

[0120] According to various aspects of the present disclosure, the goal of contrastive learning is to make the contrastive learning loss function loss c1 and loss c2 convergence.

[0121] The present disclosure utilizes contrastive learning to introduce the semantics of risk categories of feature vectors in semantic branches into non-semantic branches during the training process, thereby improving the effectiveness of risk category learning of the non-semantic branch model, thereby enabling more accurate clustering in the prediction process.

[0122] The first clustering module 110 may be used to cluster the semantic-free training feature vectors.

[0123] The first clustering module can use traditional clustering algorithms such as Kmeans, or some new deep model clustering structures, for example, agglomerative clustering.

[0124] In one aspect, the prediction output of the first clustering module 110 may be a clustering result vector [p a1 ,p a2 ,…p an ], where each element of the vector corresponds to a risk category and each vector element p ai It represents the probability that the corresponding semantic-free data sample belongs to category i.

[0125] Similarly, the second clustering module can use traditional clustering algorithms such as Kmeans, or some new deep model clustering structures.

[0126] In one aspect, the prediction output of the second clustering module 112 may be a clustering result vector [p b1 ,p b2 ,…p bn ], where each element of the vector corresponds to a risk category and each vector element p bi It represents the probability that the corresponding semantic data sample belongs to category i.

[0127] The structures of the first clustering module and the second clustering module may be the same, so that the clustering results outputted by them are vectors of the same dimension.

[0128] Optionally, an MLP may be inserted between the first feature extraction module 102 and the first clustering module 110 , and between the second feature extraction module 104 and the first clustering module 112 , respectively.

[0129] The similarity learning module 116 is used to ensure the consistency between the clustering result without semantic branches and the clustering structure with semantic branches.

[0130] The first clustering learning module 116 is used to converge the clustering results without semantic branches.

[0131] The second clustering learning module 118 is used to converge the clustering results with semantic branches.

[0132] Figure 2 is a schematic diagram of a training process for risk identification according to the present disclosure.

[0133] In the training process of the model for risk identification, the non-semantic training data samples can be input into the first feature extraction module 202 in the non-semantic branch, and the semantic training data samples can be input into the second feature extraction module 204 in the semantic branch. The first feature extraction module 202 and the second feature extraction module 204 are similar to Figure 1 The first feature extraction module 102 and the second feature extraction module 104 shown in FIG.

[0134] The first feature extraction module 202 may extract features from the non-semantic training data sample and output a non-semantic training feature vector e1, and the second feature extraction module 204 may extract features from the semantic training data sample and output a non-semantic training feature vector e2.

[0135] The first mapping module 206 may map the non-semantic training feature vector e1 to the semantic vector space domain to generate a mapped non-semantic training feature vector e1 ′, and the second mapping module 208 may map the semantic training feature vector e2 to the non-semantic vector space domain to generate a mapped semantic training feature vector e2 ′.

[0136] The contrast learning module 214 may receive the semantic-free training feature vector e1, the mapped semantic-free training feature vector e1′, the semantic training feature vector e2, and the mapped semantic training feature vector e2′ and perform contrast learning.

[0137] The contrastive learning module 214 can calculate the loss function l between the semantic-free training feature vector e1 and the mapped semantic training feature vector e2′. c1 , and the loss function l between the semantic training feature vector e2 and the mapped semantic-free training feature vector e1' c2 .

[0138] During the training process, a plurality of non-semantic data training samples and a plurality of semantic data training samples associated with a plurality of risk instances may be input into the non-semantic branch and the semantic branch, respectively.

[0139] As described above, the semantic-free data training samples and the semantic-data training samples associated with the same risk instance (e.g., user, transaction, etc.) can be combined into positive sample pairs, and the semantic-free data training samples and the semantic-data training samples associated with different risk instances can be combined into negative sample pairs for comparative learning.

[0140] Further, the semantic-free training feature vector e1 and the mapped semantic training feature vector e2' corresponding to the semantic-free training data sample and the semantic data training sample in the positive sample pair may constitute a first positive feature vector pair; and the semantic-free training feature vector e1 and the mapped semantic training feature vector e2' corresponding to the semantic-free training data sample and the semantic data training sample in the negative sample pair may constitute a first negative feature vector pair.

[0141] Similarly, the semantic training feature vector e2 and the mapped non-semantic training feature vector e1' corresponding to the semantic training data sample and the non-semantic data training sample in the positive sample pair may constitute a second positive feature vector pair. The semantic training feature vector e2 and the mapped non-semantic training feature vector e1' corresponding to the semantic training data sample and the non-semantic data training sample in the negative sample pair may constitute a second negative feature vector pair.

[0142] The goals of contrastive learning may include reducing the distance between two vectors of a first positive eigenvector pair and increasing the distance between two vectors of a first negative eigenvector pair, and reducing the distance between two vectors of a second positive eigenvector pair and increasing the distance between two vectors of a second negative eigenvector pair.

[0143] As an example, in the contrastive learning module, the distance (e.g., Euclidean distance) between the semantic-free training feature vector e1 and the mapped semantic training feature vector e2' associated with the same risk instance can be made much larger than the distance between the semantic-free training feature vector e1 and the mapped semantic training feature vector e2' associated with different risk instances. Further, the Euclidean distance between the semantic training feature vector e2 and the mapped semantic-free training feature vector e1' associated with the same risk instance can be made much larger than the distance between the semantic training feature vector e2 and the mapped semantic-free training feature vector e1' associated with different risk instances.

[0144] Loss function c1 and loss c2It may include InfoNCE loss function or triplet loss function.

[0145] In one aspect, the present disclosure further includes similarity learning between the output a of the non-semantic branch and the output b of the semantic branch. Similarity learning is to ensure consistency between the output a of the non-semantic branch and the output b of the semantic branch associated with the same risk instance.

[0146] The similarity learning module 216 may calculate a similarity loss function l between the output of the first clustering module 210 and the output of the second clustering module 212. s .

[0147] Similarity loss functions may include MAE (mean absolute error), MSE (mean square error), cosine distance and other functions.

[0148] Taking Euclidean distance as an example, the goal of similarity learning can include minimizing the Euclidean distance between the semantic-free branch output vector and the semantic-free branch output vector associated with the same risk instance (i.e., corresponding to the positive sample pair), and maximizing the Euclidean distance between the semantic-free branch output vector and the semantic-free branch output vector associated with different risk instances (i.e., corresponding to the negative sample pair).

[0149] like Figure 2 As shown, the training of the risk identification model disclosed in the present invention may also include training on clustering results without semantic branches and training on clustering results with semantic branches.

[0150] Specifically, the clustering loss function loss of the output a of the first clustering module 210 can be calculated as a and the clustering loss function loss of the output b of the first clustering module 212 b .

[0151] Clustering loss function loss a and loss b It can include k-means loss function, cluster assignment hardening loss function, balance assignments loss function, and group sparsity loss function.

[0152] The balance assignment loss function is a loss function that balances the number of samples in different clustering categories. The specific formula is: Lba = KL(G||U), where KL represents the KL divergence function, U is the uniform distribution, and G is the probability distribution of the clustering results predicted by the model. The group sparsity loss function is a loss function that ensures group sparsity. It has been proven to be an effective loss function for improving representation learning. The specific formula is: Lgs = sum_N(sum_G(lambda_g||f_g(x_i))), where N is the number of samples and G is the number of groups, which is a hyperparameter.

[0153] loss a and loss b Can be the same type of loss function.

[0154] According to various aspects of the present disclosure, the purpose of clustering training is to make loss a and loss b convergence.

[0155] In one aspect of the present disclosure, the loss functions of contrastive learning, similarity learning, and clustering result learning can be made to converge simultaneously.

[0156] For example, we can make the contrastive learning loss function loss c1 、loss c2 , Similarity learning loss function loss s , and clustering results to learn the loss function loss a 、loss b The weighted result converges.

[0157] Specifically, the total loss function of the model for risk identification can be defined as:

[0158] L=w c1 loss c1 +w c2 loss c2 +w s loss s +w a loss a +w b loss b .

[0159] where w c1 、w c2 、w s 、w a , and w b They are loss c1 、loss c2 、losss 、loss a , and loss b The weight of , whose value can be set according to the specific implementation or requirements. c1 、w c2 、w s 、w a , and w b Both are 1.

[0160] The purpose of model training is to make the total loss function L converge.

[0161] One aspect of the present disclosure includes determining a risk category label vector of a clustering result. The risk category label vector output by the model can be determined after the joint training of the semantic-free branch and the semantic branch is completed and before the semantic-free branch is used for prediction. The determined risk category label vector can be used to interpret the risk category of the clustering result (i.e., the first clustering result) in the subsequent prediction process using the semantic-free branch.

[0162] The determination of the risk category label vector may include using the clustering results of the semantic branches and their corresponding risk category semantics to determine the risk category label of each element (dimension) in the clustering result vector. In the prediction process of the non-semantic branch, the risk category label determined for the semantic branch may be applied to the clustering result vector of the non-semantic branch.

[0163] Specifically, a non-semantic data sample related to a risk instance can be input into a trained non-semantic branch, and processed by the trained first feature extraction module 102 and the trained clustering module 110 to obtain a clustering result vector a for the risk category of the risk instance. The clustering result vector a can be expressed as an n-dimensional vector [p a1 ,p a2 ,…p an ], where each element of the vector corresponds to a risk category, p ai It represents the probability that the risk instance belongs to the i-th risk category.

[0164] However, since the semantic-free data samples do not include semantic information about risk categories, it is impossible to determine the risk category represented by each element in the clustering result vector, that is, the specific risk category interpretation of the clustering result (e.g., no risk, risk category 1, ... risk category n).

[0165] In the present disclosure, semantic branches can be used to determine labels for clustering results.

[0166] For example, a semantic data sample related to a risk instance may be input into the semantic branch, and processed by the trained second feature extraction module 104 and the trained second clustering module 112 to output a clustering result vector b=[p b1 ,p b2 ,…p bn ]. Similarly, each element of the vector corresponds to a risk category, p bi It represents the probability that the risk instance belongs to the i-th risk category.

[0167] The corresponding risk category can be determined based on the semantic data sample input as the semantic branch. For example, for a semantic data sample in text form, the risk category corresponding to the data sample can be determined by extracting keywords through text recognition; for a semantic data sample in image form, the risk category corresponding to the data sample can be determined by extracting image elements, and so on.

[0168] Further, the clustering result vector b=[p b1 ,p b2 ,…p bn ] to determine the corresponding vector dimension corresponding to the determined risk category. For example, the element p with the largest value in the clustering result vector can be determined bi , and determine the label of dimension i of the clustering result vector as the determined risk category y i .

[0169] By determining the labels of multiple semantic data samples, the risk category labels of all n dimensions of the clustering result vector can be obtained, thereby obtaining the risk category label vector [y1, y2, …y n ].

[0170] Furthermore, the risk category label vector [y1, y2, …y n ] applied to the clustering result vector [p a1 ,p a2 ,…p an ], so that in the process of using semantic-free branches for prediction, the clustering results can have more accurate risk category labels.

[0171] Figure 3 is a flow chart of a method for risk identification according to aspects of the present disclosure.

[0172] In step 302, non-semantic training data samples and semantic training data samples related to risk instances may be acquired.

[0173] The non-semantic training data samples are data samples without semantics about the risk category, and the semantic training data samples are data samples with semantics about the risk category, as described above.

[0174] In step 304, the first risk identification model and the second risk identification model may be jointly trained using the non-semantic training data samples and the semantic training data samples.

[0175] Figure 4 is a flow chart of a method for joint training according to aspects of the present disclosure.

[0176] Figure 4 Yes Figure 3 Specific explanation of step 304.

[0177] In step 402, a non-semantic training feature vector and a semantic training feature vector may be extracted.

[0178] The first risk identification model may include a first feature extraction module and a first clustering module, and the second risk identification model may include a second feature extraction module and a second clustering module. The first feature extraction module and the second feature extraction module may be used to extract features from the non-semantic training data sample and the semantic training data sample to generate a non-semantic training feature vector and a semantic training feature vector.

[0179] In step 404, contrastive learning may be performed on the semantic-free training feature vector and the semantic-based training feature vector, so that the loss function of the contrastive learning converges.

[0180] Figure 5 is a flow chart of a method for contrastive learning according to aspects of the present disclosure.

[0181] In step 502, a mapping process may be performed on the semantic-free training feature vector to generate a mapped semantic-free training feature vector.

[0182] For example, the first mapping module 106 / 206 may be used to process the non-semantic training feature vector to generate a mapped non-semantic training feature vector.

[0183] In step 504, a mapping process may be performed on the semantic training feature vector to generate a mapped semantic training feature vector.

[0184] For example, the second mapping module 108 / 208 may be used to process the semantic training feature vector to generate a mapped semantic training feature vector.

[0185] In step 506, the semantic-free training feature vector and the mapped semantic-based training feature vector may be compared and learned.

[0186] The goals of comparative learning of non-semantic training feature vectors and mapped semantic training feature vectors may include: reducing the distance between the non-semantic training feature vectors and mapped semantic training feature vectors associated with the same risk instance and expanding the distance between the non-semantic training feature vectors and mapped semantic training feature vectors associated with different risk instances.

[0187] A goal of contrastive learning of the non-semantic training feature vector and the mapped semantic training feature vector may include converging a contrastive learning loss function between the semantic training feature vector and the mapped non-semantic training feature vector.

[0188] In step 508, the semantic training feature vector and the mapped semantic-free training feature vector may be compared and learned.

[0189] The goals of comparative learning of semantic training feature vectors and mapped non-semantic training feature vectors may include: reducing the distance between the semantic training feature vectors and the mapped non-semantic training feature vectors associated with the same risk instance and expanding the distance between the semantic training feature vectors and the mapped non-semantic training feature vectors associated with different risk instances.

[0190] The goal of contrastive learning of the semantic training feature vector and the mapped non-semantic training feature vector may include: converging the contrastive learning loss function between the non-semantic training feature vector and the mapped semantic training feature vector.

[0191] The contrastive learning loss function may include an infoNCE loss function and a triplet loss function.

[0192] Furthermore, the method for risk identification may include inputting the semantic-free training feature vector and the semantic-based training feature vector into a first clustering module and a second clustering module, respectively, to generate a first clustering result and a second clustering result.

[0193] In one aspect, the method may further include converging a similarity loss function between the first clustering result and the second clustering result.

[0194] In yet another aspect, the method may include converging a loss function of the first clustering result, and converging a loss function of the second clustering result.

[0195] On the other hand, the method may also include converging the total loss function of the first risk identification model and the second risk identification model, wherein the total loss function is the result of the weighted sum of the following items: the contrastive learning loss function between the semantic training feature vector and the mapped non-semantic training feature vector; the contrastive learning loss function between the non-semantic training feature vector and the mapped semantic training feature vector; the similarity loss function between the first clustering result and the second clustering result; the loss function of the first clustering result; and the loss function of the second clustering result.

[0196] In another aspect of the present disclosure, a risk category label vector may be determined for the second clustering result, and the risk category label vector may be applied to the first clustering result.

[0197] Figure 6 is a diagram of an apparatus for risk identification according to aspects of the present disclosure.

[0198] like Figure 6 As shown, the apparatus 600 for risk identification may include a first risk identification model 602 , a second risk identification model 604 , a comparative learning module 606 , a similarity learning module 608 , a first clustering learning module 610 , and a second clustering learning module 612 .

[0199] The first risk identification model 602 may include a first feature extraction module and a first clustering module (not shown), and the second risk identification model 604 may include a second feature extraction module and a second clustering module (not shown).

[0200] The first risk identification model 602 receives a non-semantic training data sample related to a risk instance and uses a first feature extraction module to perform feature extraction on the non-semantic training data sample to generate a non-semantic training feature vector.

[0201] The second risk identification model 604 receives semantic training data samples related to risk instances and uses a second feature extraction module to perform feature extraction on the semantic training data samples to generate semantic training feature vectors.

[0202] The contrastive learning module 606 uses the semantic training data samples and the semantic training data samples to jointly train the first risk identification model and the second risk identification model. Specifically, the contrastive learning module is used to perform contrastive learning on the semantic training feature vector and the semantic training feature vector so that the loss function of the contrastive learning converges.

[0203] Figure 6 The contrastive learning module 606 in the embodiment may include a first mapping module and a second mapping module (eg, Figure 1 and 2106 / 206 and the second mapping module 108 / 208 shown in FIG.

[0204] The first mapping module may perform a mapping process on the semantic-free training feature vector to generate a mapped semantic-free training feature vector.

[0205] The second mapping module may perform a mapping process on the semantic training feature vector to generate a mapped semantic training feature vector.

[0206] The contrast learning module 606 may perform contrast learning on the semantic-free training feature vector and the mapped semantic-based training feature vector, and may perform contrast learning on the semantic-based training feature vector and the mapped semantic-free training feature vector.

[0207] The goals of contrastive learning include: reducing the distance between the non-semantic training feature vectors and the mapped semantic training feature vectors associated with the same risk instance and expanding the distance between the non-semantic training feature vectors and the mapped semantic training feature vectors associated with different risk instances, as well as reducing the distance between the semantic training feature vectors and the mapped non-semantic training feature vectors associated with the same risk instance and expanding the distance between the semantic training feature vectors and the mapped non-semantic training feature vectors associated with different risk instances.

[0208] The contrastive learning module can also be used to converge the contrastive learning loss function between the semantic training feature vector and the mapped non-semantic training feature vector; and converge the contrastive learning loss function between the non-semantic training feature vector and the mapped semantic training feature vector.

[0209] The contrastive learning loss function may include an infoNCE loss function and a triplet loss function.

[0210] The first clustering module may perform clustering processing on the non-semantic training feature vectors to generate a first clustering result; and the second clustering module may perform clustering processing on the semantic training feature vectors to generate a second clustering result.

[0211] The similarity learning module 608 may be used to converge a similarity loss function between the first clustering result and the second clustering result.

[0212] The first clustering learning module 610 may be used to converge the loss function of the first clustering result.

[0213] The second clustering learning module 612 may be used to converge the loss function of the second clustering result.

[0214] The device 600 may also include a total training module (not shown), which can be used to converge the total loss function of the first risk identification model and the second risk identification model, wherein the total loss function may be the result of a weighted sum of: a contrastive learning loss function between a semantic training feature vector and a mapped non-semantic training feature vector; a contrastive learning loss function between a non-semantic training feature vector and a mapped semantic training feature vector; a similarity loss function between the first clustering result and the second clustering result; a loss function of the first clustering result; and a loss function of the second clustering result.

[0215] Optionally, the apparatus 600 may further include a risk category label determination module 614, which may be used to determine a risk category label vector for the second clustering result; and apply the risk category label vector to the first clustering result.

[0216] Figure 7 is a diagram of an electronic device for risk identification according to various aspects of the present application.

[0217] like Figure 7 As shown, the electronic device 700 may include a memory 702 and a processor 704. The memory 702 stores program instructions, and the processor 704 may be connected to and communicate with the memory 702 via a bus 706.

[0218] The processor 704 can call the program instructions in the memory 702 to perform the following steps: obtain non-semantic training data samples and semantic training data samples related to the risk instance; use the non-semantic training data samples and the semantic training data samples to jointly train the first risk identification model and the second risk identification model; wherein the first risk identification model includes a first feature extraction module and a first clustering module, and the second risk identification model includes a second feature extraction module and a second clustering module, and the joint training includes: using the first feature extraction module and the second feature extraction module to perform feature extraction on the non-semantic training data samples and the semantic training data samples respectively to generate a non-semantic training feature vector and a semantic training feature vector; and performing comparative learning on the non-semantic training feature vector and the semantic training feature vector so that the loss function of the comparative learning converges.

[0219] Optionally, the processor 404 can also call the program instructions in the memory 402 to perform the following steps: the first mapping module processes the non-semantic training feature vector to generate a mapped non-semantic training feature vector; the second mapping module processes the semantic training feature vector to generate a mapped semantic training feature vector; and the non-semantic training feature vector is compared with the mapped semantic training feature vector, and the semantic training feature vector is compared with the mapped non-semantic training feature vector. The goals of the comparative learning include: reducing the distance between the non-semantic training feature vector and the mapped semantic training feature vector related to the same risk instance and expanding the distance between the non-semantic training feature vector and the mapped semantic training feature vector related to different risk instances, and reducing the distance between the semantic training feature vector and the mapped non-semantic training feature vector related to the same risk instance and expanding the distance between the semantic training feature vector and the mapped non-semantic training feature vector related to different risk instances.

[0220] Optionally, the processor 404 may also call the program instructions in the memory 402 to perform the following steps: converge the contrastive learning loss function between the semantic training feature vector and the mapped semantic-free training feature vector; and converge the contrastive learning loss function between the semantic-free training feature vector and the mapped semantic training feature vector. The contrastive learning loss function may include an infoNCE loss function and a triplet loss function.

[0221] Optionally, the processor 404 may also call program instructions in the memory 402 to perform the following steps: inputting the semantic-free training feature vector and the semantic-based training feature vector into the first clustering module and the second clustering module respectively to generate a first clustering result and a second clustering result.

[0222] Optionally, the processor 404 may also call program instructions in the memory 402 to perform the following steps: converge the similarity loss function between the first clustering result and the second clustering result; converge the loss function of the first clustering result; and converge the loss function of the second clustering result.

[0223] Optionally, the processor 404 can also call the program instructions in the memory 402 to perform the following steps: converge the total loss function of the first risk identification model and the second risk identification model, wherein the total loss function is the result of the weighted sum of the following items: the contrastive learning loss function between the semantic training feature vector and the mapped non-semantic training feature vector; the contrastive learning loss function between the non-semantic training feature vector and the mapped semantic training feature vector; the similarity loss function between the first clustering result and the second clustering result; the loss function of the first clustering result; and the loss function of the second clustering result.

[0224] Optionally, the processor 404 may also call program instructions in the memory 402 to perform the following steps: determining a risk category label vector for the second clustering result; and applying the risk category label vector to the first clustering result.

[0225] As described above, the risk identification scheme of the present disclosure may include a model preparation phase and a model prediction phase.

[0226] The model preparation stage may include joint training of non-semantic branches and semantic branches, using the rich semantics in semantic data samples to help the neural network model perform better fine-grained division of non-semantic data samples, so as to enhance the accuracy of the model's classification of risk types.

[0227] Optionally, the model preparation stage may include the determination of a risk category label vector. After the joint training of the semantic-free branch and the semantic-with branch, the semantic-with branch may be used to determine the risk category label for each dimension in the output vector of the clustering module (as described above), thereby obtaining a risk category label vector.

[0228] The model prediction stage uses the input of the semanticless data sample into the semanticless branch for prediction to obtain the clustering result of the semanticless data sample. Optionally, the risk category label vector determined in the model preparation stage can be used to determine the risk category label corresponding to the clustering result of the semanticless data sample.

[0229] The solution of the present disclosure improves the prediction accuracy of semantic-free data samples and can give specific risk category explanations to clustered prediction results.

[0230] The descriptions set forth herein in conjunction with the accompanying drawings describe example configurations and do not represent all examples that may be implemented or that fall within the scope of the claims. The term "exemplary" as used herein means "used as an example, instance, or illustration" and does not mean "better than" or "better than other examples." This detailed description includes specific details to provide an understanding of the described techniques. However, these techniques may be practiced without these specific details. In some instances, well-known structures and devices are shown in block diagram form to avoid obscuring the concepts of the described examples.

[0231] In the accompanying drawings, similar components or features may have the same reference number. In addition, various components of the same type may be distinguished by following the reference number with a dash and a second reference number that distinguishes between the similar components. If only the first reference number is used in the specification, the description may apply to any of the similar components having the same first reference number regardless of the second reference number.

[0232] The various illustrative blocks and modules described in conjunction with the disclosure herein may be implemented or executed with a general purpose processor, a DSP, an ASIC, an FPGA or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in an alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices (e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration).

[0233] The functions described herein may be implemented in hardware, software executed by a processor, firmware, or any combination thereof. If implemented in software executed by a processor, each function may be stored on a computer-readable medium or transmitted therefrom as one or more instructions or codes. Other examples and implementations fall within the scope of the present disclosure and the appended claims. For example, due to the nature of software, the functions described above may be implemented using software, hardware, firmware, hard wiring, or any combination thereof executed by a processor. The features that implement the functions may also be physically located in various locations, including being distributed so that the various parts of the functions are implemented at different physical locations. In addition, as used herein (including in the claims), the "or" used in the enumeration of items (e.g., enumeration of items with phrases such as "at least one of" or "one or more of") indicates an inclusive enumeration, so that, for example, the enumeration of at least one of A, B, or C means A or B or C or AB or AC or BC or ABC (i.e., A and B and C). Similarly, as used herein, the phrase "based on" should not be interpreted as citing a closed set of conditions. For example, an exemplary step described as "based on condition A" may be based on both condition A and condition B without departing from the scope of the present disclosure. In other words, as used herein, the phrase "based on" should be interpreted in the same manner as the phrase "based at least in part on."

[0234] Computer readable medium includes both non-transient computer storage medium and communication medium, and it includes any medium that facilitates computer program to transfer from one place to another place.Non-transient storage medium can be any available medium that can be accessed by general or special-purpose computer.As an example and not limitation, non-transient computer readable medium can include RAM, ROM, electrically erasable programmable read-only memory (EEPROM), compact disk (CD) ROM or other optical disk storage, disk storage or other magnetic storage device, or can be used to carry or store instruction or data structure form of desired program code means and can be accessed by general or special-purpose computer or general or special-purpose processor any other non-transient medium.Any connection is also properly referred to as computer readable medium.For example, if software is transmitted from website, server or other remote source using coaxial cable, optical fiber cable, twisted pair, digital subscriber line (DSL) or wireless technology such as infrared, radio and microwave, then this coaxial cable, optical fiber cable, twisted pair, digital subscriber line (DSL) or wireless technology such as infrared, radio and microwave are just included in the definition of medium. Disk and disc as used herein include CDs, laser discs, optical discs, digital versatile discs (DVDs), floppy disks, and Blu-ray discs, where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above are also included within the scope of computer-readable media.

[0235] The description herein is provided to enable those skilled in the art to make or use the present disclosure. Various modifications to the present disclosure will be apparent to those skilled in the art, and the universal principles defined herein may be applied to other variations without departing from the scope of the present disclosure. Thus, the present disclosure is not limited to the examples and designs described herein, but should be granted the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for risk identification, comprising: Acquire semantic-free training data samples and semantic-based training data samples related to risk instances, wherein the semantic-free training data samples refer to data samples that do not have semantics about risk categories, i.e., data left by risk instances during operations within the application; and the semantic-based training data samples refer to data samples that have semantics about risk categories, i.e., descriptive information with semantic attributes about risk instances obtained from a channel outside the application; Using the non-semantic training data samples and the semantic training data samples to jointly train the first risk identification model and the second risk identification model; The first risk identification model includes a first feature extraction module and a first clustering module, the second risk identification model includes a second feature extraction module and a second clustering module, and the joint training includes: Using the first feature extraction module to perform feature extraction on the non-semantic training data sample to generate a non-semantic training feature vector; Using the second feature extraction module to perform feature extraction on the semantic training data sample to generate a semantic training feature vector; and The semantic-free training feature vector and the semantic-based training feature vector are subjected to contrastive learning so that a loss function of the contrastive learning converges.

2. The method according to claim 1, wherein the contrastive learning comprises: Mapping the semantic-free training feature vector to a semantic-free training feature vector space domain using a first mapping module to generate a mapped semantic-free training feature vector; Mapping the semantic training feature vector to a semantic-free training feature vector space domain using a second mapping module to generate a mapped semantic training feature vector; as well as The semantic-free training feature vector is compared and learned with the mapped semantic training feature vector, and the semantic training feature vector is compared and learned with the mapped semantic-free training feature vector.

3. The method according to claim 2, wherein the objectives of the contrastive learning include: reducing the distance between the semantic-free training feature vectors and the mapped semantic-based training feature vectors associated with the same risk instance and increasing the distance between the semantic-free training feature vectors and the mapped semantic-based training feature vectors associated with different risk instances, and The distance between the semantic training feature vectors and the mapped non-semantic training feature vectors related to the same risk instance is reduced, and the distance between the semantic training feature vectors and the mapped non-semantic training feature vectors related to different risk instances is increased.

4. The method according to claim 3, wherein the contrastive learning comprises: Converging a contrastive learning loss function between the semantic training feature vector and the mapped semantic-free training feature vector; as well as A contrastive learning loss function between the semantic-free training feature vector and the mapped semantic training feature vector is converged.

5. The method of claim 4, wherein the contrastive learning loss function comprises an infoNCEloss function and a tripletloss function.

6. The method of claim 2, further comprising: Inputting the semantic-free training feature vector into the first clustering module to generate a first clustering result; as well as The semantic training feature vector is input into the second clustering module to generate a second clustering result.

7. The method of claim 6, further comprising: A similarity loss function between the first clustering result and the second clustering result is converged.

8. The method of claim 6, further comprising: Converging the loss function of the first clustering result; as well as The loss function of the second clustering result is made to converge.

9. The method of claim 6, further comprising: Converging a total loss function of the first risk identification model and the second risk identification model, wherein the total loss function is a result of a weighted sum of: A contrastive learning loss function between the semantic training feature vector and the mapped semantic-free training feature vector; A contrastive learning loss function between the semantic-free training feature vector and the mapped semantic training feature vector; A similarity loss function between the first clustering result and the second clustering result; The loss function of the first clustering result; and The loss function of the second clustering result.

10. The method of claim 6, further comprising: Determining a risk category label vector for the second clustering result; as well as The risk category label vector is applied to the first clustering result.

11. A device for risk identification, comprising: a first risk identification model, the first risk identification model comprising a first feature extraction module and a first clustering module, the first feature extraction module receiving a semantic-free training data sample related to a risk instance and performing feature extraction on the semantic-free training data sample to generate a semantic-free training feature vector, wherein the semantic-free training data sample refers to a data sample without semantics about a risk category, that is, data left by the risk instance when operating within the application; a second risk identification model, the second risk identification model comprising a second feature extraction module and a second clustering module, the second feature extraction module receiving a semantic training data sample related to a risk instance and performing feature extraction on the semantic training data sample to generate a semantic training feature vector, wherein the semantic training data sample refers to a data sample having semantics about a risk category, that is, descriptive information with semantic attributes about the risk instance obtained from a channel other than an application; A contrastive learning module, which is used to use the non-semantic training data samples and the semantic training data samples to jointly train the first risk identification model and the second risk identification model, wherein the contrastive learning module is used to perform contrastive learning on the non-semantic training feature vector and the semantic training feature vector so that the loss function of the contrastive learning converges.

12. The apparatus of claim 11, wherein the contrastive learning module is further configured to: Mapping the semantic-free training feature vector to a semantic-free training feature vector space domain using a first mapping module to generate a mapped semantic-free training feature vector; Mapping the semantic training feature vector to a semantic-free training feature vector space domain using a second mapping module to generate a mapped semantic training feature vector; as well as The semantic-free training feature vector is compared and learned with the mapped semantic training feature vector, and the semantic training feature vector is compared and learned with the mapped semantic-free training feature vector.

13. The apparatus according to claim 12, wherein the objectives of the contrastive learning include: reducing the distance between the semantic-free training feature vectors and the mapped semantic-based training feature vectors associated with the same risk instance and increasing the distance between the semantic-free training feature vectors and the mapped semantic-based training feature vectors associated with different risk instances, and The distance between the semantic training feature vectors and the mapped non-semantic training feature vectors related to the same risk instance is reduced, and the distance between the semantic training feature vectors and the mapped non-semantic training feature vectors related to different risk instances is increased.

14. The apparatus of claim 13, wherein the contrastive learning module is further configured to: Converging a contrastive learning loss function between the semantic training feature vector and the mapped semantic-free training feature vector; and A contrastive learning loss function between the semantic-free training feature vector and the mapped semantic training feature vector is converged.

15. The device of claim 14, wherein the contrastive learning loss function comprises an infoNCE loss function and a tripletloss function.

16. The apparatus of claim 12, wherein: The first clustering module performs clustering processing on the semantic-free training feature vector to generate a first clustering result; and The second clustering module performs clustering processing on the semantic training feature vector to generate a second clustering result. 17 . The apparatus of claim 16 , further comprising a similarity learning module, configured to converge a similarity loss function between the first clustering result and the second clustering result.

18. The apparatus of claim 16, further comprising: A first clustering learning module, which is used to converge the loss function of the first clustering result; as well as The second clustering learning module is used to converge the loss function of the second clustering result.

19. The apparatus of claim 16, further comprising: A total training module, which is used to converge the total loss function of the first risk identification model and the second risk identification model, wherein the total loss function is a result of the weighted sum of the following items: A contrastive learning loss function between the semantic training feature vector and the mapped semantic-free training feature vector; A contrastive learning loss function between the semantic-free training feature vector and the mapped semantic training feature vector; A similarity loss function between the first clustering result and the second clustering result; The loss function of the first clustering result; and The loss function of the second clustering result.

20. The apparatus of claim 16, further comprising: A risk category label determination module is used to determine a risk category label vector for the second clustering result; and apply the risk category label vector to the first clustering result.

21. A device for risk identification, comprising: processor; as well as a memory arranged to store computer executable instructions which, when executed, cause the processor to: Acquire semantic-free training data samples and semantic-based training data samples related to risk instances, wherein the semantic-free training data samples refer to data samples that do not have semantics about risk categories, i.e., data left by risk instances during operations within the application; and the semantic-based training data samples refer to data samples that have semantics about risk categories, i.e., descriptive information with semantic attributes about risk instances obtained from a channel outside the application; Using the non-semantic training data samples and the semantic training data samples to jointly train the first risk identification model and the second risk identification model; The first risk identification model includes a first feature extraction module and a first clustering module, the second risk identification model includes a second feature extraction module and a second clustering module, and the joint training includes: Using the first feature extraction module to perform feature extraction on the non-semantic training data sample to generate a non-semantic training feature vector; Using the second feature extraction module to perform feature extraction on the semantic training data sample to generate a semantic training feature vector; and The semantic-free training feature vector and the semantic-based training feature vector are subjected to contrastive learning so that a loss function of the contrastive learning converges.