Credit risk model construction method and device based on transfer learning, equipment and medium

By employing transfer learning and feature standardization, valuable features are selected and the differentiation of decision tree paths is controlled. This addresses the overfitting and stability issues of credit risk models when the sample size of the target product is small, thereby improving the accuracy and efficiency of the model.

CN121280133APending Publication Date: 2026-01-06CHONGQING YUYIN FINANCIAL TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511764170.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-01-06

AI Technical Summary

Technical Problem

When the sample size of the target product is small, existing technologies struggle to build stable and generalizable credit risk models. In particular, models based on the XGBoost algorithm are prone to overfitting, resulting in insufficient online data prediction capabilities.

Method used

The transfer learning method is used to standardize the features of the target credit loan product and the same source credit loan product samples, select valuable features, and then use the XGBoost classifier to train the base model and perform incremental training to control the feature path of the newly added decision tree to maintain the difference from the historical path.

Benefits of technology

It improves the stability and generalization ability of the credit risk model, reduces the risk of overfitting, makes the model more closely match the credit risk assessment needs of the target product, and reduces the consumption of computing resources and training time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121280133A_ABST
    Figure CN121280133A_ABST
Patent Text Reader

Abstract

The invention discloses a credit risk model construction method and device based on transfer learning, equipment and a medium, and relates to the technical field of machine learning, and the method comprises the steps: carrying out the feature standardization processing of a target credit performance sample and a homologous credit performance sample of a target credit loan product, obtaining a processed target credit performance sample and a processed homologous credit performance sample; analyzing the processed target credit performance sample to determine a first target feature, and analyzing the processed homologous credit performance sample to determine a second target feature; training a preset initial model by using the second target feature to obtain a corresponding basic model, performing incremental training on the basic model by using the first target feature, and determining an incremental training result of which the performance index meets a preset performance index qualification condition as a target credit risk model; and in the model training process, the feature path of the newly added decision tree is controlled to be differentiated from the historical feature path.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine learning technology, and in particular to a method, apparatus, device, and medium for constructing credit risk models based on transfer learning. Background Technology

[0002] XGBoost (eXtreme Gradient Boosting, XGB) is a commonly used machine learning tree model algorithm, frequently employed in the financial field to build credit risk models. Training a credit risk model based on XGB often requires a large amount of data. With limited data, overfitting is common, leading to poor generalization and a lack of predictive ability for online data. In credit loan products, a single product typically has very limited credit performance data, severely restricting the construction of a credit risk model based on that product's sample. Although different products from the same data source have a relatively large total sample size, sufficient to train an XGB-based risk model, the diverse financial scenarios of different credit loan products make it difficult to train a comprehensive model applicable to all products, resulting in poor model stability and generalization.

[0003] In summary, how to solve the problems of overfitting and stability in credit risk model training when the sample size of the target product is small is a technical problem that urgently needs to be solved. Summary of the Invention

[0004] In view of this, the purpose of this invention is to provide a method, apparatus, device, and medium for constructing a credit risk model based on transfer learning, which can solve the problems of overfitting and stability in credit risk model training when the sample size of the target product is small. The specific solution is as follows:

[0005] Firstly, this application provides a method for constructing a credit risk model based on transfer learning, including:

[0006] The target credit performance sample and the same source credit performance sample of the target credit loan product are respectively subjected to feature standardization processing to obtain the processed target credit performance sample and the processed same source credit performance sample; the same source credit performance sample is a number of credit performance samples of other credit loan products in the data source of the target credit loan product, excluding the target credit loan product.

[0007] The first sample features of the processed target credit performance sample are analyzed to determine the corresponding first target features, and the second sample features of the processed homologous credit performance sample are analyzed to determine the corresponding second target features.

[0008] Using the second target feature of the processed homologous credit performance samples, a preset initial model is trained to obtain a corresponding basic model. Using the first target feature of the processed target credit performance samples, the basic model is incrementally trained. The incremental training result that meets the preset performance indicator qualification conditions is determined as the target credit risk model of the target credit loan product. The initial model is an initialized XGBoost classifier.

[0009] During model training, the feature paths of newly added decision trees are kept different from those of historical feature paths.

[0010] Optionally, the step of performing feature standardization processing on the target credit performance sample and the corresponding source credit performance sample of the target credit loan product to obtain the processed target credit performance sample and the processed corresponding source credit performance sample includes:

[0011] Determine the target credit performance sample of the target credit loan product, and the same source credit performance samples of other credit loan products besides the target credit loan product in the data source of the target credit loan product;

[0012] Quantile calculations are performed on several feature values ​​for each sample feature of the credit performance sample to be processed to determine the corresponding first quantile and second quantile; the credit performance sample to be processed includes the target credit performance sample and the source credit performance sample;

[0013] Based on the first quantile and the second quantile, a target standard value template corresponding to each sample feature is determined;

[0014] Each of the sample features is matched with a corresponding target standard value template to determine which of the target standard value templates has the smallest difference from the feature value and is not greater than the target standard value of the feature value.

[0015] The feature value is replaced with the target standard value to obtain the corresponding processed credit performance sample; the processed credit performance sample includes the processed target credit performance sample and the processed homologous credit performance sample.

[0016] Optionally, determining the target standard value template corresponding to each sample feature based on the first quantile and the second quantile includes:

[0017] Determine the characteristic range difference between the first quantile and the second quantile, and determine the maximum and minimum values ​​of a plurality of preset standard value templates, so as to determine the standard range difference of the plurality of preset standard value templates based on the maximum and minimum values;

