Training user-related classification model, method and device for user classification

Through the adversarial training method, labeled samples and generated samples are uniformly input into the classifier, which solves the problem of sample imbalance, improves the performance and generalization ability of user-related classification models, overcomes the difficulty of small sample training, and achieves more accurate user classification. Related categories.

CN114282684BActive Publication Date: 2024-08-27ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111603926.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-24
Publication Date
2024-08-27
Estimated Expiration
2041-12-24

AI Technical Summary

Technical Problem

In machine learning, user-related classification models have difficulties in model training due to sample imbalance. Especially in scenarios of identifying risky users or risky behaviors, the number of real risk samples is small, which affects the accuracy of model prediction.

Method used

Adopting the adversarial training method, labeled samples and unlabeled samples generated by the generator are uniformly input into the classifier for learning. Through multiple rounds of alternating adversarial training between the generator and the classifier, the generator generates simulated samples that are close to the labeled samples, and the classifier learns The characteristics of each category improve classification performance.

Benefits of technology

It significantly improves the performance and generalization ability of the classifier, overcomes the difficulties caused by small sample training, and improves the accuracy of user-related classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114282684B
    Figure CN114282684B
Patent Text Reader

Abstract

The embodiments of this specification provide a method and apparatus for training a user-related classification model, wherein the method includes obtaining a batch of annotated samples, each annotated sample having a pre-annotated category label selected from a predetermined K categories. In addition, a generator is used to generate multiple generated samples. Each annotated sample is input into a classifier for classifying into K+1 categories to obtain a first prediction result, which is positively correlated with the probability that each annotated sample belongs to its corresponding category label; wherein the K+1 categories include the aforementioned K categories and additional categories. The generated sample is also input into the classifier to obtain a second prediction result, which is positively correlated with the probability that the generated sample belongs to the additional category. The generator is first updated with the goal of minimizing the second prediction result; and the classifier is second updated with the goal of maximizing the function value of a preset function, wherein the preset function is positively correlated with both the first prediction result and the second prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the field of machine learning, and more particularly to training of user-related classifiers and classification methods and devices. Background Art

[0002] The rapid development of machine learning has enabled various machine learning models to be applied in various business scenarios. For example, in security and risk control scenarios, some risk detection models have been trained through machine learning to identify users or user behaviors that are risky or have potential safety hazards. For example, risk detection models can be used to identify junk accounts, high-risk transactions, and high-risk operations. In content recommendation scenarios, some user classification models are trained through machine learning to push corresponding classified content to users.

[0003] However, in many cases, the training of user-related classification models faces the problem of sample imbalance. For example, in the scenario of identifying risky users or risky behaviors, as the risk interception strategy is upgraded, the number of real risk samples collected is very small, accounting for a very low proportion of the actual number of samples collected, resulting in an obvious imbalance between positive and negative samples. In the content recommendation scenario, for each category, if the user actually clicks / collects the pushed content of this category, or purchases the product of this category as a positive sample, the proportion of positive samples collected is also very low; and the distribution of samples under each category is also uneven. The imbalance of samples brings great difficulties and challenges to the training of the model.

[0004] Therefore, we hope to have an improved solution that can overcome or alleviate the adverse effects of sample imbalance on model performance and improve model prediction accuracy. Summary of the invention

[0005] One or more embodiments of this specification describe a method for training a user-related classification model, in which an adversarial training method is used to uniformly input labeled samples under different categories and a large number of unlabeled samples generated by a generator into a classifier for modeling and learning of each category, thereby obtaining a classifier with better performance. Such a classifier can then be used to accurately classify user-related samples.

[0006] According to a first aspect, a method for training a user-related classification model is provided, comprising:

[0007] Obtain a batch of labeled samples, each labeled sample includes feature information related to the user and has a pre-labeled category label, and the category label is selected from predetermined K categories;

[0008] Using the generator, generate multiple generated samples;

[0009] Input each labeled sample into a classifier for performing K+1 classification, and obtain a first prediction result, wherein the first prediction result is positively correlated with a first probability that each labeled sample belongs to its corresponding category label; wherein the K+1 categories include the K categories and additional categories;

