A federated learning method and system based on local differential privacy noise control

By using the distance between the local model and the global model as a constraint factor in federated learning, and using mutual information to calculate perturbations, the problems of privacy leakage and model performance degradation in federated learning are solved, achieving higher model performance and privacy protection effects.

CN118504709BActive Publication Date: 2025-04-15UNIV OF JINAN
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410611222.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-16
Publication Date
2025-04-15
Estimated Expiration
2044-05-16

AI Technical Summary

Technical Problem

In federated learning, the model parameter information uploaded by the client will leak user privacy data, and because the data is not independent and same distributed, the model convergence speed and direction are different, resulting in a degradation of model performance.

Method used

By using the distance between the local model and the global model as a constraint factor, the local model is trained and the perturbation to be added is calculated using mutual information to protect client privacy data and improve model performance.

Benefits of technology

Effectively prevent local models from deviating too much from the global model during the update process, improve the performance of the federated learning model, reduce the negative impact of added noise on model performance, and alleviate the loss of model accuracy on non-independent homogeneous data sets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118504709B_ABST
    Figure CN118504709B_ABST
Patent Text Reader

Abstract

The present disclosure proposes a federated learning method and system based on local differential privacy noise control, the method comprising: the client uses the difference between the local model and the global model as a constraint factor to update the local local model; based on the updated local local model parameters and the global model parameters, the disturbance addition value is calculated using mutual information; the disturbance addition value is added to the updated local local model parameters, and the disturbance-added local local model parameters are sent to the central server; the central server aggregates the received disturbance-added local local model parameters, reconstructs the model according to the aggregated data to obtain the global model of this round of training, and then sends it to each client. By training the local model as a constraint factor and using mutual information to calculate the disturbance to be added, the performance of the global model training of the federated learning is achieved while protecting the local privacy of the client.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of federated learning, and in particular to a federated learning method and system based on local differential privacy noise control. Background Art

[0002] Federated learning is a distributed machine learning framework with privacy protection. It can collaboratively train a shared global model on multiple clients without exposing the original data. The client only needs to upload the trained model parameters instead of uploading its own private original data, which reduces costs while maintaining user trust.

[0003] However, studies have shown that model parameter information (such as gradient information) uploaded by clients in federated learning can leak users' private data. Secondly, the data of clients participating in training in federated learning are often not independent and identically distributed. The heterogeneity of data distribution leads to inconsistent model convergence directions of different clients, which slows down the model convergence speed or even causes the model to not converge. The heterogeneity of data quality may lead to sample label errors, thereby reducing the effectiveness of the federated learning model and increasing the communication cost of training.

[0004] In order to protect the privacy data of the client from being leaked during the upload of federated learning model parameters, many studies have been conducted. Shokri et al. proposed that differential privacy can transmit model parameters after perturbation, but the cost is the reduction of model accuracy. Choudhury et al. proposed a method to provide dynamic differential privacy in the context of federated learning, which aims to maximize node utility and improve model performance while supporting the privacy level required by GDPR and HIPAA. The SPDL framework uses differential privacy Gaussian noise for local model updates, providing a guarantee for secure federated learning. Kang et al. proposed adding specific noise to model parameters before aggregation to achieve privacy protection. However, the introduction of noise has a negative impact on the performance of the model. To solve this problem, Shen proposed a regularization method to improve the robustness of the training model to injected noise. Zhu et al. proposed a fine-grained method to distribute noise according to the importance value of the layer to maintain high model performance. Xue et al. designed a general method for sensitivity estimation based on local and global historical information to achieve higher accuracy. Zhu et al. added different degrees of Laplace noise to the intermediate parameters based on the model quality evaluation results to prevent the intermediate parameters from leaking local data privacy during transmission, and realized the dynamic adjustment of the privacy noise of the intermediate parameters. The above method effectively reduces the risk of private data leakage on the federated learning client, but there are still some defects:

[0005] 1. Differential privacy is applicable to parameter privacy protection in machine learning. However, the introduction of noise will inevitably affect the accuracy of the model. The noise added by differential privacy is random. Different noises have different effects on the gradient. Adding random noise to the gradient may cause the gradient direction to deviate. How to ensure the performance of global model training of federated learning while protecting the local privacy of the client is still an important issue that needs to be solved urgently.

[0006] 2. Since the data of federated learning clients are not independent and identically distributed, it may lead to different model convergence speeds and directions between different clients. Adding noise to it may further affect the model performance. Most studies have not considered the problem of non-independent and identically distributed client data. Summary of the invention

