Sample prediction method, device, storage medium and electronic device

The multi-task network model predicts the probability of overdue and rejection of credit applicants, which solves the problems of inaccurate assessment and overfitting in the credit risk model, and achieves a more accurate risk assessment.

CN115082182BActive Publication Date: 2025-08-08DUXIAOMAN TECH (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210623436.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-02
Publication Date
2025-08-08
Estimated Expiration
2042-06-02

AI Technical Summary

Technical Problem

When evaluating credit risk users, existing credit risk models have problems with assessment inaccuracy and overfitting risks caused by the introduction of human subjective judgments.

Method used

Using a multi-task network model, the target multi-task network model is constructed by training the category and numerical characteristics of the sample, which can simultaneously predict the overdue probability and rejection probability of credit applicants, avoiding human subjective judgment and overfitting.

Benefits of technology

The credit risk model has improved the ability to evaluate all credit application users, improved the accuracy of risk assessment, and avoided the impact of artificial subjective judgments and overfitting risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115082182B_ABST
    Figure CN115082182B_ABST
Patent Text Reader

Abstract

The present invention discloses a sample prediction method, apparatus, storage medium, and electronic device. The method comprises: obtaining a target sample, wherein the target sample is a sample of a credit applicant; obtaining a target multi-task network model; and inputting the target sample into the target multi-task network model to obtain a first target probability and a second target probability for the target sample, wherein the first target probability is the overdue probability and the second target probability is the rejection probability. This invention addresses the technical issues in related art rejection inference methods that require human subjective judgment, leading to inaccurate credit risk assessments and the risk of overfitting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of financial risk prediction, and in particular to a sample prediction method, device, storage medium and electronic device. Background Art

[0002] Financial risk prediction typically involves building credit risk models to predict the overdue risk of credit users and assess their probability of default. Credit risk models are typically built based on a sample set of approved users with a history of borrowing and lending. However, these models need to predict the risk level of all credit applicants. Because the distribution of approved users with a track record of borrowing and repayment differs from that of all credit applicants, building a credit risk model based solely on a sample set of approved users with a history of borrowing and lending will affect the confidence level of the credit risk model in assessing the risk level of rejected users.

[0003] Currently, to improve the credit risk model's ability to assess all credit applicants, a rejection inference method is often used. Based on empirically established rules, rejected user samples are introduced into the credit risk modeling process to reduce the model's predictive bias. Generally, there are two approaches to rejection inference. One method is to label all rejected users as bad users during the modeling process. However, because rejection inference requires subjective judgment, which may not reflect the actual situation, even though the overall risk level of rejected users is higher than that of users who are not overdue, some rejected users may only have a slightly higher risk, but are far from certain to default. If the entry threshold for credit products is too high, labeling all rejected users as bad users will significantly overestimate the risk of the rejected user group, leading to inaccurate credit risk assessments. Another method is to first use users with borrowing and repayment performance to establish a first version of the model, use the first version of the model to evaluate rejected users, predict the overdue probability P of the rejected users, and then split the rejected user sample into a good sample and a bad sample based on the overdue probability P. The weights of the two samples are 1-P and P respectively. The final credit risk model is then established using the weighted samples constructed based on all user samples with borrowing and lending records and rejected user samples. However, in this method, the weights of the rejected user samples are based on the output results of the first version of the model, and these result information is used to train the final credit risk model. Therefore, there is a risk of overfitting, resulting in inaccurate credit risk assessment. Summary of the Invention

[0004] Embodiments of the present invention provide a sample prediction method, device, storage medium, and electronic device to at least solve the technical problems in related technologies where rejection inference methods require the introduction of human subjective judgment, resulting in inaccurate credit risk assessment and the risk of overfitting.

[0005] According to one embodiment of the present invention, a sample prediction method is provided, comprising:

[0006] Obtain a target sample, wherein the target sample is a sample of a credit application user; obtain a target multi-task network model; input the target sample into the target multi-task network model to obtain a first target probability and a second target probability of the target sample, wherein the first target probability is an overdue probability and the second target probability is a rejection probability.

[0007] Optionally, before obtaining the target multi-task network model, the method further includes: obtaining training samples, determining a first task label and a second task label of the training samples, wherein the training samples include samples with loan records and rejected samples, the first task label is used to predict whether the sample is overdue, and the second task label is used to predict whether the sample is rejected; obtaining an initial multi-task network model, training the initial multi-task network model through the training samples, optimizing the model parameters of the initial multi-task network model, and obtaining the target multi-task network model.

[0008] Optionally, determining the first task label and the second task label of the training sample includes: determining the first task label and the second task label of the training sample according to an objective function.

[0009] Optionally, the initial multi-task network model includes a shared network layer, a first output layer and a second output layer, the shared network layer includes an embedding layer, a self-attention mechanism layer, a first several layers of fully connected layers and a splicing layer, the first output layer includes a second several layers of fully connected layers and a first normalization layer, and the second output layer includes a third several layers of fully connected layers and a second normalization layer.

[0010] Optionally, the sample features of the training samples include a first categorical feature and a first numerical feature, and the initial multi-task network model is trained through the training samples, and the model parameters of the initial multi-task network model are optimized to obtain the target multi-task network model, including: training the initial multi-task network model through the first categorical feature and the first numerical feature, determining a first loss function and a second loss function, wherein the first loss function is a loss function for predicting whether the sample is overdue, and the second loss function is a loss function for predicting whether the sample is rejected; optimizing the model parameters of the initial multi-task network model according to the first loss function and the second loss function to obtain the target multi-task network model.

[0011] Optionally, the model parameters include the dimension of the embedding layer, the number of self-attention mechanism layers, the number of the first number of fully connected layers, the number of the second number of fully connected layers, the number of the third number of fully connected layers, the parameters of the first normalization layer, and the parameters of the second normalization layer.

[0012] Optionally, the target sample includes target category features and target numerical features, and the target sample is input into the target multi-task network model to obtain the first target probability and the second target probability of the target sample, including: mapping the target category features into a vector of a preset length through an embedding layer, and then performing nonlinear combination of the vectors through a self-attention mechanism layer to obtain a first result; performing nonlinear combination of the target numerical features through a first fully connected layer to obtain a second result; splicing the first result and the second result through a splicing layer to obtain a third result; performing nonlinear combination and normalization processing on the third result through a first output layer to obtain the first target probability of the target sample; performing nonlinear combination and normalization processing on the third result through a second output layer to obtain the second target probability of the target sample.

[0013] According to one embodiment of the present invention, a sample prediction device is provided, comprising:

[0014] A sample acquisition module is used to acquire target samples, wherein the target samples are credit application users; a model acquisition module is used to acquire a target multi-task network model; and a processing module is used to input the target samples into the target multi-task network model to obtain a first target probability and a second target probability of the target samples, wherein the first target probability is the overdue probability and the second target probability is the rejection probability.

[0015] Optionally, the sample acquisition module is also used to obtain training samples and determine the first task label and the second task label of the training samples, wherein the training samples include samples with loan records and rejected samples, the first task label is used to predict whether the sample is overdue, and the second task label is used to predict whether the sample is rejected; the model acquisition module is also used to obtain an initial multi-task network model, train the initial multi-task network model through the training samples, optimize the model parameters of the initial multi-task network model, and obtain the target multi-task network model.

[0016] Optionally, the sample acquisition module is further configured to determine a first task label and a second task label of the training sample according to the objective function.

[0017] Optionally, the initial multi-task network model includes a shared network layer, a first output layer and a second output layer, the shared network layer includes an embedding layer, a self-attention mechanism layer, a first several layers of fully connected layers and a splicing layer, the first output layer includes a second several layers of fully connected layers and a first normalization layer, and the second output layer includes a third several layers of fully connected layers and a second normalization layer.

[0018] Optionally, the sample features of the training sample include a first categorical feature and a first numerical feature, and the model acquisition module is also used to train the initial multi-task network model through the first categorical feature and the first numerical feature, and determine a first loss function and a second loss function, wherein the first loss function is a loss function for predicting whether the sample is overdue, and the second loss function is a loss function for predicting whether the sample is rejected; the model parameters of the initial multi-task network model are optimized according to the first loss function and the second loss function to obtain the target multi-task network model target multi-task network model.

[0019] Optionally, the model parameters include the dimension of the embedding layer, the number of self-attention mechanism layers, the number of the first number of fully connected layers, the number of the second number of fully connected layers, the number of the third number of fully connected layers, the parameters of the first normalization layer, and the parameters of the second normalization layer.

[0020] Optionally, the target sample includes target categorical features and target numerical features, and the processing module is further used to map the target categorical features into vectors of preset length through an embedding layer, and then perform nonlinear combination of the vectors through a self-attention mechanism layer to obtain a first result; perform nonlinear combination of the target numerical features through a first fully connected layer to obtain a second result; perform splicing of the first result and the second result through a splicing layer to obtain a third result; perform nonlinear combination and normalization processing on the third result through a first output layer to obtain a first target probability of the target sample; perform nonlinear combination and normalization processing on the third result through a second output layer to obtain a second target probability of the target sample.

[0021] According to one embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored. The computer program is configured to execute any of the above-mentioned sample prediction methods when running on a computer or a processor.

[0022] According to one embodiment of the present invention, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute any of the above sample prediction methods.

[0023] In an embodiment of the present invention, a target sample is obtained, wherein the target sample is a sample of a credit application user, and a target multi-task network model is obtained, and the target sample is input into the target multi-task network model to obtain a first target probability and a second target probability of the target sample, wherein the first target probability is the overdue probability and the second target probability is the rejection probability. Using the above method, the target sample is predicted by the target multi-task network model, and both the overdue probability and the rejection probability of the target sample can be obtained. Moreover, the target multi-task network model is trained based on samples of all credit application users, including both user samples with loan records and user samples of rejections. No human subjective judgment is introduced, and there is no situation where the model results are reused for training the model. There is no overfitting risk, and the credit risk model can effectively improve the assessment ability of all credit application users and improve the accuracy of risk assessment. This solves the technical problem that the rejection inference method in the related art requires the introduction of human subjective judgment, resulting in inaccurate credit risk assessment and the risk of overfitting. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0025] Figure 1 is a flow chart of a sample prediction method according to one embodiment of the present invention;

