Federal learning model training method based on Gaussian difference privacy

By introducing Gaussian noise and model exchange mechanisms into federated learning, the problem of degraded model convergence performance and privacy leakage risks caused by data heterogeneity is solved, and efficient privacy protection and global model performance improvement is achieved.

CN119884737APending Publication Date: 2025-04-25NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411864607.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

In the federated learning scenario, due to the heterogeneity of client data distribution and differences in computing power, global model convergence performance declines and privacy leakage risks.

Method used

A federated learning model training method based on Gaussian differential privacy is adopted, Gaussian noise is introduced in local training, and a model exchange mechanism is used during global aggregation, and the difference threshold is dynamically set to determine whether global model aggregation or local model parameter exchange is performed.

Benefits of technology

It effectively reduces the negative impact of data heterogeneity on the performance of the global model, and realizes privacy protection, improving the performance and privacy protection capabilities of the global model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119884737A_ABST
    Figure CN119884737A_ABST
Patent Text Reader

Abstract

The invention discloses a federal learning model training method based on Gaussian difference privacy, which comprises the following steps: a client executes local model training after not putting back uniform sampling part of local data, then performs privacy protection disturbance processing on local model parameters and sends the local model parameters to a central server; and the central server calculates the difference degree of the local model parameters between every two clients, dynamically sets a difference degree threshold value, and judges whether to perform global model aggregation or local model parameter exchange according to the difference degree threshold value. If the difference degree exceeds a threshold value, orderly exchanging local model parameters of the corresponding client according to the difference degree; and if not, weighting and aggregating local model parameters according to the data volume, updating the global model, and issuing the global model. According to the method, the problem of global model offset caused by client data isomerism is solved, and meanwhile, the balance of privacy protection, model performance and calculation overhead is realized through technologies such as Gaussian difference privacy disturbance, dynamic threshold setting and model parameter exchange. The method is suitable for distributed learning scenes with remarkable data isomerism and high privacy protection requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the intersection of privacy protection and federated learning, and in particular to a federated learning model training method based on Gaussian differential privacy, which is mainly used in model parameter exchange and aggregation technology in data heterogeneous scenarios. Background Art

[0002] At present, deep learning has a wide range of applications in artificial intelligence, but traditional centralized learning requires all data collected by local devices such as mobile phones to be stored in a data center or cloud server. This requirement not only raises concerns about privacy risks and data leakage, but also places high demands on the storage and computing power of the server when the amount of data is huge. Therefore, Federated Learning (FL) has become a promising collaborative learning infrastructure. In FL systems, participants keep their data locally without sharing sensitive raw data. Instead, they promote the collective learning process by training models locally and sharing model parameters only with a central server. This parameter server aggregates updates and redistributes the optimized model to all participants. McMahan et al. first introduced the concept of FL based on data parallelism and proposed the Federated Average (FedAvg) algorithm. As a decentralized machine learning method, FedAvg allows multiple devices to collaboratively train machine learning models while storing user data locally. FedAvg eliminates the need to upload users' sensitive data to centralized servers and enables edge devices to locally train shared models in their own local datasets.

[0003] Many federated learning algorithms are homogeneous by default and have achieved good experimental results, but they rely heavily on the assumption that all participants share the same network structure and have similar data distribution. However, in the case of large-scale device participation, there may be great differences in data distribution, model structure, communication network, and edge devices of the system, which makes it challenging to achieve federated collaboration. Federated learning related to these situations is referred to as heterogeneous federated learning. The communication cost required to transmit parameters between the server and local devices, the computing power and energy consumption required by local devices, and the heterogeneity and randomness of a large number of local devices that may exist during the learning process are mainly reflected in two aspects: device heterogeneity and data heterogeneity. (1) Device heterogeneity: Device heterogeneity refers to the differences in computing power, storage resources, and network bandwidth among client devices participating in federated learning. Since the nodes of federated learning may come from different physical devices (such as smartphones, IoT devices, edge servers, etc.), the performance and resource conditions of each device will be different; (2) Data heterogeneity: Data heterogeneity refers to the situation where different clients participating in federated learning have inconsistencies in data distribution, feature space, or label distribution. In federated learning, the dataset of each client is usually generated by the user's personal data, resulting in a non-independent and identically distributed (Non-IID) data situation, that is, the data distribution of each client is significantly different.