[0007] To solve the above problems, the present invention proposes a federated learning method and system based on local differential privacy noise control. The local model is trained by taking the distance between the local model and the global model as a constraint factor, which effectively prevents the local model from deviating too much from the global model during the update process. In addition, the mutual information is used to calculate the disturbance to be added to overcome the problem of reduced model performance caused by non-independent and identically distributed (IID) and to achieve the performance of federated learning global model training while protecting the local privacy of the client.

[0008] In order to achieve the above object, the present invention adopts the following technical solution:

[0009] In a first aspect, the present invention provides a federated learning method based on local differential privacy noise control, comprising:

[0010] The client uses the difference between the local model and the global model as a constraint factor to update the local local model;

[0011] Based on the updated local model parameters and global model parameters, the disturbance addition value is calculated using mutual information;

[0012] Adding the disturbance added value to the parameters of the updated local local model, and sending the local local model parameters with the disturbance added to the central server;

[0013] The central server aggregates the received local model parameters with added disturbances, reconstructs the model according to the aggregated data to obtain the global model for this round of training, and then sends it to each client.

[0014] Preferably, the client uses the difference between the local model and the global model as a constraint factor to update the local partial model, specifically including:

[0015] The client inputs the local private data into the local model and the global model respectively to obtain the local prediction probability and the global prediction probability;

[0016] Calculate the KL divergence between the local prediction probability and the global prediction probability, use the KL divergence as a constraint factor, and add it to the cross entropy loss of the training local model to obtain the loss function;

[0017] The gradient is calculated based on the loss function to obtain an updated local model.

[0018] Preferably, the method of calculating the disturbance addition value based on the updated local model parameters and global model parameters using mutual information specifically includes:

[0019] The client calculates the truncation threshold and the noise control variable based on the local model parameters and the global model parameters received in the previous round; specifically, the truncation threshold is calculated based on the difference between the local model parameters and the global model parameters received in the previous round; the noise control variable is calculated based on the local model parameters and the global model parameters received in the previous round using mutual information;

[0020] A disturbance addition value is obtained based on the cutoff threshold and the noise control variable.

[0021] Preferably, obtaining the disturbance addition value based on the cutoff threshold and the noise control variable specifically includes:

[0022] The local model parameters are truncated based on the truncation threshold to obtain a truncated local model;

[0023] Calculate the sensitivity of the local model parameters after truncation, and obtain the Gaussian noise to be added based on the sensitivity;

[0024] Calculate the dynamic privacy noise adjustment coefficient according to the noise control variable;

[0025] The disturbance addition value is calculated according to the Gaussian noise and the dynamic privacy noise adjustment coefficient.

[0026] Preferably, the central server aggregates the received local model parameters with added disturbances, and reconstructs the model according to the aggregated data to obtain the global model of this round of training, which specifically includes:

[0027] The central server receives the local model parameters with added disturbances. When the number of collected parameters reaches the preset value, the FedAvg aggregation algorithm is used to aggregate the collected local model parameters with added disturbances to obtain the global model for this round of training.

[0028] Preferably, the preset value is the number of parameters required to satisfy the FedAvg aggregation algorithm.

[0029] Preferably, the central server sends the reconstructed global model of the current round of training to each client, and each client uses the global model as the initial model for the next round of federated learning training and trains until the global model converges.

[0030] In a second aspect, the present invention provides a federated learning system based on local differential privacy noise control, comprising:

[0031] The local model update module is used by the client to update the local local model by taking the difference between the local model and the global model as a constraint factor;

[0032] A noise calculation module, for calculating a disturbance addition value using mutual information based on updated local model parameters and global model parameters;

[0033] An upload module, used for adding the disturbance added value to the parameters of the updated local partial model, and sending the local partial model parameters with the disturbance added to the central server;

[0034] The sending module is used by the central server to aggregate the local model parameters with added disturbances received, reconstruct the model according to the aggregated data to obtain the global model of this round of training, and then send it to each client.

[0035] In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in a federated learning method based on local differential privacy noise control described in the first aspect.

[0036] In a fourth aspect, the present invention provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of a federated learning method based on local differential privacy noise control described in the first aspect are implemented.

[0037] Compared with the prior art, the present invention has the following beneficial effects:

[0038] 1. The present invention proposes a federated learning method based on local differential privacy noise control. This method ensures the performance of the federated learning model while meeting the local differential privacy requirements, can effectively prevent semi-honest clients and servers from stealing private data, and reduces the negative impact of adding noise on model performance.

[0039] 2. The present invention calculates the noise control variable of the dynamic privacy noise adjustment coefficient based on mutual information. The client can more accurately calculate the disturbance size that needs to be added to the local model, which not only ensures the security of the client's local data, but also reduces the impact of noise on model performance and alleviates the problem of decreased model accuracy caused by adding random noise to local model parameters.

[0040] 3. Traditional methods alleviate model performance issues caused by non-independent and identically distributed data, usually by directly processing the data, which increases the workload of the client. The present invention introduces a local model training strategy to constrain the distance between the local and global update directions. The client does not need to perform complex data processing, and can reduce the impact of independent and identically distributed data on the accuracy of the global model. At the same time, the present invention combines a method for accurately estimating sensitivity. The federated learning client estimates the sensitivity more accurately based on the local local model and the previous round of global model, and uses it on non-independent and identically distributed data sets, which makes up for its shortcomings of only considering independent and identically distributed data sets, further alleviates the model accuracy loss caused by adding differential privacy to clients with non-independent and identically distributed data, and reduces the global model performance issues caused by non-independent and identically distributed data.

[0041] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings constituting a part of the present disclosure are used to provide a further understanding of the present disclosure. The exemplary embodiments of the present disclosure and the description thereof are used to explain the present disclosure but do not constitute a limitation of the present disclosure.

[0043] Figure 1 A main flow chart of a federated learning method based on local differential privacy noise control provided by the present disclosure;

[0044] Figure 2 A diagram of the federated learning architecture provided for this disclosure;

[0045] Figure 3 A flow chart of the client updating loss function provided by the present disclosure;

[0046] Figure 4 A local model update process for adding disturbances to the client calculations provided by the present disclosure;

[0047] Figure 5 A comparison chart of experimental results between the federated learning method provided in the present invention and existing federated learning methods. DETAILED DESCRIPTION

[0048] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0049] In order to solve the problem of decreased model accuracy caused by the client adding differential privacy noise to local data in a federated learning scenario, and the problem of decreased global model performance caused by non-independent and identically distributed client data, the present invention proposes a federated learning method and system based on local differential privacy noise control, which is suitable for federated learning scenarios where multiple clients perform joint training. It can ensure the accuracy of the global model without leaking the privacy of local data of each client, while reducing the impact of non-independent and identically distributed data on model performance.

[0050] Embodiment 1

[0051] like Figure 1 As shown, this embodiment discloses a federated learning method based on local differential privacy noise control, including the following steps:

[0052] S1: The client uses the difference between the local model and the global model as a constraint factor to update the local model;

[0053] S2: Based on the updated local model parameters and global model parameters, the disturbance addition value is calculated using mutual information;

[0054] S3: adding the disturbance added value to the parameters of the updated local local model, and sending the local local model parameters with the disturbance added to the central server;

[0055] S4: The central server aggregates the received local model parameters with added disturbances, reconstructs the model according to the aggregated data to obtain the global model of this round of training, and then sends it to each client.

[0056] This embodiment mainly includes two roles: the central server S and each client C participating in federated learning i .like Figure 2 As shown, the overall architecture of the federated learning described in this embodiment.

[0057] In S1, each client C i Train your own local partial model.

[0058] Specifically, Figure 3 As shown, first, client C i Your own local private data D i =(x, y) are input into the local model ω l and the global model ω g In this paper, we get two predicted probabilities p l and p g , the difference between the predicted probabilities reflects the local model ω l and the global model ω g The difference between.

[0059] It should be understood that the prediction probability is the probability that the input data (such as image data) obtained after the data is input into the model belongs to each category. Each client needs to calculate the prediction probability during training.

[0060] In order to prevent the local model from deviating too much from the global model during the update process, the client C i Calculate the KL divergence between these two predicted probabilities Use this KL divergence value as a constraint factor for training loss and calculate the constraint factor of training loss C = γ·D KL (p l ||p g ), where γ is a hyperparameter that can be tuned to achieve optimal performance.

[0061] Add the obtained constraint factors to the cross entropy loss loss of the local model training to calculate the new loss function L = loss + C.