[0026] Figure 2 is a structural diagram of a multi-task network model according to one embodiment of the present invention;

[0027] Figure 3 is a structural block diagram of a sample prediction device according to one embodiment of the present invention. DETAILED DESCRIPTION

[0028] To facilitate understanding, some descriptions of concepts related to the embodiments of the present invention are exemplarily provided for reference.

[0029] As shown below:

[0030] Credit risk model: Based on the various attributes and behavioral data of credit users, a model is established to score customers. The score results can be used to determine whether to approve the user's credit application and the credit limit and interest rate, thereby reducing the overdue risk faced in credit scenarios.

[0031] Reject Inference: Inferring the borrowing and repayment performance of credit customers who have no borrowing and repayment performance, thereby increasing the profitability of credit business.

[0032] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0033] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0034] According to one embodiment of the present invention, an embodiment of a sample prediction method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0035] The method embodiment can be executed in an electronic device, a similar control device, or a system including a memory and a processor. Taking an electronic device as an example, the electronic device may include one or more processors and a memory for storing data. Optionally, the electronic device may also include a communication device and a display device for communication functions. It will be understood by those skilled in the art that the above structural description is only illustrative and does not limit the structure of the electronic device. For example, the electronic device may also include more or fewer components than those described in the above structural description, or have a configuration different from the above structural description.