[0004] Although FL improves privacy by localizing data, privacy issues arise during the sharing of individual model updates between clients, and attackers (e.g., untrusted servers) may still be able to undermine the privacy of the client's local training data through inference attacks. In order to enhance the privacy of FL systems, several methods based on homomorphic encryption or secure multi-party computation have been proposed. However, these techniques require a large amount of computational overhead and cannot protect the final output of the computation, making them vulnerable to privacy leakage. One of the most common ways to mitigate FL privacy risks is differential privacy (DP). Many works have demonstrated that by adding appropriate DP noise or uploaded model parameters in the local training phase, unintentional leakage of private original data can be prevented. For example, through member reasoning attacks. Currently, federated learning based on differential privacy protection has attracted widespread interest. In addition to (centralized) DP, other DP models, such as local differential privacy (LDP) and shuffle models derived from DP, are also widely used in FL.

[0005] In summary, the goal of this invention is to propose a secure and efficient differential privacy federated learning method for data heterogeneity scenarios, to achieve a balance between privacy protection and experimental accuracy, and to reduce the impact of data heterogeneity on federated learning. Summary of the invention

[0006] The purpose of the present invention is to provide a federated learning model training method based on Gaussian differential privacy, which solves the problem of global model deviation caused by client data heterogeneity.

[0007] Technical solution: A federated learning model training method based on Gaussian differential privacy. The client performs local model training by uniformly sampling part of the local data without replacement, and then performs privacy protection perturbation processing on the local model parameters and sends them to the central server. The central server calculates the difference between the local model parameters of each client, dynamically sets the difference threshold, and determines whether to perform global model aggregation or local model parameter exchange based on this. If the difference exceeds the threshold, the local model parameters of the corresponding client are exchanged in order according to the difference size. If it does not exceed the threshold, the local model parameters are weighted by the amount of data and aggregated into a global model and sent down.

[0008] During the local training process on the client, for each gradient update, a clipping operation is performed to limit the L2 norm of the gradient, and noise that follows a Gaussian distribution is added to meet GDP privacy protection requirements;

[0009] The server calculates the difference of local model parameters of each client and performs weighted aggregation for model exchange, thus reducing the impact of data heterogeneity on global model updates.

[0010] The method aims at the model training problem in heterogeneous data scenarios, and improves the performance and privacy protection capability of the global model through dynamic difference discrimination and model parameter exchange mechanism.

[0011] Furthermore, the method includes the following processing steps for the central server and the client:

[0012] S1. The server sets the initial global model ω based on actual needs. 0 , noise scale ζ, number of federated training rounds Τ, number of client iterations, global learning rate η g , and each client’s local learning rate η i , batch size Β, and send the above parameters and the Gaussian differential privacy GDP required for this federated learning to each client of the federated learning;

[0013] S2. In the tth round of training, the server randomly selects m clients and sets the global model parameters ω of the previous round. t-1 Send to all selected clients;

[0014] S3, each client i based on local data D i Perform local training, sample local data without replacement during training, and calculate local gradient g i , after clipping the gradient, add Gaussian noise to generate the perturbed gradient g' i, and update the local model parameters y i ;

[0015] S4. The server receives a local model parameter list Y from each client. t ={y 1 ,y 2 ,…,y m}, calculate the local model difference matrix D between clients t , and dynamically set the threshold δ according to the difference distribution between clients t Do the following:

[0016] If all differences do not exceed the threshold δ t :According to the amount of data on the client, the local model parameters are weighted and aggregated to obtain the new global model parameters ω t , and send it to all clients;