[0010] Inputting the generated sample into the classifier to obtain a second prediction result, wherein the second prediction result is positively correlated with a second probability that the generated sample belongs to the additional category;

[0011] Performing a first update on the generator with the goal of minimizing the second prediction result;

[0012] The classifier is updated for the second time with the goal of maximizing the function value of a preset function, wherein the preset function is positively correlated with both the first prediction result and the second prediction result.

[0013] In a specific embodiment, the above-mentioned characteristic information may include at least one of the following: user attribute information, user behavior sequence, user operation, and the user operation includes login operation and transaction operation.

[0014] In one example, the K categories are a first category corresponding to risk samples and a second category corresponding to risk-free samples.

[0015] According to one implementation, the process of generating multiple generated samples may include: inputting a noise vector of a first dimension into the generator to obtain a generated vector of a second dimension as a characterization vector of the generated sample; wherein the second dimension is the same as the dimension of the characterization vector of the labeled sample.

[0016] According to one embodiment, the process of obtaining the first prediction result may include: obtaining a third probability that the labeled sample belongs to the K categories, and a fourth probability that the labeled sample belongs to the additional category; determining the first prediction result based on the third probability and the fourth probability, so that the first prediction result is positively correlated with the third probability and negatively correlated with the fourth probability.

[0017] In one example, the preset function is a weighted sum of the first prediction result and the second prediction result.

[0018] According to an implementation manner, the first updating and the second updating are performed alternately and iteratively.

[0019] According to a second aspect, a user-related classification method is provided, comprising:

[0020] Obtain samples to be tested related to the user;

[0021] Inputting the sample to be tested into a classifier for classifying into K+1 categories to obtain a prediction output, wherein the classifier is trained by the method of the first aspect; the K+1 categories include predetermined K categories and one additional category;

[0022] According to the prediction output, a classification result of the sample to be tested is determined.

[0023] In one embodiment, the classification result of the sample to be tested is determined based on the predicted output, specifically including: if the predicted output indicates one of the K categories, then the indicated category is determined as the classification result; if the predicted output indicates the additional category, then the classification result is determined as a pending result to be further clarified.

[0024] According to a third aspect, there is provided an apparatus for training a user-related classification model, comprising:

[0025] A sample acquisition unit is configured to acquire a batch of labeled samples, each labeled sample includes feature information related to the user and has a pre-labeled category label, and the category label is selected from predetermined K categories;

[0026] A generating unit is configured to generate a plurality of generated samples using the generator;

[0027] A first prediction unit is configured to input each labeled sample into a classifier for classifying into K+1 categories, and obtain a first prediction result, wherein the first prediction result is positively correlated with a first probability that each labeled sample belongs to its corresponding category label; wherein the K+1 categories include the K categories and an additional category;

[0028] a second prediction unit, configured to input the generated sample into the classifier to obtain a second prediction result, wherein the second prediction result is positively correlated with a second probability that the generated sample belongs to the additional category;

[0029] A first updating unit, configured to perform a first update on the generator with the goal of minimizing the second prediction result;

[0030] The second updating unit is configured to perform a second update on the classifier with the goal of maximizing a function value of a preset function, wherein the preset function is positively correlated with both the first prediction result and the second prediction result.

[0031] According to a fourth aspect, a user-related classification device is provided, comprising:

[0032] A sample acquisition unit, configured to acquire a sample to be tested related to the user;

[0033] A prediction unit, configured to input the sample to be tested into a classifier for classifying into K+1 categories to obtain a prediction output, wherein the classifier is trained using the apparatus of the third aspect; the K+1 categories include predetermined K categories and one additional category;

[0034] The result determination unit is configured to determine the classification result of the sample to be tested according to the prediction output.

[0035] According to a fifth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed in a computer, the computer is caused to execute the method of the first or second aspect.

[0036] According to a sixth aspect, a computing device is provided, comprising a memory and a processor, wherein executable code is stored in the memory, and when the processor executes the executable code, the method of the first or second aspect is implemented.

