Privacy protection method against federated learning inference attack based on double perturbation

By generating pseudo-training data and perturbation gradients in federated learning, and utilizing conditional generative adversarial networks and fuzzy functions, the problem of data privacy protection in federated learning is solved, and security and performance are maintained.

CN115481431BActive Publication Date: 2026-11-27NANJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211052864.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-31
Publication Date
2026-11-27
Estimated Expiration
2042-08-31

AI Technical Summary

Technical Problem

Existing federated learning methods struggle to effectively protect client data privacy when facing inference attacks, and traditional defense solutions may result in loss of accuracy or performance degradation.

Method used

A dual-perturbation approach is adopted, which generates pseudo-training data on the client side and introduces perturbations into the gradient of the fully connected layer. Conditional generative adversarial networks and fuzzy functions are used to protect data privacy, ensuring that the data reconstructed by the attacker is significantly different from the real data and has similar feature representations.

Benefits of technology

It effectively improves the client's ability to resist external inference attacks, provides strong privacy protection, and maintains the performance of federated learning without degradation, thus enhancing security and privacy protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115481431B_ABST
    Figure CN115481431B_ABST
Patent Text Reader

Abstract

The application discloses a federated learning anti-reasoning attack privacy protection method based on double disturbance, comprising the following steps: generating a classification feature extractor for a conditional generative adversarial network, and setting and training the conditional generative adversarial network; using the trained conditional generative to generate pseudo data, and mixing real data and pseudo data at a certain ratio to construct pseudo training data participating in federated learning training; randomly initializing global model parameters by a central server, and sending the global model parameters of the current communication round to the client participating in training through a communication link, and the client trains a local model on a private data set; a target function is designed to construct a disturbance matrix to disturb the gradient of the full connection layer during model training; then, the model parameters are updated; all the models from the clients are updated, and the global model parameters of the next round are obtained through the central server according to the weight of the sample quantity. The safety is guaranteed, and the performance of the model is hardly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of privacy protection technology under the federated learning framework, and in particular to a privacy protection method for adversarial inference attacks in federated learning based on dual perturbations. Background Technology

[0002] In recent years, machine learning has benefited from the tremendous growth of end-user devices and the dramatic expansion of the amount of data collected on these devices. Machine learning-based intelligent systems have been applied to many aspects of daily life, such as intelligent disease diagnosis services and intelligent education systems. However, machine learning requires the collection of distributed user data on cloud-based servers for centralized computation. In real-world scenarios, it is difficult to collect this data centrally due to data privacy rules and regulations. Federated learning provides a technological solution to this challenge. In federated learning models, end devices do not need to upload sensitive local data to a central server; instead, they only need to train the model locally and upload locally updated data to the server for aggregation.

[0003] While federated learning can offer some privacy protection, research indicates that sharing model updates or gradients makes it vulnerable to inference attacks, such as member inference attacks and reconstruction attacks. Reconstruction attacks aim to exploit model updates or gradients to reconstruct the client's original training data as accurately as possible. To defend against reconstruction attacks, researchers have proposed numerous solutions, which can be broadly categorized into three types. The first type is based on traditional encryption techniques, which suffer from low accuracy, high computational complexity, and significant time overhead. The second type of defense perturbs the information computed on the federated learning model. These solutions primarily involve indiscriminately perturbing model parameters or gradients, protecting privacy but also incurring a significant loss of accuracy. Some literature addresses this by directly perturbing feature representations or dividing the neural network into private and public models, sharing only the feature representations extracted from the public model, thus severely degrading the quality of the attacker's reconstructed data. This type of solution only protects the information computed by the federated learning model and does not provide effective privacy protection for the sensitive data held by the client. The third type of method protects privacy by distorting or replacing the client's training data. These defenses often lead to significant performance degradation because the distribution of the data's classification features is disrupted. Furthermore, such solutions only protect customer data and do not take any privacy protection measures for the computational information of the federated learning model. Summary of the Invention

[0004] The purpose of this section is to outline some aspects of embodiments of the present invention and to briefly describe some preferred embodiments. Simplifications or omissions may be made in this section, as well as in the abstract and title of this application, to avoid obscuring the purpose of these documents; however, such simplifications or omissions should not be construed as limiting the scope of the invention.