[0018] The standard value template with the smallest difference between the standard range difference and the feature range difference among the plurality of preset standard value templates is determined as the corresponding target standard value template.

[0019] Optionally, the analysis of the first sample features of the processed target credit performance sample to determine the corresponding first target features includes:

[0020] The first sample features of the processed target credit performance sample are analyzed to evaluate the information value of the first sample features, and the group stability of the first sample features is determined based on a preset test dataset.

[0021] Among the first sample features, the sample features whose information value is higher than a preset information value threshold, whose group stability is lower than a preset group stability threshold, and which meet preset manual judgment conditions are determined as the corresponding first target features.

[0022] Optionally, the analysis of the second sample features of the processed homologous credit performance samples to determine the corresponding second target features includes:

[0023] The second sample features of the processed homologous credit performance samples are analyzed to evaluate the information value of the second sample features;

[0024] Based on the information value in descending order, a preset number of sample features that meet preset manual judgment conditions are selected from the second sample features, and the preset number of sample features that meet the preset manual judgment conditions are determined as the corresponding second target features.

[0025] Optionally, the step of incrementally training the base model using the first target feature of the processed target credit performance sample, and determining the incremental training result whose performance indicators meet the preset performance indicator qualification conditions as the target credit risk model of the target credit loan product, includes:

[0026] Load the base model and freeze the decision tree structure and weights in the base model;

[0027] The first target feature of the processed target credit performance sample is predicted using the basic model to obtain the corresponding prediction residual.

[0028] Based on the predicted residuals and preset training parameters, a new target decision tree is trained, and the integrated model of the new target decision tree and the base model is determined as the new base model. Then, the process jumps to the step of using the base model to predict the first target feature of the processed target credit performance sample, until the performance index of the integrated model meets the preset performance index qualification conditions, and the target credit risk model of the target credit loan product is obtained.

[0029] Optionally, the control of keeping the feature paths of newly added decision trees different from historical feature paths includes:

[0030] In the process of generating a new leaf node in the new decision tree, the current historical feature path and historical feature splitting point are traversed, and the traversal results are matched with the candidate feature path and candidate feature splitting point to be generated to obtain the corresponding matching results.

[0031] If the matching result indicates that there is a target feature path and a target feature segmentation point among the historical feature paths and the historical feature segmentation points, then the target feature path and the target feature segmentation point are deleted to control the feature paths of the newly added decision tree to maintain differentiation; the target feature path and the target feature segmentation point are feature paths and feature segmentation points that satisfy preset similarity conditions with the candidate feature paths and the candidate feature segmentation points.

[0032] Secondly, this application provides a credit risk model construction apparatus based on transfer learning, comprising:

[0033] The feature processing module is used to perform feature standardization processing on the target credit performance sample and the homologous credit performance sample of the target credit loan product, respectively, to obtain the processed target credit performance sample and the processed homologous credit performance sample; the homologous credit performance sample is a number of credit performance samples of other credit loan products in the data source of the target credit loan product, excluding the target credit loan product.

[0034] The feature analysis module is used to analyze the first sample features of the processed target credit performance sample to determine the corresponding first target feature, and to analyze the second sample features of the processed homologous credit performance sample to determine the corresponding second target feature.

[0035] The model determination module is used to train a preset initial model using the second target feature of the processed homologous credit performance samples to obtain a corresponding basic model, and to incrementally train the basic model using the first target feature of the processed target credit performance samples, and to determine the incremental training result that meets the preset performance indicator qualification conditions as the target credit risk model of the target credit loan product; the initial model is an initialized XGBoost classifier;

[0036] The path control module is used to ensure that the feature paths of newly added decision trees are differentiated from historical feature paths during model training.

[0037] Thirdly, this application provides an electronic device, comprising:

[0038] Memory, used to store computer programs;

[0039] A processor is used to execute the computer program to implement the aforementioned method for constructing a credit risk model based on transfer learning.

[0040] Fourthly, this application provides a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned method for constructing a credit risk model based on transfer learning.

[0041] In this application, the target credit performance samples and homologous credit performance samples of the target credit loan product are respectively subjected to feature standardization processing to obtain processed target credit performance samples and processed homologous credit performance samples. The homologous credit performance samples are several credit performance samples of other credit loan products besides the target credit loan product in the data source of the target credit loan product. The first sample feature of the processed target credit performance sample is analyzed to determine the corresponding first target feature, and the second sample feature of the processed homologous credit performance sample is analyzed to determine the corresponding second target feature. The second target feature of the processed homologous credit performance sample is used to train a preset initial model to obtain a corresponding base model. The first target feature of the processed target credit performance sample is used to incrementally train the base model, and the incremental training result that meets the preset performance indicator qualification conditions is determined as the target credit risk model of the target credit loan product. The initial model is an initialized XGBoost classifier. During the model training process, the feature path of the newly added decision tree is controlled to maintain the difference from the historical feature path. As can be seen from the above, this application first performs feature standardization processing on the target credit performance samples and the same-source credit performance samples (i.e., credit performance samples of other credit loan products in the data source of the target credit loan product) to obtain two types of samples after processing. Then, the first sample feature of the processed target credit performance sample is analyzed to determine the first target feature, and the second sample feature of the processed same-source credit performance sample is analyzed to determine the second target feature. Next, the second target feature of the processed same-source credit performance sample is used to train a preset initial XGBoost classifier to obtain a basic model. Then, the first target feature of the processed target credit performance sample is used to incrementally train the basic model. The incremental training result that meets the preset qualification conditions is determined as the target credit risk model. In the process of model training, the feature path of the newly added decision tree is controlled to maintain the difference from the historical feature path.In this way, through the above-described process of this application, the interference of feature dimension differences on model training is eliminated by standardizing the target samples and homologous samples; the target features of the two types of samples are determined separately, which can accurately extract key information valuable for credit risk assessment and improve the effectiveness of model input; the basic model is trained first using homologous samples, and then incremental training is performed using target samples, which makes full use of the common information of homologous data to reduce training difficulty, making the model more in line with the characteristics of the target credit loan product and improving the model's targeting and accuracy; the XGBoost classifier is used as the initial model, and its efficient ensemble learning ability is used to enhance the model's fitting and generalization ability; controlling the difference between the newly added decision tree and the historical feature path can avoid feature path redundancy, increase the model's diversity and expressive power, reduce the risk of overfitting, and thus solve the problems of overfitting and stability in credit risk model training when the sample size of the target product is small. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0043] Figure 1 This is a flowchart of a credit risk model construction method based on transfer learning disclosed in this application;