[0036] The processor may include one or more processing units. For example, the processor may include a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microcontroller unit (MCU), a programmable logic device (field-programmable gate array, FPGA), a neural network processor (NPU), a tensor processing unit (TPU), an artificial intelligence (AI) type processor, and the like. Among them, different processing units may be independent components or integrated into one or more processors. In some instances, the electronic device may also include one or more processors.

[0037] The memory can be used to store computer programs, such as a computer program corresponding to the overspeed prediction method in an embodiment of the present invention. The processor implements the above-mentioned sample prediction method by running the computer program stored in the memory. The memory may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely located relative to the processor, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0038] The communication device is used to receive or send data via a network. Specific examples of the aforementioned network may include a wireless network provided by a communication provider of the mobile terminal. In one embodiment, the communication device includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In one embodiment, the communication device may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0039] The display device can be, for example, a touch screen liquid crystal display (LCD) and a touch display (also referred to as a "touch screen" or "touch display screen"). The liquid crystal display can enable the user to interact with the user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), and the user can interact with the GUI by finger contacts and / or gestures on the touch-sensitive surface. The human-computer interaction functions here optionally include the following interactions: creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital videos, playing digital music and / or web browsing, etc. The executable instructions for performing the above-mentioned human-computer interaction functions are configured / stored in a computer program product or readable storage medium executable by one or more processors.