[0037] According to the method and device provided in the embodiments of this specification, the adversarial training framework is adopted to perform multiple rounds of alternating adversarial training for the generator and the classifier. After a certain number of rounds, the generator can generate generated samples sufficient to simulate the labeled samples. The classifier, because the labeled samples of K categories and the large number of unlabeled samples generated by the generator are uniformly learned and trained, the classification performance and generalization ability are significantly improved compared to the conventional classifier based on small sample training. The classifier trained in this way can be better used for user-related classification. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0039] Figure 1 A schematic diagram showing a model training framework according to one embodiment;

[0040] Figure 2 A flow chart showing a method for training a user-related classification model according to one embodiment;

[0041] Figure 3 A flow chart showing a user-related classification method according to one embodiment;

[0042] Figure 4 A schematic diagram of a training device according to an embodiment is shown;

[0043] Figure 5A schematic diagram of a classification device according to an embodiment is shown. DETAILED DESCRIPTION

[0044] The solution provided in this specification is described below in conjunction with the accompanying drawings.

[0045] As mentioned above, in the training of user-related classification models, there is often a problem of sample imbalance. Sample imbalance often results in too few samples under the target category of greater concern, resulting in difficulty in training small samples. Typically, in the scenario of identifying risky users or risky behaviors, more attention is paid to samples labeled as risky users or risky behaviors, which are often called "black samples" in practice. However, compared with a large number of normal samples, or so-called white samples, the number of black samples actually collected is very small. Small samples bring great difficulties to model training.

[0046] In response to the above technical problems, the inventors observed that although the number of samples under the target category (such as black samples) is small, there are a large number of calibrated samples of other categories (such as white samples), and an even larger number of samples with uncertain labels (which can be called gray samples). These samples can be better utilized to improve the performance of the classification model. Based on this technical concept, the inventors innovatively proposed a new training scheme. In this scheme, a small number of labeled samples under the target category, a large number of labeled samples under other categories, and a large number of unlabeled samples are incorporated into a unified framework for modeling and learning by using adversarial training, thereby providing a feasible solution for user classification in small sample cases.

[0047] Figure 1 FIG. 1 is a schematic diagram of a model training framework according to an embodiment. Figure 1 As shown, the training framework adopts the architecture of the Generative Adversarial Network (GAN), which includes a generator 110 and a classifier 120. The generator 110 is used to generate generated samples that simulate unlabeled samples. The classifier 120 is used to classify K+1 categories, where K categories in the K+1 categories correspond to the K categories set by the original user-related classification task, and the remaining additional category can correspond to the unlabeled samples.

[0048] During the training process, a set of labeled sample tags can be obtained, each of which includes feature information related to the user, such as user behavior features, and a pre-labeled category label, which is selected from the aforementioned K categories. In a typical risk identification scenario, the K categories are 2 categories indicating black and white samples.

[0049] On the other hand, the generator 110 may generate some generated samples based on the noise signal.

[0050] The labeled samples and generated samples can be input into the classifier 120 respectively to perform category prediction and obtain category prediction results. Then, according to the category prediction results, the generator 110 and the classifier 120 are respectively trained and updated adversarially. Specifically, the goal of training and updating the generator 110 is to make the probability that the category prediction result for the generated sample is an additional category as low as possible, so as to generate simulated samples that are as close to the labeled samples as possible. The training and updating goal of the classifier 120 is to make the category prediction results for the labeled samples as close as possible to their original labeled labels, and to make the category prediction results for the generated samples as additional categories as possible, so as to better learn the characteristics of each type of samples. In terms of the prediction results for the generated samples, the training objectives of the generator 110 and the classifier 120 form an adversarial relationship.

[0051] After multiple rounds of iterative adversarial training, the generator 110 can generate simulated samples close to the labeled samples, and the classifier 120 can learn the characteristics of each of the K+1 categories based on a large number of training samples. Therefore, such a classifier can be used to perform user-related classification in the future.

[0052] In the above training framework, labeled samples under different categories (there may be sample imbalance) and a large number of unlabeled samples (i.e., samples generated by the generator) are uniformly input into the classifier for modeling and learning of each category, so as to obtain a classifier with better performance.

[0053] The training process under the above framework is described in detail below.