[0005] In view of the problems existing in the above and / or existing privacy protection methods for adversarial inference attacks based on dual perturbation federated learning, this invention is proposed.

[0006] Therefore, the problem to be solved by this invention is how to enhance the security of federated learning scenarios, improve the client's ability to resist external inference attacks, and provide strong support for achieving a secure data privacy environment.

[0007] To solve the above technical problems, the present invention provides the following technical solution: a privacy protection method for federated learning adversarial inference attacks based on dual perturbation, which includes: the client setting a classification feature extractor for the conditional generative adversarial network and designing a fuzzy function for the generator of the conditional generative adversarial network; the client training the conditional generative adversarial network on a local dataset using a two-stage adversarial training mechanism.

[0008] The trained conditional generative adversarial network generates pseudo data for each data in the local dataset, and the real data and pseudo data are mixed in a certain proportion to construct pseudo training data for federated learning training.

[0009] The global model parameters are randomly initialized by the central server and sent to the clients participating in the training through the communication link. The clients then train the local model on the private dataset.

[0010] During model training, an objective function is designed to construct a perturbation matrix to perturb the gradient of the fully connected layer.

[0011] Each participating client updates its model parameters using stochastic gradient descent based on the perturbed gradient and the current model parameters.

[0012] Update all models from clients, and aggregate them through a central server based on the weights of the sample size to obtain the global model parameters for the next round.

[0013] As a preferred embodiment of the privacy protection method for federated learning adversarial inference attacks based on dual perturbations described in this invention, the setting and training process of the conditional generative adversarial network includes,

[0014] Set a fuzzy term μ(V) for the generator's target. r (G(z|y i ))-V e )2 Where μ is the coefficient of the fuzzy term, z is the noise, and y i It's a tag, along with the V. r To calculate the pseudo-image G(z|y) generated by generator G. i The variance of ) is assumed to be V. e ;

[0015] First train the generator, fix the discriminator D, and only update the generator G;

[0016] From the prior distribution P z A batch of noise z is randomly selected from (z), and it is input into the generator G to construct pseudo samples G(z|y). i );

[0017] The first convolutional layer of a neural network pre-trained on the ImageNet dataset is used as a classification feature extractor F to extract classification features from real and pseudo data.

[0018] As a preferred embodiment of the privacy protection method for adversarial inference attacks based on dual perturbation in federated learning described in this invention, the process of generating the pseudo-training data includes:

[0019] The dataset D held by client i i Each data x in i Label it y i The random noise z is input into the generator of the trained conditional generation network to generate a value similar to x. i Pseudo-data x with the same label i ′;

[0020] x i and x i Pseudo-training data x is constructed by mixing data in a certain proportion λ. i ", is expressed by the following formula:

[0021] x i "=λx i +(1-λ)x i ′

[0022] Client i (i∈{1,2,...,K}) receives a dataset x from pseudo-training data. i "The pseudo-training dataset D" i ″.

[0023] As a preferred embodiment of the privacy protection method for adversarial inference attacks based on dual perturbation in federated learning described in this invention, wherein: at the start of collaborative training, the central server sends the current global model parameters θ to the clients participating in the training via a communication link. t ;

[0024] After receiving the global model θ from the central server, the client trains a local model M on its own dataset D″ using a classification loss function, as expressed by the following formula:

[0025]

[0026] As a preferred embodiment of the privacy protection method for adversarial inference attacks based on dual perturbation in federated learning described in this invention, the perturbation matrix constructed by the objective function to perturb the gradient of the fully connected layer should follow two principles: the difference between the data inferred by the attacker and the training data should be as large as possible; and the feature representation of the data inferred by the attacker should be similar to the feature representation of the real data.

[0027] As a preferred embodiment of the privacy protection method for adversarial inference attacks in federated learning based on dual perturbation described in this invention, the perturbation process of the gradient of the fully connected layer includes:

[0028] The similarity between the real data feature representation f and the inferred data feature f′ is defined as follows: some elements of f′ are zero, and the values ​​of other elements are equal to the values ​​of the corresponding elements in f; the similarity between f and f′ can be measured by the number of zero elements, and α is a threshold for the number of zero elements; the mean squared error is used as the real input data x″ and the reconstructed input data of the model. A measure of similarity between them.

[0029] As a preferred embodiment of the privacy protection method for adversarial inference attacks based on dual perturbation in federated learning described in this invention, the client model update process includes:

[0030] The gradient of the perturbed fully connected layer is calculated.

[0031] Each participating client updates its model parameters using the gradient descent algorithm based on the perturbed gradient, the current model parameters, and the learning rate η, as shown in the following formula:

[0032]

[0033]

[0034] Where θ represents the global model.

[0035] As a preferred embodiment of the privacy protection method for adversarial inference attacks based on dual perturbation in federated learning described in this invention, the model aggregation process includes:

[0036] After the local model update is complete, the client will update the local model. Send it to the central server via the communication link;

[0037] After receiving all model updates from clients, the central server aggregates them according to the weights of the sample size to obtain the global model parameters θ for the next round. t+1 The details are as follows:

[0038]

[0039] The server will assign new global model parameters θ t+1 Send it to the client for the next round of training.

[0040] As a preferred embodiment of the privacy protection method for federated learning adversarial inference attacks based on dual perturbations described in this invention, the setting and training process of the conditional generative adversarial network further includes,

[0041] The classification features F(G(z|y) of each pseudo-sample i Input the discriminator D and get the output:

[0042] log(1-D(F(G(z|y i )))

[0043]

[0044] Retrain the discriminator. In this stage, fix the generator G and only update the discriminator D, adding the classification features F(x) from the real data. i The classification features F(G(z|y) and fake samples i The samples are input into the discriminator to distinguish between real and fake samples, resulting in two outputs: logD(F(x)). i )|y i ) and log(1-D(F(G(z|y) i )):

[0045]

[0046] The generator and discriminator are trained alternately until the conditional generative adversarial network model converges.

[0047] As a preferred embodiment of the privacy protection method for adversarial inference attacks in federated learning based on dual perturbation described in this invention, the perturbation process of the gradient of the fully connected layer further includes,

[0048] Based on the two principles followed by the gradient perturbation method, the following objective function is constructed:

[0049]

[0050] Where, feature f∈R l Each element f represents i Calculate the expression for i∈{0,1,......,l-1} respectively. When the element value f represents the reasoning feature i When ′=0, The smaller the value, the better the input data x″ and the inference data. The greater the mean square error between them;

[0051] Use set J to record the set Find the index of the first α smallest element value i, and construct a vector mask mask ∈ R with all elements having a value of 1. l By iterating through the elements j in J, let the mask... j =0 yields the pruning mask used to construct the perturbation matrix;

[0052] Initialized perturbation matrix H∈R l×b All element values ​​are 1, and the β column vectors of matrix H are replaced by a vector mask to construct the perturbation matrix H;

[0053] Gradient of the fully connected layer The process of performing a Hadamard product with the perturbation matrix H and calculating the perturbation gradient is shown below:

[0054]

[0055]

[0056]

[0057] The beneficial effects of this invention are as follows: (1) By designing a method for generating pseudo-training data, a feature extractor is introduced to help the generator learn the classification feature distribution of real data, and a function is added to the objective function of the generator to blur the generated image. The generated image and the real image are mixed in a certain proportion to construct pseudo-training images for federated training, which effectively protects the security of the client's local data and improves the client's ability to resist external inference attacks; (2) For the gradient uploaded by the client during the federated learning training process, an algorithm for perturbing the gradient of the fully connected layer is designed. The information contained in the gradient that is most conducive to the attacker's reconstruction of the training data is perturbed, so that the data reconstructed by the attacker using the perturbed gradient is significantly different from the real data, providing strong privacy protection. Moreover, the data feature representation inferred by the attacker is similar to the real data feature representation, maintaining the performance of federated learning; (3) The traditional federated learning mechanism is easily affected by a series of security threats on the communication link between the client and the server. This invention takes privacy protection measures on both the client's local data and the model calculation information, which can effectively resist the intrusion of inference attacks, provide strong privacy protection, and hardly reduce the performance of the model. Attached Figure Description

[0058] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:

[0059] Figure 1 This is the federated learning privacy protection system model based on dual perturbations described in this invention;

[0060] Figure 2 This is a diagram illustrating the defensive performance of the pseudo-training data construction method described in this invention on the MNIST dataset.

[0061] Figure 3 This is a comparison diagram of ablation experiments using the method for constructing pseudo-training data described in this invention;

[0062] Figure 4 This is a diagram illustrating the defense performance of the present invention on the MNIST dataset.

[0063] Figure 5 This is a diagram illustrating the defense performance of the present invention on the CIFAR10 dataset;

[0064] Figure 6 This is a comparison chart of the defense performance of the method described in this invention compared to DP-Laplace and GC schemes on the CIFAR10 dataset.

[0065] Figure 7 This is a comparison chart of the accuracy of the method described in this invention compared to DP-Laplace and GC schemes on the MNIST dataset.

[0066] Figure 8 This is a comparison chart of the loss of the proposed solution compared to the DP-Laplace and GC solutions on the MNIST dataset. Detailed Implementation

[0067] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0068] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0069] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0070] Example 1