[0040] In this embodiment, a sample prediction method running on an electronic device is provided. Figure 1 is a flow chart of a sample prediction method according to one embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0041] Step S101: Obtain target samples.

[0042] The target sample is a sample of credit applicants. This means that all credit application samples can be considered target samples. This sample includes both samples of users with a history of loan applications and samples of rejected users. Specifically, the target sample includes sample features, which include various attributes and behavioral data of credit users.

[0043] Step S102: Obtain a target multi-task network model.

[0044] In the credit business, whether a user is rejected or overdue is strongly correlated with their credit risk level. The key to the effectiveness of multi-task network models lies in the strong correlation between multiple subtasks. Therefore, the credit business meets the requirements for building a multi-task network model. By building a multi-task network model, it is possible to simultaneously determine the probability of a credit user being overdue and the probability of being rejected.

[0045] Step S103: Input the target sample into the target multi-task network model to obtain a first target probability and a second target probability of the target sample.

[0046] The first target probability is the overdue probability, and the second target probability is the rejection probability. The overdue probability can be understood as the probability that a credit user will default on their repayment, and the rejection probability can be understood as the probability that a credit user's loan application will be rejected.

[0047] Through the above steps, by obtaining a target sample, wherein the target sample is a sample of a credit application user, and obtaining a target multi-task network model, the target sample is input into the target multi-task network model to obtain a first target probability and a second target probability of the target sample, wherein the first target probability is the overdue probability and the second target probability is the rejection probability. Using the above method, the target sample is predicted by the target multi-task network model, and both the overdue probability and the rejection probability of the target sample can be obtained. The target multi-task network model is trained based on samples of all credit application users, including both user samples with loan records and rejected user samples. No human subjective judgment is introduced, and there is no situation where the model results are reused for training the model. There is no overfitting risk, and the credit risk model can effectively improve the assessment ability of all credit application users and improve the accuracy of risk assessment. This solves the technical problem that the rejection inference method in the related art requires the introduction of human subjective judgment, resulting in inaccurate credit risk assessment and the risk of overfitting.

[0048] Optionally, before obtaining the target multi-task network model in step S102, the following execution steps may be included:

[0049] Step S1021: Acquire a training sample, and determine a first task label and a second task label of the training sample.

[0050] The training samples include samples with loan records and rejected samples. The samples with loan records include samples with non-overdue loan records and samples with overdue loan records. The first task label is used to predict whether the sample is overdue, and the second task label is used to predict whether the sample is rejected.

[0051] The multi-task network model employed in the embodiments of the present invention can simultaneously use samples of users with loan history and samples of rejected users as training samples. Compared to the prior art method of training based solely on samples of users with loan history, the embodiments of the present invention can effectively improve the credit risk model's ability to assess all credit applicants, thereby increasing the accuracy of risk assessment. Furthermore, the multi-task network model includes two subtasks: predicting overdue payments and predicting rejections. The labels corresponding to the two subtasks for different sample categories are summarized in Table 1 below:

[0052] Table 1

[0053]