[0017] If the difference exceeds the threshold δ t :According to D t In the descending order of the difference in the , clients are selected in turn to exchange their local model parameters. The exchanged model parameters are directly distributed to the corresponding clients without global model aggregation;

[0018] S5. Determine whether the global model has converged. If so, stop training; otherwise, set t=t+1 and return to step S2.

[0019] Furthermore, in step S3, each round of training process of each client i is as follows:

[0020] S31, local data set D i Sampling without replacement is performed according to a certain ratio r to generate a training sample set D' i ;

[0021] S32, using the sampled data D' i Perform local model training and perturb the gradient of each update based on the Gaussian differential privacy method, specifically the local gradient g of each client i Clip it so that its modulus does not exceed the set threshold C; then add noise that follows Gaussian distribution to the clipped gradient to obtain the perturbed gradient g' i ;

[0022] S33, update the local model parameter y according to the perturbed gradient i .

[0023] In step S4, the central server processes the local model parameters of the client as follows:

[0024] S41. After receiving the local model parameters of the client, the central server calculates the difference between the local models of each client and generates a difference matrix D t , where the difference calculation formula is:

[0025] D t [i,j]=||y i -y j || p

[0026] Where p is the norm type, y i ,y j denote the local model parameters of client i and client j respectively;

[0027] S42, based on the difference matrix D t The distribution of all client differences in , by calculating the mean and standard deviation as the threshold for the current training round:

[0028] δ t =μ t +2σ t

[0029] in m represents the number of local models, σ t Indicates the standard deviation of the difference in the current round t;

[0030] S43, sorting from large to small according to the difference: if no difference exceeds the threshold, the server performs weighted aggregation on the local model parameters uploaded by all clients according to the data volume, and the formula is:

[0031]

[0032] Among them, n i represents the data volume of client i, and N represents the total data volume of all clients;

[0033] S44, if the threshold is exceeded, t The local model parameters of the clients are exchanged in descending order. The local model parameters of each client are exchanged only once, and the clients that have been exchanged will no longer participate in repeated exchanges. The exchanged local model parameters are directly distributed to the corresponding clients for the next round of local training.

[0034] Furthermore, in the differential privacy federated model update and parameter exchange method under data heterogeneity conditions, the client operation process steps are as follows:

[0035] (1-1) Accept the global model parameters sent by the central server;

[0036] (1-2) Sample the local data without replacement, use the sampled data to train the local model, and calculate the gradient;

[0037] (1-3) Clip the gradient and add noise to the gradient using GDP;

[0038] (1-4) Update local model parameters;

[0039] (1-5) Repeat steps (1-2) to (1-4) for a total of τ rounds;

[0040] (1-6) Upload local model parameters to the central server.

[0041] Furthermore, in the differential privacy federated model update and parameter exchange method under data heterogeneity conditions, the central server operation process steps are as follows:

[0042] (2-1) The central server initializes the global model ω 0 , noise scale ζ, number of federated training rounds Τ, number of client iterations τ;

[0043] (2-2) Send the global model parameters to each client;

[0044] (2-3) receiving local model parameters uploaded by each client;

[0045] (2-4) Calculate the difference between any two local models and calculate the threshold;

[0046] (2-5) Determine whether the difference exceeds the threshold. If the difference does not exceed the threshold, it is determined that the local model deviation of the client in this round is not serious, and the global model aggregation and distribution are performed normally. If the difference exceeds the threshold, the local models of the clients that exceed the difference threshold are exchanged in order, and the local models that have been exchanged are not exchanged repeatedly.

[0047] (2-6) After T rounds of federated training, the trained global model is tested using the test set.

[0048] Beneficial effects: The present invention solves the problems of decreased model convergence performance and privacy leakage risk caused by data distribution heterogeneity and computing power differences among clients in federated learning scenarios. The present invention is a parameter exchange and model update method based on Gaussian differential privacy (GDP). By introducing Gaussian noise in local training and using a model exchange mechanism in global aggregation, the negative impact of data heterogeneity on global model performance is effectively reduced, and privacy protection is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 It is the overall flow chart of the present invention;

