A privacy-preserving approach for federated learning based on generative adversarial networks and knowledge distillation

By training a generative adversarial network locally on the client to generate synthetic data and perform knowledge distillation, combined with balanced sampling of Renyi entropy and Gaussian noise processing, the privacy leakage problem in federated learning is solved, a balance is achieved between privacy protection and model utility, and the security and stability of federated learning are improved.

CN119203240BActive Publication Date: 2025-09-26INNER MONGOLIA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411455371.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-09-26
Estimated Expiration
2044-10-16

AI Technical Summary

Technical Problem

Existing federated learning methods based on generative adversarial networks and knowledge distillation have privacy leakage risks in terms of privacy protection, especially during the process of uploading model parameters, and fail to effectively balance privacy protection and model utility.

Method used

The generative adversarial network is trained locally on the client to generate synthetic data, and the model is updated through knowledge distillation technology. Combined with the balanced sampling strategy of Renyi entropy, Gaussian noise processing and balanced sampling are used to avoid uploading real model parameters, thereby optimizing knowledge quality and privacy protection.

Benefits of technology

It significantly reduces the risk of privacy leakage, improves the reliability and stability of the model, and achieves a balance between privacy protection and model utility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119203240B_ABST
    Figure CN119203240B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for privacy protection in federated learning based on a generative adversarial network and knowledge distillation, and relates to the field of privacy protection technology. The method comprises: S1. local model training; S2. generative adversarial network training; S3. initialization phase communication; S4. distillation training; S5. distillation phase communication; and S6. client update. The present invention innovatively combines a generative adversarial network with knowledge distillation technology. By training a generative adversarial network model locally on the client and generating synthetic data that conforms to the distribution of private data, the method avoids dependence on public datasets, and uses the generated synthetic data for knowledge distillation, thereby achieving knowledge transfer without the need to select a public dataset, effectively avoiding direct exposure of the private data distribution, and significantly reducing the risk of privacy leakage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of privacy protection technology, and in particular to a federated learning privacy protection method based on generative adversarial networks and knowledge distillation. Background Art

[0002] In recent years, machine learning technology has rapidly advanced with the widespread application of large-scale datasets. However, data is often stored in geographically dispersed locations, posing significant challenges to centralized data management. Furthermore, this data may contain sensitive information, and centralized storage not only increases the risk of data leakage but also potentially infringes on personal privacy. Therefore, when processing training data containing sensitive information, traditional centralized machine learning methods can lead to serious privacy issues.

[0003] Federated learning, as a practical machine learning framework, can effectively address data silos and reduce the risk of privacy leaks. This framework allows data to remain locally, typically requiring only the upload of model weights or gradient parameters trained on local data. By aggregating model parameters from different clients, federated learning achieves the goal of distributed training. However, because the model is trained on local data, the uploaded parameters are closely tied to local private information. Existing research has shown that these parameters are highly vulnerable to attacks during the upload process, such as model inversion and inference attacks. Attackers can infer data privacy from the transmitted model parameters or gradients, leading to serious privacy leaks.

[0004] To further enhance privacy protection, existing methods combine federated learning with knowledge distillation techniques, aggregating the prediction results of various participants by performing predictions on large-scale public datasets. This approach aims to achieve knowledge transfer and model updates by leveraging non-sensitive public datasets rather than directly sharing model parameters. However, the quality of public datasets is crucial to the effectiveness of knowledge distillation. Selecting high-quality public datasets often requires understanding the distribution of private data or related information, and this selection process itself may introduce the risk of privacy leakage. To address this issue, data-free federated distillation offers a new approach, generating synthetic data through generative adversarial networks (GANs), avoiding reliance on public datasets. However, existing data-free knowledge distillation methods still require uploading model parameters when updating the GAN, making them vulnerable to attacks. Therefore, the privacy protection issue of federated learning based on GANs and knowledge distillation has not yet been fundamentally resolved.

[0005] Generative adversarial networks (GANs) and knowledge distillation techniques are widely used in federated learning to achieve privacy protection and efficient model training. By using GANs to generate synthetic data and combining it with knowledge distillation, federated learning frameworks can perform model updates and knowledge transfer without directly accessing users' private data. However, existing privacy protection methods based on GANs and knowledge distillation have the following shortcomings:

[0006] First, existing methods pay insufficient attention to privacy protection during the distillation process. While these methods generate synthetic data through GANs, avoiding the privacy risks associated with relying on public datasets, they often still require uploading the prediction parameters of the local model to update the GAN, a process that can also lead to privacy leaks. Second, existing privacy-preserving knowledge distillation methods mostly focus on selecting the most informative samples while ignoring the accuracy and quality of soft labels. These methods fail to effectively balance privacy protection with model utility.

[0007] Therefore, to address privacy concerns in federated learning, it is necessary to explore and develop a new privacy-preserving framework. This framework should utilize GANs to generate synthetic data for knowledge distillation, while also deploying the GANs locally to avoid privacy risks associated with parameter uploads. Furthermore, a sampling strategy that balances sample information content and label quality is needed to control the growth of the privacy budget and maximize the utility of the knowledge distillation process.

[0008] In summary, proposing a privacy protection method for federated learning based on generative adversarial networks and knowledge distillation to address the difficulties of existing technologies is an urgent problem that needs to be solved by those skilled in the art. Summary of the Invention

[0009] In view of this, the present invention provides a federated learning privacy protection method based on generative adversarial networks and knowledge distillation to solve the problem of privacy leakage in the federated learning process and achieve a balance between privacy protection and model utility.

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

[0011] A privacy-preserving method for federated learning based on generative adversarial networks and knowledge distillation, including the following steps:

[0012] S1. Local model training: Initialize local model parameters and train the local model based on local datasets from multiple clients to obtain a trained local model.

[0013] S2. Generative Adversarial Network Training: The trained local model is used as the discriminator to perform adversarial training with the generator to generate new synthetic sample data.

[0014] S3. Initialization phase communication: Each client randomly selects the same amount of synthetic sample data, adds noise to it, and uploads the noisy synthetic sample data to the server for sample merging to obtain a common dataset. Multiple clients use the common dataset to generate predicted labels and send the prediction results to the server again.

[0015] S4. Distillation training: Multiple clients perform knowledge distillation training based on a public dataset to extract knowledge features.

[0016] S5. Distillation phase communication: Multiple clients perform balanced sampling of the extracted knowledge features, select predicted labels and synthetic data for noise processing, and upload the noised predicted labels and synthetic data to the server. The server averages the predicted label results and the combined synthetic data of the clients to obtain an average predicted label result, which is then sent to multiple clients.

[0017] S6. Client update: Multiple clients execute S2, S4, and S5 cyclically based on the average predicted label results to update the local model.

[0018] In the above method, each client in S1 can optionally use its own local dataset to perform local model training by minimizing the local loss function:

[0019]

[0020] Among them, w i is the local parameter initialized by each client, L(D i ,w i ) is client i in dataset D i The loss function on is the updated parameter;

[0021] Use the stochastic gradient descent optimization algorithm on each client to update the local parameter w initialized by each client i , for each iteration t, w i The update formula is:

[0022]

[0023] Where η is the learning rate, is the local loss function L(D i ,w i ) for parameter w i gradient;

[0024] On each client i, the local model will undergo multiple rounds of iterative training, with each round using the dataset D iThe weights are updated using a batch of samples in until the preset convergence condition is reached.

[0025] In the above method, an optional alternative is to set the generator in the client locally for training the generative adversarial network in S2, and directly perform adversarial training with the trained local model as the discriminator, without uploading the updated parameters to the server.

[0026] The discriminator is a trained local model network, and the generator is the same initialized model. Let p data (x) = D i represents the real data set, z represents the noise distribution from the prior z The noise vector sampled in (z) is generated by the generator by mapping z to the data space G(z);

[0027] During training, the goal of the discriminator is to maximize its ability to correctly classify real data and generated data, that is, to maximize the following objective function:

[0028]

[0029] At the same time, the goal of the generator G is to deceive the discriminator so that it judges the generated data as real data, that is, to minimize or maximize the following objective function:

[0030]

[0031] The above method is optional. The noise processing adopts Gaussian noise method to predict the label e of the model uploaded by the client. k and synthetic data d k Adding Gaussian noise, the formula is as follows:

[0032]

[0033] Where s is the sensitivity of f, and It means that the center is 0 and the variance is σ 2 Gaussian normal distribution.

[0034] The above method is optional. The steps of distillation training in S4 are as follows: first, the synthetic data after aggregation and balanced sampling and noise addition are uploaded to the server side as a public data set for knowledge distillation; second, the predicted labels after balanced sampling and noise addition are uploaded to the server side for averaging.

