Credit risk prediction model training method, electronic device and readable storage medium
By optimizing sample weights through iterative training and cluster analysis, the problem of low accuracy of the credit risk prediction model was solved, and higher prediction accuracy and generalization were achieved.
Patent Information
- Application Number
- CN202210995711.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-18
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2042-08-18
AI Technical Summary
The accuracy of user credit risk prediction models in existing technologies is low, mainly because the overall risk model relies too much on a small number of risk sub-models, resulting in insufficient prediction accuracy.
By obtaining user historical behavior data as a training sample set, the overall credit risk prediction model is iteratively trained according to the sample weights, clustering is performed based on the prediction results of the sub-models, the sample weights are optimized, and the training sample set is expanded until the preset iterative update conditions are met to obtain the target overall credit risk prediction model.
The accuracy of the credit risk prediction model is improved, the over-reliance of the overall risk model on a small number of sub-models is avoided, and the generalization and prediction accuracy are enhanced.
Smart Images

Figure CN115293889B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology in financial technology (Fintech), and in particular to a credit risk prediction model training method, electronic device and readable storage medium. Background Art
[0002] With the continuous development of financial technology, especially Internet technology finance, more and more technologies (such as distributed, artificial intelligence, etc.) are being applied in the financial field, but the financial industry also has higher requirements for technology, such as higher requirements for the credit level of users.
[0003] At present, in order to evaluate the credit level of users, the total risk model to be trained is usually trained based on the predicted credit risk of user behavior data of multiple trained risk sub-models and the actual credit risk corresponding to the user behavior data to obtain the total risk model, and then the credit risk of the user is predicted by the total risk model. However, in the total risk model trained by this method, there may be a small number of risk sub-models with high model weights, and the model weights of the remaining large number of risk sub-models are low. It is easy for the total risk model to be overly dependent on a small number of risk sub-models, resulting in low prediction accuracy of the total risk model. Therefore, the current prediction accuracy of the user's credit risk is low. Summary of the Invention
[0004] The main purpose of this application is to provide a credit risk prediction model training method, electronic device and readable storage medium, aiming to solve the technical problem of low prediction accuracy of user credit risk in the existing technology.
[0005] To achieve the above objectives, the present application provides a credit risk prediction model training method, which is applied to a credit risk prediction device. The credit risk prediction model training method includes:
[0006] Obtaining historical behavior data of the user as a training sample set and a sample weight of each training sample in the training sample set;
[0007] Iteratively training the training sample set and the weights of each sample to obtain an overall credit risk prediction model, wherein the overall credit risk prediction model is composed of multiple risk prediction sub-models;
[0008] Obtaining a sub-model prediction result of each of the risk prediction sub-models for the training sample set, and clustering the risk prediction sub-models according to the prediction results of each of the sub-models to obtain at least one sub-model group;
[0009] Optimizing the weight of each sample based on the prediction results of each sub-model and each sub-model group to expand the training sample set;
[0010] Return to the execution step: according to the training sample set and each sample weight, iterative training is performed to obtain a credit risk prediction overall model until the credit risk prediction overall model meets the preset iterative update end condition, thereby obtaining a target credit risk prediction overall model.
[0011] To achieve the above-mentioned purpose, the present application further provides a credit risk prediction device, which is applied to a credit risk prediction device and includes:
[0012] An acquisition module, configured to acquire the user's historical behavior data as a training sample set and a sample weight of each training sample in the training sample set;
[0013] A training module, configured to iteratively train, based on the training sample set and the weights of each sample, to obtain an overall credit risk prediction model, wherein the overall credit risk prediction model is composed of a plurality of risk prediction sub-models;
[0014] A clustering module, configured to obtain a sub-model prediction result of each of the risk prediction sub-models for the training sample set, and cluster the risk prediction sub-models according to the prediction results of each of the sub-models to obtain at least one sub-model group;
[0015] an expansion module, configured to optimize the weight of each sample based on the prediction results of each sub-model and each sub-model group, so as to expand the training sample set;
[0016] The optimization module is used to return to the execution step: iteratively train to obtain a credit risk prediction overall model based on the training sample set and the weights of each sample, until the credit risk prediction overall model meets the preset iterative update end condition, thereby obtaining a target credit risk prediction overall model.
[0017] The present application also provides an electronic device, which includes: a memory, a processor, and a program of the credit risk prediction model training method stored in the memory and runnable on the processor. When the program of the credit risk prediction model training method is executed by the processor, the steps of the credit risk prediction model training method as described above can be implemented.
[0018] The present application also provides a computer-readable storage medium, on which is stored a program for implementing a credit risk prediction model training method. When the program of the credit risk prediction model training method is executed by a processor, the steps of the credit risk prediction model training method as described above are implemented.
[0019] The present application also provides a computer program product, comprising a computer program, which implements the steps of the above-mentioned credit risk prediction model training method when executed by a processor.
[0020] The present application provides a credit risk prediction model training method, electronic device and readable storage medium. Compared with the method of training the total risk model to be trained based on the predicted credit risk of user behavior data and the actual credit risk corresponding to the user behavior data according to the trained multiple risk sub-models, the present application obtains the user's historical behavior data as a training sample set and the sample weights of each training sample in the training sample set; according to the training sample set and each sample weight, iterative training is performed to obtain the total credit risk prediction model, wherein the total credit risk prediction model is composed of multiple risk prediction sub-models, so as to obtain the sub-model prediction results of each risk prediction sub-model for the training sample set, cluster the risk prediction sub-models according to the prediction results of each sub-model, and obtain at least one sub-model group, thereby realizing cluster analysis of the risk prediction sub-models, thereby obtaining a sub-model group that can provide supplementary information for the total credit risk prediction model, and then optimizing each sample according to the prediction results of each sub-model and each sub-model group. Weights, thereby expanding the training sample set, so that the credit risk prediction total model can perform incremental learning based on the expanded training samples, and return to the execution step: according to the training sample set and each of the sample weights, iterative training is performed to obtain the credit risk prediction total model, until the credit risk prediction total model meets the preset iterative update end conditions, and the target credit risk prediction total model is obtained, and appropriate sample weights are iterated for the credit risk prediction total model, so that the model weighted weights of each risk prediction sub-model obtained by training the training sample set after the iterative optimization and expansion of each sample weight are evenly distributed, thereby improving the data supplement effect of the differentiated risk prediction sub-model, avoiding the use of the predicted credit risk of user behavior data and the actual credit risk corresponding to the user behavior data based on the trained multiple risk sub-models, and training the total risk model to obtain the method of the total risk model, which is prone to the technical defect of low prediction accuracy of the total risk model due to the total risk model's excessive reliance on a small number of risk sub-models, thereby improving the prediction accuracy of the user's credit risk. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0022] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0023] Figure 1This is a flowchart of the first embodiment of the credit risk prediction model training method of this application;
[0024] Figure 2 This is a flow chart of the second embodiment of the credit risk prediction model training method of this application;
[0025] Figure 3 Schematic diagram of the device involved in the credit risk prediction model training method of this application;
[0026] Figure 4 This is a schematic diagram of the device structure of the hardware operating environment involved in the credit risk prediction model training method in the embodiment of the present application.
[0027] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0028] To make the above-mentioned purposes, features, and advantages of the present application more clearly understood, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making any creative work are within the scope of protection of this application.
[0029] Example 1
[0030] The present application provides a credit risk prediction model training method. In the first embodiment of the credit risk prediction model training method of the present application, referring to Figure 1 , the credit risk prediction model training method includes:
[0031] Step S10, obtaining the user's historical behavior data as a training sample set and a sample weight of each training sample in the training sample set;
[0032] In this embodiment, it should be noted that the number of users can be one or more, the historical behavior data is the user's behavior data for the bank in the previous time step, the time step can be set as a time period for periodic extraction, and the number of data of the historical behavior data is multiple.
[0033] Exemplarily, step S10 includes: obtaining the user's behavior data at the previous time step, obtaining historical behavior data, and using the historical behavior data as a training sample set, wherein the time step can be one month, one year, or three years; the time step can be the best judgment time experience value for judging the user's credit risk behavior, or it can be set by the user's credit risk judge; the historical behavior data can be behavior data of multiple time periods of the same user, or behavior data of multiple time periods of different users, or behavior data of the same time period of different users; obtaining the sample weight of each training sample in the training sample set, wherein the sample weight can be calculated based on the sub-model prediction results of each risk prediction sub-model for each training sample, or it can be the weight experience value of each training sample with the best credit risk prediction effect, or it can be set by the user's credit risk judge.
[0034] Step S20, iteratively training based on the training sample set and the weights of each sample to obtain a credit risk prediction overall model, wherein the credit risk prediction overall model is composed of multiple risk prediction sub-models;
[0035] Step S30, obtaining a sub-model prediction result of each of the risk prediction sub-models for the training sample set, and clustering the risk prediction sub-models according to the prediction results of each of the sub-models to obtain at least one sub-model group;
[0036] Step S40, optimizing the weight of each sample based on the prediction results of each sub-model and each sub-model group to expand the training sample set;
[0037] Step S50, returning to the execution step: iteratively training to obtain a credit risk prediction overall model based on the training sample set and each sample weight, until the credit risk prediction overall model meets the preset iterative update end condition, thereby obtaining a target credit risk prediction overall model.
[0038] In this embodiment, it should be noted that the risk prediction sub-model can be a scorecard model, a tree model, or a deep learning model. The sub-model group is a cluster of at least one risk prediction sub-model.
[0039] Exemplarily, steps S20 to S50 include: iteratively training the credit risk prediction model to be trained based on the training sample set and the weights of each sample to obtain the credit risk prediction model; obtaining the sub-model prediction results of each risk prediction sub-model for the training sample set, performing cluster analysis or similarity analysis on each sub-model result based on the prediction results of each sub-model to obtain an analysis result, clustering the risk prediction sub-model based on the analysis result to obtain at least one sub-model group; optimizing each sample weight based on the prediction results of each sub-model and each sub-model group, and optimizing each sample weight based on each sample. weights, and amplify the training sample set; return to the execution step: according to the training sample set and the weights of each sample, iteratively train to obtain the credit risk prediction overall model; if it is detected that the credit risk prediction overall model meets the preset iterative update end conditions, the credit risk prediction overall model is used as the target credit risk prediction overall model, wherein, since the training sample set is amplified by optimizing the weights of each sample, the purpose of using a variety of training sample sets to train the credit risk prediction overall model in the process of continuous iterative training of the credit risk prediction overall model is achieved, thereby enhancing the generalization of the target credit risk prediction overall model finally obtained by training.
[0040] Wherein, in step S20, the iterative training is performed based on the training sample set and the weights of each sample to obtain a credit risk prediction overall model, wherein the credit risk prediction overall model is composed of a plurality of risk prediction sub-models, including:
[0041] Step S21, selecting training samples from the training sample set, and determining samples to be predicted based on the training samples and the sample weights corresponding to the training samples;
[0042] Step S22, inputting the samples to be predicted into each of the risk prediction sub-models respectively, and obtaining the prediction results output by each sub-model;
[0043] Step S23, performing weighted aggregation on the prediction results output by each sub-model according to the model weights corresponding to each risk prediction sub-model to obtain the prediction result output by the total model;
[0044] Step S24, optimizing the weights of each model and each risk prediction sub-model according to the prediction result output by the overall model;
[0045] Step S25, return to the execution step: select training samples from the training sample set, and determine the samples to be predicted based on the training samples and the sample weights corresponding to the training samples, until the weighted weights of each model meet the preset weight conditions and the parameters of each sub-model meet the preset model parameter conditions, to obtain the credit risk prediction overall model.
[0046] In this embodiment, it should be noted that the samples to be predicted include training samples and sample weights corresponding to the training samples, and the samples to be predicted are used for iterative training of the overall credit risk prediction model.
[0047] Exemplarily, steps S21 to S25 include: randomly selecting training samples from the training sample set, or selecting training samples from the training sample set in a preset order, wherein the preset order can be generated by the weights of each sample, and generating samples to be predicted based on the training samples and the sample weights corresponding to the training samples; inputting the samples to be predicted into each of the risk prediction sub-models respectively to obtain the sub-model output prediction results of each of the risk prediction sub-models for the samples to be predicted; performing weighted aggregation on the prediction results output by each of the sub-models according to the model weight weights corresponding to each of the risk prediction sub-models through a preset aggregation method to obtain sub-model output features, and combining the sub-model output features through the credit risk prediction overall model. The feature map is the prediction result output by the total model, wherein the preset aggregation method can be a mean aggregation method, a linear aggregation method, or other aggregation methods such as an overlapping aggregation method; the true label corresponding to the training sample is obtained, and the model weighted weight corresponding to each risk prediction sub-model and each risk prediction sub-model are optimized according to the difference between the true label and the prediction result output by the total model; the execution step is returned to: a training sample is selected from the training sample set, and a sample to be predicted is determined according to the training sample and the sample weight corresponding to the training sample, until the weighted weights of each model meet the preset weight conditions and the parameters of each sub-model meet the preset model parameter conditions, thereby obtaining the total credit risk prediction model.
[0048] As an example, determining whether each of the model weights satisfies the preset weight condition can be as follows: if each of the model weights satisfies the preset weight range, wherein the preset weight range is a preset range of each model weight for determining that each of the model weights is uniformly distributed, then determining that each of the model weights satisfies the preset weight condition; if there is a target model weight in each of the model weights that does not satisfy the preset weight range, then determining that each of the model weights does not satisfy the preset weight condition; or, judging whether there is a target model weight in each of the model weights that is greater than a first preset weight threshold or less than a second preset weight threshold; if there is a target model weight in each of the model weights that is greater than the first preset weight threshold or less than the second preset weight threshold, then determining that each of the model weights does not satisfy the preset weight condition; if there is no target model weight in each of the model weights that is greater than the first preset weight threshold or less than the second preset weight threshold, then determining that each of the model weights satisfies the preset weight condition.
[0049] As an example, the step of obtaining the total credit risk prediction model until the weighted weights of each model meet the preset weight conditions and the parameters of each sub-model meet the preset model parameter conditions can be: constructing the model loss corresponding to the total credit risk prediction model based on the difference; judging whether the model loss converges; if converged, taking the model weighted weights corresponding to each risk prediction sub-model and the total credit risk prediction model under each risk prediction sub-model as the total credit risk prediction model; if not converged, updating the total credit risk prediction model according to the gradient calculated by the model loss, and returning to the execution step: selecting training samples from the training sample set, and determining the samples to be predicted based on the training samples and the sample weights corresponding to the training samples, until the calculated model loss converges.
[0050] It can be understood that the risk prediction sub-model is obtained by iterative training of training samples and risk prediction sub-models to be trained. The embodiment of the present application performs multiple iterative training on the risk prediction sub-model through training samples and corresponding multiple optimized sample weights, so that the model weighting weights of each risk prediction sub-model are evenly distributed.
[0051] In step S40, the step of optimizing the weight of each sample based on the prediction results of each sub-model and each sub-model group to expand the training sample set includes:
[0052] Step S41, selecting a target sub-model group that meets a preset condition from each of the sub-model groups, wherein the preset condition includes at least one of a relevance condition and an importance condition;
[0053] Step S42: adjusting the weight of each sample according to the target sub-model group and the prediction results of each sub-model to expand the training sample set.
[0054] In this embodiment, it should be noted that the preset condition is a preset sub-model group condition for screening a target sub-model group that requires sample weight optimization.
[0055] Exemplarily, steps S41 to S42 include: selecting a target sub-model group that meets preset conditions from each of the sub-model groups; adjusting the sample weights of each training sample in the training sample set based on the target sub-model group and the training sample set to obtain adjusted weights to expand the training sample set.
[0056] Wherein, in step S41, the step of selecting a target sub-model group that meets a preset condition from each of the sub-model groups, wherein the preset condition includes at least one of a relevance condition and an importance condition, comprises:
[0057] Step A10, obtaining the total model prediction result of the total credit risk prediction model for the training sample set;
[0058] Step A20: generating sub-model group correlations between each sub-model group and the credit risk prediction overall model based on the prediction results of each sub-model and the prediction result of the overall model;
[0059] Step A30 : selecting a target sub-model group from among the sub-model groups, the sub-model group correlation of which is less than a preset correlation threshold.
[0060] In this embodiment, it should be noted that the preset correlation threshold is a pre-set critical value for determining the correlation between the sub-model group that needs sample weight optimization and the overall credit risk prediction model.
[0061] Exemplarily, steps A10 to A30 include: obtaining a prediction result of the overall model by inputting each training sample in the training sample set into the overall credit risk prediction model; obtaining the result correlation between the prediction results of each sub-model and the prediction result of the overall model, and using the result correlation as the sub-model correlation between the risk prediction sub-model and the overall credit risk prediction model; generating a sub-model group correlation between each sub-model group and the overall credit risk prediction model based on the correlation of each sub-model; and selecting a target sub-model group in each sub-model group whose sub-model group correlation is less than a preset correlation threshold.
[0062] As an example, the step of generating the sub-model group correlation between each sub-model group and the overall credit risk prediction model based on the correlation of each sub-model may be: taking the sum or average of the sub-model correlations corresponding to each risk prediction sub-model in the sub-model group as the sub-model group correlation between the overall credit risk prediction model.
[0063] Wherein, in step S41, the step of selecting a target sub-model group that meets a preset condition from each of the sub-model groups, wherein the preset condition includes at least one of a relevance condition and an importance condition, further includes:
[0064] Step B10, obtaining the model weighting weight of each risk prediction sub-model;
[0065] Step B20, determining the sub-model group importance of each sub-model group to the overall credit risk prediction model based on the model weighting;
[0066] Step B30 , selecting a target sub-model group whose sub-model group importance is less than a preset importance threshold from among the sub-model groups.
[0067] In this embodiment, it should be noted that the preset importance threshold is a pre-set critical value for determining the importance of the sub-model group between the sub-model group that needs sample weight optimization and the overall credit risk prediction model.
[0068] Exemplarily, steps B10 to B30 include: obtaining the model weighting weights of each of the risk prediction sub-models; using each of the model weighting weights as the sub-model importance of each of the risk prediction sub-models to the credit risk prediction overall model, and generating the sub-model group importance of each of the sub-model groups to the credit risk prediction overall model based on the importance of each of the sub-models; and selecting a target sub-model group from each of the sub-model groups whose sub-model group importance is less than a preset importance threshold.
[0069] As an example, the step of generating the sub-model group importance of each sub-model group to the overall credit risk prediction model based on the importance of each sub-model may be: taking the sum or average of the sub-model importance corresponding to each risk prediction sub-model in the sub-model group as the sub-model group importance between the overall credit risk prediction models.
[0070] Wherein, in step S41, the step of selecting a target sub-model group that meets a preset condition from each of the sub-model groups, wherein the preset condition includes at least one of a relevance condition and an importance condition, further includes:
[0071] Step C10 , selecting a target sub-model group from among the sub-model groups, wherein the sub-model group correlation is less than a preset correlation threshold and the sub-model group importance is less than a preset importance threshold.
[0072] Exemplarily, step C10 includes: selecting, based on the relevance of each sub-model group and the importance of each sub-model group, a target sub-model group whose relevance is less than a preset relevance threshold and whose importance is less than a preset importance threshold from each sub-model group.
[0073] Wherein, in step S42, the step of adjusting the weight of each sample according to the target sub-model group and the prediction results of each sub-model includes:
[0074] Step D10, determining prediction result distribution information of the target sub-model group based on the target sub-model group and the prediction results of each sub-model;
[0075] Step D20: adjusting the weight of each sample according to the prediction result distribution information.
[0076] In this embodiment, it should be noted that the prediction result distribution information includes the distribution information of the sub-model prediction results of each risk prediction sub-model in the target sub-model group. The prediction result distribution information can be the data distribution information of the prediction results of each sub-model, the vector distribution information of the prediction results of each sub-model, or the proportion information of the prediction results of each sub-model.
[0077] Exemplarily, steps D10 to D20 include: determining the distribution information of the sub-model prediction results of each risk prediction sub-model in the target sub-model group based on the prediction results of each sub-model to obtain the prediction result distribution information; and adjusting the weight of each sample based on the prediction result distribution information.
[0078] Wherein, in step D20, the step of adjusting the weight of each sample according to the prediction result distribution information includes:
[0079] Step D21, obtaining the correct prediction ratio of each of the training samples correctly predicted by each of the risk prediction sub-models in the prediction result distribution information, wherein the prediction result distribution information includes the sub-model prediction results of each risk prediction sub-model for the training samples;
[0080] Step D22, determining whether the correct prediction ratio is greater than a preset ratio threshold;
[0081] Step D23: If yes, then lower the sample weight corresponding to each training sample;
[0082] Step D24: If not, increase the sample weight corresponding to each training sample.
[0083] In this embodiment, it should be noted that the preset proportion threshold is a critical value of the correct prediction proportion of each training sample correctly predicted by each risk prediction sub-model that is preset to determine whether the training sample is successfully predicted by the target sub-model group.
[0084] As an example, steps D21 to D24 include: the prediction result distribution includes the prediction proportion information of the prediction results of each sub-model, the prediction proportion information includes the correct prediction proportion and the incorrect prediction proportion, and it is determined whether the correct prediction proportion is greater than the preset proportion threshold; if the correct prediction proportion is greater than the preset proportion threshold, the sample weight corresponding to each of the training samples is lowered; if the correct prediction proportion is not greater than the preset proportion threshold, the sample weight corresponding to each of the training samples is increased.
[0085] As an example, steps D21 to D24 include: the prediction result distribution includes data distribution information of the prediction results of each sub-model, if the data distribution information meets the preset data range, wherein the preset distribution range is the preset data distribution range of the prediction results of each sub-model for determining that the training sample is successfully predicted by the target sub-model group, then the sample weight corresponding to each training sample is lowered; if the data distribution information does not meet the preset data range, then the sample weight corresponding to each training sample is increased. Alternatively, the prediction result distribution includes vector distribution information of the prediction results of each sub-model, if the vector distribution information meets the preset vector range, wherein the preset vector range is the preset vector distribution range of the prediction results of each sub-model for determining that the training sample is successfully predicted by the target sub-model group, then the sample weight corresponding to each training sample is lowered; if the data distribution information does not meet the preset vector range, then the sample weight corresponding to each training sample is increased.
[0086] An embodiment of the present application provides a method for training a credit risk prediction model. Compared with the method of training a total risk model to be trained based on the predicted credit risk of user behavior data and the actual credit risk corresponding to the user behavior data according to multiple trained risk sub-models, the embodiment of the present application obtains the user's historical behavior data, and determines the training sample set of the total credit risk prediction model and the sample weights of each training sample in the training sample set according to the historical behavior data. The total credit risk prediction model is obtained by weighting the multiple risk prediction sub-models through the model to collect the sub-model prediction results of each risk prediction sub-model for the training sample set, and then classify each risk prediction sub-model according to the sub-model prediction results to obtain at least one sub-model group, and implement cluster analysis of the risk prediction sub-model, so as to obtain a sub-model group that can provide supplementary information for the total credit risk prediction model, and then optimize each of the sample weights according to the training sample set and the sub-model group, so as to expand the training sample set for The total credit risk prediction model performs incremental learning based on the amplified training samples, and returns to the execution step: iteratively trains the total credit risk prediction model according to the training sample set and each sample weight until the total credit risk prediction model meets the preset iterative update end condition, and obtains the target total credit risk prediction model, iterates appropriate sample weights for the total credit risk prediction model, so that the model weighted weights of each risk prediction sub-model obtained by training the training sample set after amplification of each sample weight after iterative optimization are evenly distributed, thereby improving the data supplement effect of the differentiated risk prediction sub-model, avoiding the use of the method of using the trained multiple risk sub-models to predict the credit risk of user behavior data and the actual credit risk corresponding to the user behavior data to train the total risk model to obtain the total risk model, which is prone to the technical defect of low prediction accuracy of the total risk model due to the total risk model's excessive reliance on a small number of risk sub-models, thereby improving the prediction accuracy of user credit risk.
[0087] Example 2
[0088] Further, refer to Figure 2 Based on the first embodiment of the present application, in another embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction and will not be described in detail. On this basis, in step S30, the step of clustering the risk prediction sub-models based on the prediction results of each sub-model to obtain at least one sub-model group includes:
[0089] Step S31, obtaining the sub-model prediction result similarity between the sub-model prediction results, and using the sub-model prediction result similarity as the sub-model similarity between the risk prediction sub-models;
[0090] Step S32: clustering the risk prediction sub-models according to the sub-model similarities to obtain at least one sub-model group.
[0091] Exemplarily, steps S31 to S32 include: calculating the similarity of the sub-model prediction results between the prediction results of each sub-model through a preset similarity algorithm, wherein the preset similarity algorithm can be a Euclidean distance algorithm, a Pearson correlation coefficient algorithm, or a cosine similarity algorithm. It can be understood that since the prediction result of each sub-model is the predicted credit risk of the user, the differentiation between the prediction results of each sub-model is reflected in the numerical value, and the algorithm content of the Euclidean distance algorithm is simple, and it is necessary to ensure that each indicator is at the same scale level; the Pearson correlation coefficient algorithm cannot calculate data with a variance that is not 0; the cosine similarity algorithm pays more attention to the difference in the direction of the vector, so the Euclidean distance algorithm is preferably used to take into account the efficiency and accuracy of obtaining the sub-model similarity. The similarity of the sub-model prediction results is used as the sub-model similarity between each of the risk prediction sub-models, and the risk prediction sub-models corresponding to the target sub-model similarity greater than the model similarity threshold among the sub-model similarities are clustered, wherein the model similarity threshold is the critical value of the sub-model similarity for determining the similarity between the risk prediction sub-models with higher similarity, thereby obtaining at least one sub-model group.
[0092] As an example, step S30 includes: selecting the first central model of each sub-model group in the risk prediction sub-model, which can be selected based on experience or set manually; obtaining the model distance between the risk prediction sub-models other than each of the central models and each of the first central models; assigning each of the risk prediction sub-models to the sub-model group corresponding to the first central model with the smallest model distance based on the model distance; determining the second central model of each of the sub-model groups based on each of the risk prediction sub-models in the sub-model group, and judging whether the second central model is consistent with the first central model; if the second central model is consistent with the first central model, taking the sub-model group as the target sub-model group; if the second central model is inconsistent with the first central model, returning to the execution step: selecting the first central model of each sub-model group in the risk prediction sub-model until the second central model is consistent with the first central model, and obtaining at least one sub-model group.
[0093] Wherein, in step S10, before the step of obtaining the user's historical behavior data as a training sample set and the sample weight of each training sample in the training sample set, the method further includes:
[0094] Step S11, obtaining the true label corresponding to each training sample;
[0095] Step S12, generating a sub-model prediction result of each risk prediction sub-model for the training sample set based on the training sample set and each risk prediction sub-model;
[0096] Step S13, determining the number of sub-models for which each risk prediction sub-model correctly predicts each training sample based on the true label and the sub-model prediction result;
[0097] Step S14: generating a sample weight for each of the training samples according to the number of sub-models, preset parameters and weight smoothing coefficients.
[0098] In this embodiment, it should be noted that the true label is the true credit risk of the user in each training sample.
[0099] Exemplarily, steps S11 to S14 include: obtaining the true label corresponding to each of the training samples; mapping each of the training samples to the user's credit risk through each of the risk prediction sub-models, and obtaining the sub-model prediction results of each of the risk prediction sub-models for the training sample set; judging whether the true label and the sub-model prediction result are consistent; if the true label and the sub-model prediction result are consistent, then judging that the risk prediction sub-model corresponding to the sub-model prediction result is correct, accumulating the number of sub-models of the risk prediction sub-model corresponding to the sub-model prediction result, and returning to the execution step: judging whether the true label and the sub-model prediction result are consistent; if the true label and the sub-model prediction result are inconsistent, then judging that the risk prediction sub-model corresponding to the sub-model prediction result is wrong, and returning to the execution step of judging whether the true label and the sub-model prediction result are consistent, until the prediction results of each of the sub-models are judged, obtaining the number of sub-models for each of the training samples correctly predicted by each of the risk prediction sub-models, and generating the sample weight of each of the training samples based on the number of sub-models, preset parameters and weight smoothing coefficients.
[0100] Optionally, the step of generating the sample weight of each training sample according to the number of sub-models, preset parameters and weight smoothing coefficient may specifically be:
[0101]
[0102] Wherein, w is the sample weight of each training sample; m i is the number of sub-models correctly predicted by each risk prediction sub-model for each training sample; α is the weight smoothing coefficient; β is the preset parameter.
[0103] As an example, the step of generating sample weights for each of the training samples may also be: obtaining the sample quantity of each of the training samples, generating a normally distributed random number of the sample quantity, and distributing the normally distributed random number to each of the training samples as the sample weight of each of the training samples.
[0104] It can be understood that the sample weight of each training sample is determined according to the number of sub-models that correctly predict the training sample by each of the risk prediction sub-models, and the number of sub-models is negatively correlated with the sample weight. The fewer the number of sub-models, the more it indicates that the sample is supplementary sample data that is differentiated from other samples. Therefore, by assigning a higher sample weight to the supplementary sample data, the subsequent iterative optimization steps of adjusting the sample weight are reduced to a certain extent, thereby improving the training efficiency of the overall credit risk prediction model.
[0105] Example 3
[0106] The present application also provides a credit risk prediction device, which is applied to a credit risk prediction device. Figure 3 , the credit risk prediction device includes:
[0107] An acquisition module, configured to acquire the user's historical behavior data as a training sample set and a sample weight of each training sample in the training sample set;
[0108] A training module, configured to iteratively train, based on the training sample set and the weights of each sample, to obtain an overall credit risk prediction model, wherein the overall credit risk prediction model is composed of a plurality of risk prediction sub-models;
[0109] A clustering module, configured to obtain a sub-model prediction result of each of the risk prediction sub-models for the training sample set, and cluster the risk prediction sub-models according to the prediction results of each of the sub-models to obtain at least one sub-model group;
[0110] an expansion module, configured to optimize the weight of each sample based on the prediction results of each sub-model and each sub-model group, so as to expand the training sample set;
[0111] The optimization module is used to return to the execution step: iteratively train to obtain a credit risk prediction overall model based on the training sample set and the weights of each sample, until the credit risk prediction overall model meets the preset iterative update end condition, thereby obtaining a target credit risk prediction overall model.
[0112] Optionally, the training module is further used to:
[0113] Selecting training samples from the training sample set, and determining samples to be predicted based on the training samples and sample weights corresponding to the training samples;
[0114] Input the samples to be predicted into each of the risk prediction sub-models respectively to obtain the prediction results output by each sub-model;
[0115] According to the model weights corresponding to the risk prediction sub-models, the prediction results output by each sub-model are weighted and aggregated to obtain the prediction result output by the total model;
[0116] Optimizing the weights of each model and each risk prediction sub-model according to the prediction results output by the overall model;
[0117] Return to the execution step: select training samples from the training sample set, and determine the samples to be predicted based on the training samples and the sample weights corresponding to the training samples, until the weighted weights of each model meet the preset weight conditions and the parameters of each sub-model meet the preset model parameter conditions, so as to obtain the credit risk prediction overall model.
[0118] Optionally, the clustering module is further configured to:
[0119] Obtaining the sub-model prediction result similarity between the sub-model prediction results, and using the sub-model prediction result similarity as the sub-model similarity between the risk prediction sub-models;
[0120] The risk prediction sub-models are clustered according to the sub-model similarities to obtain at least one sub-model group.
[0121] Optionally, the amplification module is further used to:
[0122] Selecting a target sub-model group that meets a preset condition from each of the sub-model groups, wherein the preset condition includes at least one of a relevance condition and an importance condition;
[0123] According to the target sub-model group and the prediction results of each sub-model, the weight of each sample is adjusted to expand the training sample set.
[0124] Optionally, the amplification module is further used to:
[0125] Obtaining a total model prediction result of the total credit risk prediction model for the training sample set;
[0126] Generating sub-model group correlations between each sub-model group and the credit risk prediction overall model based on the prediction results of each sub-model and the prediction result of the overall model;
[0127] A target sub-model group whose sub-model group correlation is less than a preset correlation threshold is selected from each of the sub-model groups.
[0128] Optionally, the amplification module is further used to:
[0129] Obtaining model weighting for each of the risk prediction sub-models;
[0130] Determining the sub-model group importance of each sub-model group to the overall credit risk prediction model based on the model weighting;
[0131] A target sub-model group whose sub-model group importance is less than a preset importance threshold is selected from each of the sub-model groups.
[0132] Optionally, the amplification module is further used to:
[0133] A target sub-model group is selected from each of the sub-model groups, the sub-model group relevance of which is less than a preset relevance threshold and the sub-model group importance of which is less than a preset importance threshold.
[0134] Optionally, the amplification module is further used to:
[0135] Determining prediction result distribution information of the target sub-model group based on the target sub-model group and the prediction results of each sub-model;
[0136] The weight of each sample is adjusted according to the prediction result distribution information.
[0137] Optionally, the amplification module is further used to:
[0138] Obtaining the correct prediction ratio of each of the training samples correctly predicted by each of the risk prediction sub-models in the prediction result distribution information, wherein the prediction result distribution information includes the sub-model prediction results of each risk prediction sub-model for the training samples;
[0139] Determine whether the correct prediction ratio is greater than a preset ratio threshold;
[0140] If so, lower the sample weight corresponding to each of the training samples;
[0141] If not, the sample weight corresponding to each training sample is increased.
[0142] Optionally, before the step of obtaining the user's historical behavior data as a training sample set and the sample weight of each training sample in the training sample set, the credit risk prediction device is further configured to:
[0143] Obtaining the true label corresponding to each of the training samples;
[0144] Generating a sub-model prediction result of each risk prediction sub-model for the training sample set based on each of the training samples and each of the risk prediction sub-models;
[0145] Determining the number of sub-models for which each risk prediction sub-model correctly predicts each training sample based on the true label and the sub-model prediction results;
[0146] The sample weight of each training sample is generated according to the number of sub-models, preset parameters and weight smoothing coefficient.
[0147] The credit risk prediction device provided in this application utilizes the credit risk prediction model training method described in the aforementioned embodiments to address the technical issue of low accuracy in predicting user credit risk. Compared to the prior art, the credit risk prediction device provided in this application's embodiments achieves the same beneficial effects as the credit risk prediction model training method described in the aforementioned embodiments. Other technical features of this credit risk prediction device are the same as those disclosed in the aforementioned embodiments and are not further detailed here.
[0148] Example 4
[0149] An embodiment of the present application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the credit risk prediction model training method of the above embodiment.
[0150] Reference below Figure 4 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 4 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0151] like Figure 4 As shown, the electronic device may include a processing device (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the electronic device are also stored. The processing device, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0152] Typically, the following systems can be connected to the I / O interface: input devices such as a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices such as a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices such as a magnetic tape, hard disk, etc.; and communication devices. The communication device can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figures show electronic devices with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented or have instead.
[0153] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0154] The electronic device provided in this application utilizes the credit risk prediction model training method described in the aforementioned embodiments to address the technical issue of low accuracy in predicting user credit risk. Compared to the prior art, the beneficial effects of the electronic device provided in the embodiments of this application are the same as those of the credit risk prediction model training method described in the aforementioned embodiments. Other technical features of the electronic device are the same as those disclosed in the aforementioned embodiments and are not further detailed here.
[0155] It should be understood that various parts of the present disclosure can be implemented with hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in an appropriate manner.
[0156] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0157] Example 5
[0158] This embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon, and the computer-readable program instructions are used to execute the credit risk prediction model training method in the above embodiment.
[0159] The computer-readable storage medium provided in the embodiment of the present application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination thereof. A more specific example of a computer-readable storage medium can include, but is not limited to, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present embodiment, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by an instruction execution system, a system or a device or used in combination therewith. The program code contained in the computer-readable storage medium can be transmitted with any appropriate medium, including but not limited to: an electric wire, an optical cable, RF (radio frequency), etc., or any suitable combination thereof.
[0160] The computer-readable storage medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0161] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by an electronic device, the electronic device: obtains the user's historical behavior data as a training sample set and the sample weights of each training sample in the training sample set; iteratively trains to obtain a total credit risk prediction model based on the training sample set and each sample weight, wherein the total credit risk prediction model is composed of multiple risk prediction sub-models; obtains the sub-model prediction results of each risk prediction sub-model for the training sample set, and clusters the risk prediction sub-models based on the prediction results of each sub-model to obtain at least one sub-model group; optimizes each sample weight based on the prediction results of each sub-model and each sub-model group to expand the training sample set; returns to the execution step: iteratively trains to obtain a total credit risk prediction model based on the training sample set and each sample weight, until the total credit risk prediction model meets the preset iterative update end condition, and obtains the target total credit risk prediction model.
[0162] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0163] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0164] The modules involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.
[0165] The computer-readable storage medium provided in this application stores computer-readable program instructions for executing the aforementioned credit risk prediction model training method, thereby resolving the technical issue of low accuracy in predicting user credit risk. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this embodiment of the application are the same as those of the credit risk prediction model training method provided in the aforementioned embodiment, and are not further elaborated here.
[0166] Example 6
[0167] The present application also provides a computer program product, comprising a computer program, which implements the steps of the above-mentioned credit risk prediction model training method when executed by a processor.
[0168] The computer program product provided in this application solves the technical problem of low accuracy in predicting user credit risk. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiments of this application are the same as those of the credit risk prediction model training method provided in the above embodiments, and will not be elaborated here.
[0169] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.
Claims
1. A credit risk prediction model training method, characterized in that: The credit risk prediction model training method includes: Obtaining historical behavior data of the user as a training sample set and a sample weight of each training sample in the training sample set; Iteratively training the training sample set and the weights of each sample to obtain an overall credit risk prediction model, wherein the overall credit risk prediction model is composed of multiple risk prediction sub-models; Obtaining a sub-model prediction result of each of the risk prediction sub-models for the training sample set, and clustering the risk prediction sub-models according to the prediction results of each of the sub-models to obtain at least one sub-model group; Optimizing the weight of each sample based on the prediction results of each sub-model and each sub-model group to expand the training sample set; Returning to the execution step: iteratively training to obtain a credit risk prediction overall model based on the training sample set and each sample weight, until the credit risk prediction overall model meets a preset iterative update end condition, thereby obtaining a target credit risk prediction overall model; The step of iteratively training based on the training sample set and the weights of each sample to obtain a credit risk prediction overall model, wherein the credit risk prediction overall model is composed of multiple risk prediction sub-models, comprises: Selecting training samples from the training sample set, and determining samples to be predicted based on the training samples and sample weights corresponding to the training samples; Input the samples to be predicted into each of the risk prediction sub-models respectively to obtain the prediction results output by each sub-model; According to the model weights corresponding to the risk prediction sub-models, the prediction results output by each sub-model are weighted and aggregated to obtain the prediction result output by the total model; Optimizing the weights of each model and each risk prediction sub-model according to the prediction results output by the overall model; Returning to the execution step: selecting training samples from the training sample set, and determining samples to be predicted based on the training samples and the sample weights corresponding to the training samples, until the weighted weights of each model meet the preset weight conditions and the parameters of each sub-model meet the preset model parameter conditions, thereby obtaining the overall credit risk prediction model; The step of clustering the risk prediction sub-models according to the prediction results of each sub-model to obtain at least one sub-model group includes: Obtaining the sub-model prediction result similarity between the sub-model prediction results, and using the sub-model prediction result similarity as the sub-model similarity between the risk prediction sub-models; The risk prediction sub-models are clustered according to the sub-model similarities to obtain at least one sub-model group.
2. The credit risk prediction model training method according to claim 1, characterized in that: The step of optimizing the weight of each sample based on the prediction results of each sub-model and each sub-model group to expand the training sample set includes: Selecting a target sub-model group that meets a preset condition from each of the sub-model groups, wherein the preset condition includes at least one of a relevance condition and an importance condition; According to the target sub-model group and the prediction results of each sub-model, the weight of each sample is adjusted to expand the training sample set.
3. The credit risk prediction model training method according to claim 2, characterized in that: The step of selecting a target sub-model group that meets a preset condition from each of the sub-model groups, wherein the preset condition includes at least one of a relevance condition and an importance condition, comprises: Obtaining a total model prediction result of the total credit risk prediction model for the training sample set; Generating sub-model group correlations between each sub-model group and the credit risk prediction overall model based on the prediction results of each sub-model and the prediction result of the overall model; A target sub-model group whose sub-model group correlation is less than a preset correlation threshold is selected from each of the sub-model groups.
4. The credit risk prediction model training method according to claim 2, wherein: The step of selecting a target sub-model group that meets a preset condition from each of the sub-model groups, wherein the preset condition includes at least one of a relevance condition and an importance condition, further includes: Obtaining model weighting for each of the risk prediction sub-models; Determining the sub-model group importance of each sub-model group to the overall credit risk prediction model based on the model weighting; A target sub-model group whose sub-model group importance is less than a preset importance threshold is selected from each of the sub-model groups.
5. The credit risk prediction model training method according to any one of claims 2 to 4, characterized in that: The step of selecting a target sub-model group that meets a preset condition from each of the sub-model groups, wherein the preset condition includes at least one of a relevance condition and an importance condition, further includes: A target sub-model group is selected from each of the sub-model groups, the sub-model group correlation being less than a preset correlation threshold and the sub-model group importance being less than a preset importance threshold.
6. The credit risk prediction model training method according to claim 2, characterized in that: The step of adjusting the weight of each sample according to the target sub-model group and the prediction results of each sub-model includes: Determining prediction result distribution information of the target sub-model group based on the target sub-model group and the prediction results of each sub-model; The weight of each sample is adjusted according to the prediction result distribution information.
7. The credit risk prediction model training method according to claim 6, characterized in that: The step of adjusting the weight of each sample according to the prediction result distribution information includes: Obtaining the correct prediction ratio of each of the training samples correctly predicted by each of the risk prediction sub-models in the prediction result distribution information, wherein the prediction result distribution information includes the sub-model prediction results of each risk prediction sub-model for the training samples; Determine whether the correct prediction ratio is greater than a preset ratio threshold; If so, lower the sample weight corresponding to each of the training samples; If not, the sample weight corresponding to each training sample is increased.
8. The credit risk prediction model training method according to claim 1, characterized in that: Before the step of obtaining the user's historical behavior data as a training sample set and the sample weight of each training sample in the training sample set, the method further includes: Obtaining the true label corresponding to each of the training samples; Generating a sub-model prediction result of each risk prediction sub-model for the training sample set based on each of the training samples and each of the risk prediction sub-models; Determining the number of sub-models for which each risk prediction sub-model correctly predicts each training sample based on the true label and the sub-model prediction results; The sample weight of each training sample is generated according to the number of sub-models, preset parameters and weight smoothing coefficient.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the credit risk prediction model training method described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a program for implementing a credit risk prediction model training method, and the program for implementing a credit risk prediction model training method is executed by a processor to implement the steps of the credit risk prediction model training method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Training method and system for language model
CN104572631A
Enterprise risk identification monitoring method, device and equipment and storage medium
CN109492945A