[0044] Figure 2 This is a schematic diagram of a standard value template for a credit performance sample disclosed in this application;

[0045] Figure 3 This is a schematic diagram of the structure of a credit risk model construction device based on transfer learning disclosed in this application;

[0046] Figure 4 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0048] Training a credit risk model based on the XGB algorithm often requires a large amount of data. With limited data, overfitting is common, leading to poor generalization and a lack of predictive ability for online data. In credit lending products, a single product typically has very little credit performance data, severely limiting the ability to build a credit risk model based on that product's sample. Although different products from the same data source have a relatively large total sample size, sufficient to train a risk model based on the XGB algorithm, the different financial scenarios of various credit lending products make it difficult to train a large, comprehensive model applicable to all products, resulting in poor model stability and generalization.

[0049] To overcome the aforementioned technical problems, this application provides a method for constructing a credit risk model based on transfer learning, which can solve the problems of overfitting and stability in credit risk model training when the sample size of the target product is small.

[0050] See Figure 1 As shown in the figure, this invention discloses a method for constructing a credit risk model based on transfer learning, including:

[0051] Step S11: Perform feature standardization processing on the target credit performance sample and the same source credit performance sample of the target credit loan product to obtain the processed target credit performance sample and the processed same source credit performance sample; the same source credit performance sample is a number of credit performance samples of other credit loan products other than the target credit loan product in the data source of the target credit loan product.

[0052] In this embodiment, feature standardization processing is performed on the target credit performance sample of the target credit loan product and the same source credit performance samples of other credit loan products in the data source of the product, excluding itself, to finally obtain the processed target credit performance sample and the processed same source credit performance sample.

[0053] Specifically, the process involves determining a target credit performance sample for the target credit loan product, and corresponding credit performance samples from other credit loan products in the data source of the target credit loan product. Quantile calculations are performed on several feature values ​​for each sample feature of the credit performance sample to be processed to determine the corresponding first and second quantiles. The credit performance sample to be processed includes the target credit performance sample and the corresponding corresponding credit performance samples. Based on the first and second quantiles, a target standard value template corresponding to each sample feature is determined. The several feature values ​​of each sample feature are matched with the corresponding target standard value template to determine the target standard value template whose difference from the feature value is the smallest and not greater than the feature value. The feature value is replaced with the target standard value to obtain the corresponding processed credit performance sample. The processed credit performance sample includes the processed target credit performance sample and the processed corresponding corresponding credit performance sample. In other words, since credit performance samples are typically numerical features, the first step is to identify the target credit performance samples for the target credit loan product, as well as the source credit performance samples of other credit loan products in the data source besides the product itself. Then, for the credit performance samples to be processed, which include these two types of samples, quantile calculations are performed on several feature values ​​for each sample feature to obtain the corresponding first and second quantiles, such as the 90th and 10th quantiles of the feature values. Based on these two quantiles, a target standard value template for each sample feature is determined, such as... Figure 2 The diagram illustrates a standard value template for a credit performance sample provided in this application. Here, bin_cnt represents a standard value template. Next, each feature value of each sample feature is matched with its corresponding target standard value template. Based on the principle of proximity and left-alignment, the target standard value template with the smallest difference from the feature value, and not greater than the feature value, is selected. Finally, the selected target standard value replaces the feature value, resulting in the processed target credit performance sample and the processed homologous credit performance sample.