[0054] Step S1022: Obtain an initial multi-task network model, train the initial multi-task network model through training samples, optimize the model parameters of the initial multi-task network model, and obtain a target multi-task network model.

[0055] In the embodiment of the present invention, a multi-task network model is adopted, the initial multi-task network model is trained through training samples, and the model parameters in the initial multi-task network model are adjusted so that the model output result is optimal, thereby determining the target multi-task network model based on the adjusted model parameters.

[0056] Optionally, in step S1021, determining the first task label and the second task label of the training sample may include the following execution steps:

[0057] Step S1021a: Determine the first task label and the second task label of the training sample according to the objective function.

[0058] The objective function of the sample in the multi-classification problem is Loss j =∑ i y ij logp ij , that is, the loss function of the sample is Loss j =∑ i y ij logp ij , where i represents the number of subtasks in the multi-task network model. This application has two subtasks (predicting whether it is overdue and predicting whether it is rejected), so i takes the value of 0 or 1, j represents the jth sample, and y ij represents the overdue subtask or rejected subtask label of the jth sample, p ij represents the probability that the jth sample is overdue or rejected.

[0059] Because rejected user samples lack lending performance, their labels in the overdue prediction subtask are set to [0, 0]. This ensures that the contribution of rejected user samples to the objective function is always 0. Similarly, the first and second task labels for the training samples are determined based on this objective function, as shown in Table 1.

[0060] Optionally, the initial multi-task network model includes a shared network layer, a first output layer and a second output layer, the shared network layer includes an embedding layer, a self-attention mechanism layer, a first several layers of fully connected layers and a splicing layer, the first output layer includes a second several layers of fully connected layers and a first normalization layer, and the second output layer includes a third several layers of fully connected layers and a second normalization layer.

[0061] like Figure 2The figure shows a structural diagram of a multi-task network model according to one embodiment of the present invention, wherein the embedding layer is used to map categorical features into vectors of a preset length, the self-attention mechanism layer is used to perform nonlinear combination of different categorical features, that is, to perform nonlinear combination of vectors, the first fully connected layer is used to perform nonlinear combination of numerical features, the splicing layer is used to splice the results output by the self-attention mechanism layer and the results output by the first fully connected layer, the second fully connected layer and the third fully connected layer are used to perform nonlinear combination of all features (including categorical features and numerical features), the first normalization layer (softmax) is used to output the overdue probability of the sample, and the second normalization layer is used to output the rejection probability of the sample. The number of layers of the self-attention mechanism layer can be adjusted according to actual conditions, the number of layers of the first fully connected layer, the second fully connected layer and the third fully connected layer can be adjusted, so that the results obtained by nonlinear combination of features are different, and the parameters of the first normalization layer and the second normalization layer can be adjusted, so as to finally output different probabilities.

[0062] Optionally, the sample features of the training samples include a first categorical feature and a first numerical feature. In step S1022, training the initial multi-task network model using the training samples, optimizing the model parameters of the initial multi-task network model, and obtaining the target multi-task network model may include the following execution steps:

[0063] Step S1022a: Train the initial multi-task network model using the first categorical feature and the first numerical feature to determine a first loss function and a second loss function.

[0064] Among them, the first loss function is the loss function for predicting whether the sample is overdue, and the second loss function is the loss function for predicting whether the sample is rejected.

[0065] Sample features can be divided into categorical features and numerical features. Categorical features include, for example, the credit product applied for by the sample, and numerical features include, for example, the credit amount applied for by the sample. By inputting the categorical features and numerical features of the training sample into the initial multi-task network model, the initial multi-task network model is trained to determine the optimal first loss function for predicting whether the sample is overdue. overdue,j (x j ,y overdue,j ), and the best second loss function Loss for predicting whether the sample is rejected reject,j (x j ,y reject,j ), where x j Represents all input features of the jth sample, yoverdue,j represents the overdue subtask label of the jth sample, y reject,j represents the rejected subtask label of the j-th sample.

[0066] Step S1022b: Optimize the model parameters of the initial multi-task network model according to the first loss function and the second loss function to obtain a target multi-task network model.

