Method for realizing risk assessment of legal person

By combining XGBoost and GBDT models, the historical data of legal person customers is solved, and the problems of low accuracy and resource waste in the legal person's credit risk assessment are achieved, achieving more efficient risk assessment and management.

CN119228526APending Publication Date: 2024-12-31SHENZHEN BRANCH OF AGRI BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411339276.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

Traditional expert systems are used for corporate credit risk assessment and have low prediction accuracy and require a large amount of human resources, which leads to high costs and inability to effectively support the corporate customer relationship management of financial institutions, which is prone to omissions or errors.

Method used

Using the combination of XGBoost model and GBDT model, the legal customer historical data is preprocessed and iteratively trained, and the optimal learner is generated for risk assessment. The gradient enhancement tree algorithm is used to process complex nonlinear relationship characteristics to improve prediction accuracy. .

Benefits of technology

It improves the accuracy of risk prediction of legal person customers, provides quantitative risk assessment basis, reduces the waste of human resources, and improves the risk management efficiency of financial institutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119228526A_ABST
    Figure CN119228526A_ABST
Patent Text Reader

Abstract

The invention provides a method for realizing risk assessment of a legal person, which comprises the following steps of: firstly, selecting and preprocessing historical data of a legal person customer to form a training set, then training and optimizing parameters by using an XGBoost model, and extracting important predictive variables; inputting the predictive variable into the model to obtain a legal person customer label and a predictive score; and splicing the predicted variables and the scores into a new training set for training a GBDT model. And finally, to-be-predicted customer features are input into the GBDT model, a risk level is obtained, and early warning information is output. According to the method, the gradient boosting tree algorithm is selected for modeling, and compared with a traditional logistic regression algorithm, the gradient boosting tree algorithm can more effectively process and utilize risk characteristic factor data with a complex nonlinear relation, so that the risk prediction capability of a legal customer is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the application fields of data analysis and data mining, and more specifically to a method for implementing legal person risk assessment. Background Art

[0002] With the rapid development of credit business, corporate credit risk management has become a focus of financial institutions. Traditional experience-based credit risk management methods are difficult to adapt to the increasingly complex and diverse market environment, and new technical means are urgently needed. The rise of artificial intelligence machine learning technology has provided new ideas and methods for credit risk assessment.

[0003] There are methods and applications similar to expert systems in the prior art, which are used to predict corporate customers who are about to or may default based on the analysis of past data of existing corporate customers. In this way, financial institutions can carry out targeted processing on the prediction list, or have a more accurate prediction of the number of subsequent target corporate customers based on the prediction list. In this way, financial institutions can make targeted arrangements for human resources and other resources in advance. However, traditional expert systems mainly analyze and predict based on the collected expert experience. The overall prediction accuracy is low, and a large amount of human resources are required to complete, so the cost is high, and it does not help financial institutions much, and cannot provide effective support for financial institutions to carry out effective corporate customer relationship management in advance. It is easy to miss the target corporate customers or there are a lot of errors in the selected target corporate customers, protecting a large number of non-real target corporate customers, resulting in a waste of manpower and financial resources. Summary of the invention

[0004] The technical problem to be solved by the present invention is how to improve the accuracy of risk prediction for corporate clients and meet the refined management needs of financial institutions.

[0005] In order to solve the above problems, the present invention provides a method for implementing legal person risk assessment, which is characterized by:

[0006] Step 1.1 Select historical data of corporate customers, and perform data preprocessing on the selected historical data to generate a first training set;

[0007] Step 1.2: Input the first training set after data preprocessing into the XGBoost model to train the XGBoost model. After multiple rounds of iterations, the optimal XGBoost model and the optimal parameters of the corresponding XGBoost model are obtained.

[0008] Step 1.3: Based on the training in step 1.2, extract important variables as predictor variables;

[0009] Step 1.4: According to step 1.2, the prediction variables in the training set are input into the optimal XGBoost model obtained through training, and the optimal XGBoost model outputs the legal person customer label;

[0010] Step 1.5 extracts the prediction score as the target variable based on the result of step 1.4;

[0011] Step 1.6: concatenate the prediction variables obtained in step 1.3 and the target variables obtained in step 1.5 to form a new second training set;