[0035] In the above method, optionally, the specific content of balanced sampling of the extracted knowledge features by multiple clients in S5 is as follows:

[0036] According to Renyi entropy, the amount and quality of knowledge are evaluated. First, the Renyi entropy of the predicted label is calculated, and the synthetic data corresponding to the predicted label with large Renyi entropy is selected, and the predicted label with large Renyi entropy is removed. Let the predicted label be e i =(p i1 ,p i2 ,..,p ij ) and is evaluated based on the following equation:

[0037]

[0038] Where α>0 and α≠1.

[0039] The above method optionally classifies the predicted labels into two categories based on the calculated Renyi entropy of the predicted labels. The classification result is represented by C, one of which includes accurate and clear label knowledge E l , and the other covers fuzzy label knowledge E h , the specific classification formula is as follows:

[0040]

[0041] Where, τ represents the threshold;

[0042] After selecting the label knowledge, we further screen out the datasets containing rich information, including E h The corresponding synthetic data s h And the newly generated synthetic data s k , thus forming a dynamically updated synthetic proxy dataset D p , as follows:

[0043] D p =β(s h )+γ(s k )

[0044] Among them, β and γ are the control s h 、s k Two weight parameters for the two-term balance.

[0045] The above technical solution shows that, compared with the existing technology, the present invention provides a privacy protection method for federated learning based on generative adversarial networks and knowledge distillation, which has the following beneficial effects:

[0046] (1) This invention innovatively combines generative adversarial networks (GANs) with knowledge distillation technology. By training the GAN model locally on the client and generating synthetic data that conforms to the private data distribution, it avoids dependence on public datasets. The generated synthetic data is used for knowledge distillation, achieving knowledge transfer without selecting a public dataset, effectively avoiding direct exposure of the private data distribution, and thus significantly reducing the risk of privacy leakage.

[0047] (2) The present invention introduces a balanced sampling method based on Renyi entropy in the knowledge distillation process. By performing balanced sampling and adding noise to the predicted labels and synthetic data, it can effectively measure and optimize the quality of knowledge, which not only improves the privacy protection effect, but also achieves a balance between model utility while ensuring privacy, enhances the robustness to noise, and improves the reliability and stability of the model in the federated learning process. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0049] Figure 1 A flowchart of a privacy protection method for federated learning based on generative adversarial networks and knowledge distillation provided by the present invention;

[0050] Figure 2 This is a flow chart of the generative adversarial network training provided by the present invention. DETAILED DESCRIPTION

[0051] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0052] Reference Figure 1 As shown, the present invention discloses a privacy protection method for federated learning based on generative adversarial networks and knowledge distillation, comprising the following steps:

[0053] S1. Local model training: Initialize local model parameters and train the local model based on local datasets from multiple clients to obtain a trained local model.

[0054] S2. Generative Adversarial Network Training: The trained local model is used as the discriminator to perform adversarial training with the generator to generate new synthetic sample data.

[0055] S3. Initialization phase communication: Each client randomly selects the same amount of synthetic sample data, adds noise to it, and uploads the noisy synthetic sample data to the server for sample merging to obtain a common dataset. Multiple clients use the common dataset to generate predicted labels and send the prediction results to the server again.

[0056] S4. Distillation training: Multiple clients perform knowledge distillation training based on a public dataset to extract knowledge features.

[0057] S5. Distillation phase communication: Multiple clients perform balanced sampling of the extracted knowledge features, select predicted labels and synthetic data for noise processing, and upload the noised predicted labels and synthetic data to the server. The server averages the predicted label results and the combined synthetic data of the clients to obtain an average predicted label result, which is then sent to multiple clients.

[0058] S6. Client update: Multiple clients execute S2, S4, and S5 cyclically based on the average predicted label results to update the local model.

[0059] Furthermore, each client in S1 uses its own local dataset to perform local model training by minimizing the local loss function:

[0060]

[0061] Among them, w i is the local parameter initialized by each client, L(D i ,w i ) is client i in dataset D i The loss function on is the updated parameter;

[0062] Use the stochastic gradient descent optimization algorithm on each client to update the local parameter w initialized by each client i , for each iteration t, w i The update formula is:

[0063]

[0064] Where η is the learning rate, is the local loss function L(D i ,w i ) for parameter w i gradient;

[0065] On each client i, the local model will undergo multiple rounds of iterative training, with each round using the dataset D i The weights are updated using a batch of samples in until the preset convergence condition is reached.