[0054] It should be noted that the processing flow for determining the target standard value template corresponding to each sample feature is as follows: The feature range difference between the first quantile and the second quantile is determined, and the maximum and minimum values ​​of several preset standard value templates are determined. The standard range difference of the several preset standard value templates is then determined based on the maximum and minimum values. The standard value template with the smallest difference between the standard range difference and the feature range difference among the several preset standard value templates is determined as the corresponding target standard value template. That is, firstly, the feature range difference between the first quantile and the second quantile is calculated, and simultaneously, the maximum and minimum values ​​of each of the several preset standard value templates are determined. Based on these maximum and minimum values, the standard range difference of each preset standard value template is calculated. For example, the maximum value of the standard value template is matched using the 90th quantile, and the minimum value is matched using the 10th quantile. Then, among the several preset standard value templates, the template with the smallest difference between the maximum and minimum values, i.e., the smallest difference between the standard range difference and the feature range difference, is selected as the target standard value template corresponding to that sample feature. In this way, this embodiment performs feature standardization on the target credit performance sample and the homologous credit performance sample respectively, which can eliminate the interference caused by differences in the dimensions and magnitudes of different features, making various credit performance features comparable, reducing model bias caused by inconsistent data scales, and improving the accuracy and reliability of subsequent analysis and modeling. The target standard value with the smallest difference and not greater than the feature value is selected for replacement, which not only achieves the scale uniformity of different feature values, but also preserves the relative size relationship and data connotation of the original feature values ​​to the greatest extent, reducing the destruction of the original information of the data by standardization. The quantile-based standardization method can effectively reduce the impact of extreme values ​​on the overall distribution of features and improve the stability of feature data. By calculating the difference between the feature range and the standard range difference of the preset standard value template, and using the smallest difference between the two as the selection criterion, the target standard value template can be determined, which can make the selected template highly consistent with the actual distribution range of the sample features in terms of numerical range, avoiding the problem of the standard value template being out of touch with the actual situation of features.

[0055] Step S12: Analyze the first sample features of the processed target credit performance sample to determine the corresponding first target features, and analyze the second sample features of the processed homologous credit performance sample to determine the corresponding second target features.

[0056] In this embodiment, the analysis is carried out on the first sample features contained in the processed target credit performance sample and the second sample features contained in the processed homologous credit performance sample, and the corresponding first target features and second target features are selected from them respectively.

[0057] It should be noted that the processing flow for determining the first target feature is as follows: The first sample features of the processed target credit performance sample are analyzed to evaluate the information value of the first sample features, and the group stability of the first sample features is determined based on a preset test dataset; sample features among the first sample features whose information value is higher than a preset information value threshold, whose group stability is lower than a preset group stability threshold, and which meet preset manual judgment conditions are determined as the corresponding first target features. That is, the first sample features are first analyzed to evaluate their information value (i.e., Information Value, IV value), and the group stability (i.e., Population Stability Index, PSI) of the first sample features is determined based on a preset test dataset. Then, sample features whose information value is higher than the preset information value threshold, whose group stability is lower than the preset group stability threshold, and which meet preset manual judgment conditions—that is, those judged by relevant personnel based on their own experience and knowledge—are selected from the first sample features and determined as the first target features.

[0058] It should be further noted that the processing flow for determining the second target feature is as follows: The second sample features of the processed homogeneous credit performance samples are analyzed to evaluate the information value of the second sample features; based on the information value in descending order, a preset number of sample features that meet preset manual judgment conditions are selected from the second sample features, and these preset number of sample features that meet the preset manual judgment conditions are determined as the corresponding second target features. That is, firstly, the second sample features are analyzed to evaluate the information value of each feature; then, the second sample features are sorted according to the information value in descending order, and the top preset number of sample features that meet the preset manual judgment conditions are selected and determined as the corresponding second target features. In this way, by conducting targeted analysis on the features of the two types of samples, this embodiment can accurately extract core features that are strongly correlated with the credit performance of their respective credit loan products, eliminate redundant and irrelevant features, and reduce the data complexity of subsequent model training. By evaluating the information value, it ensures that the selected first target features can provide valuable information for tasks such as credit risk assessment, avoiding the inclusion of meaningless features that increase the analysis burden. By considering group stability and setting thresholds, features that are relatively unstable in different groups can be eliminated, improving the accuracy of the training model. Combined with preset manual judgment conditions, human experience judgment is introduced, which can compensate for the potential limitations of pure data screening and improve the accuracy of the model in assessing the credit risk of the target credit loan products. By evaluating the information value of the second sample features and sorting them by size, core features that are more supportive of credit performance analysis can be selected first, avoiding irrelevant or low-value features from occupying analysis resources and improving the efficiency of subsequent model training or credit risk assessment.

[0059] Step S13: Using the second target feature of the processed homologous credit performance samples, train the preset initial model to obtain the corresponding basic model, and use the first target feature of the processed target credit performance samples to perform incremental training on the basic model, and determine the incremental training result that meets the preset performance indicator qualification conditions as the target credit risk model of the target credit loan product; the initial model is an initialized XGBoost classifier.