[0054] Figure 2 A flow chart of a method for training a user-related classification model according to an embodiment is shown. It can be understood that the method can be executed by any device, equipment, platform, or device cluster with computing and processing capabilities. Figure 2 As shown, the method includes the following steps.

[0055] First, in step 21, a batch of labeled samples are obtained, each labeled sample includes feature information related to the user and has a pre-labeled category label, and the category label is selected from predetermined K categories.

[0056] For the sake of simplicity and clarity, the i-th sample in the above labeled sample can be recorded as (x i ,y i ), where x i represents the sample features of the i-th sample, which may be feature information related to the user; iRepresents the corresponding label value, which is selected from the predetermined K categories. Typically, in the scenario of identifying risk samples, the K categories are a first category corresponding to risk samples, and a second category corresponding to risk-free samples. At this time, two different label values, such as 0 and 1, can be used to represent normal samples and risk samples, respectively. In some scenarios, user-related classifications can also be multi-classified. For example, in the content recommendation scenario, users can be classified into multiple groups, so as to facilitate the subsequent selection of recommended content based on the group. At this time, the multiple groups can correspond to K categories, and K can be any set integer.

[0057] Typically, the aforementioned user-related feature information may include all or part of the following types of features: user attribute information, user behavior sequence, user operation, and so on. Depending on the specific scenario of the classification task, corresponding specific feature items may be selected as sample features. For example, in the scenario of payment risk identification, the user behavior sequence may include a preceding behavior sequence related to payment, and the user operation may include a transaction or payment operation. In the scenario of login risk identification, the user behavior sequence may include preceding behaviors before login, and the user operation may include a login operation. In the scenario of user classification for product recommendation, the user behavior sequence may include a behavior sequence formed by historical purchase behaviors, historical browsing behaviors, and historical add-to-cart behaviors. In other scenarios, relevant user features may be selected accordingly, which are not listed one by one here. The sample distribution of the labeled sample may be denoted as p d .

[0058] Furthermore, in step 22, a plurality of generated samples are generated using the generator.

[0059] For the sake of clarity and simplicity, the generator can be represented as s (z), where ρ represents the generating function corresponding to the generator, s represents the parameters in the generator, and z represents the input of the generator.

[0060] In one embodiment, the input z of the generator is the collected unlabeled sample. The generator is generated according to the function p s The unlabeled samples input are perturbed and modified as the generated sample output.

[0061] In another embodiment, the generator generates a generated sample according to the noise signal. In this case, in order to obtain the generated sample, the noise vector z of the first dimension d can be input into the generator to obtain the generated vector of the second dimension n as the representation vector of the generated sample; wherein the second dimension n is the same as the dimension of the representation vector of the labeled sample. At this time, the generating function maps the input d-dimensional noise signal to the space with the same feature dimension as the labeled sample, thereby obtaining the generated sample. The sample distribution of the generated sample can be recorded as

[0062] Afterwards, in steps 23 and 24, the labeled samples and the generated samples are input into the classifier, respectively, to obtain a first prediction result for the labeled samples and a second prediction result for the generated samples. It can be understood that steps 23 and 24 are divided only for the sake of clarity of description. In practice, the labeled samples and the generated samples can be input into the classifier separately, or mixed into a sample batch and input into the classifier together, which is not limited here; the execution order of steps 23 and 24 is also not limited.

[0063] Specifically, in step 23, each labeled sample is input into a classifier for performing K+1 classification, wherein the K+1 categories include the aforementioned predetermined K categories and an additional category; the predetermined K categories are the categories set by the original user-related classification task, and the additional category (K+1 category) is used to indicate the samples generated by the generator, that is, the samples without labeled labels.

[0064] For the sake of clarity and simplicity, the classifier can be represented as f θ (y|x), where f represents the classification function corresponding to the classifier, θ represents the parameters in the classifier, and its output f θ (y|x) represents the probability that the input sample x belongs to category y.

[0065] Based on this, after the labeled samples are input into the above classifier, the classifier performs classification prediction for each labeled sample according to its classification function. According to an embodiment of this specification, a first prediction result can be determined according to the classification prediction output of the classifier, and the first prediction result is positively correlated to the first probability that each labeled sample belongs to its corresponding category label.