[0050] Figure 2Schematic diagram of the client process for the example of the present invention;

[0051] Figure 3 Schematic diagram of the central - end process for the example of the present invention;

[0052] Figure 4 It is a visual display of the FMNIST dataset partitioned by the Dirichlet distribution. Specific implementation manners

[0053] To elaborate in detail on the technical solution disclosed by the present invention, the following further elaboration is made in combination with the specification drawings and specific implementation steps.

[0054] The present invention solves the problems of the decline in the convergence performance of the global model and the risk of privacy leakage caused by the heterogeneity of the data distributions and the differences in computing capabilities of each client in the federated learning scenario. A federated learning model training method based on Gaussian differential privacy is proposed. By introducing Gaussian noise in local training and using a model exchange mechanism in global aggregation, the negative impact of data heterogeneity on the performance of the global model is effectively reduced, and privacy protection is achieved.

[0055] The present invention mainly includes the following two aspects:

[0056] (1) Local gradient perturbation based on GDP (Gaussian differential privacy): During the local training process of the client, for each gradient update, a clipping operation is performed to limit the L2 - norm of the gradient, and at the same time, noise obeying a Gaussian distribution is added to meet the GDP privacy protection requirements.

[0057] (2) Aggregation optimization based on difference degree: The server - side calculates the difference degree of the local model parameters of each client for weighted aggregation of model exchange, reducing the impact of data heterogeneity on the global model update.

[0058] Specifically, the implementation steps of the method of the present invention are as follows:

[0059] S1. The server - side sets the initial global model ω 0 , noise scale ζ, number of federated training rounds Τ, number of client iterations, global learning rate η g , and the local learning rate η of each client i , batch size Β, and sends the foregoing parameters and the Gaussian differential privacy GDP required for this federated learning to each client of the federated learning.

[0060] S2. In the t - th round of training, randomly select m clients (m < K), and send the global model parameters of the previous round to all the selected clients;

[0061] S3. Each client is based on the local data D iPerform local training, sample local data without replacement during training, and calculate local gradient g i , after clipping the gradient, add Gaussian noise to generate the perturbed gradient g' i , and update the local model parameters y i ;

[0062] In this step, the training process of each round of each client is as follows:

[0063] S31, local data set D i Perform sampling without replacement according to a certain ratio r to generate a training sample set D' i ;

[0064] S32, using the sampled data D' i Perform local model training and perturb the gradient of each update based on the Gaussian differential privacy method, including:

[0065] The local gradient g for each client i Cut it so that its module length does not exceed the set threshold C;

[0066] Add noise that follows a Gaussian distribution to the clipped gradient to get the perturbed gradient g' i ;

[0067] S33, update the local model parameter y according to the perturbed gradient i .

[0068] S4. The server receives a local model parameter list Y from each client. t ={y 1 ,y 2 ,…,y m}, calculate the local model difference matrix D between clients t , and dynamically set the threshold δ according to the difference distribution between clients t Do the following:

[0069] If all differences do not exceed the threshold δ t :According to the amount of data on the client, the local model parameters are weighted and aggregated to obtain the new global model parameters ω t , and send it to all clients;

[0070] If the difference exceeds the threshold δ t :According to D t The clients are selected in order from large to small in terms of the difference in , and their local model parameters are exchanged. The exchanged local model parameters are directly distributed to the corresponding clients without global model aggregation.

[0071] Furthermore, the central server processes the client's local model parameters as follows:

[0072] S41. After receiving the local model parameters of the client, the central server calculates the difference between the local models of each client and generates a difference matrix D t , where the difference calculation formula is:

[0073] D t [i,j]=||y i -y j || p

[0074] Where p is the norm type, y i ,y j denote the local model parameters of client i and client j respectively.