[0062] Finally, client C i Use the Stochastic Gradient Descent (SGD) algorithm to minimize the loss function L and calculate the gradient Get the trained local model Where α is the step size of the gradient shift.

[0063] In S2, the disturbance addition value is calculated using mutual information based on the updated local model parameters and global model parameters.

[0064] It should be understood that differential privacy is a classic privacy protection technology for machine learning, which can protect model updates without increasing the client communication cost. Differential privacy is defined as follows: Let a randomized algorithm A be used. For two datasets D and D′ that differ in at most one data point and any possible output O, if algorithm A satisfies pr[A(D)∈O]≤e ε pr[A(D′)∈O]+δ, then the randomized algorithm A is said to satisfy (ε,δ) differential privacy protection. Among them, ε represents the privacy protection budget. The smaller the privacy budget, the greater the added noise, the higher the privacy protection level, and the lower the data availability. δ is the error allowed by the algorithm, which is usually a small constant.

[0065] This embodiment uses the Gaussian mechanism to achieve local differential privacy, and can provide a relaxed (ε, δ) differential privacy mechanism. Local differential privacy can achieve data privacy protection during the local training process of the federated learning client.

[0066] Specifically, Figure 4 As shown, client C iFirst, according to the local model parameter ω i and the global model parameters received in the previous round Calculate the cutoff threshold where β is an adjustable parameter called the cutoff factor.

[0067] Client C i Based on the truncation threshold, the trained local model parameters ω i To perform truncation, the specific method is as follows:

[0068] Client C i Compute sensitivity of truncated model parameters where σ 0 is a fixed noise level value. Finally, the random Gaussian noise that needs to be added to this local model is obtained.

[0069] Different from traditional centralized differential privacy, local differential privacy focuses on privacy protection in the data collection process. It can eliminate the assumption of a trusted third party and resist attackers with prior knowledge. It is more suitable for privacy protection of intermediate parameters in federated learning.

[0070] This embodiment uses a method to accurately estimate sensitivity based on the local local model and the global model received in the previous round, and further calculates the Gaussian noise added to the local model parameters, thereby alleviating the problem of model accuracy degradation caused by adding differential privacy noise, thereby achieving smaller model accuracy loss at a higher privacy protection level.

[0071] Each client C i The noise control method of this embodiment is used to determine the disturbance size that needs to be added to the local model. Specifically, first, the client C i Calculation of noise control variables based on mutual information Where H(ω i ) is the local model ω i The entropy of It is a global model The entropy of Yes i and Then, client C i According to MI i Calculate the dynamic privacy noise adjustment coefficient Next, determine the size of the perturbation you need to add

[0072] Mutual information can be used to calculate the correlation between different models trained by clients with non-independent and identically distributed data, which helps the server detect abnormal models more accurately, thereby reducing the misjudgment of contributing models. At the same time, it effectively prevents malicious models from being used for global model aggregation and prevents global model poisoning.

[0073] Combined with the dynamic privacy noise adjustment coefficient of this embodiment, it can not only meet the data privacy protection required by differential privacy, but also achieve the controllability of added noise, reduce the impact of added random noise on model accuracy, and achieve high availability of the model while ensuring data privacy.

[0074] In S3, based on the perturbation value obtained in S2, client C i Get the local model parameters under this embodiment The local model parameters to which the perturbation will be added Sent to the central server.

[0075] In S4, this embodiment uses the FedAvg aggregation algorithm to update the global model.

[0076] It should be understood that FedAvg is a model aggregation algorithm proposed by McMahan et al. for the federated learning distributed framework, which aggregates model parameters through weighted averaging. The basic idea of ​​FedAvg is to upload the parameters of the client's local model to the server. In order to ensure the accuracy of model aggregation, the FedAvg algorithm uses weighted averaging to aggregate models. Specifically, a weight will be assigned to the model parameters uploaded by each client, and then weighted average will be performed. The weight of the model parameters uploaded by the client is assigned according to the amount of local data on the device. The more data a client has, the greater the weight. The server then calculates the average value of all model parameters based on the weights of each client, and then broadcasts this average value to all clients. This process can be iterated multiple times until the model converges, and the final converged model approaches the model of the centralized machine learning result.

[0077] Specifically, in this embodiment, the central server S receives the local model parameters from the client. When the central server S collects the number of local model parameters required by the FedAvg aggregation algorithm, the central server S uses the FedAvg aggregation algorithm to aggregate all the collected local model parameters to obtain a new global model