[0012] Step 1.7 uses the second training set to train the GBDT model to obtain a prediction GBDT model;

[0013] Step 1.8 Input the characteristics of the to-be-predicted legal person customer during the observation period into the prediction GBDT model to obtain the target legal person customer risk level of the to-be-predicted legal person customer;

[0014] Step 1.9 outputs customer warning information based on the obtained target corporate customer risk level.

[0015] The method is characterized in that the XGBoost model is trained according to the following method: a decision tree is selected as a weak learner; only one weak learner is trained each time, and the data weight of the training data of the class that was misclassified by the previous weak learner is increased and then input into the next weak learner for learning, and the next weak learner is used to correct the residual of the previous weak learner until the residual reaches a preset range; finally, the weighted sum of multiple weak learners generated by the training is performed to obtain the optimal learner, which is used for the risk level of the legal person customer to be predicted.

[0016] The method is characterized in that the decision tree is specifically:

[0017] Where: x is the input vector, q represents the structure of the tree, the structure function q(x) represents the index number of the leaf that maps the input to the leaf, ω represents the fraction of leaves corresponding to each index number, T is the number of leaf nodes in the tree, and d is the feature dimension;

[0018] A total of K decision trees generate K weak learners, and the output of the set of K decision trees is:

[0019] The complexity of a single decision tree is expressed as:

[0020] The complexity of the integrated tree is expressed as:

[0021] T is the number of leaf nodes, γ is the learning rate between 0 and 1. γ multiplied by T is equivalent to tree pruning to prevent overfitting; λ is a regularization parameter, ω is the quality of the leaf;

[0022] is the regular term of the XGBoost algorithm, and the iteration of the objective function at step t is:

[0023] The first part represents the true value and predicted value function, and L is the error function; the second part represents the sum of the complexity of a single decision tree; it is known that: , where is the decision tree to be learned in the tth round, then the objective function can be transformed into.

[0024] A system for implementing a method for legal person risk assessment, characterized by adopting an implementing method for legal person risk assessment.

[0025] The implementation of the present invention has the following beneficial effects: introducing a machine learning model to conduct risk assessment is a step forward in the process of risk management technology; by quantitatively modeling the default probability of corporate clients, a quantitative evaluation basis is provided for risk management. By selecting the gradient boosting tree algorithm for modeling, compared with the traditional logistic regression algorithm, the gradient boosting tree algorithm can more effectively process and utilize risk feature factor data with complex nonlinear relationships, thereby improving the prediction ability of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is the XGBoost model training flow chart. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0028] 1: XGBoost is a machine learning algorithm that focuses on gradient boosting. It is generally used to solve supervised learning problems and use a large amount of training data to predict target variables. XGBoost selects decision trees as its weak learners. Each time a single weak learner is trained, the weight of the data of the wrong class last time is increased a little bit before the current single weak learner is trained. Then, by adding a new weak learner, the residuals of all previous weak learners are corrected. Finally, the weighted sum of multiple learners is used for final prediction.

[0029] The basic model of XGBoost is a decision tree. First, the output of a single decision tree is defined as

[0030]

[0031] (1) In the formula: x is the input vector, q represents the structure of the tree, the structure function q(x) represents the mapping of the input to the leaf index, ω represents the fraction of leaves corresponding to each index, T is the number of leaf nodes in the tree, and d is the feature dimension. The XGBoost algorithm can be regarded as an ensemble of K decision trees, so the output of the ensemble of K trees is

[0032]

[0033] From the decision tree model, we can know that the complexity calculation formula of a single decision tree is:

[0034]

[0035] Similarly, the complexity of the tree ensemble can be expressed as

[0036]

[0037] (4) Where: T is the number of leaf nodes, γ is the learning rate between 0 and 1. γ multiplied by T is equivalent to tree pruning to prevent overfitting. λ is a regularization parameter, and ω is the quality of the leaf. Ω(f k ) is the regularization term of the XGBoost algorithm. In addition, the objective function of the XGBoost algorithm at the t-th step iteration can be expressed as

[0038]

[0039] (5) consists of two parts: the first part represents the true value y i and predicted values function, L is the error function. The second part represents the sum of the complexity of a single decision tree. where f t (x i ) is the decision tree to be learned in the tth round. Then the objective function can be transformed into