[0075] S42, based on the difference matrix D t The distribution of all client differences in , by calculating the mean and variance as the threshold for the current training round:

[0076] δ t =μ t +2σ t

[0077] in

[0078] m represents the number of local models, σ t Indicates the standard deviation of the difference in the current round t;

[0079] S43, sorting from large to small according to the difference: if no difference exceeds the threshold, the server performs weighted aggregation on the local model parameters uploaded by all clients according to the data volume, and the formula is:

[0080]

[0081] Among them, n i represents the data volume of client i, and N represents the total data volume of all clients;

[0082] If the difference exceeds the threshold, t The local model parameters of the clients are exchanged in descending order. The local model parameters of each client are exchanged only once, and the clients that have been exchanged will no longer participate in repeated exchanges. The exchanged local model parameters are directly distributed to the corresponding clients for the next round of local training.

[0083] S5. Determine whether the global model has converged. If so, stop training; otherwise, set t=t+1 and return to step S2.

[0084] Combination Figure 2 ,The client operation process steps in the differential privacy federated model update and parameter exchange method under data heterogeneity are as follows:

[0085] (1-1) Accept the global model parameters sent by the central server;

[0086] (1-2) Sample the local data without replacement, use the sampled data to train the local model, and calculate the gradient;

[0087] (1-3) Clip the gradient and add noise to the gradient using GDP;

[0088] (1-4) Update local model parameters;

[0089] (1-5) Repeat steps 2 to 4 for τ rounds;

[0090] (1-6) Upload local model parameters to the central server.

[0091] Combination Figure 3 ,The central server operation process steps of the differential privacy federated model update and parameter exchange method under data heterogeneity are as follows:

[0092] (2-1) The central server initializes the global model ω 0 , noise scale σ, number of federated training rounds Τ, number of client iterations τ;

[0093] (2-2) Send the global model parameters to each client;

[0094] (2-3) receiving local model parameters uploaded by each client;

[0095] (2-4) Calculate the difference between local models and the threshold value;

[0096] (2-5) Determine whether the difference exceeds the threshold. If the difference does not exceed the threshold, it is determined that the local model offset of the client in this round is not serious, and global model aggregation and distribution are performed normally. If the difference exceeds the threshold, the local models of the clients that exceed the difference threshold are exchanged in sequence, and those that have been exchanged are not exchanged repeatedly.

[0097] (2-6) After T rounds of federated training, the trained global model is tested using the test set.

[0098] According to the derived calculation, the use of technology based on Gaussian differential privacy (GDP) to perform privacy protection processing on the client's local training data can effectively reduce the risk of privacy leakage during data transmission and reduce the impact of heterogeneous data on model performance to a certain extent, but the noise injection may lead to a decrease in the model convergence speed; when using traditional differential privacy technology, although the computational overhead is small, the parameter perturbation has a greater impact on the accuracy of the global model, and it is difficult to maintain stable performance in complex scenarios. Therefore, the effectiveness of the present invention will be evaluated through experiments below to verify the balance between its privacy protection effect and model performance under different heterogeneous data distribution conditions, so as to further prove the scientific credibility of the present invention in federated learning.

[0099] The following is the experimental scenario setting of the present invention and the experimental results. The experiment uses two commonly used data sets in the field of federated learning: Fashion MNIST (FMNIST) and MNIST data sets, which are used to train and verify the performance and privacy protection effect of the federated learning algorithm. By comparing the global model performance on the two data sets, the effectiveness of the present invention under different task complexities can be more comprehensively evaluated. In order to evaluate the performance of the algorithm in data heterogeneous scenarios, it is usually necessary to generate non-independent and identically distributed data sets. Dirichlet distribution provides a flexible method to simulate the data distribution differences between clients by controlling the parameter α.

