Credit risk management method based on federal learning
By adopting federal learning methods and privacy protection technology in credit risk management, the problems of data heterogeneity, model heterogeneity and privacy protection in traditional credit risk management are solved, and high-precision credit risk assessment and data privacy protection are achieved.
Patent Information
- Application Number
- CN202411912590.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional credit risk management faces the problems of data heterogeneity, model heterogeneity and insufficient data, and it is difficult to ensure the integrity and modeling accuracy of privacy protection at the same time when multi-party data sharing.
The credit risk management method based on federated learning is adopted to build a model through horizontal, vertical and knowledge transfer federated learning algorithms to realize the coordinated utilization of data from all parties and the unified training of models. At the same time, privacy protection technologies such as differential privacy, homomorphic encryption and attribute obfuscation desensitization technology are used.
Successfully breaking the data silos has improved the model's ability to adapt to complex data situations, achieved the maximization of data value, and improved the accuracy of credit risk assessment and the security of privacy protection.
Smart Images

Figure CN119848925A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of credit risk management and machine learning technology, and more specifically, to a credit risk management method based on federated learning. Background Art
[0002] In today's digital age, credit risk management is crucial for financial institutions, e-commerce platforms, and all kinds of organizations involved in credit business. However, traditional credit risk management faces many challenges.
[0003] On the one hand, data heterogeneity is a common problem. The data owned by different organizations are different in distribution, such as the range of feature values and the proportion of sample categories. This makes it difficult for traditional collaborative modeling to effectively integrate the data advantages of all parties, affecting the accuracy of the model. On the other hand, due to the different business characteristics and needs of each organization, the constructed models are heterogeneous, that is, there are differences in the model architecture, the algorithms used, and the parameter settings, which hinders the fusion and unified training of the model. In addition, some organizations may have insufficient data and small data volumes due to reasons such as a short business development time, which is not conducive to training a high-precision credit risk assessment model. Moreover, in the context of multi-party data sharing, it is crucial to protect data privacy and security. It is necessary to strictly comply with relevant laws and regulations to prevent data leakage and security attacks.
[0004] As a distributed machine learning framework, federated learning makes it possible for multiple parties to collaboratively utilize data. However, when dealing with the above-mentioned complex challenges such as data heterogeneity, model heterogeneity, security and privacy protection, it is still difficult to simultaneously ensure the integrity of privacy protection and effectively improve modeling accuracy. This is still a theoretical and practical problem that needs to be solved urgently. Summary of the invention
[0005] In view of the deficiencies in the prior art, the present invention aims to provide a credit risk management method based on federated learning.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] A credit risk management method based on federated learning includes the following steps:
[0008] Step 1: Preprocess and privacy-handle the credit data collected by each participant, equip the computing equipment with the federated learning client module, and build a federated learning coordination server;
[0009] Step 2: Build a federated learning model based on the horizontal federated learning algorithm, vertical federated learning algorithm, and knowledge transfer federated learning algorithm. Each participant selects a federated learning algorithm based on data characteristics and business needs.
[0010] Step 3: Each participant trains the model on the local data set and regularly uploads the model parameters to the coordination server for aggregation. The updated global model parameters are obtained and distributed to each participant for the next round of local training. Multiple rounds of local training and global model updates are performed in this way.
[0011] Step 4: Use the trained federated learning model to conduct a risk assessment on the customer’s credit risk and output the risk assessment result, i.e., the customer’s default probability. The participants then formulate corresponding risk management strategies based on the credit risk assessment results.
[0012] Preferably, in step 1, the participants include at least two of financial institutions, e-commerce platforms, and participant credit rating agencies; the data preprocessing includes data cleaning, data standardization, and feature encoding; the privacy processing adopts at least one privacy protection technology, and the privacy protection technology includes but is not limited to differential privacy technology, homomorphic encryption technology, and attribute obfuscation desensitization technology; the federated learning coordination server and the federated learning clients of each participant communicate using a secure communication protocol.
[0013] Preferably, the step 2 is specifically:
[0014] The horizontal federated learning algorithm is applicable to data with similar characteristics but different samples from the participants; the construction of the horizontal federated learning model includes determining the model architecture, adopting a fully connected neural network structure, setting the number of input layer neurons and data mapping method according to the credit data characteristics shared by the participants, setting the number of hidden layers, the number of neurons and the activation function according to the complexity of the data, and determining the output layer form according to the credit risk assessment target; initializing the model parameters by combining pre-training and random initialization, and distributing the model structure and parameters to each participant; each participant performs training locally based on the received model, and selects the loss function, optimization algorithm and regularization technology to optimize the model;
[0015] The vertical federated learning algorithm is applicable to data of the same samples with different characteristics of the participants; the vertical federated learning model construction includes setting input layer parts for the data of different participants respectively, setting a feature fusion layer after the input layer, fusing features by splicing, weighted summation or neural network learning fusion, and setting hidden layers and output layers according to the fused features; encryption technology such as homomorphic encryption and secure multi-party computing protocols are used to protect data privacy during the training process, and a gradient exchange protocol is designed to realize gradient information exchange and model update among all parties;
[0016] The knowledge transfer federated learning algorithm is suitable for scenarios where the data differences between participants are large but knowledge sharing is still required; the knowledge transfer federated learning model construction includes building models in the source domain and the target domain respectively, performing feature migration by finding the associated features between the source domain and the target domain data, or migrating some parameters of the source domain model to the target domain model, and using the joint loss function design and the federated training process to realize the joint training and optimization of the model;
[0017] Each participant selects a federated learning algorithm for model training based on data characteristics and business needs.
[0018] Preferably, the step 3 comprises:
[0019] Each participant conducts model training based on the selected federated learning algorithm and local dataset; divides the dataset into training set, validation set and test set;
[0020] Each participant uploads the model parameters obtained through local training to the federated learning coordination server through an encrypted communication channel;
[0021] After receiving the encrypted parameters uploaded by each participant, the coordination server aggregates the parameters according to the selected federated learning algorithm and updates the global model parameters;
[0022] The model training, parameter aggregation and global model parameter update are specifically as follows:
[0023] Horizontal federated learning model:
[0024] Local training includes loss function calculation, optimization algorithm calculation, and L2 regularization;
[0025] Loss function calculation: When predicting the probability of default, the cross entropy loss function is often used; assuming the true label is y, the loss function is: Among them, y = 0 means no breach of contract, and y = 1 means breach of contract;
[0026] Optimization algorithm calculation: First calculate the gradient. Let the model parameter be θ, and the gradient of the loss function with respect to the parameter is where t represents the training round; then calculate the first-order moment estimate m of the gradient t =β1m t-1 +(1-β1)g t and the second moment estimate where β1 and β2 are hyperparameters and bias correction is performed on the first and second moment estimates: Finally update the model parameters: Among them, α is the learning rate and ε is the hyperparameter of the optimizer;
[0027] L2 regularization: To prevent overfitting, a regularization term is added to the loss function. The new loss function is: where λ is the regularization coefficient, θ i are model parameters;
[0028] Each participant uploads the model parameters obtained through local training to the federated learning coordination server through an encrypted communication channel. After receiving the encrypted parameters uploaded by each participant, the coordination server aggregates the model parameters according to the weighted average method of horizontal federated learning. Assuming that there are m participants and the amount of data of the i-th participant is n i , the model parameter uploaded is θ i , then the updated global model parameters after aggregation are: That is, the weights are determined according to the amount of data of the participants and weighted average is performed;
[0029] Vertical federated learning model:
[0030] Local training includes gradient encryption and gradient aggregation. The gradient encryption adopts homomorphic encryption technology, and the gradient aggregation adopts secure multi-party computing protocol.
[0031] Assume that the gradient calculated by participant A is g A , the gradient calculated by participant B is g B ; Using homomorphic encryption to encrypt the gradient, the encrypted gradient of participant A is E(g A ), the encrypted gradient of participant B is E(g B ) and sends the encrypted gradient to the coordination server;
[0032] Aggregation in the coordination server. After receiving the encrypted gradients sent by the participants, the coordination server performs gradient aggregation operations through the secure multi-party computing protocol. In a simple additive homomorphic encryption scenario, the aggregated gradients Where E -1 is a decryption operation;
[0033] The gradient after encrypted exchange and aggregation is g agg , let the model parameter be θ and the learning rate be α, then the updated global model parameter is: θ t+1 =θ t -αg agg ;
[0034] Knowledge transfer federated learning model:
[0035] Local training includes source domain training, target training, joint training, and federal training;
[0036] In source domain training, the mean square error loss function is used to measure the difference between the source domain model output and the target feature representation; let the true output of the source domain model be y s , then the loss function is Where ms is the number of samples in the source domain; using the Adam optimization algorithm, first calculate the gradient where θ s is the source domain model parameter, t represents the training round; calculate the first-order moment estimate m of the gradient s,t =β1m s,t-1 +(1-β1)g s,t and the second moment estimate To make a deviation correction: Update parameters: where α t is the learning rate;
[0037] Target domain training, set the goal to predict the probability of default, use the cross entropy loss function; set the target domain true label to y t , where y t =0 means no breach of contract, y t =0 indicates default, then the loss function is: Where m t is the number of samples in the source domain; using the Adam optimization algorithm, first calculate the gradient where θ s is the source domain model parameter, t represents the training round; calculate the first-order moment estimate m of the gradient t,t =β1m t,t-1 +(1-β1)g t,t and the second moment estimate To make a deviation correction: Update parameters: where α t is the learning rate;
[0038] Joint training: Joint loss function, assuming the source domain model loss function is L s , the target domain model loss function is L t ; The joint loss function is: L = λ1L s +λ2L t , where λ1 and λ2 are weight coefficients used to balance the training of the two domain models;
[0039] Federated training: Each participant performs training locally in the manner of federated learning; the source domain gradient calculated locally by the participant is g s , the target domain gradient is g t , encrypt or privacy-process the gradient information and upload it to the federated learning coordination server; the coordination server performs aggregation operations to obtain the aggregated gradient g agg =w s g s +w t g t , where w sis the knowledge contribution weight of the source domain, w t is the knowledge contribution weight of the target domain; let the model parameter be θ and the learning rate be α, then the updated global model parameter is θ t+1 =θ t -αg agg ;
[0040] After completing local training, the aggregated updated global model parameters are distributed to all participants through the coordination server for the next round of local training.
[0041] Repeat the above steps for multiple rounds of local training and global model updates until the model performance is stable or the preset number of iterations is reached.
[0042] Preferably, the step 4 comprises:
[0043] Using the trained federated learning model, each participant inputs the credit data of local customers into the federated learning model for risk assessment, and outputs the risk assessment result, i.e., the probability of customer default;
[0044] Based on the customer default probability obtained from the credit risk assessment, the participants formulate corresponding risk management strategies;
[0045] For low-risk customers with a low probability of default, more favorable credit services can be provided;
[0046] For customers with a medium probability of default, appropriate risk monitoring and management measures are adopted;
[0047] For high-risk customers with a higher probability of default, strict risk prevention measures are taken.
[0048] Compared with the prior art, the present invention has the following beneficial effects:
[0049] 1. In the present invention, through the innovative improvement of horizontal, vertical and federated transfer learning algorithms, common data problems such as data distribution heterogeneity, model heterogeneity and data shortage in the credit risk management of participants are specifically solved, successfully breaking the dilemma of data islands, realizing the maximum mining of data value, and improving the model's adaptability to complex data situations, so that the data of all parties can be more effectively coordinated for credit risk assessment, breaking the assessment bottleneck caused by traditional data limitations.
[0050] 2. In the present invention, the model algorithm selection system of the participants can intelligently select the most suitable federated learning algorithm based on its own data characteristics, business needs and data association with other participants. Whether it is data collaboration between financial institutions, cooperation between financial institutions and e-commerce platforms, or interaction with credit rating agencies, this method can respond flexibly, effectively promote data sharing and innovative cooperation among different industries, promote the continuous improvement and development of the credit ecosystem, and improve the operational efficiency and service level of the entire credit risk management field.
[0051] 3. In the present invention, in the entire method flow, from the privacy enhancement operation in the data preprocessing stage to the privacy protection processing of key data such as gradient information during the training process of different improved algorithms, mature privacy protection technologies are used in an all-round way to strictly protect the data privacy of all participants from infringement, comply with increasingly stringent data security regulations, eliminate the privacy concerns of organizations in cross-organizational data sharing and collaborative modeling, and promote more extensive cooperation and data utilization.
[0052] 4. In the present invention, relying on the customer default probability output by the high-precision credit risk assessment model trained by federated learning, the participants formulate a highly targeted risk management strategy, provide preferential treatment to attract retention for low-risk customers, moderately monitor and manage medium-risk customers to balance risk and return, strictly prevent and reduce losses for high-risk customers, realize refined, scientific and intelligent risk management, and enhance the risk management efficiency and competitiveness of financial institutions. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 A flow chart of a credit risk management method based on federated learning is proposed for the present invention. DETAILED DESCRIPTION
[0054] Reference Figure 1 .
[0055] The embodiment further illustrates a credit risk management method based on federated learning proposed by the present invention.
[0056] A credit risk management method based on federated learning includes the following steps:
[0057] Step 1: Preprocess and privacy-handle the credit data collected by each participant, equip the computing equipment with the federated learning client module, and build a federated learning coordination server;
[0058] Step 2: Build a federated learning model based on the horizontal federated learning algorithm, vertical federated learning algorithm, and knowledge transfer federated learning algorithm. Each participant selects a federated learning algorithm based on data characteristics and business needs.
[0059] Step 3: Each participant trains the model on the local data set and regularly uploads the model parameters to the coordination server for aggregation. The updated global model parameters are obtained and distributed to each participant for the next round of local training. Multiple rounds of local training and global model updates are performed in this way.
[0060] Step 4: Use the trained federated learning model to conduct a risk assessment on the customer’s credit risk and output the risk assessment result, i.e., the customer’s default probability. The participants then formulate corresponding risk management strategies based on the credit risk assessment results.
[0061] In step 1, the participants include at least two of financial institutions, e-commerce platforms, and participant credit rating agencies; the data preprocessing includes data cleaning, data standardization, and feature encoding; the privacy processing uses at least one privacy protection technology, which includes but is not limited to differential privacy technology, homomorphic encryption technology, and attribute obfuscation desensitization technology; the federated learning coordination server communicates with the federated learning clients of each participant using a secure communication protocol;
[0062] The differential privacy technology protects data privacy by adding appropriate noise to the data, making it difficult for attackers to infer information about a single user from the published data;
[0063] The homomorphic encryption technology allows specific operations, such as addition and multiplication, to be performed on the encrypted data without first decrypting the data;
[0064] The attribute obfuscation desensitization technology can blur or replace sensitive attributes, such as replacing the customer's real name with an anonymous number, blurring the specific home address by region, etc., to further reduce the risk of data leakage.
[0065] The step 2 is specifically:
[0066] The horizontal federated learning algorithm is applicable to data of participants with similar characteristics but different samples; the construction of the horizontal federated learning model includes determining the model architecture, adopting a fully connected neural network structure, setting the number of input layer neurons and data mapping method according to the credit data characteristics shared by the participants, setting the number of hidden layers, the number of neurons and the activation function according to the complexity of the data, and determining the output layer form according to the credit risk assessment target; initializing the model parameters by combining pre-training and random initialization, and distributing the model structure and parameters to each participant; each participant performs training locally based on the received model, and selects the loss function, optimization algorithm and regularization technology to optimize the model.
[0067] The vertical federated learning algorithm is applicable to data of the same samples but with different characteristics of the participants; the construction of the vertical federated learning model includes setting input layer parts for the data of different participants respectively, setting a feature fusion layer after the input layer, fusing features by splicing, weighted summation or neural network learning fusion, and setting hidden layers and output layers according to the fused features; encryption technology such as homomorphic encryption and secure multi-party computing protocol are used to ensure data privacy during the training process, and a gradient exchange protocol is designed to realize gradient information exchange and model update among all parties.
[0068] The knowledge transfer federated learning algorithm is suitable for scenarios where the data differences between participants are large but knowledge sharing is still required; the knowledge transfer federated learning model construction includes building models in the source domain and the target domain respectively, performing feature migration by finding the correlation features between the source domain and target domain data, or migrating some parameters of the source domain model to the target domain model, and using joint loss function design and federated training process to achieve joint training and optimization of the model.
[0069] Each participant selects a federated learning algorithm for model training based on data characteristics and business needs.
[0070] The step 3 comprises:
[0071] Each participant conducts model training based on the selected federated learning algorithm and local dataset; divides the dataset into training set, validation set and test set;
[0072] Each participant uploads the model parameters obtained through local training to the federated learning coordination server through an encrypted communication channel;
[0073] After receiving the encrypted parameters uploaded by each participant, the coordination server aggregates the parameters according to the selected federated learning algorithm and updates the global model parameters;
[0074] The model training, parameter aggregation and global model parameter update are specifically as follows:
[0075] Horizontal federated learning model training:
[0076] Input layer: Assuming that the parties have n credit data features in total, the number of neurons in the input layer m is equal to n; the data mapping method is usually to convert each feature value x i (i=1,2,…,n) is processed according to certain standardization rules and then input to the neurons in the input layer;
[0077] Hidden layer: Assume that there are L hidden layers and the number of neurons in the lth hidden layer is h l (l=1,2,…,L); for the input z of the jth neuron in the lth hidden layer l,j The calculation is as follows: where w l-1,i,j is the connection weight from the ith neuron in the l-1th hidden layer to the jth neuron in the lth hidden layer, a l-1,i is the output of the i-th neuron in the l-1-th hidden layer, b l,j is the bias of the jth neuron; the activation function of the hidden layer is the RELU function: a l,j =max(0,z l,j );
[0078] Output layer: Set the predicted default probability of the customer. The output layer has only one neuron and uses the Sigmoid activation function. Let the input of the output layer neuron be z out , the output is but: Among them, w L,i is the connection weight from the i-th neuron in the L-th hidden layer to the output layer neuron, a L,i is the output of the i-th neuron in the L-th hidden layer, b out is the bias of the output layer neuron; the predicted probability of customer appointment is:
[0079] Pre-training part: For the parameter initialization of the bottom layer of the neural network (close to the input layer), an autoencoder can be used for pre-training; the goal of the autoencoder is to minimize the reconstruction error. Let the input data be x, and the encoder will get the encoded representation h, and then the decoder will get the reconstructed data Its loss function is: Where m is the number of samples; the parameters (weights and biases) of the encoder and decoder are updated by minimizing this loss function through the back-propagation algorithm; the underlying parameters obtained by pre-training are used as part of the initialization parameters of the entire horizontal federated learning model;
[0080] Random initialization part: For the parameters of the upper network (such as the weights and biases of the higher hidden layers), random initialization is used; for example, the weight w can be initialized from a mean of 0 and a standard deviation of It is randomly sampled from a normal distribution, where n in is the number of input neurons, and the bias b is initialized to 0;
[0081] Local training includes loss function calculation, optimization algorithm calculation, and L2 regularization;
[0082] Loss function calculation: When predicting the probability of default, the cross entropy loss function is often used; assuming the true label is y, the loss function is: Among them, y = 0 means no breach of contract, and y = 1 means breach of contract;
[0083] Optimization algorithm calculation: First calculate the gradient. Let the model parameter be θ, and the gradient of the loss function with respect to the parameter is where t represents the training round; then calculate the first-order moment estimate m of the gradient t =β1m t-1 +(1-β1)g t and the second moment estimate where β1 and β2 are hyperparameters and bias correction is performed on the first and second moment estimates: Finally update the model parameters: Among them, α is the learning rate and ε is the hyperparameter of the optimizer;
[0084] L2 regularization: Add a regularization term to the loss function, and the new loss function is: where λ is the regularization coefficient, θ i are model parameters;
[0085] Each participant uploads the model parameters obtained through local training to the federated learning coordination server through an encrypted communication channel. After receiving the encrypted parameters uploaded by each participant, the coordination server aggregates the model parameters according to the weighted average method of horizontal federated learning. Assuming that there are m participants and the amount of data of the i-th participant is n i , the model parameter uploaded is θ i , then the updated global model parameters after aggregation are: That is, the weights are determined according to the amount of data of the participants and weighted average is performed;
[0086] Vertical federated learning model:
[0087] Input layer: Assume there are two participants, participant A (such as a bank) has n1 data features, and participant B (such as an e-commerce platform) has n2 data features; then the number of input layer neurons corresponding to participant A’s data is m1=n1, and the number of input layer neurons corresponding to participant B’s data is m2=n2; the data mapping method is similar to horizontal federated learning, and each feature is standardized before input. The feature x of participant A is 1,i (i=1,2,…,n1) is input to the neurons of the data input layer of participant A after being standardized, and the feature x of participant B 2,j (j=1,2,…,n2) are input to the neurons of the data input layer of participant B after being standardized;
[0088] The feature fusion layer includes concatenation, weighted summation, and neural network learning fusion;
[0089] Splicing: Assume that the data input layer output of participant A is a1, which is an m1-dimensional vector, and the data input layer output of participant B is a2, which is an m2-dimensional vector. The fused feature vector z after splicing is fusion =[a1,a2], whose dimension is m1+m2;
[0090] Weighted summation: Let the weight vector be w = [w1, w2], where w1 corresponds to the weight of the data of participant A and w2 corresponds to the weight of the data of participant B. Then the fusion feature z fusion =w1a1+w2a2;
[0091] Neural network learning fusion: Build a small neural network as the fusion layer, and set its weight matrix to W fusion , the bias vector is b fusion , then the fusion feature z fusion =W fusion [a1,a2]+b fusion , the parameters of the neural network are optimized through training;
[0092] The hidden layer setting is similar to the horizontal federated learning model construction. (Taking the fully connected neural network as an example) Assume that there are L hidden layers and the number of neurons in the lth hidden layer is h l (l=1,2,…,L); for the input z of the jth neuron in the lth hidden layer l,j The calculation is as follows: where is the connection weight from the i-th neuron in the l-1th hidden layer to the j-th neuron in the l-th hidden layer, and a l-1,i is the output of the i-th neuron in the l-1-th hidden layer, b l,j is the bias of the jth neuron in the lth hidden layer; the activation function uses the ReLU function: a l,j =max(0,z l,j );
[0093] The output layer is determined according to the credit risk assessment target. The risk assessment target is set to predict the probability of default. The output layer has only one neuron and uses the Sigmoid activation function. Suppose the input of the output layer neuron is z out , the output is but: where w L,i is the connection weight from the i-th neuron in the L-th hidden layer to the output layer neuron, a L,i is the output of the i-th neuron in the L-th hidden layer, b out is the bias of the output layer neuron; then the predicted customer default probability is:
[0094] Local training includes gradient encryption and gradient exchange and aggregation. The gradient encryption adopts homomorphic encryption technology, and the gradient exchange and aggregation adopts secure multi-party computing protocol.
[0095] Assume that the gradient calculated by participant A is g A , the gradient calculated by participant B is g B; Using homomorphic encryption to encrypt the gradient, the encrypted gradient of participant A is E(g A ), the encrypted gradient of participant B is E(g B ) and sends the encrypted gradient to the coordination server;
[0096] Aggregation in the coordination server. After receiving the encrypted gradients sent by the participants, the coordination server performs gradient aggregation operations through the secure multi-party computing protocol. In a simple additive homomorphic encryption scenario, the aggregated gradients Where E -1 is a decryption operation;
[0097] The gradient after encrypted exchange and aggregation is g agg , let the model parameter be θ and the learning rate be α, then the updated global model parameter is: θ t+1 =θ t -αg agg ;
[0098] Knowledge transfer federated learning model:
[0099] Source domain model construction: adopt multi-layer perceptron neural network architecture; the number of neurons in the input layer is determined as n according to the number of source domain data features s ; Set the number of hidden layers to L s , the number of neurons in the lth hidden layer is n s,l ; Activation function selects ReLU function: a s,l,j =max(0,z s,l,j ),in is the connection weight from the ith neuron in the l-1th hidden layer to the jth neuron in the lth hidden layer, a s,l-1,i is the output of the i-th neuron in the l-1-th hidden layer, b s,l,j is the bias of the jth neuron in the lth hidden layer; the number of neurons in the output layer is 1, and a comprehensive feature representation related to the target domain is obtained. The activation function selects the tanh function, and the output is mapped to the [-1,1] interval. Let the output be The input of the output layer neuron is z s,out ,but
[0100] Target domain model construction: adopt multi-layer perceptron neural network architecture; assume that the number of neurons in the input layer is determined as n according to the number of data features in the target domain t ; Set the number of hidden layers to L t , the number of neurons in the lth hidden layer is n t,l; The activation function also uses the ReLU function; the output layer has only one neuron, which is used to output the default probability. The activation function uses the Sigmoid function to map the output to the interval [0,1]; let the output be The input to the output layer neurons is
[0101] Local training includes source domain training, target training, joint training, and federal training;
[0102] In source domain training, the mean square error loss function is used to measure the difference between the source domain model output and the target feature representation; let the true output of the source domain model be y s (through some manual annotation or target output determined based on domain knowledge), the loss function is Where m s is the number of samples in the source domain; using the Adam optimization algorithm, first calculate the gradient where θ s is the source domain model parameter, t represents the training round; calculate the first-order moment estimate m of the gradient s,t =β1m s,t-1 +(1-β1)g s,t and the second moment estimate To make a deviation correction: Update parameters: where α t is the learning rate;
[0103] Target domain training, set the goal to predict the probability of default, use the cross entropy loss function; set the target domain true label to y t , where y t =0 means no breach of contract, y t =0 indicates default, then the loss function is: Where m t is the number of samples in the source domain; using the Adam optimization algorithm, first calculate the gradient where θ s is the source domain model parameter, t represents the training round; calculate the first-order moment estimate m of the gradient t,t =β1m t,t-1 +(1-β1)g t,t and the second moment estimate To make a deviation correction: Update parameters: where α t is the learning rate;
[0104] Joint training: Joint loss function, assuming the source domain model loss function is L s , the target domain model loss function is L t ; The joint loss function is: L = λ1Ls +λ2L t , where λ1 and λ2 are weight coefficients used to balance the training of the two domain models;
[0105] Federated training: Each participant performs training locally in the manner of federated learning; the source domain gradient calculated locally by the participant is g s , the target domain gradient is g t , encrypt or privacy-process the gradient information and upload it to the federated learning coordination server; the coordination server performs aggregation operations to obtain the aggregated gradient g agg =w s g s +w t g t , where w s is the knowledge contribution weight of the source domain, w t is the knowledge contribution weight of the target domain; let the model parameter be θ and the learning rate be α, then the updated global model parameter is θ t+1 =θ t -αg agg .
[0106] After completing the local training, the aggregated updated global model parameters are distributed to each participant through the coordination server for the next round of local training.
[0107] Repeat the above steps for multiple rounds of local training and global model updates until the model performance is stable or the preset number of iterations is reached.
[0108] The step 4 comprises:
[0109] Using the trained federated learning model, each participant inputs the credit data of local customers into the federated learning model for risk assessment, and outputs the risk assessment result, namely the probability of customer default.
[0110] Based on the customer default probability obtained from the credit risk assessment, the participants formulate corresponding risk management strategies;
[0111] For low-risk customers with a low probability of default (such as less than 0.2), more favorable credit services can be provided; for example, higher credit limits, lower loan interest rates, more relaxed repayment periods, etc., in order to attract and retain high-quality customers and enhance market competitiveness; for example, banks can increase credit card limits for low-risk customers, or give priority treatment and simplify procedures during loan approval.
[0112] For customers with a medium probability of default (such as between 0.2 and 0.5), appropriate risk monitoring and management measures should be taken; such as strengthening regular reviews of customer credit status, requiring customers to provide more credit certification materials or increase guarantee measures, and appropriately adjusting credit limits or interest rates within a relatively reasonable range to balance risks and returns; for example, financial institutions may require such customers to submit financial statements or proof of assets on a regular basis, and dynamically adjust credit limits and interest rates based on their credit status.
[0113] For high-risk customers with a high probability of default (such as higher than 0.5), strict risk prevention measures are taken; such as limiting credit limits, increasing loan interest rates, early collection or requiring early repayment of part of the loan, etc., to reduce potential default losses; in extreme cases, for customers with an extremely high probability of default and suspected of malicious default, legal means can be taken to pursue and sanction them, and they will be placed on the credit blacklist and information will be shared with other financial institutions to prevent them from obtaining improper credit resources in other institutions.
[0114] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A credit risk management method based on federated learning, characterized in that: The following steps are involved: Step 1: Preprocess and privacy-handle the credit data collected by each participant, equip the computing equipment with the federated learning client module, and build a federated learning coordination server; Step 2: Build a federated learning model based on the horizontal federated learning algorithm, vertical federated learning algorithm, and knowledge transfer federated learning algorithm. Each participant selects a federated learning algorithm based on data characteristics and business needs. Step 3: Each participant trains the model on the local data set and regularly uploads the model parameters to the coordination server for aggregation. The updated global model parameters are obtained and distributed to each participant for the next round of local training. Multiple rounds of local training and global model updates are performed in this way. Step 4: Use the trained federated learning model to conduct a risk assessment on the customer’s credit risk and output the risk assessment result, i.e., the customer’s default probability. The participants then formulate corresponding risk management strategies based on the credit risk assessment results.
2. A credit risk management method based on federated learning according to claim 1, characterized in that: In step 1, the participants include at least two of financial institutions, e-commerce platforms, and participant credit rating agencies; the data preprocessing includes data cleaning, data standardization, and feature encoding; the privacy processing adopts at least one privacy protection technology, and the privacy protection technology includes but is not limited to differential privacy technology, homomorphic encryption technology, and attribute obfuscation desensitization technology; the federated learning coordination server communicates with the federated learning clients of each participant using a secure communication protocol.
3. A credit risk management method based on federated learning according to claim 2, characterized in that: The step 2 is specifically: The horizontal federated learning algorithm is applicable to data with similar characteristics but different samples from the participants; the construction of the horizontal federated learning model includes determining the model architecture, adopting a fully connected neural network structure, setting the number of input layer neurons and data mapping method according to the credit data characteristics shared by the participants, setting the number of hidden layers, the number of neurons and the activation function according to the complexity of the data, and determining the output layer form according to the credit risk assessment target; initializing the model parameters by combining pre-training and random initialization, and distributing the model structure and parameters to each participant; each participant performs training locally based on the received model, and selects the loss function, optimization algorithm and regularization technology to optimize the model; The vertical federated learning algorithm is applicable to data of the same samples with different characteristics of the participants; the vertical federated learning model construction includes setting input layer parts for the data of different participants respectively, setting a feature fusion layer after the input layer, fusing features by splicing, weighted summation or neural network learning fusion, and setting hidden layers and output layers according to the fused features; encryption technology such as homomorphic encryption and secure multi-party computing protocols are used to protect data privacy during the training process, and a gradient exchange protocol is designed to realize gradient information exchange and model update among all parties; The knowledge transfer federated learning algorithm is suitable for scenarios where the data differences between participants are large but knowledge sharing is still required; The construction of the knowledge transfer federated learning model includes building models in the source domain and the target domain respectively, performing feature migration by finding the correlation features between the source domain and the target domain data, or migrating some parameters of the source domain model to the target domain model, and using the joint loss function design and the federated training process to realize the joint training and optimization of the model; Each participant selects a federated learning algorithm for model training based on data characteristics and business needs.
4. A credit risk management method based on federated learning according to claim 3, characterized in that: The step 3 comprises: Each participant conducts model training based on the selected federated learning algorithm and local dataset; divides the dataset into training set, validation set and test set; Each participant uploads the model parameters obtained through local training to the federated learning coordination server through an encrypted communication channel; After receiving the encrypted parameters uploaded by each participant, the coordination server aggregates the parameters according to the selected federated learning algorithm and updates the global model parameters; The model training, parameter aggregation and global model parameter update are specifically as follows: Horizontal federated learning model: Local training includes loss function calculation, optimization algorithm calculation, and L2 regularization; Loss function calculation: When predicting the probability of default, the cross entropy loss function is often used; assuming the true label is y, the loss function is: Among them, y = 0 means no breach of contract, and y = 1 means breach of contract; Optimization algorithm calculation: First calculate the gradient. Let the model parameter be θ, and the gradient of the loss function with respect to the parameter is where t represents the training round; then calculate the first-order moment estimate m of the gradient t =β1m t-1 +(1-β1)g t and the second moment estimate where β1 and β2 are hyperparameters and bias correction is performed on the first and second moment estimates: Finally update the model parameters: Among them, α is the learning rate and ε is the hyperparameter of the optimizer; L2 regularization: To prevent overfitting, a regularization term is added to the loss function. The new loss function is: where λ is the regularization coefficient, θ i are model parameters; Each participant uploads the model parameters obtained through local training to the federated learning coordination server through an encrypted communication channel. After receiving the encrypted parameters uploaded by each participant, the coordination server aggregates the model parameters according to the weighted average method of horizontal federated learning. Assuming that there are m participants and the amount of data of the i-th participant is n i , the model parameter uploaded is θ i , then the updated global model parameters after aggregation are: That is, the weights are determined according to the amount of data of the participants and weighted average is performed; Vertical federated learning model: Local training includes gradient encryption and gradient aggregation. The gradient encryption adopts homomorphic encryption technology, and the gradient aggregation adopts secure multi-party computing protocol. Assume that the gradient calculated by participant A is g A , the gradient calculated by participant B is g B ; Using homomorphic encryption to encrypt the gradient, the encrypted gradient of participant A is E(g A ), the encrypted gradient of participant B is E(g B ) and sends the encrypted gradient to the coordination server; Aggregation in the coordination server. After receiving the encrypted gradients sent by the participants, the coordination server performs gradient aggregation operations through the secure multi-party computing protocol. In a simple additive homomorphic encryption scenario, the aggregated gradients Where E -1 is a decryption operation; The gradient after encrypted exchange and aggregation is g agg , let the model parameter be θ and the learning rate be α, then the updated global model parameter is: θ t+1 =θ t -αg agg ; Knowledge transfer federated learning model: Local training includes source domain training, target training, joint training, and federal training; In source domain training, the mean square error loss function is used to measure the difference between the source domain model output and the target feature representation; let the true output of the source domain model be y s , then the loss function is Where m s is the number of samples in the source domain; using the Adam optimization algorithm, first calculate the gradient where θ s is the source domain model parameter, t represents the training round; calculate the first-order moment estimate m of the gradient s,t =β1m s,t-1 +(1-β1)g s,t and the second moment estimate To make a deviation correction: Update parameters: where α t is the learning rate; Target domain training, set the goal to predict the probability of default, use the cross entropy loss function; set the target domain true label to y t , where y t =0 means no breach of contract, y t =0 indicates default, then the loss function is: Where m t is the number of samples in the source domain; using the Adam optimization algorithm, first calculate the gradient where θ s is the source domain model parameter, t represents the training round; calculate the first-order moment estimate m of the gradient t,t =β1m t,t-1 +(1-β1)g t,t and the second moment estimate To make a deviation correction: Update parameters: where α t is the learning rate; Joint training: Joint loss function, assuming the source domain model loss function is L s , the target domain model loss function is L t ; The joint loss function is: L = λ1L s +λ2L t , where λ1 and λ2 are weight coefficients used to balance the training of the two domain models; Federated training: Each participant performs training locally in the manner of federated learning; the source domain gradient calculated locally by the participant is g s , the target domain gradient is g t , encrypt or privacy-process the gradient information and upload it to the federated learning coordination server; the coordination server performs aggregation operations to obtain the aggregated gradient g agg =w s g s +w t g t , where w s is the knowledge contribution weight of the source domain, w t is the knowledge contribution weight of the target domain; let the model parameter be θ and the learning rate be α, then the updated global model parameter is θ t+1 =θ t -αg agg ; After completing local training, the aggregated updated global model parameters are distributed to all participants through the coordination server for the next round of local training. Repeat the above steps for multiple rounds of local training and global model updates until the model performance is stable or the preset number of iterations is reached.
5. A credit risk management method based on federated learning according to claim 4, characterized in that: The step 4 comprises: Using the trained federated learning model, each participant inputs the credit data of local customers into the federated learning model for risk assessment, and outputs the risk assessment result, i.e., the probability of customer default; Based on the customer default probability obtained from the credit risk assessment, the participants formulate corresponding risk management strategies; For low-risk customers with a low probability of default, more favorable credit services can be provided; For customers with a medium probability of default, appropriate risk monitoring and management measures are adopted; For high-risk customers with a higher probability of default, strict risk prevention measures are taken.
Citation Information
Patent Citations
Disease data processing method, device and equipment based on federal learning and medium
CN110444263A
Credit risk control system and method based on federation mode
CN111461874A
Credit card transaction risk prediction method based on federated learning
CN112418520A
Horizontal and vertical federated learning combined algorithm
WO2024060410A1
Cited By
Asset transaction risk monitoring system based on data analysis
CN120146854A
Credit risk prediction method based on personalized federal continuous learning
CN120163645A
Label data expansion method and platform applied to retail scene and storage medium
CN120316273A
Middle number merchant credit scoring method and device, electronic equipment and storage medium
CN120563213A
Live broadcast e-commerce accounting management data processing system based on privacy calculation
CN120996958A