An XGBoost financial electronic application product intelligent risk assessment method and system
Patent Information
- Application Number
- CN202611182827.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-05
- Publication Date
- 2026-09-18
AI Technical Summary
(1)类别不平衡问题,真实信贷数据中违约样本比例通常仅为5%至20%,标准对数损失函数对少数类违约样本的惩罚权重与多数类正常还款样本相同,导致模型倾向于将大多数样本预测为正常还款,违约样本召回率偏低,实际风控价值有限;
[0088] (1) To address the issues of class imbalance and asymmetric cost, this scheme designs a cost-sensitive Focal loss. Based on the standard cross-entropy, it introduces a focusing factor and an asymmetric cost coefficient, which enables the model to give higher gradient weights to default samples that are difficult to identify. At the same time, it explicitly embeds the asymmetric business cost into the training objective.
Smart Images

Figure CN122779971A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, specifically to an intelligent risk assessment method and system for XGBoost financial electronic application products. Background Technology
[0002] Intelligent risk assessment for financial electronic applications is a core technological step for financial institutions to improve risk control efficiency and ensure asset quality and risk control levels. In recent years, gradient boosting decision tree algorithms based on ensemble learning have been widely used in financial forecasting due to their excellent performance on structured data, but they have the following shortcomings: (1) Class imbalance problem: In real credit data, the proportion of default samples is usually only 5% to 20%. The standard log loss function has the same penalty weight for the minority default samples as for the majority normal repayment samples, which leads the model to tend to predict the majority of samples as normal repayment. The recall rate of default samples is low and the actual risk control value is limited. (2) Asymmetric cost problem: In credit business, the bad debt loss caused by missing a real defaulting customer (false negative, FN) is far greater than the opportunity cost loss caused by wrongly rejecting a real normal customer (false positive, FP). Existing methods do not embed this cost asymmetry in the loss function, which leads to the model training objective being inconsistent with the business objective. (3) Lack of fairness constraints: Existing XGBoost methods for finance lack embedded fairness constraint mechanisms. The model may produce unequal default prediction biases for different population groups, which poses compliance risks. (4) Optimization framework limitations: Standard XGBoost can only handle a single separable regularization term and cannot optimize multiple cross-sample coupled constraints at the same time while maintaining computational efficiency, which makes it difficult to implement multi-constraint joint optimization in engineering. Summary of the Invention
[0003] To address the above issues and overcome the shortcomings of existing technologies, this invention provides an intelligent risk assessment method and system for XGBoost financial electronic application products. For the problems of class imbalance and asymmetric cost, this solution designs a cost-sensitive Focal loss, introducing a focusing factor and asymmetric cost coefficient on top of the standard cross-entropy. This allows the model to assign higher gradient weights to difficult-to-identify default samples, while explicitly embedding the asymmetric nature of business costs into the training objective. For the lack of fairness constraints, this solution designs a group fairness regularization term, incorporating the deviation in predicted default probabilities between different sensitive attribute groups as a penalty into the objective function. During model training, it actively constrains the sum of squares of the differences between the average predicted default probability of each sensitive group and the global mean, achieving the embedding of demographic equality constraints. For the limitation of the optimization framework, this solution incorporates a multi-constraint optimization problem into the ADMM solution framework. By introducing auxiliary variables, the original problem is decomposed into sub-objective functions, linear constraints are established, and joint optimization is achieved through a three-step iteration of ADMM. The overall complexity is of the same order as the standard XGBoost, demonstrating engineering feasibility.
[0004] The technical solution adopted in this invention is as follows: This invention provides an intelligent risk assessment method for XGBoost financial electronic application products, which includes the following steps:
[0005] Step S1: Data collection and preprocessing. Collect user data of financial electronic application products and preprocess the user data, including missing value imputation, outlier truncation and Min-Max feature normalization, to obtain preprocessed data.
[0006] Step S2: Feature engineering. Construct an enhanced feature matrix for the preprocessed data and label it with real credit tags. Divide the enhanced feature matrix and its corresponding tag vector into training set, validation set and test set. Use Cartesian product to divide user samples into sensitive attribute groups to form a sensitive attribute set. Each sample corresponds to a unique sensitive attribute value.
[0007] Step S3: Objective function construction. Based on the XGBoost algorithm, a decision tree model for risk assessment of financial electronic application products is constructed. On the basis of the original standard structure regularization term, cost-sensitive Focal loss, group fairness regularization term and class balance adaptive regularization term are added as a composite objective function.
[0008] Step S4: Simplify the objective function by performing a second-order Taylor expansion approximation on the cost-sensitive Focal loss and ignoring the constant term in the composite objective function to construct a simplified objective function;
[0009] Step S5: ADMM solution. The simplified objective function is rewritten into the standard ADMM form, decomposed into two coupled subproblems, and each variable is optimized alternately through three-step ADMM iteration until the convergence condition is met. The trained decision tree model is then output.
[0010] Step S6: Convergence and complexity analysis, analyze the convergence, time complexity and space complexity of the trained decision tree model;
[0011] Step S7: Probability calibration and risk level output. Perform Platt Scaling probability calibration on the predicted output of the trained decision tree model and convert it into a binary classification decision. Adaptively determine the optimal decision threshold on the validation set and classify users into four risk levels: low risk, medium risk, high risk, and very high risk.
[0012] Step S8: Interpretability output. The SHAP method is used to calculate the marginal contribution of each feature component in the enhanced feature matrix to the default probability of a single user on the test set, generating a risk interpretation report for the financial electronic application product.
[0013] Further, in step S2, the construction of the enhanced feature matrix specifically involves: constructing ratio features, cross features, and historical statistical features; concatenating the ratio features, cross features, and historical statistical features of all users into an enhanced feature matrix, where each row corresponds to the feature vector of a user sample, each column corresponds to a type of feature component, and a real credit label is constructed for each user, where 1 represents a default sample and 0 represents a normal repayment sample.
[0014] Further, in step S3, the objective function is constructed, including the following steps:
[0015] Step S31: Scenario definition, obtaining the total number of samples in the training set. , No. Feature vector of each sample Real credit labels Based on the XGBoost algorithm, a system is constructed. A decision tree, The value range is from 100 to 1000, the first The original prediction output for each sample The formula used to sum all the predictions from the decision trees is as follows: ;
[0016] In the formula, Indicates the sample index. Indicates the first The real credit labels of a sample Indicates a sample of default. This represents a sample of normal repayments. Indicates the first The original prediction output for each sample, This indicates the iteration number of the XGBoost algorithm, i.e., the index of the decision tree. This represents the total number of decision trees. Indicates the first The decision tree function added in each iteration, Indicates the first The feature vector of each sample Indicates the first The new decision tree in the first round Predicted values for each sample;
[0017] Step S32: Define the standard structure regularization term, using the following formula: ;
[0018] In the formula, This represents a standard structure regularization term. Indicates the first The number of leaf nodes added to the decision tree in each round. Indicates the index of the leaf node. Indicates the weight of the leaf node. The penalty coefficient for the number of leaf nodes. The L2 penalty strength is the weight of the leaf nodes;
[0019] Step S33: Based on Focal loss (dynamic cross-entropy loss), introduce an asymmetric cost coefficient adapted to the credit scenario, and define cost-sensitive Focal loss. The formula used is as follows: ;
[0020] In the formula, Indicates the first The cost-sensitive Focal loss for all training samples during rounds of decision tree iteration. This represents the total number of samples in the training set. Indicates the preceding decision trees for the first The original prediction output for each sample, Indicates the first The original prediction output after round of iteration updates;
[0021] Step S34: Define a group fairness regularization term to meet the fairness and compliance requirements of financial lending. This term measures the deviation between the average predicted default probability of each sensitive attribute group in the sensitive attribute set and the global average predicted default probability. The formula used is as follows: ; ;
[0022] In the formula, Represents a set of sensitive attributes. This represents a group of sensitive attributes within a set of sensitive attributes. Indicates sample The sensitive attribute values, Indicates sensitive attribute group The corresponding number of samples; This represents a group fairness regularization term. Indicates the first The sample at the th Predicted default probability after rounds of iteration This represents the strength coefficient of the fairness constraint. ; Indicates sensitive attribute group The average predicted default probability of all samples in the dataset; This represents the global average predicted default probability for all samples in the training set.
[0023] Step S35: Define a class-balanced adaptive regularization term for imbalanced data scenarios to constrain the average predicted default probability of all samples predicted by the current decision tree on the training set to converge towards the true default rate, preventing the decision tree from generating systematic prediction bias on severely imbalanced data. The formula used is as follows: ; ;
[0024] In the formula, This represents the true default rate of the training set. This indicates a class-balanced adaptive regularization term. This represents the equilibrium constraint strength coefficient. ;
[0025] Step S36: Construct the composite objective function by adding the standard structure regularization term, cost-sensitive Focal loss, group fairness regularization term, and class balance adaptive regularization term to form the composite objective function. The formula used is as follows: ;
[0026] In the formula, Indicates the first A composite objective function for round-by-round iteration.
[0027] Furthermore, in step S4, the objective function is simplified, specifically including the following steps:
[0028] Step S41: Cost-sensitive loss value for a single sample in cost-sensitive Focal loss. exist The place is conducting an inquiry into the increment. The second-order Taylor expansion, maintaining compatibility with the original XGBoost computation framework, uses the following formula: ;
[0029] In the formula, For the first The loss constant term of the round of iteration, i.e., based on the previous round... Each decision tree accumulates the existing loss from the original prediction output; It is a first-order term. Indicates the first The cost-sensitive loss value for each sample is in The first gradient at the location; It is a second-order term. Indicates the first The cost-sensitive loss value for each sample is in The second Hessian derivative at point ;
[0030] Step S42: Calculate the first-order gradient at The value at the specified location is determined by the following steps:
[0031] Step S421: Define the first-order gradient, using the following formula: ;
[0032] Step S422: Derive the first gradient using the chain rule. The value at that location is given by the following formula: ; ;
[0033] In the formula, Indicates the first Each sample is based on the previous The cumulative output of each decision tree represents the predicted default probability.
[0034] Step S43: Calculate the second derivative using the finite difference approximation formula as follows: ;
[0035] In the formula, Describing the first-order gradient At the current probability value The value at that location, Describing the first-order gradient In probability value The value at that location, Indicates the step size, with values ranging from 1 to 2. ;
[0036] Step S44: Construct a simplified objective function, ignoring the first... The iteration adds a constant term independent of the decision tree, simplifying the composite objective function. The formula used is as follows: ;
[0037] In the formula, This represents a simplified objective function.
[0038] Further, in step S5, the ADMM solution includes the following steps:
[0039] Step S51: Obtain the leaf node weight vector of the current decision tree and construct the sample-leaf node indicator matrix. If a sample falls into a leaf node, the element value is 1; otherwise, it is 0. The formula used is as follows: ; ; ;
[0040] In the formula, This represents the weight vector of the leaf nodes in the current decision tree. This represents the sample-leaf node indicator matrix. Indicates sample At the leaf node The element value at that position, Represents the enhanced feature matrix;
[0041] Step S52: Introduce auxiliary variables to rewrite the simplified objective function into the standard form of ADMM (Alternating Direction Multiplier Method). The specific steps are as follows:
[0042] Step S521: Introduce auxiliary variables ,constraint The simplified objective function is decomposed into two sub-objective functions. and The formula used is as follows: ; ; ;
[0043] In the formula, Represents auxiliary variables. Let the sub-objective function be the weight of the leaf nodes. This is a sub-objective function about the auxiliary variables;
[0044] Step S522: Rewrite the sub-objective function based on the sample-leaf node indicator matrix The formula used is as follows: ; ; ;
[0045] In the formula, Indicates falling into a leaf node The sample set, Indicates falling into a leaf node The sum of the first-order gradients of all samples, Indicates falling into a leaf node The sum of the second gradients of all samples;
[0046] Step S523: Replace the predicted default probability in the group fairness regularization term and the class balance adaptive regularization term with auxiliary variables, and rewrite the sub-objective function. The formula used is as follows: ; ; ; ;
[0047] In the formula, This represents the predicted default probability corresponding to the auxiliary variable. Representing auxiliary variables The One portion, This represents the sensitive attribute group corresponding to the auxiliary variable. The average predicted probability of default, This represents the global average predicted default probability corresponding to the auxiliary variable;
[0048] Step S53: Construct the augmented Lagrangian function, using the following formula: ;
[0049] In the formula, This represents the augmented Lagrange function. This represents the dual variable, i.e., the Lagrange multiplier. This represents the augmented Lagrange penalty parameter. , This represents the quadratic penalty term, i.e., the square of the L2 norm;
[0050] Step S54: ADMM outer layer iteration, execute renew, Update both the dual and concurrent variables, retrain the decision tree model, and alternately optimize each variable. The specific steps are as follows:
[0051] Step S541: Update, fix auxiliary variables and dual variables The optimal weights are solved independently for each leaf node. An augmented Lagrangian penalty parameter is introduced into the denominator to enhance the regularization strength, and an ADMM correction term related to the constraint residuals is introduced into the numerator to be compatible with the original XGBoost computation framework. The formulas used are as follows: ;
[0052] In the formula, Indicates the outer iteration round of ADMM. Indicates the first leaf nodes in round ADMM iteration The optimal weight, Indicates the first The auxiliary variable values of each round of ADMM iteration, Indicates the first The values of the dual variables in each round of ADMM iteration. Indicates ADMM correction terms;
[0053] The ADMM correction term is clipped by setting a clipping threshold, using the following formula: ;
[0054] In the formula, Indicates the first ADMM correction values after sample cropping This indicates a cropping operation. Indicates the clipping threshold;
[0055] Step S542: Update, fix leaf node weights and dual variables The formula used to solve the proximal operator problem with auxiliary variables is as follows: ; ;
[0056] In the formula, As an intermediate variable, Indicates the first The optimal auxiliary variable values for each round of ADMM iterations;
[0057] Gradient descent solution The auxiliary variables are inversely corrected based on group fairness and class balance adaptive bias, using the following formula: ; ; ;
[0058] In the formula, Represents a vector gradient operator, In the augmented Lagrange function, the terms related to... The relevant parts, The Jacobian matrix represents the Sigmoid probability map. It is a vector of all 1s. Indicates sensitive attribute group The sample indicator vector, This represents the operation of constructing a diagonal matrix;
[0059] Step S543: Update the dual variable, using the following formula: ;
[0060] In the formula, Indicates the first The values of the dual variables in each round of ADMM iteration. To constrain residuals;
[0061] Step S55: Convergence judgment. Calculate the original residual and the dual residual, set the tolerance thresholds for the original residual and the dual residual, and repeat step S54 until the convergence condition is met, at which point the iteration terminates. The convergence condition is as follows: ; ;
[0062] In the formula, and They represent the first The original residuals and dual residuals of the ADMM iteration. and These are the tolerance thresholds for the original residual and the dual residual, respectively, and are set to values of [value missing]. .
[0063] Furthermore, in step S6, the convergence and complexity analysis includes the following steps:
[0064] Step S61: ADMM convergence analysis, under the condition of fixed decision tree structure, second-order Taylor approximation holds and Under the condition that the cost-sensitive Focal loss is related to the original prediction output, To satisfy the β-smoothness condition, let If the KKT stationary point is an approximation of the problem, then the ADMM iterative residual satisfies: ;
[0065] In the formula, The bounded positive constants are related to the initial point deviation and the objective function parameters; that is, under the above locally convex approximation conditions, the algorithm residuals are expressed as... The rate decays to the neighborhood of the KKT stationary point;
[0066] Step S62: Complexity analysis, time complexity is In the formula, For the number of decision trees, For the feature dimensions of the sample, For the sample size, This represents the number of ADMM iterations. The number of sets of sensitive attributes; the space complexity is O(n). In the formula, This represents the maximum depth of the decision tree.
[0067] Furthermore, in step S7, the probability calibration and risk level output specifically include the following steps:
[0068] Step S71: Predict the output of the trained decision tree model. The parameters were fitted on the validation set using the Platt Scaling method. , The calibration default probability is obtained using the following formula: ; ;
[0069] In the formula, Indicates the probability of calibration failure. This represents the predicted output of the decision tree model. , Indicates the fitted parameters;
[0070] Step S72: Transform the continuous calibration default probability values into a binary classification decision, set the decision threshold, and base the decision on the cost coefficient. and The optimal decision threshold is determined on the validation set using the following formula: ; ; ;
[0071] In the formula, Indicates the decision threshold. , This represents the optimal decision threshold. and These represent the decision thresholds. The corresponding false negative rate and false positive rate, , , and These represent the decision thresholds. The number of false negatives, the number of true positives, and the number of false positives and true negatives;
[0072] Step S73: Divide users into four risk levels: low, medium, high, and extremely high risk, and set the risk level and recommended handling method corresponding to the calibration default probability range.
[0073] Furthermore, in step S8, the interpretability output specifically includes the following steps:
[0074] Step S81: Calculate the enhanced feature matrix using the SHAP method. Each feature component Marginal contribution to the predicted default probability of users , Represents characteristic components Increase the probability of default. Represents characteristic components To reduce the probability of default, the SHAP value is defined as follows: ; ;
[0075] In the formula, Indicates the first Each feature component corresponds to a sample feature vector. Predict the marginal contribution of the output. Indicates the feature component index, corresponding to the enhanced feature matrix. The list, Represents the enhanced feature matrix All A set composed of dimensional feature components. Indicates no characteristic components Feature subset, Indicates using only a subset of features Time decision tree model for sample feature vectors The predicted output, This indicates the decision tree model's approach to sample feature vectors when using all feature components. The predicted output, i.e. ;
[0076] Step S82: Calculate the SHAP value of all samples in the test set using the TreeSHAP algorithm, with a time complexity of O(n log n). , For the number of decision trees, The number of leaf nodes. The maximum depth of the decision tree;
[0077] Step S83: Generate the explanation report. Generate a risk explanation report for the financial electronic application product. The report includes: global feature importance ranking, details of individual user feature contributions, and quantitative explanation of the basis for model decision-making.
[0078] The present invention provides an intelligent risk assessment system for XGBoost financial electronic application products, including a data acquisition and preprocessing module, a feature engineering module, an objective function construction module, an objective function simplification module, an ADMM solving module, a convergence and complexity analysis module, a probability calibration and risk level output module, and an interpretability output module.
[0079] The data acquisition and preprocessing module collects user data of financial electronic application products, preprocesses the user data including missing value imputation, outlier truncation and Min-Max feature normalization, and sends the preprocessed data to the feature engineering module.
[0080] The feature engineering module constructs an enhanced feature matrix for the preprocessed data and labels it with real credit tags. The enhanced feature matrix and its corresponding tag vector are divided into training set, validation set and test set. The Cartesian product is used to divide the user samples into sensitive attribute groups to form a sensitive attribute set. Each sample corresponds to a unique sensitive attribute value. The training set and sensitive attribute set are sent to the objective function construction module, the validation set is sent to the probability calibration and risk level output module, and the test set is sent to the interpretability output module.
[0081] The objective function construction module constructs a decision tree model for risk assessment of financial electronic application products based on the XGBoost algorithm. On the basis of the original standard structure regularization term, it adds cost-sensitive Focal loss, group fairness regularization term and class balance adaptive regularization term as a composite objective function. The decision tree model and composite objective function are sent to the objective function simplification module.
[0082] The objective function simplification module performs a second-order Taylor expansion approximation on the cost-sensitive Focal loss and ignores the constant term in the composite objective function, constructing a simplified objective function which is then sent to the ADMM solution module.
[0083] The ADMM solver module rewrites the simplified objective function into the standard ADMM form, decomposes it into two coupled subproblems, and optimizes each variable alternately through the three-step ADMM iteration until the convergence condition is met. The trained decision tree model is then output and sent to the convergence and complexity analysis module, the probability calibration and risk level output module, and the interpretability output module.
[0084] The convergence and complexity analysis module analyzes the convergence, time complexity, and space complexity of the trained decision tree model.
[0085] The probability calibration and risk level output module performs Platt Scaling probability calibration on the predicted output of the trained decision tree model and converts it into a binary classification decision. It adaptively determines the optimal decision threshold on the validation set and classifies users into four risk levels: low risk, medium risk, high risk, and extremely high risk.
[0086] The interpretability output module uses the SHAP method to calculate the marginal contribution of each feature component in the enhanced feature matrix to the default probability of a single user on the test set for the trained decision tree model, and generates a risk interpretation report for financial electronic application products.
[0087] The beneficial effects achieved by adopting the above solution are as follows:
[0088] (1) To address the issues of class imbalance and asymmetric cost, this scheme designs a cost-sensitive Focal loss. Based on the standard cross-entropy, it introduces a focusing factor and an asymmetric cost coefficient, which enables the model to give higher gradient weights to default samples that are difficult to identify. At the same time, it explicitly embeds the asymmetric business cost into the training objective.
[0089] (2) To address the lack of fairness constraints, this scheme designs a group fairness regularization term, which incorporates the deviation of the predicted default probability among different sensitive attribute groups as a penalty into the objective function. During the model training process, the sum of squares of the difference between the average predicted default probability of each sensitive group and the global mean is actively constrained, thereby embedding the demographic equality constraint.
[0090] (3) In view of the limitations of the optimization framework, this scheme incorporates the multi-constraint optimization problem into the ADMM solution framework. By introducing auxiliary variables, the original problem is decomposed into sub-objective functions, linear constraints are established, and joint optimization is achieved through three-step iteration of ADMM. The total complexity is the same as that of the standard XGBoost, which is feasible in engineering. Attached Figure Description
[0091] Figure 1 This is a flowchart illustrating an intelligent risk assessment method for XGBoost financial electronic application products proposed in this invention.
[0092] Figure 2 This is a schematic diagram of an intelligent risk assessment system for XGBoost financial electronic application products proposed in this invention.
[0093] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof. Detailed Implementation
[0094] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0095] Example 1, see Figure 1 This invention provides an intelligent risk assessment method for XGBoost financial electronic application products, which includes the following steps:
[0096] Step S1: Data collection and preprocessing. Collect user data of financial electronic application products and preprocess the user data, including missing value imputation, outlier truncation and Min-Max feature normalization, to obtain preprocessed data.
[0097] Step S2: Feature engineering. Construct an enhanced feature matrix for the preprocessed data and label it with real credit tags. Divide the enhanced feature matrix and its corresponding tag vector into training set, validation set and test set. Use Cartesian product to divide user samples into sensitive attribute groups to form a sensitive attribute set. Each sample corresponds to a unique sensitive attribute value.
[0098] Step S3: Objective function construction. Based on the XGBoost algorithm, a decision tree model for risk assessment of financial electronic application products is constructed. On the basis of the original standard structure regularization term, cost-sensitive Focal loss, group fairness regularization term and class balance adaptive regularization term are added as a composite objective function.
[0099] Step S4: Simplify the objective function by performing a second-order Taylor expansion approximation on the cost-sensitive Focal loss and ignoring the constant term in the composite objective function to construct a simplified objective function;
[0100] Step S5: ADMM solution. The simplified objective function is rewritten into the standard ADMM form, decomposed into two coupled subproblems, and each variable is optimized alternately through three-step ADMM iteration until the convergence condition is met. The trained decision tree model is then output.
[0101] Step S6: Convergence and complexity analysis, analyze the convergence, time complexity and space complexity of the trained decision tree model;
[0102] Step S7: Probability calibration and risk level output. Perform Platt Scaling probability calibration on the predicted output of the trained decision tree model and convert it into a binary classification decision. Adaptively determine the optimal decision threshold on the validation set and classify users into four risk levels: low risk, medium risk, high risk, and very high risk.
[0103] Step S8: Interpretability output. The SHAP method is used to calculate the marginal contribution of each feature component in the enhanced feature matrix to the default probability of a single user on the test set, generating a risk interpretation report for the financial electronic application product.
[0104] Example 2, see Figure 1 This embodiment is based on the above embodiment. In step S1, the data acquisition and preprocessing specifically includes the following steps:
[0105] Step S11: Collect user data for financial electronic application products, including basic user information, financial status information, historical credit records, billing and repayment data, and sensitive attribute information, as detailed below: Basic information includes the user's age, education level, marital status, and employment status; Financial information includes monthly income, credit limit, debt-to-income ratio, and number of existing loan accounts; Historical credit records include historical repayment status, number of past overdue payments, and the most recent number of overdue days; Billing and repayment data include the billing amount and repayment amount for the past six months; Sensitive attribute information includes user gender and age grouping;
[0106] Step S12: Impute missing values in the collected user data: use the median to impute numerical data and the mode to impute categorical data;
[0107] Step S13: Perform outlier detection and truncation on the filled data. Based on the interquartile range method, truncate values that exceed 1.5 times the interquartile range to the corresponding boundary value.
[0108] Step S14: Perform Min-Max feature normalization on the truncated data to map the numerical data to the 0~1 interval, and obtain the preprocessed data.
[0109] Example 3, see Figure 1 This embodiment is based on the above embodiment. In step S2, the feature engineering specifically includes the following steps:
[0110] Step S21: Construct ratio features. Obtain each user's bill and repayment data from the preprocessed data, calculate the ratio of the user's monthly repayment amount to the monthly bill amount, and record it as the monthly repayment ratio; calculate the average repayment amount and average bill amount over the past six months, and record it as the average monthly repayment ratio.
[0111] Step S22: Construct cross features, obtain basic information and financial status information of each user from the preprocessed data, calculate the interaction term of the product of user age and credit limit, which is used to reflect the credit affordability of the user's age group.
[0112] Step S23: Construct historical statistical features, obtain the historical credit records of each user from the preprocessed data, and record the total number of historical overdue months and the maximum continuous overdue duration of the user;
[0113] Step S24: Matrix concatenation, concatenating the ratio features, cross features, and historical statistical features of all users into an enhanced feature matrix. Each row corresponds to a user sample. of 3D feature vector Each column corresponds to a type of feature component, and a real credit label for each user is constructed. , Indicates a sample of default. This represents a sample of normal repayments;
[0114] Step S25: Group partitioning. Sensitive attribute information is obtained from the preprocessed data. The Cartesian product of user gender and age is calculated to partition the data into sensitive attribute groups, forming a sensitive attribute set. Each sample The corresponding unique sensitive attribute value ;
[0115] Step S26: Dataset partitioning. The enhanced feature matrix and its corresponding label vector are divided into training set, validation set and test set in a ratio of 8:1:1.
[0116] Example 4, see Figure 1 This embodiment is based on the above embodiment. In step S3, the construction of the objective function specifically includes the following steps:
[0117] Step S31: Scenario definition, obtaining the total number of samples in the training set. , No. Feature vector of each sample Real credit labels Based on the XGBoost algorithm, a system is constructed. A decision tree, The value is 500, the first The original prediction output for each sample The formula used to sum all the predictions from the decision trees is as follows: ;
[0118] In the formula, Indicates the sample index. Indicates the first The real credit labels of a sample Indicates a sample of default. This represents a sample of normal repayments. Indicates the first The original prediction output for each sample, This indicates the iteration number of the XGBoost algorithm, i.e., the index of the decision tree. This represents the total number of decision trees. Indicates the first The decision tree function added in each iteration, Indicates the first The feature vector of each sample Indicates the first The new decision tree in the first round Predicted values for each sample;
[0119] Step S32: Define the standard structure regularization term, using the following formula: ;
[0120] In the formula, This represents a standard structure regularization term. Indicates the first The number of leaf nodes added to the decision tree in each round. Indicates the index of the leaf node. Indicates the weight of the leaf node. The penalty coefficient for the number of leaf nodes. The L2 penalty strength is the weight of the leaf nodes;
[0121] Step S33: Based on Focal loss, introduce an asymmetric cost coefficient adapted to the credit scenario, and define cost-sensitive Focal loss. The formula used is as follows: ;
[0122] In the formula, Indicates the first The cost-sensitive Focal loss for all training samples during rounds of decision tree iteration. This represents the total number of samples in the training set. Indicates the preceding decision trees for the first The original prediction output for each sample, Indicates the first The original prediction output after round of iteration updates;
[0123] Step S34: Define a group fairness regularization term to meet the fairness and compliance requirements of financial lending. This term measures the deviation between the average predicted default probability of each sensitive attribute group in the sensitive attribute set and the global average predicted default probability. The formula used is as follows: ; ;
[0124] In the formula, Represents a set of sensitive attributes. This represents a group of sensitive attributes within a set of sensitive attributes. Indicates sample The sensitive attribute values, Indicates sensitive attribute group The corresponding number of samples; This represents a group fairness regularization term. Indicates the first The sample at the th Predicted default probability after rounds of iteration This represents the fairness constraint strength coefficient, with a value of 0.1. Indicates sensitive attribute group The average predicted default probability of all samples in the dataset; This represents the global average predicted default probability for all samples in the training set.
[0125] Step S35: Define a class-balanced adaptive regularization term for imbalanced data scenarios to constrain the average predicted default probability of all samples predicted by the current decision tree on the training set to converge towards the true default rate. The formula used is as follows: ; ;
[0126] In the formula, This represents the true default rate of the training set. This indicates a class-balanced adaptive regularization term. This represents the equilibrium constraint strength coefficient, with a value of 0.5.
[0127] Step S36: Construct the composite objective function by adding the standard structure regularization term, cost-sensitive Focal loss, group fairness regularization term, and class balance adaptive regularization term to form the composite objective function. The formula used is as follows: ;
[0128] In the formula, Indicates the first A composite objective function for round-by-round iteration.
[0129] Example 5, see Figure 1This embodiment is based on the above embodiment. In step S33, defining the cost-sensitive Focal loss specifically includes the following steps:
[0130] Step S331: Construct the Focal loss, using the following formula: ;
[0131] In the formula, Indicates Focal loss. This represents the probability that the decision tree predicts the true class of a sample. The focusing parameter indicates the degree of weight reduction for easily classified samples. Indicates the focus factor;
[0132] Step S332: Calculate the predicted probability of default using the following formula: ;
[0133] In the formula, Indicates the first Predicted default probability for each sample;
[0134] Step S333: Based on the business logic of financial institutions, set the false negative cost coefficient and false positive cost coefficient, using the following formula: ;
[0135] In the formula, and These represent the false negative cost coefficient and the false positive cost coefficient, respectively. ;
[0136] Step S334: Unify the difficult sample focusing mechanism with the cost asymmetry of the credit scenario. Replace the prediction probability of the true class of the sample in the Focal loss decision tree with the prediction probability of default. Apply different cost coefficients to the two types of samples, default and normal repayment, respectively. The formula used is as follows: ;
[0137] In the formula, Indicates the first The cost-sensitive loss value for each sample. The natural logarithm represents the predicted probability of default. The natural logarithm represents the probability of predicting normal repayment.
[0138] Step S335: Calculate the cost-sensitive Focal loss using the following formula: ;
[0139] When bad debt loss data is unavailable in the training set , , .
[0140] Example 6, see Figure 1 This embodiment is based on the above embodiment. In step S4, the objective function is simplified, specifically including the following steps:
[0141] Step S41: Cost-sensitive loss value for a single sample in cost-sensitive Focal loss. exist The place is conducting an inquiry into the increment. The second-order Taylor expansion, maintaining compatibility with the original XGBoost computation framework, uses the following formula: ;
[0142] In the formula, For the first The loss constant term of the round of iteration, i.e., based on the previous round... Each decision tree accumulates the existing loss from the original prediction output; It is a first-order term. Indicates the first The cost-sensitive loss value for each sample is in The first gradient at the location; It is a second-order term. Indicates the first The cost-sensitive loss value for each sample is in The second Hessian derivative at point ;
[0143] Step S42: Calculate the first-order gradient at The value at the specified location is determined by the following steps:
[0144] Step S421: Define the first-order gradient, using the following formula: ;
[0145] Step S422: Derive the first gradient using the chain rule. The value at that location is given by the following formula: ; ;
[0146] In the formula, Indicates the first Each sample is based on the previous The cumulative output of each decision tree represents the predicted default probability.
[0147] Step S43: Calculate the second derivative using the finite difference approximation formula as follows: ;
[0148] In the formula, Describing the first-order gradient At the current probability value The value at that location, Describing the first-order gradient In probability value The value at that location, Indicates the step size, with values ranging from 1 to 2. ;
[0149] Step S44: Construct a simplified objective function, ignoring the first... The iteration adds a constant term independent of the decision tree, simplifying the composite objective function. The formula used is as follows: ;
[0150] In the formula, This represents a simplified objective function.
[0151] Example 7, see Figure 1 This embodiment is based on the above embodiment. In step S5, the ADMM solution specifically includes the following steps:
[0152] Step S51: Obtain the leaf node weight vector of the current decision tree and construct the sample-leaf node indicator matrix. If a sample falls into a leaf node, the element value is 1; otherwise, it is 0. The formula used is as follows: ; ; ;
[0153] In the formula, This represents the weight vector of the leaf nodes in the current decision tree. This represents the sample-leaf node indicator matrix. Indicates sample At the leaf node The element value at that position, Represents the enhanced feature matrix;
[0154] Step S52: Rewrite the simplified objective function into the standard form of ADMM. The specific steps are as follows:
[0155] Step S521: Introduce auxiliary variables ,constraint The simplified objective function is decomposed into two sub-objective functions. and The formula used is as follows: ; ; ;
[0156] In the formula, Represents auxiliary variables. Let the sub-objective function be the weight of the leaf nodes. This is a sub-objective function about the auxiliary variables;
[0157] Step S522: Rewrite the sub-objective function based on the sample-leaf node indicator matrix The formula used is as follows: ; ; ;
[0158] In the formula, Indicates falling into a leaf node The sample set, Indicates falling into a leaf node The sum of the first-order gradients of all samples, Indicates falling into a leaf node The sum of the second gradients of all samples;
[0159] Step S523: Replace the predicted default probability in the group fairness regularization term and the class balance adaptive regularization term with auxiliary variables, and rewrite the sub-objective function. The formula used is as follows: ; ; ; ;
[0160] In the formula, This represents the predicted default probability corresponding to the auxiliary variable. Representing auxiliary variables The One portion, This represents the sensitive attribute group corresponding to the auxiliary variable. The average predicted probability of default, This represents the global average predicted default probability corresponding to the auxiliary variable;
[0161] Step S53: Construct the augmented Lagrangian function, using the following formula: ;
[0162] In the formula, This represents the augmented Lagrange function. This represents the dual variable, i.e., the Lagrange multiplier. This represents the augmented Lagrange penalty parameter. , This represents the quadratic penalty term, i.e., the square of the L2 norm;
[0163] Step S54: ADMM three-step iteration, executed. renew, Update both the dual and concurrent variables, retrain the decision tree model, and alternately optimize each variable. The specific steps are as follows:
[0164] Step S541: Update, fix auxiliary variables and dual variables The optimal weights are solved independently for each leaf node. An augmented Lagrangian penalty parameter is introduced into the denominator to enhance the regularization strength, and an ADMM correction term related to the constraint residuals is introduced into the numerator to be compatible with the original XGBoost computation framework. The formulas used are as follows: ;
[0165] In the formula, Indicates the outer iteration round of ADMM. Indicates the first leaf nodes in round ADMM iteration The optimal weight, Indicates the first The auxiliary variable values of each round of ADMM iteration, Indicates the first The values of the dual variables in each round of ADMM iteration. Indicates ADMM correction terms;
[0166] The clipping threshold is set to 5.0, and the ADMM correction term is clipped using the following formula: ;
[0167] In the formula, Indicates the first ADMM correction values after sample cropping This indicates a cropping operation. Indicates the clipping threshold;
[0168] Step S542: Update, fix leaf node weights and dual variables The formula used to solve the proximal operator problem with auxiliary variables is as follows: ; ;
[0169] In the formula, As an intermediate variable, Indicates the first The optimal auxiliary variable values for each round of ADMM iterations;
[0170] Gradient descent solution The auxiliary variables are inversely corrected based on group fairness and class balance adaptive bias, using the following formula: ; ; ;
[0171] In the formula, Represents a vector gradient operator, In the augmented Lagrange function, the terms related to... The relevant parts, The Jacobian matrix represents the Sigmoid probability map. It is a vector of all 1s. Indicates sensitive attribute group The sample indicator vector, This represents the operation of constructing a diagonal matrix;
[0172] In engineering implementation, a first-order linearized approximation is used. , It is the identity matrix, or Perform projection update directly on top;
[0173] Step size , ;
[0174] In the formula, This represents the upper bound of the Lipschitz constant. This represents the minimum group sample size;
[0175] Step S543: Update the dual variable, using the following formula: ;
[0176] In the formula, Indicates the first The values of the dual variables in each round of ADMM iteration. To constrain residuals;
[0177] Step S55: Convergence judgment. Calculate the original residual and the dual residual, set the tolerance thresholds for the original residual and the dual residual, and repeat steps S541 to S543 until the convergence condition is met, at which point the iteration terminates. The convergence condition is as follows: ; ;
[0178] In the formula, and They represent the first The original residuals and dual residuals of the ADMM iteration. and These are the tolerance thresholds for the original residual and the dual residual, respectively, and are set to values of [value missing]. .
[0179] Example 8, see Figure 1 This embodiment is based on the above embodiment. In step S6, the convergence and complexity analysis specifically includes the following steps:
[0180] Step S61: ADMM convergence analysis, under the condition of fixed decision tree structure, second-order Taylor approximation holds and Under the condition that the cost-sensitive Focal loss is related to the original prediction output, To satisfy the β-smoothness condition, let If the KKT stationary point is an approximation of the problem, then the ADMM iterative residual satisfies: ;
[0181] In the formula, These are bounded positive constants related to the initial point deviation and the parameters of the objective function;
[0182] That is, under the aforementioned locally convex approximation conditions, the algorithm residual is... The rate decays to the neighborhood of the KKT stationary point;
[0183] Step S62: Complexity analysis, time complexity is In the formula, For the number of decision trees, For the feature dimensions of the sample, For the sample size, This represents the number of ADMM iterations. The number of sets of sensitive attributes; the space complexity is O(n). In the formula, This represents the maximum depth of the decision tree.
[0184] Example 9, see Figure 1 This embodiment is based on the above embodiment. In step S7, the probability calibration and risk level output specifically include the following steps:
[0185] Step S71: Predict the output of the trained decision tree model. The parameters were fitted on the validation set using the Platt Scaling method. , The calibration default probability is obtained using the following formula: ; ;
[0186] In the formula, Indicates the probability of calibration failure. This represents the predicted output of the decision tree model. , Indicates the fitted parameters;
[0187] Step S72: Transform the continuous calibration default probability values into a binary classification decision, based on the cost coefficient. and The optimal decision threshold is determined on the validation set using the following formula: ; ; ;
[0188] In the formula, Indicates the decision threshold. , This represents the optimal decision threshold. and These represent the decision thresholds. The corresponding false negative rate and false positive rate, , , and These represent the decision thresholds. The number of false negatives, the number of true positives, and the number of false positives and true negatives;
[0189] Step S73: In this embodiment, when , hour, The actual measured value is approximately 0.29 to 0.35. Users are divided into four risk levels: low, medium, high, and very high. The risk levels corresponding to the calibration default probability intervals and the suggested handling methods are set as follows: As the risk level is low, approval will be granted automatically. Medium risk level, manual review required; This is considered high-risk and requires additional collateral. This is considered extremely high risk and will be automatically rejected.
[0190] Example 10, see Figure 1 This embodiment is based on the above embodiment. In step S8, the interpretability output specifically includes the following steps:
[0191] Step S81: Calculate the enhanced feature matrix using the SHAP method. Each feature component Marginal contribution to the predicted default probability of users , Represents characteristic components Increase the probability of default. Represents characteristic components To reduce the probability of default, the SHAP value is defined as follows: ; ;
[0192] In the formula, Indicates the first Each feature component corresponds to a sample feature vector. Predict the marginal contribution of the output. Indicates the feature component index, corresponding to the enhanced feature matrix. The list, Represents the enhanced feature matrix All A set composed of dimensional feature components. Indicates no characteristic components Feature subset, Indicates using only a subset of features Time decision tree model for sample feature vectors The predicted output, This indicates the decision tree model's approach to sample feature vectors when using all feature components. The predicted output, i.e. ;
[0193] Step S82: Calculate the SHAP value using the TreeSHAP algorithm, with a time complexity of O(n log n). , For the number of decision trees, The number of leaf nodes. The maximum depth of the decision tree;
[0194] Step S83: Generate the explanation report, generate a risk explanation report for the financial electronic application product, the report content includes: Global Feature Importance Ranking: Based on the SHAP values of all samples in the test set, the average absolute SHAP value of each feature is calculated and sorted in descending order to show the features that have the greatest impact on default prediction, which is used by financial institutions to understand the key drivers of the overall risk control model. Individual User Feature Contribution Details: For each user, list the SHAP value of each feature, the original value of the feature, and the corresponding risk direction, so that the user understands the specific reasons why they are judged to a certain risk level. Quantitative explanation of the basis for model decision-making: By combining the SHAP value with the risk level determined in step S73, the complete decision-making path from input features to the final risk level output is explained, providing a transparent and traceable basis for regulatory review and handling of credit user objections.
[0195] Example 11, see Figure 2 Based on the above embodiments, this embodiment provides an intelligent risk assessment system for XGBoost financial electronic application products, including a data acquisition and preprocessing module, a feature engineering module, an objective function construction module, an objective function simplification module, an ADMM solving module, a convergence and complexity analysis module, a probability calibration and risk level output module, and an interpretability output module.
[0196] The data acquisition and preprocessing module collects user data of financial electronic application products, preprocesses the user data including missing value imputation, outlier truncation and Min-Max feature normalization, and sends the preprocessed data to the feature engineering module.
[0197] The feature engineering module constructs an enhanced feature matrix for the preprocessed data and labels it with real credit tags. The enhanced feature matrix and its corresponding tag vector are divided into training set, validation set and test set. The Cartesian product is used to divide the user samples into sensitive attribute groups to form a sensitive attribute set. Each sample corresponds to a unique sensitive attribute value. The training set and sensitive attribute set are sent to the objective function construction module, the validation set is sent to the probability calibration and risk level output module, and the test set is sent to the interpretability output module.
[0198] The objective function construction module constructs a decision tree model for risk assessment of financial electronic application products based on the XGBoost algorithm. On the basis of the original standard structure regularization term, it adds cost-sensitive Focal loss, group fairness regularization term and class balance adaptive regularization term as a composite objective function. The decision tree model and composite objective function are sent to the objective function simplification module.
[0199] The objective function simplification module performs a second-order Taylor expansion approximation on the cost-sensitive Focal loss and ignores the constant term in the composite objective function, constructing a simplified objective function which is then sent to the ADMM solution module.
[0200] The ADMM solver module rewrites the simplified objective function into the standard ADMM form, decomposes it into two coupled subproblems, and optimizes each variable alternately through the three-step ADMM iteration until the convergence condition is met. The trained decision tree model is then output and sent to the convergence and complexity analysis module, the probability calibration and risk level output module, and the interpretability output module.
[0201] The convergence and complexity analysis module analyzes the convergence, time complexity, and space complexity of the trained decision tree model.
[0202] The probability calibration and risk level output module performs Platt Scaling probability calibration on the predicted output of the trained decision tree model and converts it into a binary classification decision. It adaptively determines the optimal decision threshold on the validation set and classifies users into four risk levels: low risk, medium risk, high risk, and extremely high risk.
[0203] The interpretability output module uses the SHAP method to calculate the marginal contribution of each feature component in the enhanced feature matrix to the default probability of a single user on the test set for the trained decision tree model, and generates a risk interpretation report for financial electronic application products.
[0204] 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 process, method, article, or apparatus.
[0205] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
[0206] The present invention and its embodiments have been described above. This description is not restrictive, and the accompanying drawings are only one embodiment of the present invention; the actual structure is not limited thereto. In conclusion, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the invention, such designs should fall within the protection scope of the present invention.
Claims
1. A smart risk assessment method for XGBoost financial electronic application products, characterized in that: The method includes the following steps: Step S1: Data collection and preprocessing. Collect user data of financial electronic application products and preprocess the user data, including missing value imputation, outlier truncation and Min-Max feature normalization, to obtain preprocessed data. Step S2: Feature engineering. Construct an enhanced feature matrix for the preprocessed data and label it with real credit tags. Divide the enhanced feature matrix and its corresponding tag vector into training set, validation set and test set. Use Cartesian product to divide user samples into sensitive attribute groups to form a sensitive attribute set. Each sample corresponds to a unique sensitive attribute value. Step S3: Objective function construction. Based on the XGBoost algorithm, a decision tree model for risk assessment of financial electronic application products is constructed. On the basis of the original standard structure regularization term, cost-sensitive Focal loss, group fairness regularization term and class balance adaptive regularization term are added as a composite objective function. Step S4: Simplify the objective function by performing a second-order Taylor expansion approximation on the cost-sensitive Focal loss and ignoring the constant term in the composite objective function to construct a simplified objective function; Step S5: ADMM solution. The simplified objective function is rewritten into the standard ADMM form, decomposed into two coupled subproblems, and each variable is optimized alternately through three-step ADMM iteration until the convergence condition is met. The trained decision tree model is then output. Step S6: Convergence and complexity analysis, analyze the convergence, time complexity and space complexity of the trained decision tree model; Step S7: Probability calibration and risk level output. Perform PlattScaling probability calibration on the predicted output of the trained decision tree model and convert it into a binary classification decision. Adaptively determine the optimal decision threshold on the validation set and classify users into four risk levels: low risk, medium risk, high risk, and very high risk. Step S8: Interpretability output. The SHAP method is used to calculate the marginal contribution of each feature component in the enhanced feature matrix to the default probability of a single user on the test set, generating a risk interpretation report for the financial electronic application product.
2. The intelligent risk assessment method for XGBoost financial electronic application products according to claim 1, characterized in that: In step S2, the construction of the enhanced feature matrix specifically involves: constructing ratio features, cross features, and historical statistical features; concatenating the ratio features, cross features, and historical statistical features of all users into an enhanced feature matrix, where each row corresponds to the feature vector of a user sample, each column corresponds to a type of feature component, and a real credit label is constructed for each user, with 1 representing a default sample and 0 representing a normal repayment sample.
3. The intelligent risk assessment method for XGBoost financial electronic application products according to claim 1, characterized in that: In step S3, the objective function is constructed, including the following steps: Step S31: Scenario definition, obtaining the total number of samples in the training set. , No. Feature vector of each sample Real credit labels Based on the XGBoost algorithm, a system is constructed. The first decision tree, the The original prediction output for each sample The formula used to sum all the predictions from the decision trees is as follows: ; In the formula, Indicates the sample index. Indicates the first The real credit labels of a sample Indicates a sample of default. This represents a sample of normal repayments. Indicates the first The original prediction output for each sample, This indicates the iteration number of the XGBoost algorithm, i.e., the index of the decision tree. This represents the total number of decision trees. Indicates the first The decision tree function added in each iteration, Indicates the first The feature vector of each sample Indicates the first The new decision tree in the first round Predicted values for each sample; Step S32: Define the standard structure regularization term, using the following formula: ; In the formula, This represents a standard structure regularization term. Indicates the first The number of leaf nodes added to the decision tree in each round. Indicates the index of the leaf node. Indicates the weight of the leaf node. The penalty coefficient for the number of leaf nodes. The L2 penalty strength is the weight of the leaf nodes; Step S33: Based on Focal loss, introduce an asymmetric cost coefficient adapted to the credit scenario, and define cost-sensitive Focal loss. The formula used is as follows: ; In the formula, Indicates the first The cost-sensitive Focal loss for all training samples during rounds of decision tree iteration. This represents the total number of samples in the training set. Indicates the preceding decision trees for the first The original prediction output for each sample, Indicates the first The original prediction output after round of iteration updates; Step S34: Define a group fairness regularization term to meet the fairness and compliance requirements of financial lending. This term measures the deviation between the average predicted default probability of each sensitive attribute group in the sensitive attribute set and the global average predicted default probability. The formula used is as follows: ; ; In the formula, Represents a set of sensitive attributes. This represents a group of sensitive attributes within a set of sensitive attributes. Indicates sample The sensitive attribute values, Indicates sensitive attribute group The corresponding number of samples; This represents a group fairness regularization term. Indicates the first The sample at the th Predicted default probability after rounds of iteration This represents the strength coefficient of the fairness constraint. ; Indicates sensitive attribute group The average predicted default probability of all samples in the dataset; This represents the global average predicted default probability for all samples in the training set. Step S35: Define a class-balanced adaptive regularization term for imbalanced data scenarios to constrain the average predicted default probability of all samples predicted by the current decision tree on the training set to converge towards the true default rate, preventing the decision tree from generating systematic prediction bias on severely imbalanced data. The formula used is as follows: ; ; In the formula, This represents the true default rate of the training set. This indicates a class-balanced adaptive regularization term. Indicates the equilibrium constraint strength coefficient. ; Step S36: Construct the composite objective function by adding the standard structure regularization term, cost-sensitive Focal loss, group fairness regularization term, and class balance adaptive regularization term to form the composite objective function. The formula used is as follows: ; In the formula, Indicates the first A composite objective function for round-by-round iteration.
4. The intelligent risk assessment method for XGBoost financial electronic application products according to claim 3, characterized in that: In step S4, the simplified objective function is constructed using the following formula: ; In the formula, This represents a simplified objective function.
5. The intelligent risk assessment method for XGBoost financial electronic application products according to claim 4, characterized in that: In step S5, the ADMM solution includes the following steps: Step S51: Obtain the leaf node weight vector of the current decision tree and construct the sample-leaf node indicator matrix. If a sample falls into a leaf node, the element value is 1; otherwise, it is 0. The formula used is as follows: ; ; ; In the formula, This represents the weight vector of the leaf nodes in the current decision tree. This represents the sample-leaf node indicator matrix. Indicates sample At the leaf node The element value at that position, Represents the enhanced feature matrix; Step S52: Introduce auxiliary variables to rewrite the simplified objective function into the standard form of ADMM, using the following formula: ; In the formula, Represents auxiliary variables. Let the sub-objective function be the weights of the leaf nodes. This is a sub-objective function about the auxiliary variables; Step S53: Construct the augmented Lagrangian function, using the following formula: ; In the formula, This represents the augmented Lagrange function. This represents the dual variable, i.e., the Lagrange multiplier. This represents the augmented Lagrange penalty parameter. , This represents the quadratic penalty term, i.e., the square of the L2 norm; Step S54: ADMM outer layer iteration, execute renew, Update both the dual and concurrent variables, retrain the decision tree model, and alternately optimize each variable. Step S55: Convergence judgment, calculate the original residual and dual residual, set the tolerance threshold for the original residual and dual residual, repeat step S54 until the original residual and dual residual are less than the tolerance threshold and terminate the iteration.
6. The intelligent risk assessment method for XGBoost financial electronic application products according to claim 5, characterized in that: In step S54, the outer layer iteration of the ADMM includes the following steps: Step S541: Update, fix the auxiliary and dual variables, solve for the optimal weights independently for each leaf node, and set a pruning threshold to prune the ADMM correction term; Step S542: Update: Fix the leaf node weights and dual variables, use gradient descent to solve the proximal operator problem for the auxiliary variables, and apply reverse correction to the auxiliary variables based on group fairness and class balance adaptive bias; Step S543: Update the dual variable using the updated auxiliary variable and leaf node weights.
7. The intelligent risk assessment method for XGBoost financial electronic application products according to claim 5, characterized in that: In step S7, the probability calibration and risk level output includes the following steps: Step S71: The predicted output of the trained decision tree model is fitted with parameters on the validation set using the Platt Scaling method to obtain the calibrated default probability; Step S72: Transform the continuous calibration default probability values into a binary classification decision, and determine the optimal decision threshold based on the cost coefficient and the validation set; Step S73: Divide users into four risk levels: low, medium, high, and extremely high risk, and set the risk level and recommended handling method corresponding to the calibration default probability interval.
8. The intelligent risk assessment method for XGBoost financial electronic application products according to claim 5, characterized in that: In step S8, the interpretability output includes the following steps: Step S81: Use the SHAP method to calculate the marginal contribution of each feature component in the enhanced feature matrix to the user's predicted default probability; Step S82: Calculate the SHAP value of all samples in the test set using the TreeSHAP algorithm; Step S83: Generate the explanation report. Generate a risk explanation report for the financial electronic application product. The report includes: global feature importance ranking, details of individual user feature contributions, and quantitative explanation of the basis for model decision-making.
9. An intelligent risk assessment system for XGBoost financial electronic application products, used to implement the intelligent risk assessment method for XGBoost financial electronic application products as described in any one of claims 1-8, characterized in that: It includes modules for data acquisition and preprocessing, feature engineering, objective function construction, objective function simplification, ADMM solving, convergence and complexity analysis, probability calibration and risk level output, and interpretability output. The data acquisition and preprocessing module collects user data of financial electronic application products, preprocesses the user data including missing value imputation, outlier truncation and Min-Max feature normalization, and sends the preprocessed data to the feature engineering module. The feature engineering module constructs an enhanced feature matrix for the preprocessed data and labels it with real credit tags. The enhanced feature matrix and its corresponding tag vector are divided into training set, validation set and test set. The Cartesian product is used to divide the user samples into sensitive attribute groups to form a sensitive attribute set. Each sample corresponds to a unique sensitive attribute value. The training set and sensitive attribute set are sent to the objective function construction module, the validation set is sent to the probability calibration and risk level output module, and the test set is sent to the interpretability output module. The objective function construction module constructs a decision tree model for risk assessment of financial electronic application products based on the XGBoost algorithm. On the basis of the original standard structure regularization term, it adds cost-sensitive Focal loss, group fairness regularization term and class balance adaptive regularization term as a composite objective function. The decision tree model and composite objective function are sent to the objective function simplification module. The objective function simplification module performs a second-order Taylor expansion approximation on the cost-sensitive Focal loss and ignores the constant term in the composite objective function, constructing a simplified objective function which is then sent to the ADMM solution module. The ADMM solver module rewrites the simplified objective function into the standard ADMM form, decomposes it into two coupled subproblems, and optimizes each variable alternately through the three-step ADMM iteration until the convergence condition is met. The trained decision tree model is then output and sent to the convergence and complexity analysis module, the probability calibration and risk level output module, and the interpretability output module. The convergence and complexity analysis module analyzes the convergence, time complexity, and space complexity of the trained decision tree model. The probability calibration and risk level output module performs PlattScaling probability calibration on the predicted output of the trained decision tree model and converts it into a binary classification decision. It adaptively determines the optimal decision threshold on the validation set and classifies users into four risk levels: low risk, medium risk, high risk, and extremely high risk. The interpretability output module uses the SHAP method to calculate the marginal contribution of each feature component in the enhanced feature matrix to the default probability of a single user on the test set for the trained decision tree model, and generates a risk interpretation report for financial electronic application products.