[0066] More specifically, in one embodiment, the first prediction result can be expressed as in, represents the expected value, (x, y)~p d Indicates that the combination of sample feature x and label y belongs to the labeled sample distribution p d , accordingly, for (x, y)~p d Calculated f θ (y|x) represents the probability that each labeled sample predicted by the classifier belongs to its corresponding category label, that is, the first probability mentioned above. It can be seen that the first prediction result is positively correlated with the first probability and increases with the increase of the first probability.

[0067] On the other hand, in step 24, the generated sample is input into the above-mentioned classifier, and the classifier performs classification prediction on the generated sample according to the classification function. According to the classification prediction result output by the classifier, a second prediction result can be determined, and the second prediction result is positively correlated with the second probability that the generated sample belongs to the additional category (the K+1th category).

[0068] Specifically, in one example, the second prediction result can be expressed as in, Indicates that the sample feature x belongs to the sample distribution of the generated sample Accordingly, for Calculated f θ (y=K+1|x) represents the probability predicted by the classifier that the generated sample x belongs to the K+1th category (i.e., the additional category), i.e., the second probability mentioned above. It can be seen that the second prediction result is positively correlated with the second probability, and increases with the increase of the second probability.

[0069] On the basis of obtaining the above first prediction result and the second prediction result, in step 25, the generator is updated with the goal of minimizing the above second prediction result. For the sake of clarity and distinction, the updating process of the generator is called the first update. The first update can be expressed as follows:

[0070]

[0071] The above formula (1) shows that adjusting the generator ρ s The parameter s is updated and adjusted by gradient descent or the like in order to minimize the second prediction result min.

[0072] On the other hand, in step 26, the classifier is updated (referred to as the second update) with the goal of maximizing the function value of a preset function, wherein the preset function is positively correlated with both the first prediction result and the second prediction result.

[0073] In a specific example, the above-mentioned predetermined function can be defined as a weighted sum of the first prediction result and the second prediction result. In this case, the predetermined function is positively correlated with both the first prediction result and the second prediction result.

[0074] In one example, the predetermined function J is defined as the sum of the first prediction result and the second prediction result, as shown below:

[0075]

[0076] The second update of the classifier is to adjust the parameter θ of the classifier with the goal of maximizing the function value of function J.

[0077] It can be seen that the first update of the generator and the second update of the classifier form an adversarial training regarding the adjustment direction of the second prediction result. That is, the training objective of the generator is to make the second prediction result as small as possible, which means that the generated samples are as close as possible to the sample features of the labeled samples, so that the classifier cannot determine that they are unlabeled samples generated by the generator. And the training objective of the classifier includes making the second prediction result as large as possible, that is, identifying the unlabeled samples generated by the generator as much as possible. Usually, the first update and the second update can be alternately iterated. In some rounds, one of the classifier / generator can be fixed and the other can be updated; in some iteration rounds, both can be updated. Thus, after multiple rounds of iterative updates, the performance of the generator and the classifier alternately climbs and enhances. After a certain number of rounds, the generated samples produced by the generator are sufficient to simulate the labeled samples; and the classification performance of the classifier is sufficient to distinguish each category in the K + 1 categories.

[0078] According to one embodiment, in order to facilitate parameter update and convergence during the classifier training process, the first prediction result can be rewritten as:

[0079]

[0080] The first term in the above formula (3) corresponds to the third probability that the labeled sample belongs to the aforementioned predetermined K categories (y < K + 1), and the second term corresponds to the fourth probability that the labeled sample belongs to the additional category (y = K + 1).

[0081] Correspondingly, in this embodiment, the process of step 23 for determining the first prediction result may include obtaining the third probability that each labeled sample belongs to the K categories and the fourth probability that it belongs to the additional category; determining the first prediction result according to the above third probability and fourth probability, such that the first prediction result is positively correlated with the third probability and negatively correlated with the fourth probability. More specifically, the first prediction result is determined according to formula (3).

[0082] When the first prediction result adopts the form of formula (3), the training objective of the classifier shown in formula (2) can be correspondingly rewritten as the following update process:

[0083]