[0071] Reference Figure 1 and Figure 2 This is the first embodiment of the present invention, which provides a privacy protection method for adversarial inference attacks in federated learning based on dual perturbations, including:

[0072] S1: The client sets up a classification feature extractor for the conditional generative adversarial network and designs a fuzzy function for the generator of the conditional generative adversarial network. The client trains the conditional generative adversarial network on a local dataset using a two-stage adversarial training mechanism.

[0073] The steps for setting up and training a conditional generative adversarial network are as follows:

[0074] Set a fuzzy term μ(V) for the generator's target. r (G(z|y i ))-V e ) 2 μ is the coefficient of the fuzzy term, along with V r To calculate the pseudo-image G(z|y) generated by generator G. i The variance of ) is assumed to be V. e ;

[0075] First, train the generator. In this stage, fix the discriminator D and only update the generator G. Start with the prior distribution P. z A batch of noise z is randomly selected from (z), and it is input into the generator G to construct pseudo samples G(z|y). i The first convolutional layer of a neural network pre-trained on the ImageNet dataset is used as a classification feature extractor F to extract classification features from real and pseudo-data. Then, the classification features F(G(z|y)) of each pseudo-sample are... i Input discriminator D, and get the output log(1-D(F(G(z|y)). i ))):

[0076]

[0077] Retrain the discriminator. In this stage, fix the generator G and only update the discriminator D, adding the classification features F(x) from the real data. i The classification features F(G(z|y) and fake samples iThe samples are input into the discriminator to distinguish between real and fake samples, resulting in two outputs: logD(F(x)). i )|y i ) and log(1-D(F(G(z|y) i )):

[0078]

[0079] The generator and discriminator are trained alternately until the conditional generative adversarial network model converges.

[0080] S2: The client uses a pre-trained conditional generative adversarial network to generate pseudo data for each data point in the local dataset, and mixes the real data and pseudo data in a certain proportion to construct pseudo training data for federated learning training.

[0081] The generation of pseudo-training data includes the following steps:

[0082] The dataset D held by client i i Each data x in i Label it y i The random noise z is input into the generator of the trained conditional generation network to generate a value similar to x. i Pseudo-data x with the same label i ′;

[0083] x i and x i Pseudo-training data x is constructed by mixing data in a certain proportion λ. i ";

[0084] x i "=λx i +(1-λ)x i ′

[0085] Client i (i∈{1,2,...,K}) receives a dataset x from pseudo-training data. i "The pseudo-training dataset D" i ″.

[0086] S3: The central server randomly initializes the global model parameters and sends the current global model parameters to the clients participating in the training through the communication link. After receiving the global model from the central server, the clients train the local model on their own datasets.

[0087] The interaction between the client and the server includes the following steps:

[0088] At the start of collaborative training, the central server sends the current global model parameters θ to the clients participating in the training via a communication link. t ;

[0089] After receiving the global model θ from the central server, the client trains a local model M on its own dataset D″ using the classification loss function l.

[0090]

[0091] S4: During model training, an objective function was designed to construct a perturbation matrix to perturb the gradient of the fully connected layer. The objective function makes the gradient perturbation follow two principles: 1) To protect privacy, the difference between the data inferred by the attacker and the training data should be as large as possible; 2) The data feature representation inferred by the attacker should be similar to the real data feature representation in order to maintain FL performance.

