Method and device for training risk assessment model

By introducing augmented Lagrange multipliers and a dynamic caching mechanism into the risk assessment model, the model parameters are optimized, solving the problem of low prediction accuracy of head samples in traditional methods, achieving higher high-scoring sample recognition rate and preventing overfitting.

CN119904237BActive Publication Date: 2026-03-10ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively improve the prediction accuracy of risk assessment models for high-scoring samples, especially in areas such as insurance fraud detection and bank withdrawal detection. Traditional methods have failed to specifically optimize the prediction accuracy for top-scoring samples.

Method used

The augmented Lagrange multiplier method is used to transform the constraint term into a penalty term. The modified NDCG index is used as the constraint condition. Combined with a dynamic caching mechanism, the risk assessment model is trained through multiple rounds of iteration to optimize the model parameters and improve the prediction accuracy of head samples.

Benefits of technology

With the same head interception rate, more high-risk users were identified, improving the accuracy of the model in predicting high-scoring samples, alleviating the problem of sparse positive samples, and preventing model overfitting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119904237B_ABST
    Figure CN119904237B_ABST
Patent Text Reader

Abstract

Embodiments of the present specification provide a risk assessment model training method and device, including: obtaining a target sample set, which includes a plurality of positive example samples corresponding to risk users and a plurality of negative example samples corresponding to normal users. Each positive example sample and each negative example sample is processed by using a risk assessment model to obtain a respective predicted risk score of each positive example sample and each negative example sample. For any target positive example sample, a target score distance between the target positive example sample and each negative example sample is obtained based on the respective predicted risk scores of the target positive example sample and each negative example sample, and each interval parameter between the target positive example sample and each negative example sample. According to the respective predicted risk scores of each positive example sample and each negative example sample, the risk labels thereof, and the respective score distances corresponding to each positive example sample, the parameters of the risk assessment model are adjusted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of machine learning technology, and in particular to a method and apparatus for training a risk assessment model. Background Technology

[0002] With the increasing prevalence of internet technology, the risks involved in online transactions are also increasing. In order to effectively reduce high-risk transactions and strengthen market regulation, risk assessment for users is extremely important.

[0003] Traditional techniques typically train risk assessment models to improve the prediction accuracy across all score ranges. However, in critical areas such as insurance fraud detection and bank withdrawal detection, it's often necessary to focus on the high-scoring samples predicted by the model (also known as head samples). These samples correspond to high-risk users that need to be intercepted. In other words, it's crucial to improve the prediction accuracy of the high-scoring samples. Summary of the Invention

[0004] This specification describes one or more embodiments of a training method and apparatus for a risk assessment model, which can improve the prediction accuracy of high-scoring samples in the model.

[0005] Firstly, a training method for a risk assessment model is provided, comprising multiple iterations, wherein any t-th iteration includes:

[0006] Obtain the target sample set, which includes several positive sample samples corresponding to risky users and several negative sample samples corresponding to normal users;

[0007] Each positive and negative sample is processed using a risk assessment model to obtain the predicted risk score for each positive and negative sample.

[0008] For any target positive sample, based on the predicted risk scores of the target positive sample and each of the negative samples, and the interval parameters between the target positive sample and each of the negative samples, the target score distance between the target positive sample and each of the negative samples is obtained; the target score distance is negatively correlated with each of the interval parameters.

[0009] The parameters of the risk assessment model are adjusted based on the predicted risk scores and risk labels of each positive and negative sample, as well as the score distances corresponding to each positive sample.

[0010] Secondly, a training device for a risk assessment model is provided, comprising:

[0011] The acquisition unit is used to acquire the target sample set, which includes a number of positive sample samples corresponding to risky users and a number of negative sample samples corresponding to normal users.

[0012] The processing unit is used to process each positive sample and each negative sample using a risk assessment model to obtain the predicted risk score for each positive sample and each negative sample.

[0013] The acquisition unit is further configured to, for any target positive sample, obtain the target score distance between the target positive sample and each negative sample based on the predicted risk scores of the target positive sample and each negative sample, and the interval parameters between the target positive sample and each negative sample respectively; the target score distance is negatively correlated with each interval parameter.

[0014] The adjustment unit is used to adjust the parameters of the risk assessment model based on the predicted risk scores and risk labels of each positive and negative sample, as well as the score distances corresponding to each positive sample.

[0015] Thirdly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method of the first aspect.

[0016] Fourthly, a computing device is provided, including a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to implement the method of the first aspect.