[0084] According to formula (4), the process of the second update includes adjusting the classifier f θThe parameter θ is used to minimize the function value min of the loss function, where the loss function is obtained by rewriting the predetermined function J of formula (2) according to formula (3) and taking the negative value. In formula (4), the two terms in the curly brackets are predictions for the additional category (y=K+1), which is conducive to applying, for example, feature matching or other constraints between the two terms during the parameter adjustment process, thereby better improving the training effect.

[0085] By performing multiple rounds of alternating adversarial training on the generator and classifier, we can obtain a generator and classifier with gradually enhanced performance. After a certain number of rounds, the generator can generate generated samples that are sufficient to simulate labeled samples. As for the classifier, since the labeled samples of K categories and the large number of unlabeled samples generated by the generator are uniformly learned and trained, the classification performance and generalization ability are significantly improved compared with the conventional classifier based on small sample training. The classifier trained in this way can be better used for user-related classification.

[0086] Figure 3 A flowchart of a user-related classification method according to an embodiment is shown. It can be understood that the method can be executed by any device, equipment, platform, or device cluster with computing and processing capabilities. Figure 3 As shown, the method includes the following steps.

[0087] In step 31, a sample to be tested related to the user is obtained. In different embodiments, the feature information of the sample to be tested may include user attribute information, user behavior sequence, user operation, etc. The user operation may further include login operation, transaction operation, etc. The feature information of the sample to be tested is specifically determined according to the classification scenario related to the user, and corresponds to the feature information of the labeled sample used in the training phase.

[0088] In step 32, the sample to be tested is input into a classifier for classifying K+1 categories to obtain a prediction output. The classifier for the K+1 category is the one obtained by the above Figure 2 The classifier is trained using the method shown.

[0089] In step 33, the classification result of the sample to be tested is determined according to the prediction output.

[0090] As mentioned above, the trained classifier can perform K+1 classification, where the first K categories indicate predetermined user-related categories, and the remaining additional category indicates unlabeled samples. Therefore, in this step, if the prediction output of the classifier indicates one of the K categories, the indicated category is determined as the classification result; if the prediction output indicates the additional category, the classification result is determined as a pending result to be further clarified.

[0091] Specifically, in the risk prediction scenario, the above classifier is a 2+1 classifier, and the two predetermined user-related categories are a first category indicating risky users or risky behaviors, and a second category indicating normal users or normal behaviors. In this case, if the prediction output of the classifier indicates the first category, the sample to be tested is determined to be a risky user or risky behavior. If the prediction output indicates the second category, the sample to be tested is determined to be a normal user or normal behavior. If the prediction output indicates the third category (additional category), it is considered that the risk status cannot be determined. For the samples to be tested in the third category, they can be input into the downstream algorithm for further risk analysis, or they can be submitted for manual verification.

[0092] As mentioned above, since the classifier is trained against the generator based on K labeled samples and a large number of unlabeled samples generated by the generator, the training of a large number of samples can largely make up for the deficiency of small samples in the target category, thus improving the overall classification performance of the classifier. Using such a classifier to perform classification prediction of user samples can obtain more accurate classification results.

[0093] According to another aspect of the embodiment, a device for training a user-related classification model is also provided. The device can be deployed on any device or platform with computing and processing capabilities. Figure 4 FIG. 2 shows a schematic diagram of a training device according to an embodiment. Figure 4 As shown, the training device 400 includes:

[0094] The sample acquisition unit 41 is configured to acquire a batch of labeled samples, each labeled sample includes feature information related to the user and has a pre-labeled category label, and the category label is selected from predetermined K categories;

[0095] A generating unit 42 is configured to generate a plurality of generated samples using a generator;

[0096] A first prediction unit 43 is configured to input each labeled sample into a classifier for classifying into K+1 categories, and obtain a first prediction result, wherein the first prediction result is positively correlated with a first probability that each labeled sample belongs to its corresponding category label; wherein the K+1 categories include the K categories and additional categories;

[0097] A second prediction unit 44 is configured to input the generated sample into the classifier to obtain a second prediction result, where the second prediction result is positively correlated with a second probability that the generated sample belongs to the additional category;