[0067] According to the determined optimal first loss function and second loss function, the model parameters of the initial multi-task network model are adjusted and the model parameters of the initial multi-task network model are optimized, thereby obtaining the target multi-task network model. The loss function of the target multi-task network model is the weighted sum of the first loss function and the second loss function, that is, the loss function of the target multi-task network model is:

[0068] Loss multi,j (x j ,y j )

[0069] =ω overdue ×Loss overdue,j (x j ,y overdue,j )+ω reject

[0070] ×Loss reject,j (x j ,y reject,j )

[0071] Among them, ω overdue represents the weight of the first loss function, ω reject represents the weight of the second loss function.

[0072] Optionally, the model parameters include the dimension of the embedding layer, the number of self-attention mechanism layers, the number of the first number of fully connected layers, the number of the second number of fully connected layers, the number of the third number of fully connected layers, the parameters of the first normalization layer, and the parameters of the second normalization layer.

[0073] Among them, the dimension of the embedding layer can be understood as the length of the vector mapped into the categorical features, the number of self-attention mechanism layers and the number of fully connected layers can be understood as the number of nonlinear combinations, and the parameters of the normalization layer can be understood as the various parameters in the normalization layer.

[0074] Optionally, the target sample includes a target categorical feature and a target numerical feature. In step S103, inputting the target sample into the target multi-task network model to obtain a first target probability and a second target probability of the target sample may include the following execution steps:

[0075] Step S1031: Map the target category features into a vector of a preset length through the embedding layer, and then perform nonlinear combination of the vectors through the self-attention mechanism layer to obtain a first result.

[0076] The target sample to be predicted is input into the target multi-task network model. The target category features of the target sample will be mapped into a vector of preset length through the embedding layer, and then the vector mapped by the embedding layer will be nonlinearly combined through the self-attention mechanism layer to obtain the first result.

[0077] Step S1032: Perform nonlinear combination on the target numerical features through the first fully connected layer to obtain a second result.

[0078] The target sample to be predicted is input into the target multi-task network model, and the target numerical features of the target sample are nonlinearly combined through the first several fully connected layers to obtain the second result.

[0079] Step S1033: splice the first result and the second result through the splicing layer to obtain a third result.

[0080] The first result obtained by processing the target categorical feature and the second result obtained by processing the target numerical feature are concatenated to obtain a third result.

[0081] Step S1034: Perform nonlinear combination and normalization processing on the third result through the first output layer to obtain a first target probability of the target sample.

[0082] Step S1035: Perform nonlinear combination and normalization processing on the third result through the second output layer to obtain a second target probability of the target sample.

[0083] Since the target multi-task network model of the embodiment of the present invention includes two subtasks, the target multi-task network model includes a first output layer and a second output layer, wherein the first output layer is used to output the first target probability of the target sample, that is, the overdue probability of the target sample. The second output layer is used to output the second target probability of the target sample, that is, the rejection probability of the target sample. Compared with the single-task network model in the prior art, which can only output the overdue probability of the target sample, the target multi-task network model of the embodiment of the present invention can simultaneously obtain the overdue probability and rejection probability of the target sample.

[0084] The third result obtained by the concatenation layer is nonlinearly combined and normalized by the first output layer, and the first target probability of the target sample is finally output. The third result obtained by the concatenation layer is nonlinearly combined and normalized by the second output layer, and the second target probability of the target sample is finally output.

[0085] Therefore, the target multi-task network model proposed in this embodiment of the present invention uses user samples with loan history and rejected user samples during model training, thereby improving the credit risk model's ability to assess all credit applicants and enhancing the accuracy of risk assessment. Furthermore, the modeling process simultaneously considers both overdue and rejected factual labels, which is superior to rejection inference methods that require subjective judgment.

[0086] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0087] In this embodiment, a sample prediction device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments. The details that have been described will not be repeated here. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.