[0040]

[0041] Therefore, the XGBoost algorithm has certain advantages in practical applications.

[0042] 2. Choose appropriate XGBoost model evaluation metrics.

[0043] 1) Accuracy refers to the ratio of the number of samples correctly classified by the classifier to the total number of samples, and the calculation formula is (TP+TN) / (TP+FN+FP+TN).

[0044] 2) Recall rate refers to the proportion of all true positive examples that are identified as positive examples, that is, the percentage of true positive examples that are identified. The calculation formula is TP / (TP+FN).

[0045] 3) Precision refers to the proportion of true positive examples among the results judged as positive examples by the classifier, and the calculation formula is TP / (TP+FP).

[0046] 3. About the setting of GBDT model evaluation indicators.

[0047] 1: About GBRT model.

[0048] GBDT (Gradient Boosting Decision Tree) is a Gradient Boosting Decision Tree (GBDT), which is a combination of fitting negative gradient (Gradient Boosting) and decision regression tree (Decision Tree). It is a Gradient Boosting Decision Tree in which weak learners use CART regression tree.

[0049] Gradient Boosting is an algorithm of Boosting family, and its basic idea is: generate multiple weak learners in series, and the goal of each weak learner is to fit the negative gradient of the loss function of the previous cumulative model, so that the cumulative model loss after adding the weak learner is reduced in the direction of the negative gradient. The algorithm flow of Gradient Boosting is general, and a variety of different algorithms can be evolved according to the difference of loss function and weak learner. GBDT is an algorithm for classifying or regressing data by adopting an additive model (i.e., a linear combination of basis functions) and continuously reducing the residual generated in the training process. GBDT is through multiple rounds of iterations, and each round of iteration produces a weak classifier, and each classifier is trained on the basis of the gradient (if the loss function is a square loss function, then the gradient is the residual value) of the previous round of classifier.

[0050] The algorithm flow of GBDT is as follows:

[0051] ① Initialize weak learners;

[0052] ② Start iteration: a. According to the given error function, calculate the negative gradient of the current model, that is, the residual; b. Fit the next base learner according to the residual; c. Calculate the best fit value; d. Update the strong learner.

[0053] ③Get the final learning

[0054] 2: GBDT model evaluation metrics.

[0055] The main evaluation indicators of regression problems include mean square error (MSE), root mean square error (RMSE), determination coefficient, etc. They are essentially a measure of the gap between the predicted value and the true value. The mean square error function is as follows:

[0056]

[0057] Among them, y (i) is the true value, is the predicted value. The root mean square error is the square root of the mean square error. The coefficient of determination is also called goodness of fit, and its value is between 0 and 1. The closer the coefficient of determination is to 1, the better the model fits; the closer the coefficient of determination is to 0, the worse the model fits. The formula for the coefficient of determination is as follows:

[0058]

[0059] Figure 1 This is the XGBoost model training flowchart. In the application of assessing and analyzing the risks of corporate clients, the XGBoost model training flowchart and related steps are appropriately adjusted and optimized to adapt to the characteristics of corporate client risk assessment. The following is an improved application process:

[0060] 1. Model selection: The XGBoost model is selected as the model for assessing corporate customer risks.

[0061] 2. Data preparation: According to the pre-defined access rules, select the data that meets the access rules within a certain time period and prepare the data.

[0062] 3. Data preprocessing:

[0063] 1) Data cleaning: remove outliers and delete features with all columns empty or zero variance.

[0064] 2) Feature selection: Remove features that are meaningless for model training, such as customer numbers, identifiers, etc.

[0065] 3) Sample balance: Since the ratio of positive and negative samples may be unbalanced, appropriate undersampling or oversampling is performed, such as random undersampling at a ratio of 1:10.

[0066] 4) Feature encoding: Encode categorical variables into dummy variables to facilitate model processing.

[0067] 4. Feature Engineering:

[0068] Based on expert systems and expert experience, multi-modal evaluation indicators are determined. These indicators may include financial status, credit history, industry status, legal proceedings record, etc.

[0069] Feature selection and engineering are performed to extract the features that have the most impact on risk assessment.

[0070] 5. Model training:

[0071] Train the XGBoost model using the preprocessed data.