[0100] Figure 4 The figure shows the category distribution of non-iid data simulated using Dirichlet distribution. In order to simulate the heterogeneity of the data, we assign a probability vector sampled from the Dirichlet distribution to each client, which controls the distribution ratio of each category in each client's data. In the figure, the bar chart of each client represents the category distribution of the client, and bars of different colors represent different categories. Specifically, as the Dirichlet parameter α changes, the heterogeneity of data distribution between clients gradually increases. For example, when α is small (such as 0.1 or lower), certain categories of data dominate the client, resulting in more significant differences in the data set between clients; when α is small (such as 10 or higher), the data distribution of the client tends to be more uniform, and the number of samples in each category is relatively balanced.

[0101] This non-iid data simulation method is an effective way to evaluate the performance of federated learning algorithms in heterogeneous data environments. It can test the convergence and generalization ability of federated learning models under uneven distribution of client data. In this experiment, the Dirichlet distribution simulation method was used. By adjusting the value of α, we can control the uniformity of data distribution and evaluate the impact of different data distributions on federated learning performance.

[0102] Table 1. Comparison of accuracy under α = 0.01 in FMNIST dataset

[0103]

[0104] Table 2. Comparison of accuracy under α=0.1 in MNIST dataset

[0105]

[0106] Tables 1 and 2 are for the FMNIST and MNIST datasets, with heterogeneity levels of 0.01 and 0.1. The vertical axis represents the accuracy of the global model, and the horizontal axis represents the number of rounds of federated learning. Figure 4 The performance comparison of three methods is shown in Figure 1: GDPFL (Federated Learning Based on Gaussian Differential Privacy), DP-SCAFFOLD, and DPFL. Curves of different colors represent the performance changes of these three methods under different privacy budgets.

[0107] By analyzing the experimental results, we can draw the following conclusions: the GDPFL method shows the highest accuracy in all rounds, and has less impact on the update of the federated learning global model due to heterogeneous data. The stability of the federated learning global model training is better than that of the SCAFFOLD and DPFL methods.

Claims

1. A federated learning model training method based on Gaussian differential privacy, characterized in that: The client performs local model training by uniformly sampling some local data without replacement, and then performs privacy-preserving perturbation processing on the local model parameters and sends them to the central server. The central server calculates the difference between the local model parameters of each client, dynamically sets the difference threshold, and determines whether to perform global model aggregation or local model parameter exchange based on the difference threshold. If the difference exceeds the threshold, the local model parameters of the corresponding client are exchanged in order according to the difference; if it does not exceed the threshold, the local model parameters are weighted and aggregated into a global model according to the data volume and sent down; During the local training process on the client, clipping is performed for each gradient update to limit the L2 norm of the gradient, and noise that follows a Gaussian distribution is added to meet GDP privacy protection requirements; The server side calculates the difference of local model parameters of each client and performs weighted aggregation of model exchange to reduce the impact of data heterogeneity on global model updates. The method aims at the model training problem in heterogeneous data scenarios, and improves the performance and privacy protection capability of the global model through dynamic difference discrimination and model parameter exchange mechanism.

2. The method for training a federated learning model based on Gaussian differential privacy according to claim 1, characterized in that: The processing steps of the method for the central server and the client include: S1. The server sets the initial global model ω0, noise scale ζ, number of federated training rounds Τ, number of client iterations, and global learning rate η based on actual needs. g , and each client’s local learning rate η i , batch size Β, and send the above parameters and the Gaussian differential privacy GDP required for this federated learning to each client of the federated learning; S2. In the tth round of training, the server randomly selects m clients and sets the global model parameters ω of the previous round. t-1 Send to all selected clients; S3, each client i based on local data D i Perform local training, sample local data without replacement during training, and calculate local gradient g i , after clipping the gradient, add Gaussian noise to generate the perturbed gradient g' i , and update the local model parameters y i ; S4. The server receives a local model parameter list Y from each client. t ={y1,y2,…,y m }, calculate the local model difference matrix D between clients t , and dynamically set the threshold δ according to the difference distribution between clients t Do the following: If all differences do not exceed the threshold δ t :According to the amount of data on the client, the local model parameters are weighted and aggregated to obtain the new global model parameters ω t , and send it to all clients; If the difference exceeds the threshold δ t :According to D t In the descending order of the difference in the , clients are selected in turn to exchange their local model parameters. The exchanged model parameters are directly distributed to the corresponding clients without global model aggregation; S5. Determine whether the global model has converged. If so, stop training; otherwise, execute t=t+1, and then return to step S2.