[0092] The perturbation of the gradient in the fully connected layer includes the following steps:

[0093] The similarity between the real data feature representation *f* and the inferred data feature representation *f′* is defined as follows: some elements of *f′* have values ​​of zero, while the values ​​of other elements are equal to the values ​​of the corresponding elements in *f*. Therefore, the similarity between *f* and *f′* can be measured by the number of zero elements, with α being a threshold for the number of zero elements. Mean squared error is used as both the real input data *x″* and the reconstructed input data for the model. A measure of similarity between them.

[0094] Based on the two principles followed by the gradient perturbation method, the following objective function is constructed:

[0095]

[0096] Feature representation f∈R l Each element f i (i∈{0,1,......,l-1}) Calculate the expression respectively When the element value f represents the inference feature i When ′=0, The smaller the value, the better the input data x″ and the inference data. The greater the mean square error between them;

[0097] Use set J to record the set Find the index of the first α smallest element value i, and construct a vector mask mask ∈ R with all elements having a value of 1. l By iterating through the elements j in J, let the mask... j =0 yields the pruning mask used to construct the perturbation matrix;

[0098] Initialized perturbation matrix H∈R l×b All elements are set to 1. Next, the β column vectors of matrix H are replaced with a vector mask to construct the perturbation matrix H;

[0099] Gradient of the fully connected layer The process of performing a Hadamard product with the perturbation matrix H and calculating the perturbation gradient is shown below:

[0100]

[0101]

[0102]

[0103] S5: Each participating client updates the model parameters by performing a stochastic gradient descent algorithm based on the perturbed gradient and the current model parameters;

[0104] Client-side model updates include the following steps:

[0105] The gradient of the perturbed fully connected layer is calculated.

[0106] Each participating client updates its model parameters using the gradient descent algorithm based on the perturbed gradient, the current model parameters, and the learning rate η, as shown in the following formula:

[0107]

[0108]

[0109] S6: After receiving all model updates from the clients, the central server aggregates them according to the weights of the sample size to obtain the global model parameters for the next round.

[0110] Model aggregation includes the following steps:

[0111] After the local model update is complete, the client will update the local model. Send it to the central server via the communication link;

[0112] After receiving all model updates from clients, the central server aggregates them according to the weights of the sample size to obtain the global model parameters θ for the next round. t+1 The details are as follows:

[0113]

[0114] The server will assign new global model parameters θ t+1 Send it to the client for the next round of training.

[0115] In summary, as Figure 1 As shown, the dataset includes entities such as a central server and multiple distributed clients. First, assume there are K clients, where client i holds a dataset {D1, D2, ..., D...}. KThe client sets the classification feature extractor F for the Conditional Generative Adversarial Network (CGEN) and designs a fuzzy function for the generator of the CGEN. The client trains the CGEN on a local dataset using a two-stage adversarial training mechanism. The dataset D held by client i is... i Each data x in i Label it y i The random noise z is input into the generator of the trained conditional generation network to generate a value similar to x. i Pseudo-data x with the same label i ′, then x i and x i 'Construct pseudo-training x by mixing λ in a certain proportion' i "The client i (i∈{1,2,...,K}) receives a dataset x from the pseudo-training data." i "The pseudo-training dataset D" i "At the start of collaborative training, the central server sends the current global model parameters θ to the clients participating in the training via a communication link." t After receiving the global model from the central server, the client trains its local model M on its own dataset D″ using the classification loss function l. During training, an objective function is designed to construct the perturbation matrix H∈R. l×b gradient of fully connected layer The gradient is perturbed, and the objective function ensures that the perturbation follows two principles: 1) to protect privacy, the difference between the attacker's inferred data and the training data should be as large as possible; 2) the feature representation of the data inferred by the attacker should be similar to the feature representation of the real data to maintain FL performance. The perturbed gradient... Continue participating in model training. Each participating client updates its model parameters using gradient descent based on the perturbed gradient and the current model parameters. After the local model update is complete, the client updates its local model. The data is sent to the central server via a communication link. After receiving all model updates from the clients, the central server aggregates them according to the weights n / N of the sample size to obtain the global model parameters θ for the next round. t+1 The server will assign new global model parameters θ t+1 Send it to the client for the next round of training.