[0072] During the training process, features are continuously screened and important feature data are re-input into the model for further training.

[0073] Use cross-validation and parameter search (such as grid search) to reduce the degree of model overfitting and continuously verify the model effect.

[0074] 6. Model optimization:

[0075] Multi-modal fusion training is adopted to combine the prediction results of multiple models and select the model with the highest evaluation index.

[0076] The best XGBoost model is selected and fine-tuned to improve prediction accuracy and robustness.

[0077] 7. Model Validation:

[0078] Verify the model effect on an independent test set to ensure that the model has good generalization ability for unknown data. Evaluate the prediction performance of the model, such as accuracy, recall, AUC value, etc.

[0079] 8. Risk Assessment:

[0080] The trained XGBoost model is applied to the credit risk assessment of corporate customers.

[0081] Output prediction results to provide banks with the risk level and risk exposure of corporate customers.

[0082] 9. Reporting and decision support:

[0083] Generate a risk assessment report based on the risk assessment results output by the model.

[0084] Provide decision support to help banks formulate corresponding risk management strategies and credit policies.

[0085] Through the above process, the XGBoost model can be effectively applied to corporate customer risk assessment to help banks better understand and manage credit risks.

[0086] The prediction results of the model have been initially applied in the key monitoring work of our department. When the model was tested on 72 customers who were rated as key monitoring targets by experts, 53 were successfully hit. In the post-loan scenario, the new credit risk management model of "model warning + expert judgment" was realized for the first time.

[0087] The above disclosure is only one embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiment can be implemented, and equivalent changes made according to the claims of the present invention still fall within the scope of the invention.

Claims

1. A method for implementing legal person risk assessment, characterized in that: Step 1.1 Select historical data of corporate customers, and perform data preprocessing on the selected historical data to generate a first training set; Step 1.2: Input the first training set after data preprocessing into the XGBoost model to train the XGBoost model. After multiple rounds of iterations, the optimal XGBoost model and the optimal parameters of the corresponding XGBoost model are obtained. Step 1.3: Based on the training in step 1.2, extract important variables as predictor variables; Step 1.4: According to step 1.2, the prediction variables in the training set are input into the optimal XGBoost model obtained through training, and the optimal XGBoost model outputs the legal person customer label; Step 1.5 extracts the prediction score as the target variable based on the result of step 1.4; Step 1.6: concatenate the prediction variables obtained in step 1.3 and the target variables obtained in step 1.5 to form a new second training set; Step 1.7 uses the second training set to train the GBDT model to obtain a prediction GBDT model; Step 1.8 Input the characteristics of the to-be-predicted legal person customer during the observation period into the prediction GBDT model to obtain the target legal person customer risk level of the to-be-predicted legal person customer; Step 1.9 outputs customer warning information based on the obtained target corporate customer risk level.

2. The method according to claim 1, characterized in that The XGBoost model is trained according to the following method: a decision tree is selected as a weak learner; only one weak learner is trained each time, the data weight of the training data of the class misclassified by the previous weak learner is increased and then input into the next weak learner for learning, and the next weak learner is used to correct the residual of the previous weak learner until the residual reaches a preset range; finally, the weighted sum of multiple weak learners generated by the training is performed to obtain the optimal learner, which is used for the risk level of the legal person customer to be predicted.

3. The method according to claim 2, characterized in that The decision tree is specifically: Where: x is the input vector, q represents the structure of the tree, the structure function q(x) represents the index number of the leaf that maps the input to the leaf, ω represents the fraction of leaves corresponding to each index number, T is the number of leaf nodes in the tree, and d is the feature dimension; A total of K decision trees generate K weak learners, and the output of the set of K decision trees is: The complexity of a single decision tree is expressed as: The complexity of the integrated tree is expressed as: T is the number of leaf nodes, γ is the learning rate between 0 and 1. γ multiplied by T is equivalent to tree pruning to prevent overfitting; λ is a regularization parameter, ω is the quality of the leaf; is the regular term of the XGBoost algorithm, and the iteration of the objective function at step t is: The first part represents the true value and predicted value function, and L is the error function; the second part represents the sum of the complexity of a single decision tree; it is known that: , where is the decision tree to be learned in the tth round, then the objective function can be transformed into.