[0088] Figure 3 is a structural block diagram of a sample prediction device according to one embodiment of the present invention. Figure 3 As shown, a sample prediction device 300 is used as an example, and the device includes: a sample acquisition module 301, used to obtain a target sample, wherein the target sample is a credit application user; a model acquisition module 302, used to obtain a target multi-task network model; a processing module 303, used to input the target sample into the target multi-task network model to obtain a first target probability and a second target probability of the target sample, wherein the first target probability is the overdue probability and the second target probability is the rejection probability.

[0089] Optionally, the sample acquisition module 301 is also used to obtain training samples and determine the first task label and the second task label of the training samples, wherein the training samples include samples with loan records and rejected samples, the first task label is used to predict whether the sample is overdue, and the second task label is used to predict whether the sample is rejected; the model acquisition module 302 is also used to obtain an initial multi-task network model, train the initial multi-task network model through the training samples, optimize the model parameters of the initial multi-task network model, and obtain the target multi-task network model.

[0090] Optionally, the sample acquisition module 301 is further configured to determine a first task label and a second task label of the training sample according to the objective function.

[0091] Optionally, the initial multi-task network model includes a shared network layer, a first output layer and a second output layer, the shared network layer includes an embedding layer, a self-attention mechanism layer, a first several layers of fully connected layers and a splicing layer, the first output layer includes a second several layers of fully connected layers and a first normalization layer, and the second output layer includes a third several layers of fully connected layers and a second normalization layer.

[0092] Optionally, the sample features of the training sample include a first categorical feature and a first numerical feature, and the model acquisition module 302 is also used to train the initial multi-task network model through the first categorical feature and the first numerical feature, and determine a first loss function and a second loss function, wherein the first loss function is a loss function for predicting whether the sample is overdue, and the second loss function is a loss function for predicting whether the sample is rejected; the model parameters of the initial multi-task network model are optimized according to the first loss function and the second loss function to obtain the target multi-task network model target multi-task network model.

[0093] Optionally, the model parameters include the dimension of the embedding layer, the number of self-attention mechanism layers, the number of the first number of fully connected layers, the number of the second number of fully connected layers, the number of the third number of fully connected layers, the parameters of the first normalization layer, and the parameters of the second normalization layer.

[0094] Optionally, the target sample includes target category features and target numerical features, and the processing module 303 is further used to map the target category features into a vector of a preset length through an embedding layer, and then perform nonlinear combination of the vectors through a self-attention mechanism layer to obtain a first result; perform nonlinear combination of the target numerical features through a first fully connected layer to obtain a second result; perform splicing of the first result and the second result through a splicing layer to obtain a third result; perform nonlinear combination and normalization processing on the third result through a first output layer to obtain a first target probability of the target sample; perform nonlinear combination and normalization processing on the third result through a second output layer to obtain a second target probability of the target sample.

[0095] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0096] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above method embodiments when running on a computer or a processor.

[0097] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0098] Step S1, obtaining a target sample;

[0099] Step S2: obtaining a target multi-task network model;

[0100] Step S3: Input the target sample into the target multi-task network model to obtain the first target probability and the second target probability of the target sample.

[0101] Optionally, in this embodiment, the above-mentioned computer-readable storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0102] An embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0103] Optionally, in this embodiment, the processor in the electronic device may be configured to run a computer program to perform the following steps:

[0104] Step S1, obtaining a target sample;

[0105] Step S2: obtaining a target multi-task network model;

[0106] Step S3: Input the target sample into the target multi-task network model to obtain the first target probability and the second target probability of the target sample.

[0107] Optionally, specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.

[0108] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0109] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0110] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0111] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0112] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0113] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, magnetic disk or optical disk, etc., various media that can store program code.

