Credit risk assessment method and device based on longitudinal federated learning
Through a vertical federated learning method, encrypted identity alignment and feature screening of mobile phone data and credit data, training a credit risk assessment model, solving the problem of low data privacy and security, and achieving efficient credit risk assessment.
Patent Information
- Application Number
- CN202411880495.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-03-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art does not take into account the privacy and security attributes of mobile phone data and credit party data, and directly uses these data for local processing at the same time, resulting in a reduction in data security.
Using a credit risk assessment method based on vertical federated learning, we use encrypted identity alignment and screened credit characteristics and communication characteristics, and train multiple initial evaluation models of different model architectures based on vertical federated learning, obtain multiple target evaluation models, and calculate the model indicators of each target evaluation model, and select the credit risk evaluation model.
Establish a credit risk assessment model on the premise of ensuring privacy and security, and realize the advance screening and risk division of credit white users through mobile phone data, improving data security and evaluation accuracy.
Smart Images

Figure CN119648393A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of credit risk assessment, and in particular to a credit risk assessment method and device based on vertical federated learning. Background Art
[0002] In today's digital economy, financial transactions, credit business, e-commerce and many other fields involving resource sharing and interaction are booming. Various institutions, such as banks, Internet financial platforms, consumer credit companies, etc., are faced with the key issue of how to accurately assess user credit risks in the course of conducting business.
[0003] Traditional credit risk assessment mainly relies on limited structured data, such as basic identity information of users, repayment status in bank credit records, and some asset and liability data. These data sources are relatively single and it is difficult to fully and accurately reflect the credit status of users. Due to the high penetration rate of mobile phones and the characteristics of automatic recording that is not easy to tamper with, mobile phone data is increasingly becoming an important supplement for online credit institutions to assess credit risk.
[0004] However, in the past use of mobile phone data, the privacy and security attributes of mobile phone data and credit party data were not taken into consideration. Usually, mobile phone data and credit party data were directly used for local processing at the same time, resulting in reduced data security. Summary of the invention
[0005] The present invention provides a credit risk assessment method and device based on vertical federated learning, which solves the technical problem that the prior art does not take into account the privacy and security attributes of mobile phone data and credit party data, and usually directly uses mobile phone data and credit party data for local processing at the same time, resulting in reduced data security.
[0006] The present invention provides a credit risk assessment method based on vertical federated learning, which is applied to a credit node, wherein the credit node is in communication connection with an operator node, the operator node collects mobile phone data, and the credit node collects credit data. The method comprises:
[0007] In response to the modeling request, aligning the credit data and the mobile phone data by encrypted identity, and screening credit features and communication features;
[0008] Using the credit features and the communication features, multiple initial evaluation models of different model architectures are trained based on longitudinal federated learning to obtain multiple target evaluation models;
[0009] Calculating the model index of each target assessment model, and selecting a credit risk assessment model from the plurality of target assessment models according to the model index;
[0010] When the mobile phone data to be evaluated is received, the corresponding user credit risk is determined according to the mobile phone data to be evaluated by the credit risk evaluation model.
[0011] Optionally, in response to the modeling request, performing encrypted identity alignment on the credit data and the mobile phone data, and screening credit features and communication features, includes:
[0012] In response to the modeling request, a first hash value corresponding to the user identity information to which the credit data belongs is calculated and sent to the operator node;
[0013] When receiving the second hash value sent by the operator node, matching the first hash value and the second hash value, and aligning the credit data and the mobile phone data according to the matching result; the second hash value is calculated by the operator node according to the user identity information to which the mobile phone data belongs;
[0014] Calculating the information value weights of the credit data and the mobile phone data;
[0015] Selecting the credit data whose information value weight is greater than a preset weight threshold as the credit feature;
[0016] The mobile phone data whose information value weight is greater than a preset weight threshold is selected as a communication feature through the operator node.
[0017] Optionally, before calculating the information value weight between the credit data and the mobile phone data, the method further includes:
[0018] Calculate the credit difference between each of the credit data and the average of the credit data, encrypt it into an encrypted credit difference and send it to the operator node;
[0019] Calculate the communication difference and standard deviation of each of the mobile phone data and the mean of the mobile phone data through the operator node;
[0020] Calculating, by the operator node, a cumulative sum of the multiplications of each of the communication differences and the encrypted credit difference according to the identity identifier corresponding to the encrypted credit difference;
[0021] Encrypting the standard deviation through the operator node to obtain the encrypted standard deviation and accumulating it with the multiplication value and sending it to the credit node;
[0022] Decrypting the product value cumulative sum and the encrypted standard deviation respectively to obtain a decrypted cumulative sum and a decrypted standard deviation;
[0023] Calculate the credit standard deviation between each of the credit data and the credit data mean, combine the decrypted standard deviation and the decrypted cumulative sum, and determine the correlation coefficient between the credit data and the mobile phone data through a correlation coefficient calculation formula;
[0024] If the correlation coefficient exceeds a preset correlation threshold, the associated credit data or mobile phone data is retained;
[0025] If the correlation coefficient does not exceed the preset correlation threshold, the associated credit data and mobile phone data are retained.
[0026] Optionally, the calculating the information value weights of the credit data and the mobile phone data includes:
[0027] Performing equal-frequency binning on each of the credit data, calculating and accumulating the information value weight corresponding to each of the credit data in each bin, and obtaining the first information value weight corresponding to each of the credit data;
[0028] Encrypting the default label corresponding to each of the credit data, obtaining the encrypted default label and sending it to the operator node;
[0029] The mobile phone data is binned by the operator node, and the homomorphic summation is performed according to the identity identifier of the encrypted default tag to obtain the characteristics and values corresponding to each bin and send them to the credit node;
[0030] The second information value weight corresponding to the mobile phone data is calculated according to the characteristics and values.
[0031] Optionally, the credit feature and the communication feature are used to train multiple initial evaluation models of different model architectures based on longitudinal federated learning to obtain multiple target evaluation models, including:
[0032] The operator node uses the communication feature to train multiple initial evaluation models of different model architectures, obtains first model parameters, calculates first encrypted variables and sends them to the credit node;
[0033] Using the credit feature to train multiple initial evaluation models of different model architectures, obtain second model parameters and calculate second encrypted variables and send them to the operator node;
[0034] Calculate the encryption loss function value and the first encrypted data gradient according to the first encrypted variable and the second encrypted variable, calculate the encryption intermediate parameter and send it to the operator node;
[0035] Calculate the second encrypted data gradient according to the encrypted intermediate parameter through the operator node and send it to the credit node;
[0036] According to the encrypted loss function value, the first encrypted data gradient and the second encrypted data gradient, the first model parameters and the second model parameters are updated to obtain multiple target evaluation models.
[0037] Optionally, updating the first model parameter and the second model parameter according to the encrypted loss function value, the first encrypted data gradient, and the second encrypted data gradient to obtain multiple target evaluation models includes:
[0038] Decrypting the encrypted loss function value, the first encrypted data gradient, and the second encrypted data gradient to obtain a loss function value, a first data gradient, and a second data gradient;
[0039] If the loss function value is not less than a preset loss threshold, sending the second data gradient to the operator node;
[0040] Update the second model parameters according to the first data gradient;
[0041] updating the first model parameter according to the second data gradient by the operator node;
[0042] Jump to execute the step of training multiple initial evaluation models of different model architectures through the operator node using the communication characteristics, obtaining the first model parameter and calculating the first encrypted variable and sending it to the credit node, until the loss function value is less than the preset loss threshold, and obtaining multiple target evaluation models.
[0043] Optionally, the calculating of the model index of each target assessment model and selecting a credit risk assessment model from the plurality of target assessment models according to the model index comprises:
[0044] Using test data to input into each of the target evaluation models respectively to obtain test evaluation results;
[0045] Calculate the model effect evaluation index according to the test evaluation result and the real evaluation result corresponding to the test data;
[0046] Perform confusion matrix classification on the test data according to the test evaluation results, and calculate the model pre-prediction value and the model post-prediction value;
[0047] Determining a model value evaluation index according to the model prediction value and the model prediction value;
[0048] Perform weighted accumulation according to the model effect evaluation index and the model value evaluation index to obtain the model index corresponding to each of the target evaluation models;
[0049] The target assessment model to which the maximum value of the model indicator belongs is selected and determined as the credit risk assessment model.
[0050] Optionally, when receiving the mobile phone data to be evaluated, determining the corresponding user credit risk according to the mobile phone data to be evaluated by using the credit risk evaluation model includes:
[0051] When receiving the mobile phone data to be evaluated, inputting the mobile phone data to be evaluated into the credit risk evaluation model;
[0052] Calculating the probability of default according to the mobile phone data to be evaluated by using the credit risk assessment model;
[0053] Multiple risk intervals are matched according to the default probability, and the corresponding user credit risk is determined according to the matching results.
[0054] Optionally, after calculating the model indicators of each target assessment model and selecting a credit risk assessment model from the plurality of target assessment models according to the model indicators, the method further comprises:
[0055] Selecting each of the credit features and / or each of the mobile phone features one by one, and combining with the credit risk assessment model, determining the feature contribution corresponding to each of the credit features and each of the mobile phone features;
[0056] The credit characteristics and mobile phone characteristics whose contribution does not exceed the preset contribution threshold are screened out.
[0057] Optionally, the method further comprises:
[0058] Selecting model coefficients corresponding to each of the credit characteristics and each of the mobile phone characteristics from the credit risk assessment model;
[0059] Draw a first interpretable bar graph according to each of the model coefficients;
[0060] Calculating the feature importance score of each of the credit features and each of the mobile phone features to measure the contribution to the output of the credit risk assessment model;
[0061] Draw a second interpretable bar chart according to the importance scores of each feature;
[0062] According to the overlap of features in the first interpretability bar chart and the second interpretability bar chart, new credit features and mobile phone features are selected.
[0063] Optionally, the method further comprises:
[0064] In response to the data description request, data description is performed on the credit characteristics and the mobile phone characteristics to generate corresponding data description results.
[0065] The present invention also provides a credit risk assessment device based on vertical federated learning, which is applied to a credit node, wherein the credit node is in communication connection with an operator node, the operator node collects mobile phone data, and the credit node collects credit data. The device comprises:
[0066] A feature alignment and screening module, for performing encrypted identity alignment on the credit data and the mobile phone data in response to a modeling request, and screening credit features and communication features;
[0067] A model training module, for using the credit features and the communication features to train multiple initial evaluation models of different model architectures based on longitudinal federated learning to obtain multiple target evaluation models;
[0068] A model screening module, used to calculate the model index of each target assessment model, and select a credit risk assessment model from the multiple target assessment models according to the model index;
[0069] The risk assessment module is used to determine the corresponding user credit risk according to the mobile phone data to be assessed through the credit risk assessment model when receiving the mobile phone data to be assessed.
[0070] It can be seen from the above technical solutions that the present invention has the following advantages:
[0071] The present invention responds to modeling requests through credit nodes, encrypts and aligns credit data and mobile phone data, and screens credit features and communication features; uses credit features and communication features to train multiple initial evaluation models of different model architectures based on longitudinal federated learning to obtain multiple target evaluation models; calculates model indicators of each target evaluation model, and selects a credit risk evaluation model from multiple target evaluation models according to the model indicators; when receiving mobile phone data to be evaluated, the credit risk of the corresponding user is determined according to the mobile phone data to be evaluated through the credit risk evaluation model. In this way, a credit risk evaluation model can be established under the premise of ensuring privacy and security, and early screening and risk classification of credit-free households can be achieved through mobile phone data. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0073] Figure 1 A flowchart of a credit risk assessment method based on vertical federated learning provided by an embodiment of the present invention;
[0074] Figure 2 A correlation heat map provided by an embodiment of the present invention;
[0075] Figure 3 A schematic diagram of a confusion matrix provided by an embodiment of the present invention;
[0076] Figure 4 A schematic diagram of the ROC curve corresponding to the model provided in the embodiment of the present invention;
[0077] Figure 5 A schematic diagram of a KS image when different thresholds are selected in a federated logistic regression for the model provided in an embodiment of the present invention;
[0078] Figure 6 A schematic diagram of user credit risk provided by an embodiment of the present invention;
[0079] Figure 7 A frequency distribution diagram of a customer's predicted credit score provided by an embodiment of the present invention;
[0080] Figure 8 A bar chart of default impact indicators provided by an embodiment of the present invention;
[0081] Fig. 9 A schematic diagram of measuring the contribution of a feature to the probability of default provided by an embodiment of the present invention;
[0082] Fig.10 A schematic diagram of the overall impact of variables on prediction results provided by an embodiment of the present invention;
[0083] Fig.11 A structural block diagram of a credit risk assessment device based on vertical federated learning provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0084] The embodiment of the present invention provides a credit risk assessment method and device based on vertical federated learning, which is used to solve the technical problem that the prior art does not take into account the privacy and security attributes of mobile phone data and credit party data, and usually directly uses mobile phone data and credit party data for local processing at the same time, resulting in reduced data security. It is possible to establish a credit risk assessment model under the premise of ensuring privacy and security, and to achieve early screening and risk division of credit white households through mobile phone data. Specifically, first, before modeling, federated feature engineering based on encryption algorithms is performed. Mobile phone data involves hundreds of variables, and it is necessary to use encryption algorithms to perform federal correlation analysis, federal binning, and federal IV value calculation under the condition of privacy protection to achieve analysis and screening of data features before modeling. Secondly, in modeling, a credit risk assessment model based on vertical federated learning is constructed: integrating mobile phone data and credit data, taking logistic regression as the basic model, constructing a local model that only uses credit party data, a global model that uses all data, and a federated learning model that uses all data and federated logistic regression, and comparing the model effects. Finally, after modeling, the economic value of the model and the interpretability of indicators were analyzed, and indicators that reflect the economic value of the model and the predictive effect were constructed to evaluate the economic value of the model contribution and benefits brought by the introduction of different types of data. At the same time, the model was subjected to logistic regression model-related and SHAP value-based model-independent interpretability analysis to find the key mobile phone variables that affect credit defaults.
[0085] Federated learning is a distributed machine learning technology that aims to train models while protecting user data privacy. Unlike traditional centralized machine learning methods, in federated learning, the data for model training remains on the respective data sources (such as the company's server) instead of uploading all data to a centralized server. In this way, federated learning is able to jointly train a shared machine learning model using data sets from multiple participants without exposing the original data. This approach is particularly suitable for scenarios involving sensitive information, such as healthcare, financial services, and other fields. Vertical federated learning is a specific form of federated learning, which is mainly applied to collaborative learning between two or more datasets with different feature spaces but the same individuals. In other words, these datasets contain different attributes or feature information of the same group of individuals. For example, a bank may have the financial records of its customers, while a telecom operator may have the communication behavior data of these customers. In this case, the two parties can jointly train models through vertical federated learning to more comprehensively analyze customer behavior without having to directly exchange their sensitive data. The key to vertical federated learning is how to effectively handle the feature differences between different data sources and ensure data security and personal privacy throughout the learning process.
[0086] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below 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.
[0087] See also Figure 1 , Figure 1 A flowchart of the steps of a credit risk assessment method based on vertical federated learning provided in an embodiment of the present invention.
[0088] The present invention provides a credit risk assessment method based on vertical federated learning, which is applied to a credit node, the credit node is connected to an operator node for communication, the operator node collects mobile phone data, and the credit node collects credit data. The method includes:
[0089] Step 101, in response to a modeling request, encrypting and aligning credit data and mobile phone data, and screening credit features and communication features;
[0090] In this embodiment, after obtaining the user's authorization for credit data and mobile phone data, the credit data and mobile phone data inside are collected through the credit node and the operator node respectively, and the credit node and the operator node are established to provide the hardware basis for subsequent data interaction. After completing the respective data collection, since the credit risk assessment model is mainly deployed on the credit node, the credit node can respond to the modeling request input by the external user or the upstream client, and encrypt the credit data and mobile phone data of the credit node and the operator node to align the identity to determine the user with a common identity. Then, the credit features are screened from the credit data through federal feature engineering, and the communication features are screened from the mobile phone data.
[0091] It should be noted that credit data may include but is not limited to the borrower's age, loan amount, gender, default, and the borrower's permanent city, etc. Mobile phone data may include but is not limited to data in the following dimensions: basic mobile phone feature variables, telecommunications variables, financial variables, social capital variables, entertainment variables, and mobility variables.
[0092] In an example of the present invention, step 101 may include the following sub-steps S11-S15:
[0093] S11. In response to the modeling request, a first hash value corresponding to the user identity information to which the credit data belongs is calculated and sent to the operator node;
[0094] S12, when receiving the second hash value sent by the operator node, matching the first hash value and the second hash value, and aligning the credit data and the mobile phone data according to the matching result; the second hash value is calculated by the operator node according to the user identity information to which the mobile phone data belongs;
[0095] In this embodiment, the user identity information can be data that represents the user's identity, such as the user's mobile phone number or ID card ID. In order to take into account both data privacy protection and accurate matching and verification, the credit node and the operator node can agree in advance and use the same hash algorithm, such as MD5, SHA-256, etc. After calculating the corresponding hash values, they can compare each other to find a matching hash value pair, which means that the corresponding relevant data samples of the same customer have been found, that is, the credit data and mobile phone data belonging to the same user identity information, and the encrypted identity alignment of the credit data and mobile phone data has been completed.
[0096] For example, the creditor takes the customer's mobile phone number and the hash value of the ID card, and the communication operator also takes the customer's mobile phone number and the hash value of the ID card to align the encrypted samples.
[0097] S13. Calculate the information value weight of credit data and mobile phone data;
[0098] In this embodiment, since the amount and types of credit data and mobile phone data are large, and the default prediction capabilities of each type of data are different, in order to improve the training efficiency of subsequent models, it is necessary to calculate the information value weights of the credit data and mobile phone data to screen out some credit features and mobile phone features that exceed the weight threshold.
[0099] In an example of the present invention, S13 may include the following sub-steps:
[0100] Bin each credit data with equal frequency, calculate and accumulate the information value weight corresponding to each credit data in each bin, and obtain the first information value weight corresponding to each credit data;
[0101] Encrypt the default label corresponding to each credit data, obtain the encrypted default label and send it to the operator node;
[0102] The mobile phone data is binned by the operator node, and the homomorphic summation is performed according to the identity of the encrypted default label to obtain the corresponding features and values of each bin and send them to the credit node;
[0103] The second information value weight corresponding to the mobile phone data is calculated according to the characteristics and values.
[0104] In order to describe the strength of the relationship between each variable and default, the weight of evidence (WOE) and information value weight (IV) are used to measure this strength relationship. The specific information value weight calculation formula is as follows:
[0105]
[0106]
[0107]
[0108] in, is the weight of evidence for box t, which indicates the ability of the feature to distinguish the target variable (good and bad customer classification); is the number of defaulting customers in box t; is the number of customers who repay normally in box t. is the number of defaulting customers in the entire time period T; is the number of customers who repay normally during the entire time period T; is the information value weight corresponding to box t, and m is the number of boxes.
[0109] In this embodiment, for each type of credit data, the credit data is arranged in ascending order and classified, and 5 bins based on equal frequency are used for segmentation, that is, m=5. Calculate the number of 'good' ( ) and 'bad' ( ) individuals. According to the 'good' ( ) and 'bad' ( ) The total number of individuals in each bin is calculated . Calculate each bin . Calculate the IV value of this type of credit data. As for the mobile phone data of the operator node, due to its privacy protection attribute, the default label corresponding to each credit data can be encrypted, and the encrypted default label can be obtained and sent to the operator node; the mobile phone data is feature-binned through the operator node, and the identity identifier to which the encrypted default label belongs is added homomorphically to obtain the characteristics and values corresponding to each box and sent to the credit node; the second information value weight corresponding to the mobile phone data is calculated according to the characteristics and values. Specifically, the operator node is party A and the credit node is party B, and the calculation is performed in the following way:
[0110] 1) Creditor B has both the feature and the default label (y), so it needs to provide the encrypted value of whether it is a default to data party A. For each sample ID, party B uses the Paillier encryption method to encrypt and , thus obtaining and , together with the plaintext ID, is transmitted to A.
[0111] 2) After receiving the ID and ciphertext label value of Party B, Party A performs homomorphic addition summation on the ciphertext label value corresponding to the ID in each bin according to the local feature binning method to obtain the as well as , and then pass it to Party B together with the bins corresponding to each ID.
[0112] 3) After obtaining the sum of the bins from Party A, Party B decrypts and obtains and , and Represents the total number of positive samples in the tth bin And the total number of negative samples ,. Party B only needs to calculate the local and , which can be calculated in turn according to the above information value weight calculation formula , and .
[0113] During the entire data interaction process, since Party A only obtains Party B's encrypted label value and Party B obtains the sum of Party A's binned eigenvalues, it is impossible to infer the specific size of each eigenvalue of Party A. Therefore, privacy and security protection is achieved in the calculation of WOE and IV.
[0114] S14, selecting credit data whose information value weight is greater than a preset weight threshold as credit features;
[0115] S15. Select mobile phone data whose information value weight is greater than a preset weight threshold as a communication feature through the operator node.
[0116] In this embodiment, after calculating the information value weight corresponding to each type of credit data, the credit node selects the credit data with a weight greater than a preset weight threshold as the credit feature. Similarly, the operator node selects the mobile phone data with an information value weight greater than the preset weight threshold as the communication feature.
[0117] In order to further reduce the number of feature processing and reduce resource consumption, before executing step S13, step 101 may also include the following sub-steps:
[0118] Calculate the credit difference between each credit data and the average of the credit data, encrypt it into an encrypted credit difference and send it to the operator node;
[0119] Calculate the communication difference and standard deviation of each mobile phone data and the mean of mobile phone data through the operator node;
[0120] The operator node calculates the cumulative sum of the multiplication of each communication difference and the encrypted credit difference according to the identity corresponding to the encrypted credit difference;
[0121] The standard deviation is encrypted through the operator node, the encrypted standard deviation is obtained, and the encrypted standard deviation is added to the multiplication value and sent to the credit node;
[0122] Decrypt the accumulated sum of the multiplied values and the encrypted standard deviation respectively to obtain a decrypted accumulated sum and a decrypted standard deviation;
[0123] Calculate the credit standard deviation between each credit data and the credit data mean, combine the decrypted standard deviation and the decrypted cumulative sum, and determine the correlation coefficient between the credit data and the mobile phone data through the correlation coefficient calculation formula;
[0124] If the correlation coefficient exceeds a preset correlation threshold, the associated credit data or mobile phone data is retained;
[0125] If the correlation coefficient does not exceed the preset correlation threshold, the associated credit data and mobile phone data are retained.
[0126] In this embodiment, since the information value weight is to analyze and screen each credit data and mobile phone data, when there are many types of credit data and mobile phone data, the calculation time is too long. At this time, the credit data and mobile phone data can be first analyzed for correlation to filter out some data and reduce the subsequent calculation pressure. Specifically, the correlation between the two types of credit data can be calculated by the following correlation calculation formula :
[0127]
[0128] in, is the i-th observation value of the first type of data, is the i-th observation value of the second type of data, is the mean of the first type of data, is the mean of the second type of data, and n is the total number of this type of data.
[0129] The denominator is the standard deviation of the two data, and the numerator is the covariance of the two data. In the scenario of vertical federated learning, mobile phone data is stored in communication operators, and credit data is stored in credit institutions. The correlation analysis between mobile phone data indicators does not require the use of credit data, and can be obtained directly by internal calculation. The correlation analysis between credit data indicators can also be calculated by itself. However, due to privacy protection restrictions, the correlation between mobile phone data indicators and credit data indicators cannot be calculated directly, and a federated correlation analysis under an encryption algorithm is required. The homomorphic encryption method is used to complete the parameter transfer between the participants. This method allows any party to use a public key to encrypt its data, while the private key used for decryption is owned by itself. Additive homomorphic encryption can calculate the addition of two encrypted numbers, and can also calculate the product of an unencrypted number and an encrypted number. As an encryption operation, it is expressed as , . Let participant A be the communication operator that owns the mobile phone data, and participant B be the creditor that owns the credit data. Calculate the mobile phone data index and credit data indicators The correlation between them can be calculated using the following steps:
[0130] 1) Party B calculation , and encrypt it with the public key as , together with the plaintext ID, is transmitted to Party A.
[0131] 2) Party A uses Party B’s ID and calculate , while calculating its own indicators Standard Deviation , and encrypt it with the public key as , together with Transmitted to Party B together.
[0132] 3) Party B decrypts the data transmitted by Party A according to the homomorphic encryption rules , so decrypting it with its own private key can get ,right Decrypt it to get , while Party B calculates Standard Deviation , put it into formula 1 to get the correlation between the two indicators.
[0133] Through the above steps, Party A obtains the encrypted feature value of Party B ( ), and Party B can calculate the encrypted Therefore, the correlation coefficient is calculated under the premise that both parties A and B guarantee the privacy and security of their own data. The correlation between variables is tested, and a correlation heat map is drawn based on the correlation results, as shown in Figure 2 As shown. The results show that the correlation between most variables is below 0.4, which means that the variables are relatively independent and can provide independent information. Among all variables, variables reflecting the same type of indicators are usually highly correlated, such as the strong correlation between the number of incoming and outgoing calls, which reflects the customer's communication pattern and social network. The monthly phone charges and monthly out-of-package consumption are highly correlated, which shows the continuity and consistency of customers' mobile phone consumption habits. The number of uses, clicks, traffic, and days of use of the same type of APP are highly correlated, which reflects the customer's usage habits from the dimensions of the diversity of APP types, frequency of use, and duration of use.
[0134] It should be noted that before screening credit characteristics and communication characteristics, credit data and mobile phone data can also be standardized and normalized.
[0135] Step 102, using the credit features and the communication features, training multiple initial evaluation models of different model architectures based on vertical federated learning to obtain multiple target evaluation models;
[0136] In this embodiment, the initial evaluation model is a longitudinal federated model constructed based on different machine learning models, and specifically can be a federated logistic regression model. The initial evaluation models under different model architectures are trained by longitudinal federated learning to obtain target evaluation models of different model architectures.
[0137] It should be noted that during the training process, parameters are adjusted in the same way for each initial evaluation model.
[0138] In an example of the present invention, step 102 may include the following sub-steps S21-S25:
[0139] S21. Using the operator node to train multiple initial evaluation models of different model architectures using communication features, obtain first model parameters, calculate first encrypted variables, and send them to the credit node;
[0140] S22. Use credit features to train multiple initial evaluation models of different model architectures, obtain second model parameters, calculate second encrypted variables, and send them to the operator node;
[0141] In this embodiment, a vertical federated learning model is constructed through federated logistic regression. Since the log operation involved in logistic regression cannot be implemented through encryption, it is necessary to perform Taylor expansion on the loss function so that it can perform additive homomorphic encryption operations. In the binary classification problem, the value of the log function is between 0 and 1, so the log function can be approximated as a second-order Taylor expansion, as shown below:
[0142]
[0143] For the logistic regression model, z as an intermediate variable can be replaced by ,in Indicates whether there is a breach of contract. is the vector representation of the model parameters, for The transposed matrix of is the i-th eigenvector (i.e., credit feature or communication feature), e is a natural constant, is the sample set (i.e., all credit features or communication features). Therefore, the loss function of logistic regression is It can be expressed by the following formula:
[0144]
[0145]
[0146] After calculating the loss function, make it Derivation, you can calculate the corresponding gradient , as shown in the following formula:
[0147]
[0148] Then use the gradient descent method to optimize the parameters and finally converge them:
[0149]
[0150] in, is the learning rate, which determines the step size of each parameter update during the gradient descent process; is the vector representation of the current model parameters, i.e., the k-th model parameters; is the vector representation of the k+1th model parameters.
[0151] S23, calculating the encryption loss function value and the first encrypted data gradient according to the first encryption variable and the second encryption variable, calculating the encryption intermediate parameter and sending it to the operator node;
[0152] In the federated model, three participants are required. Participant A is the data party that provides more data dimensions ( ), Party B is the creditor with default data ( ), participant C is a trusted intermediary (usually also participant A / B). The parameter transfer between the participants is completed through homomorphic encryption. For data party A, record , ,remember . Therefore, the encryption loss function value for:
[0153]
[0154] Encrypted Data Gradients The calculation formula is expressed as:
[0155]
[0156] in, is the first encrypted variable, is the second encrypted variable, is the encryption intermediate parameter, d is the intermediate parameter, is the second encrypted data gradient, is the first encrypted data gradient.
[0157] S24, calculating the second encrypted data gradient according to the encryption intermediate parameter through the operator node and sending it to the credit node;
[0158] S25. Update the first model parameter and the second model parameter according to the encrypted loss function value, the first encrypted data gradient and the second encrypted data gradient to obtain multiple target evaluation models.
[0159] In an example of the present invention, S25 may include the following sub-steps:
[0160] Decrypting the encrypted loss function value, the first encrypted data gradient, and the second encrypted data gradient to obtain the loss function value, the first data gradient, and the second data gradient;
[0161] If the loss function value is not less than the preset loss threshold, sending the second data gradient to the operator node;
[0162] Update the second model parameters according to the first data gradient;
[0163] Updating the first model parameters according to the second data gradient through the operator node;
[0164] Jump to execute the step of training multiple initial evaluation models of different model architectures through operator nodes using communication characteristics, obtaining first model parameters and calculating first encrypted variables and sending them to the credit node until the loss function value is less than a preset loss threshold, and obtaining multiple target evaluation models.
[0165] In this embodiment, after the encrypted loss function and gradient calculation formula of each participant are obtained, they can be encrypted and transmitted between the participants, so as to jointly train a federated logistic regression model under the premise of ensuring data privacy. The specific process is as follows:
[0166] 1) Model initialization: Participant C generates a public key and a private key, and sends the public key to data party A and credit party B. Data party A and credit party B generate initial parameters. and .
[0167] 2) Local calculation by Party A: Data Party A calculates the data based on its own parameters. Calculate the encrypted and , and send it to credit party B.
[0168] 3) Party B calculates the credit locally Party B calculates its own and , and encrypt it to get and , according to the sent and Encrypted by formula Functions and , and the encrypted Send to data party A, the encrypted Sent to intermediary C.
[0169] 4) Gradient calculation: Data Cube A is based on Calculate the gradient of the corresponding data , and send it to the middle party C, and the credit party B also calculates the gradient of the corresponding data , and send it to the middle party C.
[0170] 5) Party C decrypts: The middle party C uses its own private key to and To decrypt, the decrypted and The middleman uses the private key to verify the data sent by the creditor B. Decrypt the value and determine the loss function value Whether the minimum value is reached. If the loss function value becomes larger than that of the previous iteration, the iteration is stopped.
[0171] 6) Parameter update: Data party A and data party B update the decrypted and Update its own parameters and , if it is determined whether to stop the iteration according to step 5, if the iteration is not stopped, return to step 2).
[0172] Among the three parties mentioned above, only encrypted intermediate parameters are transmitted between data party A, credit party B and intermediary party C. No party knows what the data of other participants looks like, thus ensuring the privacy and security of the data. The trained logistic regression model integrates all data dimensions of the data party and the credit party, making the data available but invisible.
[0173] Step 103, calculating the model index of each target assessment model, and selecting a credit risk assessment model from multiple target assessment models according to the model index;
[0174] Model indicators are used to evaluate the performance of the target evaluation model, which may include but are not limited to prediction effect evaluation indicators and model value evaluation indicators, so as to simultaneously evaluate the prediction effect of the model and the economic value brought by the model.
[0175] In this embodiment, since the user to whom the credit node belongs may be a bank or other service end with normal official authorization to provide lending services, while considering the prediction effect of the model, it is also necessary to consider whether the use of the model has economic value such as reducing costs or increasing profits for users in combination with actual conditions. To this end, after training the target evaluation models with different model architectures, the model indicators of each target evaluation model are calculated respectively, and then according to each model indicator, a credit risk evaluation model that meets both the prediction effect evaluation indicator and the model value evaluation indicator is selected from multiple target evaluation models.
[0176] In an example of the present invention, step 103 may include the following sub-steps:
[0177] The test data is input into each target evaluation model to obtain the test evaluation results;
[0178] Calculate the model effect evaluation index according to the test evaluation results and the actual evaluation results corresponding to the test data;
[0179] According to the test evaluation results, the test data is classified into confusion matrix, and the model prediction value before and after prediction value are calculated;
[0180] Determine the model value evaluation index based on the model prediction value and the model prediction value;
[0181] According to the model effect evaluation index and the model value evaluation index, weighted accumulation is performed to obtain the model index corresponding to each target evaluation model;
[0182] The target assessment model to which the maximum value of the model indicator belongs is selected and determined as the credit risk assessment model.
[0183] Specifically, in the model effect evaluation indicators, the indicators used to evaluate models in classic machine learning can be calculated, including accuracy, F1-score, AUC value and KS value. By dividing the samples containing the credit party data into training set and test set in a ratio of 2:1. The 3-fold cross-validation method is used to train the model using logistic regression on the training set, and the performance of the model is evaluated on the test set. Whether it is a traditional logistic regression model or a federal logistic regression model, it can predict the probability of default for each sample in the test set. This is a value between 0-1. By selecting different thresholds, different results of predicting whether there is a default can be generated. According to the prediction of whether there is a default, compared with the actual default situation, a 2*2 confusion matrix can be obtained, such as Figure 3 As shown in the matrix, True Positives (TP) are the number of correctly predicted good samples. True Negatives (TN) are the number of correctly predicted bad samples. False Positives (FP) are the number of good samples misclassified, and False Negatives (FN) are the number of bad samples misclassified.
[0184] In addition, it can also be calculated by the following formula:
[0185]
[0186]
[0187]
[0188]
[0189]
[0190]
[0191] Accuracy is an assessment of overall predictability, and other metrics are used to assess regional impact. The harmonic mean of precision and recall is the f-score. Different thresholds can be set to obtain different true positive rates and false positive rates. A curve, the ROC curve, can be obtained by crossing all thresholds and is based on the true positive rate and false positive rate on the coordinate axis. The AUC score below the ROC curve can also be used to assess the impact of the model.
[0192] In credit risk assessment, the KS (Kolmogorov-Smirnov) indicator is an important statistic used to evaluate the distinguishing ability and predictive effect of the model. The KS indicator comes from the Kolmogorov-Smirnov test in statistics, which is used to measure the maximum vertical distance between two cumulative distribution functions. In the credit scoring model, this indicator is used to compare the difference in score distribution between defaulters and non-defaulters. Specifically, based on the trained logistic regression model, a credit score of default probability can be obtained for each sample in the test set. These customers can be divided into two groups: one group is customers who actually defaulted (marked as 1), and the other group is customers who did not default (marked as 0). Next, the credit scores of the two groups of customers are sorted, and the cumulative percentage of defaulting customers and non-defaulting customers at each score point is calculated. The KS indicator is defined as the maximum absolute value of the difference between the two. It can be expressed by the following formula:
[0193]
[0194] in, is the cumulative distribution function of default customers, is the cumulative distribution function of non-defaulting customers, Represents different levels of credit scores. A higher KS value means that the model can better distinguish defaulters from non-defaulters. It is generally believed that an effective credit scoring model should have a KS value greater than 20%.
[0195] As for the model value evaluation index, it can include economic added value (Value-added) and profit added value (Profit-added). After obtaining the test evaluation results, the test data is classified by confusion matrix according to the test evaluation results, and the value before model prediction and the value after model prediction are calculated. According to the value after model prediction and the value before model prediction, the model value evaluation index is determined. Specifically, the loan customers in the test set can be classified by confusion matrix, and the profit can be calculated according to the loan amount and interest rate of the loan customers to characterize the value before model prediction and the value after model prediction:
[0196]
[0197]
[0198] is the loan amount of the i-th loan customer, is the loan interest rate of the i-th loan customer, The pre-value for applying the model is calculated by deducting the principal loss due to default from the interest income of customers who repay normally. To calculate the post-prediction value of the model, credit institutions will not lend to customers who are predicted to default, so they only need to consider the profits brought by the actual normal customers among the customers predicted to be normal and the principal losses of the actual default customers.
[0199]
[0200] The profit added value of the model application can be calculated through the above formula, which can be divided into two parts, including the principal loss saved by correctly judging the defaulting customers and the money lost by incorrectly judging the normal customers.
[0201] As for the economic value added (Value-added), it is assumed that when the model prediction effect is the best, the maximum increase in profit that can be brought by rejecting all bad customers is ,make Compare this with the maximum profit to get the economic added value:
[0202]
[0203] As for the profit-added value, when the model is used for prediction, no loan is made to the customer who is predicted to default, so the actual loan amount is less than when the model is not used for prediction. The saved loan amount can still be used to make a profit. The profit-added value is calculated by the increase in the profit rate with and without the model:
[0204]
[0205] It should be noted that in actual calculations, if the interest rate of each loan contract provided by the credit party is missing, the average interest rate of the credit institution can be used for calculation.
[0206] After calculating the model effect evaluation index and the model value evaluation index, they can be weighted and accumulated according to the model effect evaluation index and the model value evaluation index to obtain the model indicators corresponding to each target evaluation model; the target evaluation model to which the maximum value of the model indicator belongs is selected as the credit risk assessment model.
[0207] In addition, in this embodiment, the modeling effects of the federal model, the local model, and the global model can be compared. The local model only contains the variables of the credit party, and the logistic regression model is used to train the model. The global model contains indicators including the credit party variables and mobile phone data, and also directly uses the logistic regression training model. At this time, the privacy attributes of the data are not considered, but all the data are put together to train the model. The federal model uses the same indicators as the global model, but the federal logistic regression model is used to consider the privacy attributes of the data. In the above steps, the IV of each indicator is analyzed, which can be used for indicator screening. It is generally believed that indicators with IV values less than 0.02 have no predictive ability and should be discarded. Therefore, on the basis of the global model and the federal model, IV>0.02 can be added to the indicator screening to check the model prediction effect after the screening indicators. The model parameters involved in each model are shown in Table 1 below:
[0208]
[0209] See also Figure 4 , Figure 4 The ROC curves for the above five types of models show that the local model performs poorly, while the federated model and the global model are significantly better than the local model. The federated model is slightly inferior to the global model, but the overall gap between the two is small, as evidenced by the AUC value, which shows that federated modeling can achieve almost the same effect as the global model under privacy protection conditions. After the index screening, the AUC values of the global model and the federated model both dropped slightly, and the AUC of the IV+global model was even smaller than that of the federated model without index screening, which shows that even if the IV is not high, introducing more data dimensions will still increase the accuracy of the prediction effect.
[0210] Please refer to Table 2 below, which shows the economic effect and prediction effect evaluation indicators of the model. It can also be found that the federal model and the global model are significantly higher than the local model, and the federal model is slightly inferior to the global model. By evaluating the economic value brought by the model, we can reasonably judge the contribution of mobile phone data in the entire model, which provides a theoretical basis for measuring the economic value of data and the distribution of revenue contribution brought by data. It is worth noting that for the economic value indicators of the model, the profit added value and economic added value obtained after IV screening are slightly higher than before the indicator screening, which shows that from the perspective of cost saving, selecting high-quality data indicators is more conducive to improving the economic value of the model.
[0211]
[0212] The logistic regression model can predict the probability of default based on the borrower, but how to select the threshold for judging good and bad customers is a difficult problem, which can be judged through the KS curve. Figure 5The KS graph for different thresholds in federated logistic regression shows two different types of curves: the green line represents the ratio of good customers, and the red line represents the ratio of bad customers. Both curves use the threshold as the horizontal axis, which is the probability or score output by the model. In this KS graph, you can see that the ratio of good customers to bad customers is constantly changing as the threshold changes. When the threshold is low, the model tends to classify more customers as good customers because the model is more willing to accept the risk of misjudgment; on the contrary, when the threshold is high, the model chooses to judge more conservatively, thereby reducing the number of misclassified good customers. At certain specific threshold points, the gap between the two curves reaches a maximum value, which is called the KS statistic. When the threshold is 0.495, the KS value is 0.642, which means that the model performs well in distinguishing good customers from bad customers.
[0213] Step 104: when the mobile phone data to be evaluated is received, the corresponding user credit risk is determined according to the mobile phone data to be evaluated by using the credit risk evaluation model.
[0214] In one example of the present invention, step 104 may include the following sub-steps:
[0215] When the mobile phone data to be evaluated is received, the mobile phone data to be evaluated is input into the credit risk evaluation model;
[0216] Calculate the default probability according to the mobile phone data to be evaluated through the credit risk assessment model;
[0217] Match multiple risk intervals according to the probability of default, and determine the corresponding user credit risk based on the matching results.
[0218] In the embodiment of the present invention, taking into account the privacy protection requirements of mobile phone data, the whole process of mobile phone credit scoring from feature engineering, model development, indicator evaluation to practical application is realized through the joint data modeling of the creditor and the communication operator. After receiving the mobile phone data to be evaluated, the corresponding default probability is calculated through the credit risk assessment model, and the default probability is matched to multiple risk intervals to determine the user's credit risk.
[0219] The Basel Accord defines five levels of default, namely normal, special mention, substandard, doubtful and loss. According to the default probability output by the federal logistic regression model, the credit risk level of the borrower can be divided into five categories: greater than 0.8 is high risk, between 0.6-0.8 is medium-high risk, between 0.4-0.6 is medium risk, between 0.2-0.4 is medium-low risk, and below 0.2 is low risk. In model training, all samples are divided into training set and test set at a ratio of 2:1. According to the model parameters obtained from the training set, the data on the test set is divided into credit scores and risk levels, and the default rate and number of borrowers at different risk levels are counted and plotted as follows: Figure 6 shown.
[0220] Depend on Figure 6 It can be seen that the lower the risk level, the lower the corresponding default rate. In the low risk level, the default rate is only 2%, while in the high risk level, the default rate is as high as 90%. Since the proportion of default in all samples is 1 / 2, the model's prediction can accurately predict the risk level of the borrower, and the number of people predicted for high risk and low risk is the largest, while the number of people predicted for medium-low risk, medium risk, and medium-high risk is relatively small.
[0221] In this embodiment, the trained model is used to make predictions on a wider dataset of credit-free households. The dataset with no loan records provided by the communication operator is used. After data processing and cleaning, the trained model can be used to predict its risk score. The following Tables 3 and 4 give the descriptive statistics of these credit-free households. Figure 7 The frequency distribution of the predicted credit scores of these customers is given, which shows obvious normal distribution characteristics. In model training, since the ratio of good customers to bad customers is 1:1, which is much higher than the ratio of bad sample customers in reality, the model attempts to balance the learning weights of the two types of samples to prevent the prediction results from being biased towards one category, so that the credit score obtained by the model training will be stricter. When this rigorously trained model is applied to new and more extensive credit-free households, it still maintains a high standard to assess default risk. Therefore, screening according to the credit score generated by the model may be more inclined to exclude those potential high-risk users, thereby providing a more conservative but safe basis for decision-making.
[0222]
[0223]
[0224] In another example of the present invention, after executing step 103, the method may further include the following steps:
[0225] Select each credit feature and / or each mobile phone feature one by one, and determine the feature contribution corresponding to each credit feature and each mobile phone feature in combination with the credit risk assessment model;
[0226] Screen out credit features and mobile phone features whose feature contribution does not exceed the preset contribution threshold.
[0227] In this embodiment, due to the different importance of different credit features and mobile phone features, their feature contributions to the prediction results are also different. Therefore, the feature contribution can be calculated in the following way. Specifically, it can be divided into two groups of data. In Group A, each model only adds one type of mobile variable to the baseline of the credit variable. Since there are seven types of variables, there are seven models (models 6 to 12). In Group B, 7 models were created, of which models 13 to 19 each contain 6 types of variables. Table 5 shows the variable settings of the two groups, and all models use the federal logistic regression model.
[0228]
[0229] Please refer to Table 6, which shows the AUC, Accuracy, F1-score, KS-score, Value-added, and Profit-added of all models. Most of the evaluation indicators have consistent effects. In Group A, the model performance ranking is as follows: Model 10> Model 7> Model 9> Model 8> Model 11≈ Model 12> Model 6, where the evaluations of Model 11 and Model 12 are very close. The ranking of Group B is Model 18≈Model 19≈Model 13>Model 15≈Model 16≈Model 14>Model 17, where the indicators of Model 18, Model 19, and Model 13 are very close, as are Model 14, Model 15, and Model 16. In order to further distinguish model performance and evaluate variable importance, AUC, Accuracy, Value-added, and Profit-added are selected for further calculations:
[0230]
[0231] In Group A, since the ratio of good and bad customers in the sample is 1:1, the accuracy and AUC values are 0.5 when no model is used, and profit-added and value-added are 0. Therefore, through Model 6, the improvement of the credit variable under AUC and accuracy can be obtained, which is 0.620-0.5=0.12 and 0.511-0.5=0.011, and the corresponding improvement of profit-added and value-added is itself. For Models 7-12, since a type of mobile phone variable is added on the basis of the credit variable, the corresponding indicator minus the indicator of Model 6 can get the contribution value of the variable type. In Group B, since Model 20 corresponds to the prediction effect under all variables, and Models 13-19 lack one type of variable respectively, the contribution value of the variable type can be obtained by subtracting the model indicators of Models 13-19 from the value of the corresponding indicator of Model 20.
[0232] Table 7 gives the importance and contribution of each type of variable calculated from the two sets of experiments. It can be found that the social capital variable is the most important, reaching 33.45%, followed by the basic mobile phone variable, which is 19.45%, followed by the financial variable, which is 15.86%, and then the telecommunications model variable, which is 10.64%. The remaining credit party variables, entertainment model variables, and mobile model variables are all relatively small, accounting for 7.36%, 6.38%, and 6.86% respectively, as follows:
[0233]
[0234] Optionally, the method further comprises the following steps:
[0235] Select model coefficients corresponding to each credit feature and each mobile phone feature from the credit risk assessment model;
[0236] Draw the first interpretability bar chart according to each model coefficient;
[0237] Calculate the feature importance score of each credit feature and each mobile phone feature to measure the contribution to the output of the credit risk assessment model;
[0238] Draw a second interpretability bar chart based on the importance score of each feature;
[0239] According to the overlap of features in the first explainable bar chart and the second explainable bar chart, new credit features and mobile phone features are selected.
[0240] In this embodiment, since the logistic regression model itself is interpretable, the coefficient of each indicator can be trained. Since the data needs to be standardized during data initialization, the dimensions between different data dimensions have been unified, so the coefficients of different indicators can be compared. The larger the absolute value of the coefficient, the greater its impact on the final default rate. The positive or negative value of the coefficient represents whether the variable has a positive or negative impact on the default. By selecting the 20 indicators with the greatest impact on default and plotting them into a bar chart, as shown in Figure 2, the coefficient of each indicator can be compared with each other. Figure 8 shown.
[0241] Although logistic regression itself provides good interpretability, in complex real-world scenarios, relying solely on the model's internal parameters may not be enough to fully reveal the specific causes of each case. For this reason, a model-independent method of SHAP value is used to perform a deeper cross-validation. SHAP value is based on the concept of Shapley value in game theory, which quantifies the extent to which each feature contributes to the prediction results of a specific sample. By calculating the SHAP value of each feature on each record, you can see specifically how a single feature changes the output of the model, and infer the direction and strength of its impact on the final classification decision. Fig. 9 The contribution measure of each feature of a single customer to the probability of default is given. The blue bar represents the marginal effect of the feature value being lower than the average expected value, and the red bar represents the case where the feature value is higher than the average expected value. The length of the bar represents the degree of influence of the feature on the model prediction results. As shown in the figure, among the characteristics of this customer, the value of night call time (NIGHT_CALL_DURA) reduces the default rate by 4.84%, and the value of the number of night calls (NGIHT_CALL_NUM) increases the default rate by 2.85%. Each other variable can give the SHAP value of its impact on default.
[0242] In addition to the analysis of individual features, SHAP values also support overall visualization. Fig.10 The figure provides the overall impact of the top 20 most influential variables in the entire model on the prediction results. In the figure, each point represents a sample value of a feature, the color represents the size of the SHAP value, and the horizontal position represents the impact of the feature on the sample prediction result. The higher the density of the points, the greater the impact of the feature on the model output. The vertical axis represents the variable features, and the points on the horizontal axis represent the SHAP value, that is, the impact of the feature on the model output.
[0243] comprehensive Figure 8 and Fig.10 The results can be plotted in Table 8:
[0244]
[0245] It can be found that the top 20 important indicators obtained by the model-related method and the model-independent method are very similar. 16 indicators appear in both methods, and the direction of their impact on default is consistent. Among these variables, the number of APPs used has the greatest impact on default, and the more APPs there are, the greater the probability of default. The second most influential indicators include the number of domestic long-distance calls in the current account period, the number of shopping APPs used in the current account period, the number of fixed-line calls in the current account period, the number of domestic long-distance calls in the current account period, the amount of loans, the number of days of loan APP use, the number of fixed-line calls in the current account period, etc.
[0246] In this example, the analysis of the logistic regression coefficient and SHAP value provides a multi-dimensional perspective on which factors are most predictive of default behavior. This approach not only identifies important features, but also helps understand the specific impact mechanism of each feature to facilitate retraining of the model.
[0247] In one example of the present invention, the method may further include the following steps:
[0248] In response to the data description request, data description is performed on the credit characteristics and mobile phone characteristics to generate corresponding data description results.
[0249] In this embodiment, the types of mobile phone features can cover demographic characteristics such as different ages, genders and regions, and after strict cleaning and processing, they cover different socioeconomic backgrounds. For example, one part is obtained by aligning encrypted samples of ID numbers between the credit party and the communication operator, which are customers who borrowed money from the online consumer credit institution from January to March of year A, totaling 2,880 loan samples, and the other part is credit white households with no borrowing records from the credit institution, totaling 9,999 samples. By using samples containing credit data for model training and testing, and predicting mobile phone credit scores on credit white households with pure mobile phone data without credit data labels, it helps credit institutions expand their business scope and improve the quality of approval. The data dimensions provided by the credit institution include the borrower's age, loan amount, gender, whether it is in default, and the borrower's permanent city. The definition of default complies with the Basel Accord, and loans that are overdue for 90 days are default customers. The proportion of normal and default customers providing samples is 1:1, thereby avoiding the problem of imbalance in model training caused by imbalance of good and bad samples. The communication operator obtains the mobile phone data of the month before the loan based on the ID card and mobile phone number retained by the credit customer, so as to ensure that the mobile phone data used for prediction occurs before the default. The dimensions of mobile phone data are divided into several aspects: basic mobile phone feature variables, telecommunications variables, financial variables, social capital variables, entertainment variables, and mobile variables. Please refer to Tables 9 and 10 below:
[0250]
[0251]
[0252] It gives the descriptive statistics and IV values of all variables as well as the specific definitions of the variables. In the creditor variable, we can see that the average loan amount is 172,675 yuan, the minimum loan amount is 2,000 yuan, and the maximum loan amount is 1,000,000 yuan. 61% of the borrowers are male, the average borrowing age is 37 years old, the youngest is 19 years old, and the oldest is 75 years old. According to the city where the borrower is located, the GDP (GDP) and per capita GDP (PERGDP) levels of the corresponding city can be found, thus reflecting the economic situation of the city. Among these variables, the loan amount has the closest relationship with default, with an IV value of 0.36, while other variables are smaller.
[0253] The basic characteristic data of mobile phones include the number of mobile phone numbers under the same ID card (CERT_NUM), the VIP level of the mobile phone number, whether it is a family user, the number of stable terminals in the past year, the group customer identification, the type of mobile phone system, and the length of time the mobile phone is used (UPDATE). In particular, according to the specific model of the mobile phone, the release price of the corresponding model can be found. Among these variables, the price of the mobile phone and the operating system have a strong relationship with default, reaching 0.38 and 0.18 respectively. Table 11 further summarizes the statistics according to the model and brand of the mobile phone. It is found that P mobile phones have the highest market share compared with other types of mobile phones, reaching 42.5%, and the price of P mobile phones is the highest (5506.29), the average user age is younger (35.66), the mobile phone quality is the best, the usage time is the longest (3.43), and the proportion of male consumers is smaller (53.95%). The second is Huawei mobile phones, with a market share of 30.40% and an average mobile phone price of 3665.6 yuan. The users of H mobile phones are the oldest (40.29). The average price of other brands of mobile phones is between 2000 and 3000, and the usage time of mobile phones is relatively short, less than 2.5 years. It is worth mentioning that the users of M and other brands of mobile phones are mainly males (more than 80%).
[0254]
[0255] Since it involves the interaction between mobile phone data and credit data, encrypted statistics are also required. The method is as follows:
[0256] In the variable statistical analysis in Table 11, statistics are divided into boxes according to mobile phone brands. However, age and gender are creditor variables, and mobile phone data cannot be directly obtained. Therefore, federal feature engineering is required. The idea is similar to federal IV. The specific steps are as follows:
[0257] 1) Encryption calculation by Party B. Credit Party B provides encrypted values of age and gender to Data Party A. For each sample ID, Party B uses the Paillier encryption method to encrypt and obtain and , together with the plaintext ID, is transmitted to A.
[0258] 2) Party A bins and sums the ciphertext. After receiving Party B’s ID and ciphertext tag value, Party A bins the data according to the mobile phone brand’s tag, and performs homomorphic addition to sum the ciphertext tag value corresponding to the ID in each bin to obtain the average value in each bin. as well as , z is the number of samples in each bin, and then it is transmitted to Party B together with the bin corresponding to each ID.
[0259] 3) Party B performs local calculation. After obtaining the sum of the bins from Party A, Party B decrypts the data to obtain the average age of the data under different mobile phone brands. and gender average .
[0260] It can be seen that in the telecommunications model variables, the main ones include the number of arrears, mobile phone fees, traffic and text messages. Regardless of the total mobile phone fees, traffic fees or phone fees, the descriptive statistics of the data in the past three months all show consistent results, which confirms the consistency of the borrower's calling habits. Among these variables, the variables with larger IV values include the number of arrears in the past three months (OVERDUE_m3), the current account package includes Internet traffic (FLUX_M), and the total number of text messages in the current account period (TOTAL_SMS_NUM). In the financial variables, the main ones include the use of various bank, loan, payment, credit card, financial management, securities, and insurance apps. Bank apps are the most frequently used software among all financial apps. At the same time, the number of bank calls and text messages will also be counted, which reflects the borrower's financial habits. In terms of the maximum value, it can be found that the number of clicks on loan apps, the number of bank text messages, and the number of clicks on alipay are greatly different from the mean, which may indicate that the borrower has major financial and consumption problems. In the IV value, the number of bank apps used and the number of days used have higher IV, which indicates that financial management habits will significantly affect defaults. Social capital is based on social connections. Mobile phones are an important tool for people to build social capital. People frequently contact and communicate through mobile phones. Therefore, the variables in social capital mainly include various call modes and the use of social apps. In the IV statistics, the use of WeChat, the duration of package voice calls, and the number of fixed-line calls in the current account period are all over 0.1. Among the variables of entertainment modes, mobile phones are increasingly becoming the main way for people to entertain themselves, including watching videos, listening to music, shopping, eating big meals, and even buying lottery tickets. Among these entertainment activities, the IV value of the use of shopping apps is the largest, and the IV value of the number of shopping apps used reaches 0.19 (SHOPAPP_CNT).
[0261] In the embodiment of the present invention, the credit node responds to the modeling request, encrypts and aligns the credit data and the mobile phone data, and screens the credit features and communication features; uses the credit features and communication features to train multiple initial evaluation models of different model architectures based on vertical federated learning to obtain multiple target evaluation models; calculates the model index of each target evaluation model, and selects a credit risk evaluation model from multiple target evaluation models according to the model index; when the mobile phone data to be evaluated is received, the corresponding user credit risk is determined according to the mobile phone data to be evaluated through the credit risk evaluation model. In this way, a credit risk evaluation model can be established under the premise of ensuring privacy and security, and early screening and risk classification of credit-free households can be achieved through mobile phone data.
[0262] See also Fig.11 , Fig.11 It is a structural block diagram of a credit risk assessment device based on vertical federated learning in an embodiment of the present invention.
[0263] The embodiment of the present invention provides a credit risk assessment device based on vertical federated learning, which is applied to a credit node, the credit node is connected to an operator node for communication, the operator node collects mobile phone data, and the credit node collects credit data. The device includes:
[0264] A feature alignment and screening module 1101 is used to perform encrypted identity alignment on credit data and mobile phone data in response to a modeling request, and screen credit features and communication features;
[0265] A model training module 1102 is used to train multiple initial evaluation models of different model architectures based on vertical federated learning using credit features and communication features to obtain multiple target evaluation models;
[0266] A model screening module 1103 is used to calculate the model index of each target assessment model and select a credit risk assessment model from multiple target assessment models according to the model index;
[0267] The risk assessment module 1104 is used to determine the corresponding user credit risk according to the mobile phone data to be assessed by using a credit risk assessment model when receiving the mobile phone data to be assessed.
[0268] Optionally, the feature alignment screening module 1101 includes:
[0269] A hash value calculation submodule, for calculating a first hash value corresponding to the user identity information to which the credit data belongs and sending the first hash value to the operator node in response to the modeling request;
[0270] A data matching submodule is used to match the first hash value and the second hash value when receiving the second hash value sent by the operator node, and align the credit data and the mobile phone data according to the matching result; the second hash value is calculated by the operator node according to the user identity information to which the mobile phone data belongs;
[0271] The information value weight calculation submodule is used to calculate the information value weight of credit data and mobile phone data;
[0272] A credit feature screening submodule is used to select credit data whose information value weight is greater than a preset weight threshold as credit features;
[0273] The communication feature screening submodule is used to select mobile phone data whose information value weight is greater than a preset weight threshold as communication features through the operator node.
[0274] Optionally, before calculating the information value weight between the credit data and the mobile phone data, the feature alignment screening module 1101 is further used to:
[0275] Calculate the credit difference between each credit data and the average of the credit data, encrypt it into an encrypted credit difference and send it to the operator node;
[0276] Calculate the communication difference and standard deviation of each mobile phone data and the mean of mobile phone data through the operator node;
[0277] The operator node calculates the cumulative sum of the multiplication of each communication difference and the encrypted credit difference according to the identity corresponding to the encrypted credit difference;
[0278] The standard deviation is encrypted through the operator node, the encrypted standard deviation is obtained, and the encrypted standard deviation is added to the multiplication value and sent to the credit node;
[0279] Decrypt the accumulated sum of the multiplied values and the encrypted standard deviation respectively to obtain a decrypted accumulated sum and a decrypted standard deviation;
[0280] Calculate the credit standard deviation between each credit data and the credit data mean, combine the decrypted standard deviation and the decrypted cumulative sum, and determine the correlation coefficient between the credit data and the mobile phone data through the correlation coefficient calculation formula;
[0281] If the correlation coefficient exceeds a preset correlation threshold, the associated credit data or mobile phone data is retained;
[0282] If the correlation coefficient does not exceed the preset correlation threshold, the associated credit data and mobile phone data are retained.
[0283] Optionally, the information value weight calculation submodule is specifically used for:
[0284] Bin each credit data with equal frequency, calculate and accumulate the information value weight corresponding to each credit data in each bin, and obtain the first information value weight corresponding to each credit data;
[0285] Encrypt the default label corresponding to each credit data, obtain the encrypted default label and send it to the operator node;
[0286] The mobile phone data is binned by the operator node, and the homomorphic summation is performed according to the identity of the encrypted default label to obtain the corresponding features and values of each bin and send them to the credit node;
[0287] The second information value weight corresponding to the mobile phone data is calculated according to the characteristics and values.
[0288] Optionally, the model training module 1102 includes:
[0289] A first encrypted variable calculation module, used to train multiple initial evaluation models of different model architectures using communication features through the operator node, obtain first model parameters and calculate first encrypted variables and send them to the credit node;
[0290] A second encrypted variable calculation module, used to train multiple initial evaluation models of different model architectures using credit features, obtain second model parameters and calculate second encrypted variables and send them to the operator node;
[0291] An encryption intermediate parameter calculation module, used to calculate the encryption loss function value and the first encrypted data gradient according to the first encryption variable and the second encryption variable, calculate the encryption intermediate parameter and send it to the operator node;
[0292] A second encrypted gradient calculation module, used to calculate the second encrypted data gradient according to the encrypted intermediate parameter through the operator node and send it to the credit node;
[0293] The model updating module is used to update the first model parameter and the second model parameter according to the encrypted loss function value, the first encrypted data gradient and the second encrypted data gradient to obtain multiple target evaluation models.
[0294] Optionally, the model updating module is specifically used for:
[0295] Decrypting the encrypted loss function value, the first encrypted data gradient, and the second encrypted data gradient to obtain the loss function value, the first data gradient, and the second data gradient;
[0296] If the loss function value is not less than the preset loss threshold, sending the second data gradient to the operator node;
[0297] Update the second model parameters according to the first data gradient;
[0298] Updating the first model parameters according to the second data gradient through the operator node;
[0299] Jump to execute the step of training multiple initial evaluation models of different model architectures through operator nodes using communication characteristics, obtaining first model parameters and calculating first encrypted variables and sending them to the credit node until the loss function value is less than a preset loss threshold, and obtaining multiple target evaluation models.
[0300] Optionally, the model screening module 1103 is specifically used for:
[0301] The test data is input into each target evaluation model to obtain the test evaluation results;
[0302] Calculate the model effect evaluation index according to the test evaluation results and the actual evaluation results corresponding to the test data;
[0303] According to the test evaluation results, the test data is classified into confusion matrix, and the model prediction value before and after prediction value are calculated;
[0304] Determine the model value evaluation index based on the model prediction value and the model prediction value;
[0305] According to the model effect evaluation index and the model value evaluation index, weighted accumulation is performed to obtain the model index corresponding to each target evaluation model;
[0306] The target assessment model to which the maximum value of the model indicator belongs is selected and determined as the credit risk assessment model.
[0307] Optionally, the risk assessment module 1104 is specifically used for:
[0308] When the mobile phone data to be evaluated is received, the mobile phone data to be evaluated is input into the credit risk evaluation model;
[0309] Calculate the default probability according to the mobile phone data to be evaluated through the credit risk assessment model;
[0310] Match multiple risk intervals according to the probability of default, and determine the corresponding user credit risk based on the matching results.
[0311] Optionally, after calculating the model indicators of each target assessment model and selecting a credit risk assessment model from multiple target assessment models according to the model indicators, the device further includes:
[0312] A feature contribution calculation module is used to select each credit feature and / or each mobile phone feature one by one, and determine the feature contribution corresponding to each credit feature and each mobile phone feature in combination with a credit risk assessment model;
[0313] The feature screening module is used to screen out credit features and mobile phone features whose feature contribution does not exceed a preset contribution threshold.
[0314] Optionally, the device further comprises:
[0315] The model coefficient selection module is used to select the model coefficients corresponding to each credit feature and each mobile phone feature from the credit risk assessment model;
[0316] A first mapping module, used for drawing a first interpretable bar graph according to each model coefficient;
[0317] The feature importance score calculation module is used to calculate the feature importance score of each credit feature and each mobile phone feature to measure the contribution to the output of the credit risk assessment model;
[0318] A second mapping module is used to draw a second interpretable bar chart according to the importance score of each feature;
[0319] The feature updating module is used to select new credit features and mobile phone features according to the feature overlap between the first interpretable bar graph and the second interpretable bar graph.
[0320] Optionally, the device further comprises:
[0321] The feature description module is used to respond to data description requests, perform data description on credit features and mobile phone features, and generate corresponding data description results.
[0322] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, modules and sub-modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0323] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0324] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0325] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A credit risk assessment method based on vertical federated learning, characterized in that: Applied to a credit node, the credit node is in communication connection with an operator node, the operator node collects mobile phone data, and the credit node collects credit data, the method comprises: In response to the modeling request, aligning the credit data and the mobile phone data by encrypted identity, and screening credit features and communication features; Using the credit features and the communication features, multiple initial evaluation models of different model architectures are trained based on longitudinal federated learning to obtain multiple target evaluation models; Calculating the model index of each target assessment model, and selecting a credit risk assessment model from the plurality of target assessment models according to the model index; When the mobile phone data to be evaluated is received, the corresponding user credit risk is determined according to the mobile phone data to be evaluated by the credit risk evaluation model.
2. The method according to claim 1, characterized in that In response to the modeling request, the credit data and the mobile phone data are encrypted and aligned with each other, and credit characteristics and communication characteristics are screened, including: In response to the modeling request, a first hash value corresponding to the user identity information to which the credit data belongs is calculated and sent to the operator node; When receiving the second hash value sent by the operator node, matching the first hash value and the second hash value, and aligning the credit data and the mobile phone data according to the matching result; the second hash value is calculated by the operator node according to the user identity information to which the mobile phone data belongs; Calculating the information value weights of the credit data and the mobile phone data; Selecting the credit data whose information value weight is greater than a preset weight threshold as the credit feature; The mobile phone data whose information value weight is greater than a preset weight threshold is selected as a communication feature through the operator node.
3. The method according to claim 2, characterized in that Before calculating the information value weight between the credit data and the mobile phone data, the method further includes: Calculate the credit difference between each of the credit data and the average of the credit data, encrypt it into an encrypted credit difference and send it to the operator node; Calculate the communication difference and standard deviation of each of the mobile phone data and the mean of the mobile phone data through the operator node; Calculating, by the operator node, a cumulative sum of the multiplications of each of the communication differences and the encrypted credit difference according to the identity identifier corresponding to the encrypted credit difference; Encrypting the standard deviation through the operator node to obtain the encrypted standard deviation and accumulating it with the multiplication value and sending it to the credit node; Decrypting the product value cumulative sum and the encrypted standard deviation respectively to obtain a decrypted cumulative sum and a decrypted standard deviation; Calculate the credit standard deviation between each of the credit data and the credit data mean, combine the decrypted standard deviation and the decrypted cumulative sum, and determine the correlation coefficient between the credit data and the mobile phone data through a correlation coefficient calculation formula; If the correlation coefficient exceeds a preset correlation threshold, the associated credit data or mobile phone data is retained; If the correlation coefficient does not exceed the preset correlation threshold, the associated credit data and mobile phone data are retained.
4. The method according to claim 2, characterized in that: The calculating the information value weights of the credit data and the mobile phone data includes: Performing equal-frequency binning on each of the credit data, calculating and accumulating the information value weight corresponding to each of the credit data in each bin, and obtaining the first information value weight corresponding to each of the credit data; Encrypting the default label corresponding to each of the credit data to obtain the encrypted default label and sending it to the operator node; The mobile phone data is binned by the operator node, and the homomorphic summation is performed according to the identity identifier of the encrypted default tag to obtain the characteristics and values corresponding to each bin and send them to the credit node; The second information value weight corresponding to the mobile phone data is calculated according to the characteristics and values.
5. The method according to claim 1, characterized in that The credit features and the communication features are used to train multiple initial evaluation models of different model architectures based on longitudinal federated learning to obtain multiple target evaluation models, including: The operator node uses the communication feature to train multiple initial evaluation models of different model architectures, obtains first model parameters, calculates first encrypted variables and sends them to the credit node; Using the credit feature to train multiple initial evaluation models of different model architectures, obtain second model parameters and calculate second encrypted variables and send them to the operator node; Calculate the encryption loss function value and the first encrypted data gradient according to the first encrypted variable and the second encrypted variable, calculate the encryption intermediate parameter and send it to the operator node; Calculate the second encrypted data gradient according to the encrypted intermediate parameter through the operator node and send it to the credit node; According to the encrypted loss function value, the first encrypted data gradient and the second encrypted data gradient, the first model parameters and the second model parameters are updated to obtain multiple target evaluation models.
6. The method according to claim 5, characterized in that The updating of the first model parameter and the second model parameter according to the encrypted loss function value, the first encrypted data gradient, and the second encrypted data gradient to obtain multiple target evaluation models includes: Decrypting the encrypted loss function value, the first encrypted data gradient, and the second encrypted data gradient to obtain a loss function value, a first data gradient, and a second data gradient; If the loss function value is not less than a preset loss threshold, sending the second data gradient to the operator node; Update the second model parameters according to the first data gradient; updating the first model parameter according to the second data gradient by the operator node; Jump to execute the step of training multiple initial evaluation models of different model architectures through the operator node using the communication characteristics, obtaining the first model parameter and calculating the first encrypted variable and sending it to the credit node, until the loss function value is less than the preset loss threshold, and obtaining multiple target evaluation models.
7. The method according to claim 1, characterized in that The step of calculating the model index of each target assessment model and selecting a credit risk assessment model from the plurality of target assessment models according to the model index comprises: Using test data to input into each of the target evaluation models respectively to obtain test evaluation results; Calculate the model effect evaluation index according to the test evaluation result and the real evaluation result corresponding to the test data; Perform confusion matrix classification on the test data according to the test evaluation results, and calculate the model pre-prediction value and the model post-prediction value; Determining a model value evaluation index according to the model prediction value and the model prediction value; Perform weighted accumulation according to the model effect evaluation index and the model value evaluation index to obtain the model index corresponding to each of the target evaluation models; The target assessment model to which the maximum value of the model indicator belongs is selected and determined as the credit risk assessment model.
8. The method according to claim 1, characterized in that When receiving the mobile phone data to be evaluated, determining the corresponding user credit risk according to the mobile phone data to be evaluated by using the credit risk evaluation model includes: When receiving the mobile phone data to be evaluated, inputting the mobile phone data to be evaluated into the credit risk evaluation model; Calculating the probability of default according to the mobile phone data to be evaluated by using the credit risk assessment model; Multiple risk intervals are matched according to the default probability, and the corresponding user credit risk is determined according to the matching results.
9. The method according to claim 1, characterized in that: After calculating the model indicators of each target assessment model and selecting a credit risk assessment model from the plurality of target assessment models according to the model indicators, the method further includes: Selecting each of the credit features and / or each of the mobile phone features one by one, and combining with the credit risk assessment model, determining the feature contribution corresponding to each of the credit features and each of the mobile phone features; The credit characteristics and mobile phone characteristics whose contribution does not exceed the preset contribution threshold are screened out.
10. The method according to claim 1, characterized in that The method further comprises: Selecting model coefficients corresponding to each of the credit characteristics and each of the mobile phone characteristics from the credit risk assessment model; Draw a first interpretable bar graph according to each of the model coefficients; Calculating the feature importance score of each of the credit features and each of the mobile phone features to measure the contribution to the output of the credit risk assessment model; Draw a second interpretable bar chart according to the importance scores of each feature; According to the overlap of features in the first interpretability bar chart and the second interpretability bar chart, new credit features and mobile phone features are selected.
11. The method according to claim 1 or 10, characterized in that: The method further comprises: In response to the data description request, data description is performed on the credit characteristics and the mobile phone characteristics to generate corresponding data description results.
12. A credit risk assessment device based on vertical federated learning, characterized in that: Applied to a credit node, the credit node is connected to an operator node for communication, the operator node collects mobile phone data, the credit node collects credit data, and the device comprises: A feature alignment and screening module, for performing encrypted identity alignment on the credit data and the mobile phone data in response to a modeling request, and screening credit features and communication features; A model training module, for using the credit features and the communication features to train multiple initial evaluation models of different model architectures based on longitudinal federated learning to obtain multiple target evaluation models; A model screening module, used to calculate the model index of each target assessment model, and select a credit risk assessment model from the multiple target assessment models according to the model index; The risk assessment module is used to determine the corresponding user credit risk according to the mobile phone data to be assessed through the credit risk assessment model when receiving the mobile phone data to be assessed.
Citation Information
Patent Citations
Federal learning supported real estate financial risk privacy calculation method and platform
CN117876102A
Cited By
Federal learning method for intelligent power grid data protection
CN119862942A
Early warning method, electronic equipment and computer program product
CN120930009A