[0017] The risk assessment model training method and apparatus provided in one or more embodiments of this specification set an interval parameter between positive and negative samples, and determined the score distance between positive samples and each negative sample based on the interval parameter and the predicted risk scores of the positive and negative samples respectively. Then, the parameters of the risk assessment model are adjusted according to the score distance, thereby improving the prediction accuracy of samples with high predicted scores. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments in this specification, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic diagram illustrating an implementation scenario of one embodiment disclosed in this specification;

[0020] Figure 2A flowchart illustrating a training method for a risk assessment model according to one embodiment of this specification is shown.

[0021] Figure 3 This document illustrates a method for updating a supplementary sample set in one example.

[0022] Figure 4 A schematic diagram illustrating the method for updating the supplementary sample set is shown in another example of this specification;

[0023] Figure 5 A schematic diagram of a training apparatus for a risk assessment model according to one embodiment of this specification is shown. Detailed Implementation

[0024] The solution provided in this specification will now be described with reference to the accompanying drawings.

[0025] As mentioned earlier, in many scenarios, it is necessary to improve the prediction accuracy of the high-scoring samples (e.g., predicting the top k percent of risk scores, where k can be 1). However, these scenarios are often characterized by extreme data imbalance, i.e., a small number of positive samples of interest, making it difficult to learn an effective model. Furthermore, over-focusing on a small number of positive samples can lead to overfitting.

[0026] Currently, the training problem of models in imbalanced scenarios is mainly solved through the following two approaches.

[0027] First, there's the imbalanced learning approach: this addresses the problem of imbalanced positive and negative sample distribution by weighting or sampling the positive samples belonging to the minority class, or by adding a regularization term to the loss function, borrowing ideas from ALM or RankReg. However, this approach focuses more on solving the global performance degradation caused by the imbalanced positive and negative sample distribution, without specifically optimizing the prediction accuracy of the high-scoring samples, primarily optimizing the overall accuracy.

[0028] Second, the Partial-AUC optimization scheme: PAUC is defined as the AUC within a certain range of false positive rate (FPR). By limiting the higher FPR, it approximates the prediction accuracy of the high-scoring samples predicted by the model. However, since the actual calculation principle of FPR is to calculate the AUC of the k negative samples with the highest predicted risk scores, it may lead to over-penalizing some samples with good prediction results that rank high globally.

[0029] Since existing solutions fail to effectively optimize the prediction accuracy of head samples, the inventors of this solution propose viewing the head optimization problem (i.e., improving the prediction accuracy of head samples) as a constrained optimization problem. The design of the constraint terms ensures the effectiveness of head optimization, and the objective function of the constraint problem is the classification loss function for a binary classification task. Then, the augmented Lagrange multiplier method is used to multiply the constraint terms by the objective function of the original constraint problem, transforming the constrained optimization problem into an unconstrained optimization problem. Finally, a risk assessment model is trained based on this unconstrained optimization problem.

[0030] To determine the specific representation of the above constraints, the inventors of this scheme analyzed several commonly used optimization metrics in binary classification tasks: Area Under Curve (AUC), Normalized Discounted Cumulative Gain (NDCG), etc.

[0031] The AUC metric is calculated using the following formula:

[0032]

[0033] in, The predicted risk score for positive samples. Let |N| be the predicted risk score for negative samples, |P| be the number of negative samples, and |P| be the number of positive samples.

[0034] As can be seen from Formula 1, in the process of calculating the AUC index, samples of all score ranges predicted by the model are given equal attention, thereby improving the ranking of low-scoring positive samples and high-scoring positive samples, which will cause the loss function to decrease to the same extent. This is inconsistent with the head optimization objective of this scheme.

[0035] The formula for calculating the NDCG indicator is as follows:

[0036]

[0037] Where rel(i) is the predicted risk score of the sample ranked at position i.

[0038] As can be seen from Formula 2, in the process of calculating the NDCG index, only the top k samples are considered, which is consistent with the head optimization objective of this scheme. Therefore, this scheme considers the NDCG index as a constraint term in the constraint problem.

[0039] It should be understood that in a binary classification task scenario, user samples are divided into positive and negative samples, with positive samples corresponding to high-risk users. Therefore, to effectively intercept high-risk users, the optimization objective of this solution can be further limited to improving the prediction accuracy of the top positive samples. In other words, this solution only needs to focus on the ranking of positive samples during the prediction process. However, the existing NDCG metric may be affected by the ranking of all top samples (including both positive and negative samples). Therefore, the existing NDCG metric can be modified as follows:

[0040]

[0041] Where P is the set of positive samples, rank(x) + The positive examples are ranked.