[0066] Furthermore, in S2, the generative adversarial network training is to set the generator locally on the client and directly perform adversarial training with the trained local model as the discriminator, without uploading the updated parameters to the server;

[0067] The discriminator is a trained local model network, and the generator is the same initialized model. Let p data (x) = D i represents the real data set, z represents the noise distribution from the prior z The noise vector sampled in (z) is generated by the generator by mapping z to the data space G(z);

[0068] During training, the goal of the discriminator is to maximize its ability to correctly classify real data and generated data, that is, to maximize the following objective function:

[0069]

[0070] At the same time, the goal of the generator G is to deceive the discriminator so that it judges the generated data as real data, that is, to minimize or maximize the following objective function:

[0071]

[0072] Specifically, the generative adversarial network (GAN) is defined as follows: let G represent the generator and D represent the discriminator. The task of the generator is to generate data that is as realistic as possible, and the task of the discriminator is to distinguish whether the input data is real or generated by the generator.

[0073] This paper proposes a novel privacy-preserving federated learning framework based on generative adversarial networks and simple distillation. The core idea is to set the generator locally on the client, so that it can directly perform adversarial training with the locally trained model (i.e., the discriminator), eliminating the need to upload updated parameters to the server.

[0074] The entire training process can be viewed as a game process, in which the generator and the discriminator continuously compete to achieve their respective goals. After the training of the generative adversarial network is completed, synthetic data that conforms to the private data distribution is generated, such as Figure 2 Shown is the training process of GAN.

[0075] Furthermore, the noise addition method is used to add Gaussian noise to the model prediction label e uploaded by the client. k and synthetic data dk Adding Gaussian noise, the formula is as follows:

[0076]

[0077] Where s is the sensitivity of f, and It means that the center is 0 and the variance is σ 2 Gaussian normal distribution.

[0078] Specifically, in federated learning, Gaussian noise is a common privacy protection method. Gaussian noise is a differential privacy noise method that adds precisely calculated noise to the data, ensuring that any small change in a single entry in the dataset will not significantly change the output result.

[0079] Furthermore, the steps of distillation training in S4 are as follows: first, aggregate the synthetic data after balanced sampling and noise addition and upload it to the server side as a public dataset for knowledge distillation; second, upload the predicted labels after balanced sampling and noise addition to the server side for averaging.

[0080] Specifically, in federated learning, when each client has a heterogeneous model structure, knowledge distillation technology can effectively solve this problem. Through knowledge distillation, the knowledge of each client can be migrated to a unified global model, thereby achieving model collaboration and fusion. The overall distillation steps in the present invention are as follows: First, aggregate the synthetic data uploaded to the server after balanced sampling and noise, and use it as a public data set for knowledge distillation; second, upload the predicted labels after balanced sampling and noise to the server and average them; finally, send them to the client for knowledge distillation update. The pseudo code is as follows:

[0081]

[0082] Furthermore, the specific contents of balanced sampling of the extracted knowledge features by multiple clients in S5 are as follows:

[0083] According to Renyi entropy, the amount and quality of knowledge are evaluated. First, the Renyi entropy of the predicted label is calculated, and the synthetic data corresponding to the predicted label with large Renyi entropy is selected, and the predicted label with large Renyi entropy is removed. Let the predicted label be e i =(p i1 ,p i2 ,..,p ij ) and is evaluated based on the following equation:

[0084]

[0085] Where α>0 and α≠1.

[0086] Furthermore, based on the calculated Renyi entropy of the predicted labels, the predicted labels are classified into two categories. The classification result is represented by C, one of which includes accurate and clear label knowledge E l , and the other covers fuzzy label knowledge E h , the specific classification formula is as follows:

[0087]

[0088] Where, τ represents the threshold;

[0089] After selecting the label knowledge, we further screen out the datasets containing rich information, including E h The corresponding synthetic data s h And the newly generated synthetic data s k , thus forming a dynamically updated synthetic proxy dataset D p , as follows:

[0090] D p =β(s h )+γ(s k )

[0091] Among them, β and γ are the control s h 、s k Two weight parameters for the two-term balance.

[0092] Specifically, the balanced sampling strategy achieves a balance between the quantity and quality of knowledge. It selects informative synthetic data for knowledge extraction and selects high-quality predictive knowledge for knowledge distillation training, achieving efficient knowledge distillation.

[0093] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.