[0078] In step 6, the central server S sends the new global model Sent to each client C of federated learning i , as client C iThe initial model for the next round of federated learning training. In the federated learning training scenario, each client C i It is necessary to carry out multiple rounds of iterative communication with the central server S until the final global model converges.

[0079] like Figure 5 The above is a comparison chart of the experimental results between this embodiment and not adding noise and adding general Gaussian noise, which shows the superiority of this embodiment. Using non-independent and identically distributed data for federated learning training will lead to unstable global model performance and affect model convergence. If noise is added to the model trained using non-independent and identically distributed data, the accuracy of the global model will be further reduced. Using the federated learning method proposed in this embodiment for training, the same accuracy as when training without adding noise can be obtained, which protects the security of local client privacy data while reducing the problem of decreased model accuracy caused by adding random noise.

[0080] At the same time, this embodiment alleviates the problem of unstable model performance caused by using non-independent and identically distributed data for training. Figure 5 It can be seen that this embodiment reduces the oscillation amplitude of the model and improves the convergence speed of the model. In the first 50 rounds of training, this embodiment can obtain higher accuracy than when no noise is added, and the oscillation amplitude of the model is gradually decreasing. After 50 rounds, there is almost no oscillation, and the model performance tends to be stable.

[0081] Embodiment 2

[0082] This embodiment provides a federated learning system based on local differential privacy noise control, including:

[0083] The local model update module is used by the client to update the local local model by taking the difference between the local model and the global model as a constraint factor;

[0084] A noise calculation module, for calculating a disturbance addition value using mutual information based on updated local model parameters and global model parameters;

[0085] An upload module, used for adding the disturbance added value to the parameters of the updated local partial model, and sending the local partial model parameters with the disturbance added to the central server;

[0086] The sending module is used by the central server to aggregate the local model parameters with added disturbances received, reconstruct the model according to the aggregated data to obtain the global model of this round of training, and then send it to each client.

[0087] Embodiment 3

[0088] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of a federated learning method based on local differential privacy noise control as described in the first embodiment above are implemented.

[0089] Embodiment 4

[0090] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of a federated learning method based on local differential privacy noise control as described in the first embodiment above are implemented.

[0091] The steps or modules involved in the above embodiments 2 to 4 correspond to those in embodiment 1. For the specific implementation, please refer to the relevant description of embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.

[0092] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A federated learning method based on local differential privacy noise control, characterized in that: include: The client uses the difference between the local model and the global model as a constraint factor to update the local local model; Based on the updated local model parameters and global model parameters, the disturbance addition value is calculated using mutual information; Adding the disturbance added value to the parameters of the updated local local model, and sending the local local model parameters with the disturbance added to the central server; The central server aggregates the received local model parameters with added disturbances, reconstructs the model based on the aggregated data to obtain the global model for this round of training, and then sends it to each client; Specifically, first, client C i Your own local private data D i =(x,y) are input into the local model ω l and the global model ω g In this paper, we get two predicted probabilities p l and p g , the difference between the predicted probabilities reflects the local model ω l and the global model ω g The difference between The prediction probability is the probability that the input data belongs to each category after the data is input into the model. Each client needs to calculate the prediction probability during training; Client C i Calculate the KL divergence between these two predicted probabilities Take the KL divergence value as a constraint factor of the training loss and calculate the constraint factor of the training loss C = γ·D KL (p l ||p g ), where γ is a hyperparameter; Add the obtained constraint factors to the cross entropy loss loss of the local model training to calculate the new loss function L = loss + C; Finally, client C i The stochastic gradient descent algorithm is used to minimize the loss function L and calculate the gradient Get the trained local model parameters Where α is the step size of gradient movement; Specifically, client C i First, according to the local model parameter ω i and the global model parameters received in the previous round Calculate the cutoff threshold Where β is an adjustable parameter called the cutoff factor; Client C i Based on the truncation threshold, the trained local model parameters ω i To perform truncation, the specific method is as follows: Client C i Compute sensitivity of truncated model parameters and Where σ0 is a fixed noise level value, and finally the random Gaussian noise that needs to be added to this local model is obtained The sensitivity is accurately estimated based on the local model and the global model received in the previous round, and the Gaussian noise method added to the local model parameters is further calculated to alleviate the problem of model accuracy degradation caused by adding differential privacy noise, thereby achieving smaller model accuracy loss at a higher privacy protection level; Each client C i Based on the noise control method, the disturbance size that needs to be added to the local model is determined. Specifically, first, the client C i Calculation of noise control variables based on mutual information Where H(ω i ) is the local model parameter ω i The entropy of It is a global model The entropy of Yes i and The joint entropy of client C i According to MI i Calculate the dynamic privacy noise adjustment coefficient Next, determine the size of the perturbation you need to add Based on the obtained disturbance added value, client C i Get the local model parameters of the added disturbance The local model parameters to which the perturbation will be added Sent to the central server.