[0042] Having determined the form of the constraint terms (i.e., the modified NDCG shown in Equation 3), the constrained optimization problem of this scheme can be expressed as:

[0043] argminF(θ)

[0044]

[0045] Where F(θ) is the classification loss function, The predicted risk score for positive samples. For the predicted risk score of negative samples, δ ij The interval parameter is the positive and negative sample interval. This interval parameter is an adjustable hyperparameter that is adjusted accordingly depending on the positive and negative sample intervals.

[0046] It should be understood that the constraints in Formula 4 are equivalent to the modified NDCG index, that is, satisfying the constraints in Formula 4 is equivalent to optimizing the modified NDCG index.

[0047] For the constrained optimization problem mentioned above, this solution can transform it into an unconstrained optimization problem using the augmented Lagrange multiplier method, which can be expressed in the following form:

[0048]

[0049] Where F(θ) is the classification loss function, and the second and third terms are two penalty terms. |N| is the number of negative samples, |P| is the number of positive samples, and μ and λ i These are predefined parameters that control the impact of the second and third terms on the overall loss function, respectively. i This can be expressed as the following formula:

[0050]

[0051] It should be noted that for the loss function shown in Equation 5, since L i The calculation formula (Equation 6) includes a max operation, resulting in a non-convex, non-smooth loss function that cannot be directly optimized using traditional stochastic gradient descent. Therefore, this scheme uses the log(exp(sum(.))) function to approximate the max function, thus L i It can be represented as:

[0052]

[0053] The following explains the proof that Formula 7 can replace Formula 6:

[0054]

[0055] Since Formula 6 is an equivalent substitution for the modified NDCG, and Formula 7 is derived based on Formula 6, optimizing Formula 7 is equivalent to optimizing the modified NDCG.

[0056] In summary, Equation 5 above is the final loss function obtained by multiplying the constraint term designed for the head optimization problem into the classification loss function under the binary classification task using the augmented Lagrange multiplier method. Therefore, training the risk assessment model based on the final loss function shown in Equation 5 can improve the prediction accuracy of high-scoring samples.

[0057] Furthermore, due to the imbalance of positive and negative samples in the risk user prediction scenario, i.e., the number of positive samples corresponding to risk users is relatively small, this solution proposes to pre-cache the target positive samples and target negative samples (this will be explained in detail later), and then add the pre-cached samples to the training in each round of training to accelerate the convergence of the model.

[0058] The above is the inventive concept provided in this specification. Based on this inventive concept, this solution can be realized. The solution will be described in detail below.

[0059] Figure 1 This is a schematic diagram illustrating an implementation scenario of one of the embodiments disclosed in this specification. Figure 1In this model, the target sample set includes several positive samples corresponding to high-risk users and several negative samples corresponding to normal users. Specifically, each positive and negative sample can be input into the risk assessment model to obtain its own predicted risk score. Furthermore, each pair of positive and negative samples can be input into the target prediction network to obtain the margin parameter between the positive and negative samples in each pair. Finally, based on the predicted risk scores of each positive and negative sample and the margin parameter between the positive and negative samples in each pair, the total loss can be calculated, and the parameters of the risk assessment model can be adjusted to minimize this total loss.

[0060] It should be understood that Figure 1 This is merely an illustrative example. In practice, the interval parameter between positive and negative samples can also be predicted directly through the risk assessment model without the need for an additional target prediction network. This specification does not limit this.

[0061] Figure 2 This diagram illustrates a flowchart of a training method for a risk assessment model according to one embodiment of this specification. This method can be executed by any device, equipment, platform, or cluster of devices with computing and processing capabilities. It should be noted that this method includes multiple iterations. Figure 2 The diagram illustrates the steps involved in the t-th iteration (t is a positive integer). It can be understood that by repeatedly executing the steps shown, multiple iterations of updating the risk assessment model can be achieved, with the last updated risk assessment model becoming the final risk assessment model used. Figure 2 As shown, the method may include the following steps:

[0062] Step S202: Obtain the target sample set, which includes several positive sample sets corresponding to risky users and several negative sample sets corresponding to normal users.

[0063] Here, any user sample in the target sample set can be represented as (x i ,y i ), where x i User characteristics for user samples may include, but are not limited to, interests, place of residence, and online behavior preferences. i This is the risk label for the user sample, which is either 0 or 1. Specifically, y i When y = 1, it means that the user sample is a positive sample, and the corresponding risk label is a positive label. i When the value is 0, it means that the user sample is a negative sample, and the corresponding risk label is a negative label.