[0098] A first updating unit 45 is configured to perform a first update on the generator with the goal of minimizing the second prediction result;

[0099] The second updating unit 46 is configured to perform a second update on the classifier with the goal of maximizing a function value of a preset function, wherein the preset function is positively correlated with both the first prediction result and the second prediction result.

[0100] In a specific embodiment, the feature information may include at least one of the following: user attribute information, user behavior sequence, user operation, and the user operation includes a login operation and a transaction operation.

[0101] In one example, the K categories are a first category corresponding to risk samples and a second category corresponding to risk-free samples.

[0102] According to one implementation, the generating unit 42 is configured to: input a noise vector of a first dimension into the generator to obtain a generated vector of a second dimension as a characterization vector of the generated sample; wherein the second dimension is the same as the characterization vector dimension of the labeled sample.

[0103] According to one embodiment, the first prediction unit 43 is configured to: obtain a third probability that the labeled sample belongs to the K categories, and a fourth probability that the labeled sample belongs to the additional category; determine the first prediction result based on the third probability and the fourth probability, so that the first prediction result is positively correlated with the third probability and negatively correlated with the fourth probability.

[0104] In one example, the preset function is a weighted sum of the first prediction result and the second prediction result.

[0105] According to an implementation, the first updating unit 45 and the second updating unit 46 are configured to perform the first updating and the second updating alternately and iteratively.

[0106] According to another aspect of the embodiment, a user-related classification device is also provided, which can be deployed on any device or platform with computing and processing capabilities. Figure 5 FIG. 2 shows a schematic diagram of a classification device according to an embodiment. Figure 5 As shown, the classification device 500 includes:

[0107] The sample acquisition unit 51 is configured to acquire a sample to be tested related to the user;

[0108] The prediction unit 52 is configured to input the sample to be tested into a classifier for classifying K+1 categories to obtain a prediction output. The classifier uses the above-mentioned combination Figure 4 The device is trained; the K+1 categories include predetermined K categories and one additional category;

[0109] The result determination unit 53 is configured to determine the classification result of the sample to be tested according to the prediction output.

[0110] According to one embodiment, the result determination unit 53 is specifically configured as: if the prediction output indicates one of the K categories, then the indicated category is determined as the classification result; if the prediction output indicates the additional category, then the classification result is determined as a pending result to be further clarified.

[0111] Through the above device, the deficiency of small samples can be overcome, and a classifier with better performance can be trained, and then such a classifier can be used to better perform user-related classification.

[0112] According to another embodiment, there is also provided a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute a combination of Figure 2 or Figure 3 The method described.

[0113] According to another embodiment of the present invention, a computing device is provided, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the Figure 2 or Figure 3 The method described.

[0114] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the present invention can be implemented by hardware, software, firmware or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.

[0115] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for training a user-related classification model, comprising: Obtain a batch of labeled samples, each labeled sample includes feature information related to the user and has a pre-labeled category label, and the category label is selected from predetermined K categories; Using the generator, generate multiple generated samples; Input each labeled sample into a classifier for classifying into K+1 categories to obtain a first prediction result; wherein the K+1 categories include the K categories and an additional category; obtaining the first prediction result includes: obtaining a third probability that the labeled sample belongs to the K categories, and a fourth probability that the labeled sample belongs to the additional category; determining the first prediction result according to the third probability and the fourth probability, so that the first prediction result is positively correlated with the third probability and negatively correlated with the fourth probability; Inputting the generated sample into the classifier to obtain a second prediction result, wherein the second prediction result is positively correlated with a second probability that the generated sample belongs to the additional category; Performing a first update on the generator with the goal of minimizing the second prediction result; The classifier is updated for the second time with the goal of maximizing the function value of a preset function, wherein the preset function is positively correlated with both the first prediction result and the second prediction result.

2. The method according to claim 1, wherein: The characteristic information includes at least one of the following: user attribute information, user behavior sequence, and user operation, and the user operation includes login operation and transaction operation.

3. The method according to claim 1, wherein: The K categories are a first category corresponding to risk samples and a second category corresponding to risk-free samples.