[0114] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A sample prediction method, characterized in that: include: Obtaining a target sample, wherein the target sample is a sample of credit application users, and the target sample includes a target category feature and a target numerical feature; Obtaining training samples, and determining a first task label and a second task label for the training samples according to an objective function, wherein the training samples include samples with loan records and rejected samples, the first task label is used to predict whether the samples are overdue, the second task label is used to predict whether the samples are rejected, and sample features of the training samples include a first categorical feature and a first numerical feature; Obtaining an initial multi-task network model, training the initial multi-task network model using the first categorical feature and the first numerical feature, and determining a first loss function and a second loss function, wherein the first loss function is a loss function for predicting whether a sample is overdue, and the second loss function is a loss function for predicting whether a sample is rejected, the initial multi-task network model includes a shared network layer, a first output layer, and a second output layer, the shared network layer includes an embedding layer, a self-attention mechanism layer, a first number of fully connected layers, and a splicing layer, the first output layer includes a second number of fully connected layers and a first normalization layer, and the second output layer includes a third number of fully connected layers and a second normalization layer; Optimizing model parameters of the initial multi-task network model according to the first loss function and the second loss function to obtain a target multi-task network model, wherein the loss function of the target multi-task network model is a weighted sum of the first loss function and the second loss function; Map the target categorical features into vectors of a preset length, perform nonlinear combination on the vectors to obtain a first result; perform nonlinear combination on the target numerical features to obtain a second result; concatenate the first result and the second result to obtain a third result; perform nonlinear combination and normalization on the third result to obtain a first target probability and a second target probability of the target sample, wherein the first target probability is the overdue probability and the second target probability is the rejection probability.

2. The method according to claim 1, characterized in that The model parameters include the dimension of the embedding layer, the number of layers of the self-attention mechanism layer, the number of layers of the first number of fully connected layers, the number of layers of the second number of fully connected layers, the number of layers of the third number of fully connected layers, the parameters of the first normalization layer, and the parameters of the second normalization layer.

3. The method according to claim 1 or 2, characterized in that The method further comprises: Mapping the target category feature into a vector of a preset length through the embedding layer, and then performing nonlinear combination on the vector through the self-attention mechanism layer to obtain a first result; Performing a nonlinear combination on the target numerical features through the first fully connected layer to obtain a second result; splicing the first result and the second result through the splicing layer to obtain a third result; Performing nonlinear combination and normalization processing on the third result through the first output layer to obtain a first target probability of the target sample; The third result is subjected to nonlinear combination and normalization processing through the second output layer to obtain a second target probability of the target sample.

4. A sample prediction device, characterized in that: include: A sample acquisition module, wherein the sample acquisition module is used to acquire a target sample, wherein the target sample is a credit application user, and the target sample includes a target category feature and a target numerical feature; A model acquisition module is used to acquire training samples, and determine the first task label and the second task label of the training samples according to the objective function, wherein the training samples include samples with loan records and rejected samples, the first task label is used to predict whether the sample is overdue, the second task label is used to predict whether the sample is rejected, and the sample features of the training samples include a first categorical feature and a first numerical feature; an initial multi-task network model is acquired, and the initial multi-task network model is trained by the first categorical feature and the first numerical feature, and a first loss function and a second loss function are determined, wherein the first loss function is a loss function for predicting whether the sample is overdue. number, the second loss function is a loss function for predicting whether a sample is rejected, the initial multi-task network model includes a shared network layer, a first output layer and a second output layer, the shared network layer includes an embedding layer, a self-attention mechanism layer, a first number of fully connected layers and a splicing layer, the first output layer includes a second number of fully connected layers and a first normalization layer, and the second output layer includes a third number of fully connected layers and a second normalization layer; the model parameters of the initial multi-task network model are optimized according to the first loss function and the second loss function to obtain a target multi-task network model, wherein the loss function of the target multi-task network model is a weighted sum of the first loss function and the second loss function; A processing module is provided, wherein the processing module is used to map the target categorical features into vectors of a preset length, perform nonlinear combination on the vectors to obtain a first result; perform nonlinear combination on the target numerical features to obtain a second result; concatenate the first result and the second result to obtain a third result; perform nonlinear combination and normalization on the third result to obtain a first target probability and a second target probability of the target sample, wherein the first target probability is an overdue probability and the second target probability is a rejection probability.

5. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the sample prediction method according to any one of claims 1 to 3 when running on a computer or a processor.

6. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to run the computer program to execute the sample prediction method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Loan risk control model screening method and device and storage medium

    CN107944708A

  • Protein function prediction method combining multi-task learning and self-attention mechanism

    CN112562784A