[0064] In this scheme, the positive examples mentioned above correspond to high-risk users, and the negative examples mentioned above correspond to normal users. Here, high-risk users and normal users can refer to insured users in various insurance scenarios (e.g., health insurance, accident insurance, and travel insurance).

[0065] It should be understood that since the risk labels of the user samples mentioned above only include 0 and 1, the risk assessment model trained by this scheme is a binary classification model, which is used to perform binary classification tasks.

[0066] Furthermore, as mentioned earlier, the number of positive samples in the risk user prediction scenario is relatively small. To address this sparsity issue, in each iteration, a supplementary sample set from the cache will be used to supplement the sample set of that iteration, thereby obtaining the target sample set. The number of positive samples in each iteration's sample set is less than the number of negative samples.

[0067] Each supplementary sample in the aforementioned supplementary sample set can be determined based on the predicted risk scores of user samples in the previous round of sample sets. For example, each supplementary sample includes the q positive examples that ranked lowest in the previous iteration according to their predicted risk scores. Alternatively, each supplementary sample includes several positive examples whose predicted risk scores were less than a preset threshold in the previous iteration, and several negative examples whose predicted risk scores ranked highest. In a more specific embodiment, these negative examples are obtained through sampling; the specific sampling method will be described later.

[0068] Step S204: Use the risk assessment model to process each positive sample and each negative sample to obtain the predicted risk score for each positive sample and each negative sample.

[0069] In one embodiment, the risk assessment model described above can be implemented as a tree model, a deep learning (DL) model, or a Bayesian network model, etc. In a specific embodiment, the tree model can be a gradient boosting decision tree (GBDT), an ID3 classification tree, or a C4.5 classification tree, etc.

[0070] Furthermore, the positive and negative sample pairs in the target sample set can be input into the target prediction network (e.g., a multilayer perceptron, MLP) to obtain the interval parameter between the positive and negative samples in each positive and negative sample pair. In a specific embodiment, this interval parameter is a probability value between 0 and 1.

[0071] Of course, in practice, the interval parameter between the positive and negative samples can also be predicted directly by the risk assessment model without the need to add an additional target prediction network. This specification does not limit this.

[0072] Step S206: For any target positive sample, based on the predicted risk scores of the target positive sample and each negative sample, and the interval parameters between the target positive sample and each negative sample, obtain the target score distance between the target positive sample and each negative sample.

[0073] The target score distance is negatively correlated with each interval parameter.

[0074] Specifically, this can be determined based on the interval parameter δ between any negative sample j and the target positive sample i. ij Determine the weight coefficient η of any negative sample j relative to the target positive sample i. ij The weighting coefficient η ij With the interval parameter δ ij Positive correlation. Then, based on the weight coefficients of each negative sample relative to the target positive sample, the calculated values ​​of the predicted risk scores for each negative sample are weighted and summed to obtain the target sum. Finally, the target score distance is determined based on the ratio of the target calculated value of the target predicted risk score for the target positive sample to the target sum.

[0075] For any of the above negative sample j, the weight coefficient η ij The calculation method may include using e as the base and interval parameter δ. ij To raise a power, perform an exponentiation operation to obtain the calculated value. The operand The quotient of dividing by the number of negative samples |N| is used as the weighting coefficient η. ij Specifically, it can be expressed as the following formula:

[0076]

[0077] Of course, in practice, Formula 8 can be modified in various ways, such as by adding a constant term to the denominator. This manual does not limit this.

[0078] Furthermore, the fractional distance between positive sample i and each negative sample can be determined using the following formula:

[0079]

[0080] Where, d i The fractional distance between positive sample i and each negative sample is denoted as i. The predicted risk score for positive sample i. This is the calculated value of the predicted risk score for positive sample i; For the predicted risk score of negative sample j, Let |N| be the calculated risk score for the negative sample j, where |N| is the number of negative samples.

[0081] Of course, in practice, Formula 9 can be modified in various ways, such as replacing |N| with other values, etc. This manual does not limit this.

[0082] It should be understood that the score distances corresponding to each positive sample can be obtained according to Formula 9.

[0083] Step S208: Adjust the parameters of the risk assessment model based on the predicted risk score and risk label of each positive and negative sample, as well as the score distances corresponding to each positive sample.

[0084] Specifically, a first loss term can be calculated based on the predicted risk score and risk label of each positive and negative sample. First and second penalty terms are determined based on the score distances corresponding to each positive sample. The first penalty term is determined based on the weighted sum of the negatives of the score distances, and the second penalty term is determined based on the sum of the squares of the score distances. The first loss term and the first and second penalty terms are then superimposed to obtain the total loss. The parameters of the risk assessment model are adjusted with the goal of minimizing this total loss.