3. The method for training a federated learning model based on Gaussian differential privacy according to claim 1, characterized in that: In step S3, each round of training process of each client i is as follows: S31, local data set D i Sampling without replacement is performed according to a certain ratio r to generate a training sample set D' i ; S32, using the sampled data D' i Perform local model training and perturb the gradient of each update based on the Gaussian differential privacy method, specifically by perturbing the local gradient g of each client i Clip it so that its modulus does not exceed the set threshold C; then add noise that follows Gaussian distribution to the clipped gradient to obtain the perturbed gradient g' i ; S33, update the local model parameter y according to the perturbed gradient i .

4. The method for training a federated learning model based on Gaussian differential privacy according to claim 1, characterized in that: In step S4, the central server processes the local model parameters of the client as follows: S41. After receiving the local model parameters of the client, the central server calculates the difference between the local models of each client and generates a difference matrix D t , the difference calculation formula is: D t [i,j]=||y i -y j || p Where p is the norm type, y i ,y j denote the local model parameters of client i and client j respectively; S42, based on the difference matrix D t The distribution of all client differences in , by calculating the mean and variance as the threshold for the current training round: d t =μ t +2s t in m represents the number of local models; σ t Indicates the standard deviation of the difference in the current round t; S43. Sort by difference from large to small: If no difference exceeds the threshold, the server performs weighted aggregation on the local model parameters uploaded by all clients according to the amount of data, which can be expressed mathematically as follows: Among them, n i represents the data volume of client i, and N represents the total data volume of all clients; S44, if the threshold is exceeded, t The local model parameters of the clients are exchanged in descending order. The local model parameters of each client are exchanged only once, and the clients that have been exchanged will no longer participate in repeated exchanges. The exchanged local model parameters are directly distributed to the corresponding clients for the next round of local training.

5. The method for training a federated learning model based on Gaussian differential privacy according to claim 1, characterized in that: In the differential privacy federated model update and parameter exchange method under data heterogeneity conditions, the client operation process steps are as follows: (1-1) Accept the global model parameters sent by the central server; (1-2) Sample the local data without replacement, use the sampled data to train the local model, and calculate the gradient at the same time; (1-3) Clip the gradient and add noise to the gradient using Gaussian differential privacy; (1-4) Update local model parameters; (1-5) Repeat steps (1-2) to (1-4) for a total of τ rounds; (1-6) Upload local model parameters to the central server.

6. The method for training a federated learning model based on Gaussian differential privacy according to claim 1, characterized in that: In the differential privacy federated model update and parameter exchange method under data heterogeneity conditions, the central server operation process steps are as follows: (2-1) The central server initializes the global model ω0, the noise scale ζ, the number of federated training rounds Τ, and the number of client iterations τ; (2-2) Send the global model parameters to each client; (2-3) receiving local model parameters uploaded by each client; (2-4) Calculate the difference between any two local models and calculate the threshold; (2-5) Determine whether the difference exceeds the threshold. If the difference does not exceed the threshold, it is determined that the local model deviation of the client in this round is not serious, and the global model aggregation and distribution are performed normally. If the difference exceeds the threshold, the local models of the clients that exceed the difference threshold are exchanged in order, and the local models that have been exchanged are not exchanged repeatedly. (2-6) After T rounds of federated training, the trained global model is tested using the test set.

Citation Information

Cited By

  • Cross-college practical training data sharing method based on data privacy

    CN121277901A