[0060] In this embodiment, an initialized XGBoost classifier is used as the initial model, and relevant hyperparameters are set. First, the initial model is trained using the second target feature of the processed homologous credit performance samples and the hyperparameters to obtain a base model. Then, incremental training is performed on the base model using the first target feature of the processed target credit performance samples. Finally, the incremental training result whose performance metrics meet the preset performance metric qualification conditions is determined as the target credit risk model for the target credit loan product. The performance metrics include, but are not limited to, KS (Kolmogorov-Smirnov, a performance metric used to measure the model's ability to distinguish between positive and negative samples), AUC (Area Under Curve), PSI, etc.

[0061] It should be noted that the processing flow for determining the target credit risk model of the target credit loan product is as follows: load the base model and freeze the decision tree structure and weights in the base model; use the base model to predict the first target feature of the processed target credit performance sample to obtain the corresponding prediction residual; train the target new decision tree based on the prediction residual and preset training parameters, and determine the integrated model of the target new decision tree and the base model as the new base model, and jump to the step of using the base model to predict the first target feature of the processed target credit performance sample until the performance index of the integrated model meets the preset performance index qualification conditions, thereby obtaining the target credit risk model of the target credit loan product. That is, firstly, the base model is loaded, and the structure of the model remains unchanged. The decision tree structure and corresponding weights in the base model are frozen. Then, the base model and corresponding parameters are used to predict the first target feature of the processed target credit performance sample to obtain the corresponding prediction residual. Then, a new target decision tree is trained based on the prediction residual and preset training parameters. The new target decision tree is integrated with the base model to form an ensemble model, which is determined as the new base model. Then, the process jumps to the step of using the base model to predict the first target feature. The above process is repeated until the performance index of the ensemble model meets the preset performance index qualification conditions, and finally the target credit risk model of the target credit loan product is obtained. In this embodiment, the XGBoost classifier is chosen as the initial model. Leveraging its advantages in handling nonlinear relationships, evaluating feature importance, and resisting overfitting, it lays an efficient and stable foundation for model construction. The base model is trained using the second target feature from the same source samples, fully utilizing the common value of the source data and enabling the base model to acquire general predictive capabilities, reducing the potential underfitting problem caused by insufficient target sample data. Incremental training using the first target feature of the target samples allows the model to enhance its predictive ability for the target product based on general principles, making the model more aligned with the credit risk assessment needs of the target product. This eliminates the need to retrain the entire model, significantly reducing computational resource consumption and training time costs. Freezing the decision tree structure and weights of the base model preserves the general principles of credit risk assessment learned from training on the same source samples, preventing parameter adjustments from disrupting the existing effective model structure during subsequent iterations and ensuring the stability of model training. Meeting performance targets is used as the iteration termination condition, ensuring that the final target credit risk model possesses reliable credit risk assessment capabilities.

[0062] Step S14: During the model training process, ensure that the feature paths of the newly added decision tree are differentiated from the historical feature paths.

[0063] In this embodiment, during the basic model training and incremental learning training, it is necessary to ensure that the feature path formed by the newly added decision tree is different from the existing feature path in the model training history, so as to prevent the features and corresponding split points from becoming homogeneous, so as to make full use of feature information.

[0064] Specifically, during the process of generating a new leaf node in the new decision tree, the current historical feature paths and historical feature split points are traversed, and the traversal results are matched with the candidate feature paths and candidate feature split points to be generated to obtain the corresponding matching results. If the matching results indicate that there is a target feature path and target feature split point among the historical feature paths and historical feature split points, then the target feature path and target feature split point are deleted to control the feature paths of the new decision tree to maintain differentiation. The target feature path and target feature split point are feature paths and feature split points that satisfy a preset similarity condition with the candidate feature paths and candidate feature split points. That is, when a new leaf node is generated in the new decision tree, the feature paths and feature split points of the new leaf node and all previous leaf nodes are traced back. The current historical feature paths and historical feature split points are traversed. Then, based on the traversal results, they are matched with the candidate feature paths and candidate feature split points to be generated, so as to obtain the corresponding matching results. If the matching results indicate that there are target feature paths and target feature split points in the historical feature paths and historical feature split points that meet the preset similarity conditions with the candidate feature paths and candidate feature split points, then the target feature paths and target feature split points are deleted. This achieves control over the new decision tree feature paths and ensures that they remain different from the historical feature paths. In this way, by traversing historical feature paths and segmentation points and matching them with candidate information, this embodiment can accurately identify candidate paths and segmentation points that may repeat or be highly similar to historical paths, providing a clear target for subsequent differentiated control; deleting target paths and segmentation points that meet similarity conditions prevents the homogenization of features and corresponding segmentation points, effectively reducing the redundancy of feature paths within the model, enriching the model's capture dimensions of credit risk-related features, and improving the model's expressive and generalization capabilities; differentiated feature paths can reduce the model's over-reliance on certain specific features, reduce model prediction bias caused by fluctuations in a single feature, and enhance the model's stability.

[0065] As can be seen from the above, the embodiments of this application first perform feature standardization on the target credit performance samples and the same-source credit performance samples (i.e., credit performance samples of other credit loan products in the data source of the product) of the target credit loan product to obtain two types of samples after processing. Then, the first sample feature of the processed target credit performance sample is analyzed to determine the first target feature, and the second sample feature of the processed same-source credit performance sample is analyzed to determine the second target feature. Next, the second target feature of the processed same-source credit performance sample is used to train a preset initial XGBoost classifier to obtain a basic model. Then, the first target feature of the processed target credit performance sample is used to incrementally train the basic model. The incremental training result that meets the preset qualification conditions is determined as the target credit risk model. In the process of model training, the feature path of the newly added decision tree is controlled to maintain the difference from the historical feature path. In this way, through the above-described process of the embodiments of this application, on the one hand, feature standardization processing is performed on the target credit performance sample and the homologous credit performance sample respectively, which can eliminate the interference caused by the difference in scale and magnitude between different features, reduce the model bias caused by the inconsistency of data scale, and improve the accuracy and reliability of subsequent analysis and modeling; on the other hand, the target standard value with the smallest difference and not greater than the feature value is selected for replacement, which not only achieves the scale uniformity of different feature values, but also preserves the relative size relationship and data connotation of the original feature values ​​to the greatest extent, reducing the destruction of the original information of the data by standardization; on the other hand, the standardization method based on quantiles can effectively reduce the impact of extreme values ​​on the overall distribution of features and improve the stability of feature data; on the other hand, by calculating the difference between the feature range and the standard range difference of the preset standard value template, and using the smallest difference between the two as the selection criterion to determine the target standard value template, the selected template can be highly consistent with the actual distribution range of the sample features in terms of numerical range, avoiding the problem of the standard value template being out of touch with the actual situation of the features; On the one hand, by conducting targeted analysis on the features of the two types of samples, core features strongly correlated with the credit performance of their respective credit loan products can be accurately extracted, while redundant and irrelevant features are eliminated, reducing the data complexity of subsequent model training. On the other hand, by evaluating the information value, it is ensured that the selected primary target features can provide valuable information for tasks such as credit risk assessment, avoiding the inclusion of meaningless features that increase the analytical burden. On the other hand, by considering group stability and setting thresholds, features that are relatively unstable in different groups can be eliminated, improving the accuracy of the training model. On the other hand, by combining preset manual judgment conditions, human experience judgment is introduced, which can compensate for the limitations of pure data screening and improve the accuracy of the model in assessing the credit risk of the target credit loan products. On the other hand, by evaluating the information value of the second sample features and sorting them by size, core features that are more supportive of credit performance analysis can be selected first, avoiding irrelevant or low-value features from occupying analytical resources and improving the efficiency of subsequent model training or credit risk assessment.On the one hand, the XGBoost classifier was chosen as the initial model, leveraging its advantages in handling nonlinear relationships, feature importance assessment, and anti-overfitting to lay an efficient and stable foundation for model construction. On the other hand, the second target feature of the same source samples was used to train the base model, fully utilizing the common value of the same source data and enabling the base model to acquire general predictive capabilities, reducing the underfitting problem that may be caused by insufficient target sample data. On the other hand, incremental training using the first target feature of the target samples allows the model to strengthen its predictive ability for the target product based on general rules, making the model more in line with the credit risk assessment needs of the target product, while eliminating the need to retrain the entire model, significantly reducing computational resource consumption and training time costs. On the other hand, freezing the decision tree structure and weights of the base model can preserve the general rules of credit risk assessment mastered by the base model based on the same source samples, avoiding the destruction of existing effective models due to parameter adjustments during subsequent iterations. The model structure ensures the stability of model training. On one hand, achieving performance targets serves as the termination condition for iteration, ensuring the final target credit risk model possesses reliable credit risk assessment capabilities. On the other hand, by traversing historical feature paths and segmentation points and matching them with candidate information, it can accurately identify candidate paths and segmentation points that may repeat or be highly similar to historical paths, providing a clear target for subsequent differentiated control. Furthermore, by deleting target paths and segmentation points that meet similarity conditions, it prevents feature and corresponding segmentation point homogenization, effectively reducing redundancy in the model's internal feature paths, enriching the model's capture dimensions of credit risk-related features, and improving the model's expressive and generalization abilities. Finally, differentiated feature paths can reduce the model's over-reliance on certain specific features, reduce model prediction bias caused by fluctuations in a single feature, enhance model stability, and thus solve the problems of overfitting and stability in credit risk model training when the sample size of the target product is small.

[0066] Accordingly, see Figure 3 As shown in the figure, this application embodiment also provides a credit risk model construction device based on transfer learning, including:

[0067] The feature processing module 11 is used to perform feature standardization processing on the target credit performance sample and the homologous credit performance sample of the target credit loan product, respectively, to obtain the processed target credit performance sample and the processed homologous credit performance sample; the homologous credit performance sample is a number of credit performance samples of other credit loan products other than the target credit loan product in the data source of the target credit loan product.

[0068] The feature analysis module 12 is used to analyze the first sample features of the processed target credit performance sample to determine the corresponding first target feature, and to analyze the second sample features of the processed homologous credit performance sample to determine the corresponding second target feature.

[0069] The model determination module 13 is used to train a preset initial model using the second target feature of the processed homologous credit performance samples to obtain a corresponding basic model, and to incrementally train the basic model using the first target feature of the processed target credit performance samples, and to determine the incremental training result that meets the preset performance indicator qualification conditions as the target credit risk model of the target credit loan product; the initial model is an initialized XGBoost classifier;

[0070] The path control module 14 is used to control the feature paths of newly added decision trees to maintain their differences from historical feature paths during model training.

[0071] As can be seen from the above, the embodiments of this application first perform feature standardization on the target credit performance samples and the same-source credit performance samples (i.e., credit performance samples of other credit loan products in the data source of the product) of the target credit loan product to obtain two types of samples after processing. Then, the first sample feature of the processed target credit performance sample is analyzed to determine the first target feature, and the second sample feature of the processed same-source credit performance sample is analyzed to determine the second target feature. Next, the second target feature of the processed same-source credit performance sample is used to train a preset initial XGBoost classifier to obtain a basic model. Then, the first target feature of the processed target credit performance sample is used to incrementally train the basic model. The incremental training result that meets the preset qualification conditions is determined as the target credit risk model. In the process of model training, the feature path of the newly added decision tree is controlled to maintain the difference from the historical feature path. In this way, through the above-described process of the embodiments of this application, the interference of feature dimension differences on model training is eliminated by standardizing the target samples and homologous samples; the target features of the two types of samples are determined respectively, which can accurately extract key information valuable for credit risk assessment and improve the effectiveness of model input; the basic model is trained first using homologous samples, and then incremental training is performed using target samples, which makes full use of the common information of homologous data to reduce training difficulty, making the model more in line with the characteristics of the target credit loan product and improving the model's targeting and accuracy; the XGBoost classifier is used as the initial model, and its efficient ensemble learning ability is used to enhance the model's fitting and generalization ability; controlling the difference between the newly added decision tree and the historical feature path can avoid feature path redundancy, increase the model's diversity and expressive power, reduce the risk of overfitting, and thus solve the problems of overfitting and stability in credit risk model training when the sample size of the target product is small.

[0072] In some specific embodiments, the feature processing module 11 may specifically include:

[0073] The sample determination unit is used to determine the target credit performance sample of the target credit loan product, and the same source credit performance samples of other credit loan products other than the target credit loan product in the data source of the target credit loan product.

[0074] The quantile calculation unit is used to perform quantile calculations on several feature values ​​of each sample feature of the credit performance sample to be processed, so as to determine the corresponding first quantile and second quantile; the credit performance sample to be processed includes the target credit performance sample and the source credit performance sample;

[0075] The template determination submodule is used to determine the target standard value template corresponding to each sample feature based on the first quantile and the second quantile.

[0076] The feature value matching unit is used to match the plurality of feature values ​​of each sample feature with the corresponding target standard value template, so as to determine that among the plurality of standard values ​​of the target standard value template, the difference between the feature value and the feature value is the smallest and not greater than the target standard value of the feature value;

[0077] A standard value replacement unit is used to replace the feature value with the target standard value to obtain the corresponding processed credit performance sample; the processed credit performance sample includes the processed target credit performance sample and the processed homologous credit performance sample.

[0078] In some specific implementations, the template determining submodule may specifically include:

[0079] The minimum value determination unit is used to determine the characteristic range difference between the first quantile and the second quantile, and to determine the maximum and minimum values ​​of a plurality of preset standard value templates, so as to determine the standard range difference of the plurality of preset standard value templates based on the maximum and minimum values;

[0080] The template determination unit is used to determine the standard value template with the smallest difference between the standard range difference and the feature range difference among the plurality of preset standard value templates as the corresponding target standard value template.

[0081] In some specific embodiments, the feature analysis module 12 may specifically include:

[0082] The stability determination unit is used to analyze the first sample features of the processed target credit performance sample to evaluate the information value of the first sample features and determine the group stability of the first sample features based on a preset test dataset.

[0083] The first feature determination unit is used to determine the sample features in the first sample features that have information value higher than a preset information value threshold, group stability lower than a preset group stability threshold, and satisfy preset manual judgment conditions as the corresponding first target features.

[0084] In some specific embodiments, the feature analysis module 12 may specifically include:

[0085] The feature analysis unit is used to analyze the second sample features of the processed homologous credit performance samples in order to evaluate the information value of the second sample features.

[0086] The second feature determination unit is used to select a preset number of sample features that meet preset manual judgment conditions from the second sample features based on the information value in descending order, and to determine the preset number of sample features that meet the preset manual judgment conditions as the corresponding second target features.

[0087] In some specific embodiments, the model determination module 13 may specifically include:

[0088] The weight freezing unit is used to load the base model and freeze the decision tree structure and weights in the base model.

[0089] The feature prediction unit is used to predict the first target feature of the processed target credit performance sample using the base model, so as to obtain the corresponding prediction residual.

[0090] The step jump unit is used to train a new target decision tree based on the prediction residual and preset training parameters, and to determine the integrated model of the new target decision tree and the base model as the new base model. It also jumps to the step of using the base model to predict the first target feature of the processed target credit performance sample until the performance index of the integrated model meets the preset performance index qualification conditions, thereby obtaining the target credit risk model of the target credit loan product.

[0091] In some specific embodiments, the path control module 14 may specifically include:

[0092] The path matching unit is used to traverse the current historical feature paths and historical feature splitting points during the process of generating a new leaf node in the new decision tree, and to match the traversal results with the candidate feature paths and candidate feature splitting points to be generated, so as to obtain the corresponding matching results.

[0093] The path deletion unit is used to delete the target feature path and the target feature segment if the matching result indicates that there is a target feature path and the target feature segment among the historical feature paths and the historical feature segmentation points, so as to control the feature paths of the newly added decision tree to maintain differentiation; the target feature path and the target feature segment are feature paths and feature segmentation points that satisfy a preset similarity condition with the candidate feature paths and the candidate feature segmentation points.

[0094] Furthermore, embodiments of this application also disclose an electronic device, Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the credit risk model construction method based on transfer learning disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0095] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0096] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0097] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the credit risk model construction method based on transfer learning disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.