[0085] Regarding the first loss term mentioned above, it can be calculated using the cross-entropy loss function BCE, based on the predicted risk score and positive label of each positive sample, and the predicted risk score and negative label of each negative sample.

[0086] Of course, in practical applications, the above cross-entropy loss function can also be replaced by weighted binary cross-entropy loss functions such as WBCE and LDAM.

[0087] Furthermore, taking any positive sample as an example, the inverse of the score distance corresponding to that positive sample can be expressed as Equation 7, and the total loss mentioned above can be expressed as Equation 5. Here, the reason why the total loss can be expressed as Equation 5 is because d i =-L i ,and

[0088] It should be noted that in practice, Formula 5 can be modified in various ways. For example, other penalty terms can be added to the total loss. Alternatively, the constant term of the first penalty term can be removed. The constant term of the second penalty term This instruction manual does not limit such matters.

[0089] After calculating the total loss, the backpropagation method is used to calculate the update gradient of the parameters of the risk assessment model based on the total loss, and then the parameters of the risk assessment model are updated.

[0090] Of course, when the interval parameter between positive and negative samples is predicted using the target prediction network, the parameters of the target prediction network can be adjusted to maximize the total loss.

[0091] This completes one round of iterative training for the risk assessment model.

[0092] It should be noted that in this scheme, after completing one round (i.e., round t) of iterative training and before entering the next round (i.e., round t+1), the supplementary sample set in the cache can be updated. The following describes the update process.

[0093] Figure 3 This diagram illustrates a method for updating a supplementary sample set in one example of this specification. Figure 3 In this process, the positive samples in the target sample set (shown by white boxes) can be ranked from highest to lowest according to their predicted risk scores. Then, the q positive samples with the lowest predicted risk scores are selected, and these q positive samples are used to update and supplement the sample set. Here, the predicted risk scores of the q positive samples are usually less than 0.5.

[0094] In other words, in this example, each supplementary sample in the supplementary sample set is a positive sample that was incorrectly predicted in each round of training. Thus, on the one hand, the model can strengthen its learning on these misclassified positive samples, and on the other hand, it can alleviate the problem that the above two penalty terms are ineffective due to the sparseness of positive samples.

[0095] It should be understood that in the first iteration, each supplementary sample in the supplementary sample set can be randomly sampled from all positive samples globally.

[0096] Figure 4 A schematic diagram illustrating the method for updating the supplementary sample set is shown in another example of this specification. Figure 4 In this process, we can first remove all positive samples from the supplementary sample set whose predicted risk scores are greater than a preset threshold (e.g., 0.5) (i.e., remove correctly predicted positive samples). Assume the number of removed positive samples is the first number. Then, we can rank the negative samples in the target sample set (shown by gray boxes) according to their predicted risk scores from high to low, and sample the first number of target negative samples from the top-ranked negative samples (e.g., the top k%, where k can be 1), and use these to replace the removed positive samples.

[0097] Among them, the target sampling probability of any target negative sample in each of the top-ranked negative samples is the sum of the discrimination difficulties between the target negative sample and each positive sample. The discrimination difficulty between the target negative sample and any positive sample is determined according to the interval parameter between the target negative sample and any positive sample, and the discrimination difficulty is negatively correlated with the interval parameter.

[0098] In one specific embodiment, the difficulty of distinguishing between positive and negative samples can be calculated using the following formula:

[0099]

[0100] Among them, T ij δ represents the difficulty of distinguishing between positive sample i and negative sample j. ij Let |N| be the interval parameter between positive sample i and negative sample j, and |N| be the number of negative samples.

[0101] Of course, in practice, the first number of target negative samples can be randomly sampled from the top-ranked negative samples, but this specification does not limit this.

[0102] As can be seen in this example, each supplementary sample in the supplementary sample set consists of a positive sample that was predicted incorrectly and a negative sample that was difficult to predict in each round of training. The reason why it is called a difficult negative sample is because its prediction risk score is high, making it more difficult to distinguish from the positive sample.

[0103] It should be understood that by using the supplementary sample set in this example to supplement the sample set in each round, the predicted risk score of negative samples can be suppressed, and the model overfitting problem can be prevented.

[0104] After updating and supplementing the sample set, the next round of iteration can begin. After multiple rounds of iteration, the final risk assessment model can be obtained.

[0105] It should be noted that since the supplementary sample set in the cache is updated after each iteration, this scheme actually adopts a dynamic caching mechanism.