[0116] Example 2

[0117] Reference Figures 1 to 8 This is the second embodiment of the present invention. Based on the previous embodiment, the federated learning privacy protection framework in this embodiment is based on extended conditional generative adversarial networks and data perturbation technology, which provides support for the privacy protection of sensitive data of the client.

[0118] In this embodiment, the client-side local model update is based on the stochastic gradient descent algorithm, which is simple and effective in speeding up parameter updates. The server aggregation mechanism uses the FedAvg algorithm to effectively ensure the contribution of sample sizes from different clients and to a certain extent effectively reduces many privacy risks brought about by traditional machine learning source data aggregation.

[0119] In this embodiment, privacy protection measures are taken for the client's private data itself and the gradient information containing data privacy, which can effectively resist malicious inference attacks on the communication link and provide strong privacy protection.

[0120] Based on the above-described application of the privacy protection method for adversarial inference attacks in federated learning based on dual perturbations designed in this invention in practical processes, such as... Figure 2 , Figure 3 As shown, the three key steps of the pseudo-training data generation method designed in this invention are: blurring the generated image, using a feature extractor to help the generated image learn the classification feature distribution of the real image, and ablation experiments of mixing real and pseudo images. These experiments demonstrate that the pseudo-training data generation method can provide visual protection for sensitive client data, and the decrease in classification accuracy of federated learning is negligible. Combined with... Figures 4-8 As can be seen, compared with the other three schemes—ordinary federated learning (FL), Differential Privacy based on Laplace (DP-Laplace), and Gradient Compression (GC)—the dual perturbation method designed in this invention exhibits a larger mean squared error (MSE) in the attacker's reconstruction, meaning a greater gap between the reconstructed data and the original sensitive data, resulting in better privacy protection. Furthermore, while ensuring privacy protection, the method proposed in this invention demonstrates superior accuracy compared to DP-Laplace and GC. This is mainly because, to maintain the performance of federated learning, this method only perturbs the information in the fully connected layers most conducive to the attacker's reconstruction of the original data during gradient perturbation. In contrast, DP-Laplace and GC methods indiscriminately perturb or add noise to the model parameters or gradients. Similarly, the loss of the method designed in this invention is also smaller than that of DP-Laplace and GC. In conclusion, the method designed in this invention is more suitable for practical federated learning scenarios.

Claims