2. A federated learning method based on local differential privacy noise control as claimed in claim 1, characterized in that: The central server aggregates the received local model parameters with added disturbances, and reconstructs the model according to the aggregated data to obtain the global model of this round of training, specifically including: The central server receives the local model parameters with added disturbances. When the number of collected parameters reaches the preset value, the FedAvg aggregation algorithm is used to aggregate the collected local model parameters with added disturbances to obtain the global model for this round of training.

3. A federated learning method based on local differential privacy noise control as claimed in claim 2, characterized in that: The preset value is the number of parameters required to satisfy the FedAvg aggregation algorithm.

4. The method for federated learning based on local differential privacy noise control according to claim 1, characterized in that: Also includes: The central server sends the reconstructed global model of this round of training to each client, and each client uses the global model as the initial model for the next round of federated learning training until the global model converges.

5. A federated learning system based on local differential privacy noise control, characterized in that: include: The local model update module is used by the client to update the local model by taking the difference between the local model and the global model as a constraint factor; A noise calculation module, for calculating a disturbance addition value using mutual information based on updated local model parameters and global model parameters; An upload module, used for adding the disturbance added value to the parameters of the updated local partial model, and sending the local partial model parameters with the disturbance added to the central server; The sending module is used for the central server to aggregate the received local model parameters with added disturbances, reconstruct the model according to the aggregated data to obtain the global model of this round of training, and then send it to each client; Specifically, first, client C i Your own local private data D i =(x,y) are input into the local model ω l and the global model ω g In this paper, we get two predicted probabilities p l and p g , the difference between the predicted probabilities reflects the local model ω l and the global model ω g The difference between The prediction probability is the probability that the input data belongs to each category after the data is input into the model. Each client needs to calculate the prediction probability during training; Client C i Calculate the KL divergence between these two predicted probabilities Take the KL divergence value as a constraint factor of the training loss and calculate the constraint factor of the training loss C = γ·D KL (p l ||p g ), where γ is a hyperparameter; Add the obtained constraint factors to the cross entropy loss loss of the local model training to calculate the new loss function L = loss + C; Finally, client C i The stochastic gradient descent algorithm is used to minimize the loss function L and calculate the gradient Get the trained local model parameters Where α is the step size of gradient movement; Specifically, client C i First, according to the local model parameter ω i and the global model parameters received in the previous round Calculate the cutoff threshold Where β is an adjustable parameter called the cutoff factor; Client C i Based on the truncation threshold, the trained local model parameters ω i To perform truncation, the specific method is as follows: Client C i Compute sensitivity of truncated model parameters and Where σ0 is a fixed noise level value, and finally the random Gaussian noise that needs to be added to this local model is obtained The sensitivity is accurately estimated based on the local model and the global model received in the previous round, and the Gaussian noise method added to the local model parameters is further calculated to alleviate the problem of model accuracy degradation caused by adding differential privacy noise, thereby achieving smaller model accuracy loss at a higher privacy protection level; Each client C i Based on the noise control method, the disturbance size that needs to be added to the local model is determined. Specifically, first, the client C i Calculation of noise control variables based on mutual information Where H(ω i ) is the local model parameter ω i The entropy of It is a global model The entropy of Yes i and The joint entropy of client C i According to MI i Calculate the dynamic privacy noise adjustment coefficient Next, determine the size of the perturbation you need to add Based on the obtained disturbance added value, client C i Get the local model parameters of the added disturbance The local model parameters to which the perturbation will be added Sent to the central server.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in a federated learning method based on local differential privacy noise control as described in any one of claims 1 to 4 are implemented.

7. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in a federated learning method based on local differential privacy noise control as described in any one of claims 1-4 are implemented.

Citation Information

Patent Citations

  • Personalized federal learning and recognition method and system based on differential privacy

    CN115952533A

  • Federal learning privacy protection method based on differential privacy and homomorphic encryption

    CN117421762A