[0106] It should also be noted that the risk assessment model trained in this solution can be applied to a variety of scenarios. For example, the risk assessment model can be used to predict risky users in insurance scenarios such as health insurance (including critical illness insurance and medical insurance) so that the predicted risky users can be intercepted and intervened.

[0107] In summary, the training method for the risk assessment model provided in this specification selects the modified NDCG index as a constraint term and uses the augmented Lagrange multiplier method to transform it into a penalty term added to the classification loss function, thereby achieving explicit modeling of the head optimization problem in binary classification tasks. Furthermore, the dynamic caching mechanism employed in this scheme ensures sufficient positive samples participate in the model training process, alleviating the problem of excessively sparse positive samples and preventing model overfitting. Finally, experiments have shown that, with the same head interception rate as existing schemes, this scheme can identify more high-risk users.

[0108] Corresponding to the training method of the risk assessment model described above, one embodiment of this specification also provides a training apparatus for a risk assessment model, such as... Figure 5 As shown, the device may include:

[0109] The acquisition unit 502 is used to acquire a target sample set, which includes a number of positive sample sets corresponding to risky users and a number of negative sample sets corresponding to normal users.

[0110] The processing unit 504 is used to process each positive sample and each negative sample using a risk assessment model to obtain the predicted risk score for each positive sample and each negative sample.

[0111] The acquisition unit 502 is further configured to, for any target positive sample, obtain the target score distance between the target positive sample and each negative sample based on the predicted risk scores of the target positive sample and each negative sample, and the interval parameters between the target positive sample and each negative sample, wherein the target score distance is negatively correlated with each interval parameter.

[0112] The adjustment unit 506 is used to adjust the parameters of the risk assessment model based on the predicted risk scores and risk labels of each positive and negative sample, as well as the score distances corresponding to each positive sample.

[0113] In one embodiment, the acquisition unit 502 includes:

[0114] The determination submodule 5022 is used to determine, for any first negative sample, a first weight coefficient of the first negative sample based on a first interval parameter between the first negative sample and the target positive sample, wherein the first weight coefficient is positively correlated with the first interval parameter;

[0115] The summation submodule 5024 is used to perform weighted summation of the calculated values ​​of the predicted risk score for each negative sample based on the weight coefficients of each negative sample, so as to obtain the target sum value.

[0116] The determination submodule 5022 is also used to determine the target score distance based on the ratio of the target calculated value to the target sum value for the target predicted risk score of the target positive sample.

[0117] In one specific embodiment, the determination submodule 5022 is specifically used for:

[0118] With e as the base and the first interval parameter as the power, perform an exponentiation operation to obtain the first operation value;

[0119] The quotient of the first calculated value divided by the number of each negative sample is used as the first weighting coefficient.

[0120] In one embodiment, the adjustment unit 506 includes:

[0121] The calculation submodule 5062 is used to calculate the first loss term based on the predicted risk score and risk label of each positive sample and each negative sample.

[0122] The calculation submodule 5062 is also used to determine the first and second penalty terms based on the score distances corresponding to each positive sample; wherein the first penalty term is determined based on the weighted sum of the negatives of each score distance, and the second penalty term is determined based on the sum of the squares of each score distance;

[0123] The superposition submodule 5064 is used to superimpose the first loss term and the first and second penalty terms to obtain the total loss, and to adjust the parameters of the risk assessment model with the goal of minimizing the total loss.

[0124] In one embodiment, there is a margin parameter between each positive sample and each negative sample in the target sample set, and the margin parameter is predicted using a target prediction network.

[0125] The adjustment unit 506 is also used to adjust the parameters of the target prediction network with the goal of maximizing the total loss.

[0126] In one embodiment, the target sample set is obtained by merging the sample set of round t with the supplementary sample set in the cache, and the above apparatus further includes:

[0127] Unit 508 is selected to select the q positive samples with the lowest predicted risk scores from each positive sample in the target sample set.

[0128] Update unit 510 is used to update the supplementary sample set using q positive samples for the next iteration.

[0129] In one embodiment, the target sample set is obtained by merging the sample set from round t with a supplementary sample set in the cache; the apparatus further includes:

[0130] The removal unit 512 is used to remove each positive sample whose predicted risk score is greater than a preset threshold from the supplementary sample set and replace it with each target negative sample in the target sample set to obtain an updated supplementary sample set for the next iteration.

[0131] Among them, each target negative sample is sampled from the negative samples ranked first in the predicted risk score.