1. A privacy protection method for adversarial inference attacks in federated learning based on dual perturbations, characterized by: include, The client sets up a classification feature extractor for the conditional generative adversarial network and designs a fuzzy function for the generator of the conditional generative adversarial network. The client trains the conditional generative adversarial network on a local dataset using a two-stage adversarial training mechanism. The trained conditional generative adversarial network generates pseudo image data for each image data in the local image dataset, and mixes real image data and pseudo image data in a certain proportion to construct pseudo image training data for federated learning training. The global model parameters are randomly initialized by the central server and sent to the clients participating in the training through the communication link. The clients then train the local model on the private dataset. During model training, an objective function is designed to construct a perturbation matrix to perturb the gradient of the fully connected layer. Each participating client updates its model parameters using stochastic gradient descent based on the perturbed gradient and the current model parameters. Update all models from clients, and aggregate them through the central server based on the weight of the sample size to obtain the global model parameters for the next round; The objective function used to construct the perturbation matrix to perturb the gradient of the fully connected layer should follow two principles: the difference between the data inferred by the attacker and the training data should be as large as possible; and the feature representation of the image data inferred by the attacker should be similar to the feature representation of the real image data. The perturbation process of the gradient of the fully connected layer includes, Provide feature representations of real image data f Features of the inferred image data Definition of similarity: Some elements have a value of zero, while the values ​​of other elements are equal to 0. f The value of the element at the corresponding position; f and The similarity between them can be measured by the number of zero elements. The threshold for the number of zero elements; the mean squared error was used as the true input data for the model. and the input data for reconstruction A measure of similarity between them; The perturbation process of the gradient of the fully connected layer also includes, Based on the two principles followed by the gradient perturbation method, the following objective function is constructed: Among them, features Each element represented Calculation formulas When the element value represented by the reasoning feature hour, The smaller the value, the better the input data. and inference data The greater the mean square error between them; Use sets J To record the set The former Small element value index i And construct a vector mask in which all elements are 1. Through iteration J elements in j ,make Obtain the pruning mask used to construct the perturbation matrix. mask ; Initialized perturbation matrix The matrix has all elements with a value of 1. H of Each column vector is masked by a vector. mask Replacement to construct the perturbation matrix H ; Gradient of the fully connected layer With perturbation matrix H The process of performing the Hadamard product and calculating and perturbing the gradient is as follows: 。 2. The privacy protection method for adversarial inference attacks in federated learning based on dual perturbations as described in claim 1, characterized in that: The setup and training process of the conditional generative adversarial network includes: Set a fuzzy term for the generator's target. ,in, These are the coefficients of the fuzzy term. It's noise. It's a label, along with To calculate the pseudo-images generated by generator G The variance, and the pre-defined expected variance. ; First train the generator, fix the discriminator D, and only update the generator G; From the prior distribution A random batch of noise z is selected and input into the generator G to construct pseudo samples. ; The first convolutional layer of a neural network pre-trained on the ImageNet dataset is used as a classification feature extractor F to extract classification features from real image data and pseudo image data.

3. The privacy protection method for adversarial inference attacks in federated learning based on dual perturbations as described in claim 2, characterized in that: The process of generating the pseudo-image training data includes: The dataset held by client i Each image data in Tag it The random noise z is input into the generator of the trained conditional generation network to generate a signal similar to the random noise z. Pseudo-image data with the same labels ; Will and According to a certain proportion Hybrid construction of pseudo-image training data It can be expressed by the following formula: Client Obtain training data from pseudo-images The pseudo-image training dataset .

4. The privacy protection method for adversarial inference attacks in federated learning based on dual perturbations as described in claim 3, characterized in that: At the start of collaborative training, the central server sends the current global model parameters to the clients participating in the training via a communication link. ; Receive the global model from the central server. Afterwards, the client in its own dataset The local model M is trained using a classification loss function, as expressed by the following formula: 。 5. The privacy protection method for adversarial inference attacks in federated learning based on dual perturbations as described in claim 4, characterized in that: The client model update process includes, The gradient of the perturbed fully connected layer is calculated. ; Each participating client is determined based on the perturbed gradient, current model parameters, and learning rate. The gradient descent algorithm is used to update the model parameters, as shown in the following formula: in, This represents the global model.

6. The privacy protection method for adversarial inference attacks in federated learning based on dual perturbations as described in claim 5, characterized in that: The model aggregation process includes, After the local model update is complete, the client will update the local model. Send it to the central server via the communication link; After receiving all model updates from clients, the central server aggregates them according to the weights of the sample size to obtain the global model parameters for the next round. The details are as follows: The server will change the global model parameters. Send it to the client for the next round of training.

7. The privacy protection method for adversarial inference attacks in federated learning based on dual perturbations as described in claim 6, characterized in that: The setup and training process of the conditional generative adversarial network also includes... Classification features of each pseudo-sample Input discriminator D, get the output: Retrain the discriminator. In this stage, the generator G is fixed, and only the discriminator D is updated, incorporating the classification features of the real image data. Classification features of fake samples The samples are input into the discriminator to distinguish between real and fake samples, resulting in two outputs: and : The generator and discriminator are trained alternately until the conditional generative adversarial network model converges.

Citation Information

Patent Citations

  • Federal learning privacy protection method and system based on adversarial training

    CN113609521A

  • Differential privacy federal learning method for resisting member reasoning attack

    CN114785559A