[0098] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed method for constructing a credit risk model based on transfer learning. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0099] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0100] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0101] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0102] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0103] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for constructing a credit risk model based on transfer learning, characterized in that, The method comprises the following steps: performing feature standardization processing on a target credit performance sample of a target credit loan product and a homologous credit performance sample, to obtain a processed target credit performance sample and a processed homologous credit performance sample; the homologous credit performance sample is a plurality of credit performance samples of credit loan products other than the target credit loan product in a data source of the target credit loan product; performing analysis on a first sample feature of the processed target credit performance sample to determine a corresponding first target feature, and performing analysis on a second sample feature of the processed homologous credit performance sample to determine a corresponding second target feature; training a preset initial model by using the second target feature of the processed homologous credit performance sample to obtain a corresponding base model, and performing incremental training on the base model by using the first target feature of the processed target credit performance sample, and determining an incremental training result that meets a preset performance index qualification condition as a target credit risk model of the target credit loan product; the initial model is an initialized XGBoost classifier; in the process of model training, the feature path of the newly added decision tree is controlled to be different from the historical feature path. 2.The credit risk model construction method based on migration learning according to claim 1, characterized in that, The method comprises the following steps: determining a target credit performance sample of a target credit loan product and a homologous credit performance sample of credit loan products other than the target credit loan product in a data source of the target credit loan product; performing quantile calculation on a plurality of feature values of each sample feature of a to-be-processed credit performance sample to determine a corresponding first quantile and a second quantile; the to-be-processed credit performance sample comprises the target credit performance sample and the homologous credit performance sample; determining a target standard value template corresponding to each sample feature based on the first quantile and the second quantile; matching the plurality of feature values of each sample feature with the corresponding target standard value template respectively to determine a target standard value in a plurality of standard values of the target standard value template, which has a minimum difference with the feature value and is not greater than the feature value; replacing the feature value with the target standard value to obtain a corresponding processed credit performance sample; the processed credit performance sample comprises a processed target credit performance sample and a processed homologous credit performance sample. 3.The credit risk model construction method based on migration learning according to claim 2, characterized in that, The method comprises the following steps: determining a feature range difference between the first quantile and the second quantile, and determining a maximum value and a minimum value of a plurality of preset standard value templates, to determine a standard range difference of the plurality of preset standard value templates based on the maximum value and the minimum value; The standard value template with the minimum difference between the standard range difference value and the feature range difference value in the plurality of preset standard value templates is determined as a corresponding target standard value template. 4.The credit risk model construction method based on migration learning according to claim 1, characterized in that, The analysis on the first sample feature of the processed target credit performance sample comprises: The analysis on the first sample feature of the processed target credit performance sample is performed to evaluate the information value of the first sample feature, and the population stability of the first sample feature is determined based on a preset test data set; The sample feature in the first sample feature, whose information value is higher than a preset information value threshold, whose population stability is lower than a preset population stability threshold, and which satisfies a preset manual judgment condition, is determined as a corresponding first target feature. 5.The credit risk model construction method based on migration learning according to claim 1, characterized in that, The analysis on the second sample feature of the processed homologous credit performance sample comprises: The analysis on the second sample feature of the processed homologous credit performance sample is performed to evaluate the information value of the second sample feature; A preset number of sample features that satisfy a preset manual judgment condition are selected from the second sample feature in descending order of the information value, and the preset number of sample features that satisfy the preset manual judgment condition are determined as corresponding second target features. 6.The credit risk model construction method based on transfer learning according to claim 1, characterized in that, The incremental training of the base model by using the first target feature of the processed target credit performance sample, and the determination of an incremental training result, whose performance index satisfies a preset performance index qualified condition, as a target credit risk model of the target credit loan product, comprises: The base model is loaded, and the decision tree structure and weight in the base model are frozen; The first target feature of the processed target credit performance sample is predicted by using the base model to obtain a corresponding prediction residual; A target new decision tree is trained based on the prediction residual and a preset training parameter, an integrated model of the target new decision tree and the base model is determined as a new base model, and the step of predicting the first target feature of the processed target credit performance sample by using the base model is jumped to until the performance index of the integrated model satisfies a preset performance index qualified condition, and a target credit risk model of the target credit loan product is obtained.