[0132] In one embodiment, the target sampling probability of any target negative sample among the top-ranked negative samples is the sum of the discrimination difficulties between the target negative sample and each positive sample; the first discrimination difficulty between the target negative sample and any first positive sample is determined based on the first interval parameter between the target negative sample and the first positive sample; the first discrimination difficulty is negatively correlated with the first interval parameter.

[0133] In one embodiment, the number of positive samples in the t-th round sample set is less than the number of negative samples.

[0134] The functions of each functional module of the apparatus in the above embodiments of this specification can be implemented through the steps of the above method embodiments. Therefore, the specific working process of the apparatus provided in one embodiment of this specification will not be repeated here.

[0135] The risk assessment model training apparatus provided in one embodiment of this specification can improve the prediction accuracy of high-scoring samples predicted by the model.

[0136] According to another embodiment, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed in a computer, causes the computer to perform a combination Figure 2 The method described.

[0137] According to another embodiment, a computing device is also provided, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements a combination... Figure 2 The method described.

[0138] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the medium or device embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0139] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0140] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of this specification. It should be understood that the above description is only a specific embodiment of this specification and is not intended to limit the scope of protection of this specification. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of this specification should be included within the scope of protection of this specification.

Claims

1. A method for training a risk assessment model, comprising multiple rounds of iterations, wherein any t-th round of iteration comprises: obtaining a target sample set, which comprises a plurality of positive samples corresponding to risk users and a plurality of negative samples corresponding to normal users; processing each of the positive samples and the negative samples by using the risk assessment model to obtain a predicted risk score of each of the positive samples and the negative samples; for any target positive sample, obtaining a target score distance between the target positive sample and each of the negative samples based on the predicted risk score of the target positive sample and each of the negative samples, and each interval parameter between the target positive sample and each of the negative samples; the target score distance is negatively correlated with the interval parameter; determining a total loss based on the predicted risk score of each of the positive samples and the negative samples, the risk label of each of the positive samples and the negative samples, and the score distance corresponding to each of the positive samples, and adjusting parameters of the risk assessment model to minimize the total loss. The obtaining of the target score distance between the target positive sample and each of the negative samples comprises: for any first negative sample, determining a first weight coefficient of the first negative sample based on a first interval parameter between the first negative sample and the target positive sample; the first weight coefficient is positively correlated with the first interval parameter; performing weighted summation on each operation value of the predicted risk score of each of the negative samples based on the weight coefficient of each of the negative samples to obtain a target sum value; determining the target score distance based on a ratio of a target operation value of the target predicted risk score of the target positive sample to the target sum value. The determining of the first weight coefficient of the first negative sample comprises: performing power operation on the first interval parameter with base e and power to obtain a first operation value; dividing the first operation value by a quotient of the number of the negative samples to obtain the first weight coefficient. The determining of the total loss comprises: calculating a first loss term based on the predicted risk score of each of the positive samples and the negative samples and the risk label of each of the positive samples and the negative samples; determining a first and a second penalty term based on the score distance corresponding to each of the positive samples; wherein the first penalty term is determined based on weighted summation result of reciprocals of the score distance, and the second penalty term is determined based on summation result of squares of the score distance; superimposing the first loss term, the first and the second penalty term to obtain the total loss. Each of the positive samples and the negative samples in the target sample set has an interval parameter, and the interval parameter is predicted by using a target prediction network; the method further comprises: adjusting parameters of the target prediction network to maximize the total loss. The target sample set is obtained by merging a t-th round sample set and a supplementary sample set in a cache; the method further comprises: selecting q positive samples with a low ranking of corresponding predicted risk score from each of the positive samples in the target sample set; updating the supplementary sample set by using the q positive samples for a next round of iteration. ​ ​ ​ ​ 2. The method of claim 1, wherein, ​ ​ ​ ​ 3. The method of claim 2, wherein, ​ ​ ​ 4. The method of claim 1, wherein, ​ ​ ​ ​ 5. The method of claim 4, wherein, ​ ​ 6. The method of claim 1, wherein, ​ ​ ​ 7. The method of claim 1, wherein, The target sample set is obtained by merging the tth round sample set and the supplementary sample set in the cache; the method further comprises: Removing each positive example sample corresponding to a predicted risk score greater than a preset threshold from the supplementary sample set and replacing it with each target negative example sample in the target sample set to obtain an updated supplementary sample set for the next round of iteration; Wherein, the target negative example sample is sampled from the negative example samples ranked at the top.