[0094] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A privacy protection method for federated learning based on generative adversarial networks and knowledge distillation, characterized by: The following steps are involved: S1. Local model training: Initialize local model parameters and train the local model based on local datasets from multiple clients to obtain a trained local model. S2. Generative Adversarial Network Training: The trained local model is used as the discriminator to perform adversarial training with the generator to generate new synthetic sample data. S3. Initialization phase communication: Each client randomly selects the same amount of synthetic sample data, adds noise to it, and uploads the noisy synthetic sample data to the server for sample merging to obtain a common dataset. Multiple clients use the common dataset to generate predicted labels and send the prediction results to the server again. S4. Distillation training: Multiple clients perform knowledge distillation training based on a public dataset to extract knowledge features. S5. Distillation phase communication: Multiple clients perform balanced sampling of the extracted knowledge features, select predicted labels and synthetic data for noise processing, and upload the noised predicted labels and synthetic data to the server. The server averages the predicted label results and the combined synthetic data of the clients to obtain an average predicted label result, which is then sent to multiple clients. S6. Client update: Multiple clients execute S2, S4, and S5 in a loop based on the average predicted label results to update their local models. Each client in S1 uses its own local dataset to train a local model by minimizing the local loss function: Among them, w i is the local parameter initialized by each client, L(D i ,w i ) is client i in dataset D i The loss function on is the updated parameter; Use the stochastic gradient descent optimization algorithm on each client to update the local parameter w initialized by each client i , for each iteration t, w i The update formula is: Where η is the learning rate, is the local loss function L(D i ,w i ) for parameter w i gradient; On each client i, the local model will undergo multiple rounds of iterative training, with each round using the dataset D i The weights are updated using a batch of samples in until the preset convergence condition is reached.

2. A method for privacy protection in federated learning based on generative adversarial networks and knowledge distillation according to claim 1, characterized in that: In S2, the generative adversarial network training is to set the generator locally on the client and directly perform adversarial training with the trained local model as the discriminator, without uploading the updated parameters to the server; The discriminator is a trained local model network, and the generator is the same initialized model. Let p data (x) = D i represents the real data set, z represents the noise distribution from the prior z The noise vector sampled in (z) is generated by the generator by mapping z to the data space G(z); During training, the goal of the discriminator is to maximize its ability to correctly classify real data and generated data, that is, to maximize the following objective function: At the same time, the goal of the generator G is to deceive the discriminator so that it judges the generated data as real data, that is, to minimize or maximize the following objective function:

3. The method for privacy protection of federated learning based on generative adversarial networks and knowledge distillation according to claim 1, characterized in that: The noise processing uses the Gaussian noise method to predict the label e of the model uploaded by the client. k and synthetic data d k Adding Gaussian noise, the formula is as follows: Where s is the sensitivity of f, and It means that the center is 0 and the variance is σ 2 Gaussian normal distribution.

4. The method for privacy protection of federated learning based on generative adversarial networks and knowledge distillation according to claim 1, characterized in that: The steps of distillation training in S4 are as follows: first, aggregate the synthetic data after balanced sampling and noise addition and upload it to the server side as a public dataset for knowledge distillation; second, upload the predicted labels after balanced sampling and noise addition to the server side for averaging.

5. The method for privacy protection of federated learning based on generative adversarial networks and knowledge distillation according to claim 1, characterized in that: The specific content of balanced sampling of extracted knowledge features by multiple clients in S5 is as follows: According to Renyi entropy, the amount and quality of knowledge are evaluated. First, the Renyi entropy of the predicted label is calculated, and the synthetic data corresponding to the predicted label with large Renyi entropy is selected, and the predicted label with large Renyi entropy is removed. Let the predicted label be e i =(p i1 ,p i2 ,..,p ij ) and is evaluated based on the following equation: Where α>0 and α≠1.

6. The method for privacy protection of federated learning based on generative adversarial networks and knowledge distillation according to claim 5, characterized in that: Based on the calculated Renyi entropy of the predicted labels, the predicted labels are classified into two categories. The classification result is represented by C. One category includes accurate and clear label knowledge E l , and the other covers fuzzy label knowledge E h , the specific classification formula is as follows: Where, τ represents the threshold; After selecting the label knowledge, we further screen out the datasets containing rich information, including E h The corresponding synthetic data s h And the newly generated synthetic data s k , thus forming a dynamically updated synthetic proxy dataset D p , as follows: D p =β(s h )+γ(s k ) Among them, β and γ are the control s h 、s k Two weight parameters for the two-term balance.