7. The credit risk model construction method based on transfer learning according to any one of claims 1 to 6, characterized in that, The feature path of the new decision tree is controlled to be different from the historical feature path, comprising: In the process of generating a new leaf node of the new decision tree, the current historical feature path and historical feature split point are traversed, and based on the traversal result, a candidate feature path and a candidate feature split point to be generated are matched to obtain a corresponding matching result; If the matching result represents that there are target feature paths and target feature split points in the historical feature paths and the historical feature split points, the target feature paths and the target feature split points are deleted to control the feature paths of the added decision tree to remain differentiated; the target feature paths and target feature split points are feature paths and feature split points that meet a preset similarity condition with the candidate feature paths and the candidate feature split points. 8.A credit risk model construction device based on transfer learning, characterized in that, Comprise: The feature processing module is configured to perform feature standardization processing on a target credit performance sample of a target credit loan product and a homologous credit performance sample to obtain a processed target credit performance sample and a processed homologous credit performance sample; the homologous credit performance sample is a plurality of credit performance samples of credit loan products other than the target credit loan product in a data source of the target credit loan product; The feature analysis module is configured to analyze first sample features of the processed target credit performance sample to determine corresponding first target features, and analyze second sample features of the processed homologous credit performance sample to determine corresponding second target features; The model determination module is configured to train a preset initial model using the second target features of the processed homologous credit performance sample to obtain a corresponding base model, and perform incremental training on the base model using the first target features of the processed target credit performance sample, and determine an incremental training result that meets a preset performance indicator eligibility condition as a target credit risk model of the target credit loan product; The initial model is an initialized XGBoost classifier; The path control module is configured to control feature paths of added decision trees to remain differentiated from historical feature paths during model training.

9. An electronic device, comprising: Comprise: A memory for saving a computer program; A processor for executing the computer program to implement the credit risk model construction method based on transfer learning according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, A memory for saving a computer program; wherein the computer program is executed by a processor to implement the credit risk model construction method based on transfer learning according to any one of claims 1 to 7. A memory for saving a computer program; wherein the computer program is executed by a processor to implement the credit risk model construction method based on transfer learning according to any one of claims 1 to 7.