8. The method of claim 7, wherein, A target sampling probability of any target negative example sample in the negative example samples ranked at the top is a sum of each discrimination difficulty between the target negative example sample and each positive example sample; a first discrimination difficulty between the target negative example sample and any first positive example sample is determined according to a first interval parameter between the target negative example sample and the first positive example sample; and the first discrimination difficulty is negatively correlated with the first interval parameter.

9. The method of claim 6 or 7, wherein, The number of positive example samples in the tth round sample set is less than the number of negative example samples.

10. A device for training a risk assessment model, comprising: an acquisition unit configured to acquire a target sample set, wherein the target sample set comprises a plurality of positive example samples corresponding to risk users and a plurality of negative example samples corresponding to normal users; a processing unit configured to process each positive example sample and each negative example sample by using a risk assessment model to obtain a predicted risk score of each positive example sample and each negative example sample; the acquisition unit is further configured to, for any target positive example sample, acquire a target score distance between the target positive example sample and each negative example sample based on the predicted risk score of each negative example sample and the target positive example sample, and each interval parameter between the target positive example sample and each negative example sample; the target score distance is negatively correlated with the interval parameter; an adjustment unit configured to determine a total loss based on the predicted risk score of each positive example sample and each negative example sample, the risk label of each positive example sample and each negative example sample, and the score distance corresponding to each positive example sample, and adjust a parameter of the risk assessment model to minimize the total loss.

11. The apparatus of claim 10, wherein, the acquisition unit comprises: a determination sub-module configured to, for any first negative example sample, determine a first weight coefficient of the first negative example sample based on a first interval parameter between the first negative example sample and the target positive example sample; the first weight coefficient is positively correlated with the first interval parameter; a summation sub-module configured to perform weighted summation on each operation value of the predicted risk score of each negative example sample based on each weight coefficient of each negative example sample to obtain a target sum value; the determination sub-module is further configured to determine the target score distance based on a ratio of a target operation value of the target predicted risk score of the target positive example sample to the target sum value.

12. The apparatus of claim 11, wherein, the determination sub-module is specifically configured to: perform power operation on the first interval parameter with e as the base to obtain a first operation value; divide the first operation value by a quotient value of the number of negative example samples to obtain the first weight coefficient.

13. The apparatus of claim 10, wherein, the adjustment unit comprises: The computing sub-module is configured to calculate a first loss term based on the predicted risk score of each of the positive samples and the negative samples and the risk label of each of the positive samples and the negative samples; The computing sub-module is further configured to determine a first penalty term and a second penalty term based on the score distance corresponding to each of the positive samples; the first penalty term is determined based on a weighted sum of reciprocals of the score distances, and the second penalty term is determined based on a sum of squares of the score distances; The superimposing sub-module is configured to superimpose the first loss term, the first penalty term, and the second penalty term to obtain the total loss.

14. The apparatus of claim 13, wherein, The positive samples and the negative samples in the target sample set have a gap parameter, and the gap parameter is predicted by using a target prediction network; The adjusting unit is further configured to adjust the parameter of the target prediction network to maximize the total loss.

15. The apparatus of claim 10, wherein, The target sample set is obtained by merging the tth-round sample set and a supplementary sample set in a cache; the device further includes: The selecting unit is configured to select q positive samples with a low ranking of predicted risk score from the positive samples in the target sample set; The updating unit is configured to update the supplementary sample set by using the q positive samples, for a next round of iteration.

16. The apparatus of claim 10, wherein, The target sample set is obtained by merging the tth-round sample set and a supplementary sample set in a cache; the device further includes: The removing unit is configured to remove, from the supplementary sample set, each positive sample with a predicted risk score greater than a preset threshold, and replace the positive sample with each target negative sample in the target sample set to obtain an updated supplementary sample set, for a next round of iteration; The target negative samples are sampled from the negative samples with a high ranking of predicted risk score.

17. The device of claim 16, wherein, The target sampling probability of any target negative sample in the negative samples with a high ranking of predicted risk score is a sum of discrimination difficulties between the target negative sample and each of the positive samples; a first discrimination difficulty between the target negative sample and any first positive sample is determined according to a first gap parameter between the target negative sample and the first positive sample; and the first discrimination difficulty is negatively correlated with the first gap parameter.

18. The apparatus of claim 15 or 16, wherein, The number of positive samples in the tth-round sample set is less than the number of negative samples.

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

20. A computing device comprising a memory and a processor, wherein, The memory stores executable code, and the processor executes the executable code to implement the method of any one of claims 1-9.

Citation Information

Patent Citations

  • Risk identification model training method and device for business object

    CN112200488A

  • Method and device for training and predicting risk prediction model for multiple mechanisms

    CN118822711A