4. The method according to claim 1, wherein: Using the generator, multiple generated samples are generated, including: The noise vector of the first dimension is input into the generator to obtain a generated vector of the second dimension as the characterization vector of the generated sample; wherein the second dimension is the same as the dimension of the characterization vector of the labeled sample.

5. The method according to claim 1, wherein: The preset function is a weighted sum of the first prediction result and the second prediction result.

6. The method according to claim 1, wherein: The first updating and the second updating are performed alternately and iteratively.

7. A user-related classification method, comprising: Obtain samples to be tested related to the user; Inputting the sample to be tested into a classifier for classifying into K+1 categories to obtain a prediction output, wherein the classifier is trained by the method of any one of claims 1 to 6; the K+1 categories include predetermined K categories and one additional category; According to the prediction output, a classification result of the sample to be tested is determined.

8. The method according to claim 7, wherein: The characteristic information of the sample to be tested includes at least one of the following: user attribute information, user behavior sequence, and user operation, and the user operation includes login operation and transaction operation.

9. The method according to claim 7, wherein: Determining the classification result of the sample to be tested according to the prediction output includes: If the prediction output indicates one of the K categories, determining the indicated category as the classification result; If the prediction output indicates the additional category, the classification result is determined as a pending result to be further clarified.

10. A device for training a user-related classification model, comprising: A sample acquisition unit is configured to acquire a batch of labeled samples, each labeled sample includes feature information related to the user and has a pre-labeled category label, and the category label is selected from predetermined K categories; A generating unit is configured to generate a plurality of generated samples using the generator; The first prediction unit is configured to input each labeled sample into a classifier for classifying into K+1 categories to obtain a first prediction result; wherein the K+1 categories include the K categories and an additional category; obtaining the first prediction result includes: obtaining a third probability that the labeled sample belongs to the K categories and a fourth probability that the labeled sample belongs to the additional category; determining the first prediction result according to the third probability and the fourth probability, so that the first prediction result is positively correlated with the third probability and negatively correlated with the fourth probability; a second prediction unit, configured to input the generated sample into the classifier to obtain a second prediction result, wherein the second prediction result is positively correlated with a second probability that the generated sample belongs to the additional category; A first updating unit, configured to perform a first update on the generator with the goal of minimizing the second prediction result; The second updating unit is configured to perform a second update on the classifier with the goal of maximizing a function value of a preset function, wherein the preset function is positively correlated with both the first prediction result and the second prediction result.

11. The device according to claim 10, wherein: The characteristic information includes at least one of the following: user attribute information, user behavior sequence, and user operation, and the user operation includes login operation and transaction operation.

12. The device according to claim 10, wherein: The K categories are a first category corresponding to risk samples and a second category corresponding to risk-free samples.

13. The device according to claim 10, wherein: The generation unit is configured as follows: The noise vector of the first dimension is input into the generator to obtain a generated vector of the second dimension as the characterization vector of the generated sample; wherein the second dimension is the same as the dimension of the characterization vector of the labeled sample.

14. The device according to claim 10, wherein: The preset function is a weighted sum of the first prediction result and the second prediction result.

15. The device according to claim 10, wherein: The first updating unit and the second updating unit are configured to perform the first updating and the second updating alternately and iteratively.

16. A user-related classification device, comprising: A sample acquisition unit, configured to acquire a sample to be tested related to the user; A prediction unit, configured to input the sample to be tested into a classifier for classifying into K+1 categories to obtain a prediction output, wherein the classifier is trained using the device of any one of claims 10 to 15; the K+1 categories include predetermined K categories and one additional category; The result determination unit is configured to determine the classification result of the sample to be tested according to the prediction output.

17. The device according to claim 16, wherein: The characteristic information of the sample to be tested includes at least one of the following: user attribute information, user behavior sequence, and user operation, and the user operation includes login operation and transaction operation.

18. The device according to claim 16, wherein: The result determination unit is configured as follows: If the prediction output indicates one of the K categories, determining the indicated category as the classification result; If the prediction output indicates the additional category, the classification result is determined as a pending result to be further clarified.

19. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 9.

20. A computing device comprising a memory and a processor, characterized in that: The memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 9 is implemented.