A Deep Learning Differential Privacy Protection Method
By introducing the differential privacy mechanism and WGAN generation model into the deep learning network, combined with Gaussian noise and privacy loss calculation, the problem of difficult balance between privacy protection and data availability in the privacy protection of deep learning data sets is solved, and better privacy protection is achieved. and data generation quality.
Patent Information
- Application Number
- CN202010572297.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-22
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2040-06-22
AI Technical Summary
It is difficult to achieve a balance between privacy protection and data availability in the privacy protection of deep learning data sets with existing technologies. Traditional GAN has problems with unstable training and mode collapse, and the privacy parameter grouping settings lack qualitative analysis.
Using the WGAN generation model, the differential privacy mechanism is introduced into the deep learning network, Gaussian noise is added and the privacy loss is calculated, and the similarity difference feedback of the generated image is used to adjust the privacy parameters to achieve a balance between privacy protection and data availability.
The privacy protection effect and data availability of deep learning data sets are improved. By quantitatively calculating privacy loss, the minimum setting of privacy parameters is achieved, ensuring better privacy protection and high data generation quality.
Smart Images

Figure CN111737743B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of information system security technology, and more specifically, relates to a deep learning differential privacy protection method. Background Art
[0002] The existing common privacy protection methods for data sets, such as using k-anonymity to anonymize data, are difficult to provide strict privacy guarantees. As a new privacy protection technology with great advantages, differential privacy (DR) technology is a privacy protection method based on data distortion proposed for attackers with strong knowledge background. It adds noise to ensure that inserting or deleting any record in the data set does not affect the query output results, thereby achieving the purpose of protecting data privacy. This technology is based on a rigorous mathematical foundation and provides a quantitative evaluation method. It is one of the most effective and applicable ways of privacy protection technology. Since the differential privacy technology was proposed, many developers have studied and expanded it, and various algorithm models have been continuously generated. It plays a very important role in our daily life as well as in industry, production, and medical care.
[0003] As one of the deep learning model categories, Generative Adversarial Networks (GAN) can generate image results that are very close to the original image, achieving a realistic effect. However, traditional GANs have problems such as training instability, mode collapse, and gradient disappearance, so the actual training process often fails to generate the image results we expect. Until the introduction of Wasserstein GAN (WGAN), these problems were well solved. WGAN uses the smoothness and symmetry of Wasserstein distance to replace the asymmetric JS divergence used by traditional GAN, and the training process shows strong stability and high image generation quality. Therefore, from the perspective of training stability and image generation quality, using WGAN to generate deep learning image datasets has gradually become a key research object in many fields such as image processing and computer vision.
[0004] The architecture of the deep learning differential privacy protection algorithm based on the WGAN feedback method usually contains many parameters, and the setting of these parameters is usually considered to be the key factor in balancing privacy protection and data availability. However, the general privacy parameter grouping setting method is often limited by the user's own needs and lacks a qualitative analysis of the privacy protection of the model, thus hindering the realization of a balance between privacy protection and data availability.
[0005] After searching, the application number is: 201811540698.0, the application date is: December 17, 2018, and the name of the invention is: A joint deep learning training method based on privacy protection technology. In this application, the homomorphic encryption (HE) method is combined to send the encrypted data to the cloud server, and the user obtains the data by decrypting the ciphertext. However, the operation of homomorphic encryption only involves addition and multiplication, which is difficult to adapt to the complex operation requirements of deep learning, and the operation process requires a lot of computing resources, which will lead to the performance degradation of the deep learning network.
[0006] For another example, the application number is: 201710611972.8, the application date is: July 25, 2017, and the name of the invention is: A deep differential privacy protection method based on generative adversarial networks. In this application, the idea of deep convolution generative adversarial networks (DCGAN) is applied to deep learning image datasets for privacy protection. However, the DCGAN used in this method still has shortcomings in training stability. As the number of training times increases, some parameters (such as filters) will oscillate due to collapse, and the generation model of DCGAN will be limited by batch normalization. In addition, the method of grouping privacy parameters in this method mainly depends on the personal needs of the user, and no qualitative analysis of minimizing privacy loss is performed on the privacy parameter setting of feedback adjustment.
[0007] Based on the above analysis, the existing technology requires a privacy protection method for deep learning datasets that can better balance privacy protection and data availability. Summary of the invention
[0008] 1. Technical problem to be solved by the invention
[0009] The purpose of the present invention is to overcome the shortcoming that it is difficult to balance the privacy protection degree and data availability when protecting the privacy of deep learning data sets, and provide a deep learning differential privacy protection method. The present invention proposes a new deep learning differential privacy protection model, and uses WGAN to generate image results for data processed by the model privacy protection, selects the result closest to the real image from the generated image, compares the similarity between the generated result and the original image, and calculates the difference for threshold comparison, and feedback adjusts the privacy parameters in the model gradient under the condition of the similarity threshold, thereby providing a certain driving force for the application of differential privacy in deep learning and other fields.
[0010] 2. Technical solution
[0011] In order to achieve the above object, the technical solution provided by the present invention is:
[0012] A deep learning differential privacy protection method of the present invention comprises the following steps:
[0013] Step 1: Build a deep learning network that introduces a differential privacy mechanism;
[0014] Step 2: Add Gaussian noise to the gradient in combination with differential privacy theory during the parameter optimization phase of the deep learning network;
[0015] Step 3: Calculate the privacy loss of step 2 by combining the composable characteristics of differential privacy;
[0016] Step 4: Use the WGAN generative model to generate a generated image processed with differential privacy parameters; and also use the WGAN generative model to generate an image for the original data that has not been processed in any way;
[0017] Step 5: Select the best image result from the generated images processed by differential privacy parameters, compare the difference between the best image and the image generated by the original data, and calculate the similarity difference;
[0018] Step 6: Under the limitation of the similarity threshold, feedback is used to adjust the relevant privacy parameters in the model so that the privacy loss in step 3 is minimized, achieving a balance between privacy protection and data availability.
[0019] Furthermore, in step 1, a convolutional neural network with two convolutional layers and three fully connected layers is established, and the differential privacy introduced is (ε,δ)-differential privacy, as shown in formula (1):
[0020] Pr[M(D)∈S M ]≤e ε ×Pr[M(D')∈S M ]+δ (1)
[0021] Where M is a given random algorithm; D and D' are neighbor datasets that differ by at most one record; S M are all possible outputs of the random algorithm M on the data sets D and D'; ε and δ represent the privacy budget and privacy error value respectively.
[0022] Furthermore, the process of adding Gaussian noise to the deep network parameter optimization phase in step 2 is:
[0023] From the training data set X = {x1, x2, ..., x n} randomly selects small batches of training data for input, the batch size is m, and calculates the gradient value corresponding to each training data Gradient clipping is performed on the L2 norm of each gradient and the average value is calculated to obtain a new gradient value within the threshold range C. Then at the new gradient value Add Gaussian noise V~N(0,σ 2 ) perturbs the output of the gradient, σ is the noise added scale; finally, the new gradient is Move back one step and update the gradient value parameter θ t .
[0024] Furthermore, the calculation of privacy loss in step 3 is expressed by formula (2):
[0025]
[0026] Where M is a given random algorithm; D and D' are two adjacent data sets, aux is the input auxiliary parameter, s represents the output and s∈R;
[0027] The added Gaussian noise has Markov properties. Combined with the definition of differential privacy, we can get formula (3) as follows:
[0028]
[0029] When Gaussian noise V and V' are added to adjacent data sets D and D', formula (4) is satisfied as follows:
[0030] V'=V+Dd (4)
[0031] Where Dd is the differential privacy sensitivity;
[0032] Finally, combining the characteristics of the Gaussian mechanism, we can get After simplifying formulas (2), (3), and (4), we can get the privacy loss in the process of adding Gaussian noise as formula (5):
[0033]
[0034] Furthermore, the loss function of WGAN in step 4 is shown in formula (6):
[0035]
[0036] Among them, P d represents the real data distribution, P g Represents the generated data distribution; when updating the weights, the network parameters need to be maintained within the range that satisfies the Lipschitz condition.
[0037] Furthermore, the optimal selection of the generated image after the privacy parameter processing in step 5 mainly depends on the classification accuracy and visual evaluation. The calculation of the similarity difference is obtained by subtracting the classification accuracy of the optimal selection from the classification accuracy of the generated image without any processing, as shown in formula (7):
[0038] Cacc =acc r -acc p (7)
[0039] Among them, acc r Indicates the classification accuracy of the generated image without any processing; acc p Represents the classification accuracy of the generated image for the best choice.
[0040] Furthermore, the similarity threshold C in step 6 is generally set to 10%; the C obtained in step 5 is calculated acc The size of the similarity threshold C set; if C acc When the value of is greater than C, reselect the appropriate generated image and repeat step 5 until C acc Less than C; when C acc When the value of is less than C, the size of the privacy loss is evaluated through step 3, and the privacy loss is minimized by selecting appropriate ε and δ to meet the conditions of Gaussian noise, ultimately achieving a balance between privacy protection and data availability.
[0041] 3. Beneficial effects
[0042] Compared with the existing known technologies, the technical solution provided by the present invention has the following significant effects:
[0043] (1) A deep learning differential privacy protection method of the present invention constructs a deep learning model that introduces a (ε, δ)-differential privacy mechanism, in which the degree of privacy protection is affected by privacy parameters ε, δ and σ. By setting multiple pairs of privacy parameter groups and conducting single-parameter variable and multi-parameter variable classification accuracy experiments, the most appropriate privacy parameter combination is selected, which is conducive to more effectively controlling the privacy protection effect of the model.
[0044] (2) A deep learning differential privacy protection method of the present invention uses WGAN to generate generated images after being processed with privacy parameters and generated images without any processing, and combines the evaluation criteria of privacy loss and classification accuracy to feedback and adjust the privacy parameters, and finally obtains a set of suitable privacy parameters to ensure good privacy protection effect and high data availability. Since WGAN solves the problems existing in traditional GAN well and shows better training stability and generated image quality than other GAN derivatives (such as DCGAN), it will help improve the availability of generated results and enhance the practical significance of its research.
[0045] (3) A deep learning differential privacy protection method of the present invention designs a method for quantitatively calculating privacy loss. By minimizing privacy loss, it can be verified whether the privacy parameter setting adjusted by feedback can make the privacy loss reach a smaller value, thereby obtaining a better privacy protection effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is the overall architecture diagram of the model of the present invention;
[0047] Figure 2 is a flow chart of the privacy feedback part based on WGAN of the present invention;
[0048] Figure 3 It is a schematic diagram of the convolutional neural network model of the present invention. DETAILED DESCRIPTION
[0049] In order to further understand the content of the present invention, the present invention is described in detail in conjunction with the accompanying drawings and embodiments.
[0050] Example 1
[0051] Combination Figure 1 , a deep learning differential privacy protection method of this embodiment, the steps are:
[0052] Step 1: Build a convolutional neural network with two convolutional layers and three fully connected layers. Introduce differential privacy theory in network parameter optimization and add Gaussian noise that satisfies the Gaussian mechanism. The specific process is as follows:
[0053] Initialize, build a convolutional neural network with two convolutional layers and three fully connected layers, and initialize the model parameters of the convolutional neural network, such as Figure 3 As shown. The introduction of (ε,δ)-differential privacy is shown in formula (1):
[0054] Pr[M(D)∈S M ]≤e ε ×Pr[M(D')∈S M ]+δ (1)
[0055] Where M is a given random algorithm; D and D' are neighbor datasets that differ by at most one record; S M are all possible outputs of the random algorithm M on the data sets D and D'. The degree of privacy protection is affected by the privacy parameters: the privacy budget ε, the privacy leakage error value δ, and the Gaussian noise V~N(0,σ 2 )’s noise addition scale σ: excessive noise will reduce the usability of the data, and too little noise will reduce the degree of privacy protection.
[0056] Step 2: In the parameter optimization stage of the deep learning network, add Gaussian noise to the gradient in combination with differential privacy theory; set the privacy parameter grouping method. The specific process is as follows:
[0057] From the training data set X = {x1, x2, ..., x n} randomly selects a small batch (batch size m) of training data for input and calculates each training data (x i ∈m t ) corresponding to the gradient value Gradient clipping is performed on the L2 norm of each gradient and the average value is calculated to obtain a new gradient value within the range of the gradient clipping threshold C. Then at the new gradient value Add Gaussian noise V~N(0,σ 2 ) The output of the perturbation gradient; finally, the new gradient is Move back one step and update the gradient value parameter θ t .
[0058] For the privacy parameters that affect the differential privacy protection effect, we changed a single parameter and fixed the other two parameters to conduct classification accuracy experiments; by analyzing the change trend, we concluded that the ideal value range of ε is [0.5, 1, 2, 4], the value range of σ is [2, 4, 6, 8], and the value range of δ is [1e-5, 1e-4, 1e-3, 1e-2]. Then, 64 sets of privacy parameter combinations were formed through mutual combination.
[0059] Step 3: Calculate the privacy loss of step 2 by combining the characteristics of differential privacy that can quantitatively evaluate privacy protection; the specific process is:
[0060] As a random variable, the value of privacy loss directly reflects the effect of privacy protection, which mainly depends on the added Gaussian noise. 2 ) has Markov properties. The privacy loss of this process can be tracked by the Moments Accountant (MA) calculation method. The calculation of privacy loss is expressed as formula (2):
[0061]
[0062] Among them, M is a random algorithm; D and D' are two adjacent data sets; aux is the input auxiliary parameter; s represents the output and s∈R.
[0063] In order to better quantify the privacy loss and analyze the impact of privacy parameter settings on privacy loss, we can obtain formula (3) by combining the characteristics of Gaussian noise with the definition of differential privacy as follows:
[0064]
[0065] By using the global sensitivity characteristic of differential privacy, when Gaussian noise V and V' are added to adjacent data sets D and D', formula (4) is satisfied as follows:
[0066] V'=V+Dd (4)
[0067] Where Dd is the differential privacy sensitivity.
[0068] Since in the Gaussian mechanism, Gaussian noise V~N(0,σ 2 ) satisfies σ 2 ≥c△f / ε,c 2 >2In(2 / δ); therefore, we can get After simplifying the above calculation formula, the privacy loss in the process of adding Gaussian noise can be obtained as formula (5) as follows:
[0069]
[0070] Step 6 The setting of the privacy parameter for feedback adjustment needs to minimize the value of formula (5) as much as possible and needs to satisfy conditions to achieve better privacy protection.
[0071] Step 4: Use the WGAN generative model to generate a generated image processed by the differential privacy parameters in step 2, and also use the WGAN generative model to generate images for the original data that has not been processed in any way; calculate the classification accuracy. The specific process is as follows:
[0072] First, build a WGAN class and define basic information: the size of the input image (28,28,1); the implicit encoding dimension of the input (100 dimensions); define the generator and discriminator functions; and define the loss function of WGAN. Then build the generator and discriminator, and set the weight clipping value (0.01). Finally, optimize (RMSProp method) the parameters of the generator. The training process uses WGAN to set up a training model under different privacy parameters to generate image results. The obtained image results are used to train the classifier and test the classification accuracy on the test set; the image results generated by WGAN without any privacy protection are used to train the classifier and test the classification accuracy on the test set. The loss function of WGAN is shown in formula (6):
[0073]
[0074] Among them, P d represents the real data distribution, P g Represents the generated data distribution; when updating the weights, the network parameters need to be maintained within the range that satisfies the Lipschitz condition.
[0075] The present invention uses WGAN, an excellent derivative variant of GAN, to generate images processed with privacy parameters and images without any processing, which effectively solves the problems of training instability and mode collapse existing in traditional GAN. The generative model of WGAN is constantly trained in a direction closer to the real data distribution. The closer the generated results are to the real results in terms of accuracy, the better the data availability. Combined with the calculation and analysis of privacy loss in step 3, the goal of the present invention is to ensure better privacy protection effect as much as possible while taking into account higher data availability.
[0076] Step 5: Select the best image result from the generated images processed by differential privacy parameters, compare the difference between the best image and the image generated by the original data, and calculate the similarity difference; the specific process is:
[0077] The most appropriate generated image result is selected based on the test accuracy and visual evaluation, and the accuracy difference with the generated image result without privacy protection is calculated and regarded as the similarity difference. As shown in formula (7):
[0078] C acc =acc r -acc p (7)
[0079] Among them, acc r Indicates the classification accuracy of the generated image without any processing; acc p Represents the classification accuracy of the generated image for the best choice.
[0080] Step 6: Under the similarity threshold, feedback the relevant privacy parameters in the adjustment model, such as Figure 2 , so that the privacy loss in step 3 is minimized and the balance between privacy protection and data availability is achieved; the specific process is:
[0081] Calculate C from step 5 acc The size of the similarity threshold C (10%) is set; if C acc When the value of is greater than C, reselect the appropriate generated image and repeat step 5 until C acc Less than C; when C acc When the value of is less than C, the privacy loss is evaluated through step 3; ultimately, a balance between privacy protection and data availability is achieved.
[0082] The present invention and its embodiments are described schematically above, and the description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. Therefore, if a person skilled in the art is inspired by it and designs a structural method and an embodiment similar to the technical solution without creativity without departing from the purpose of the invention, they shall all fall within the protection scope of the present invention.
Claims
1. A deep learning differential privacy protection method, characterized in that: The steps are: Step 1: Construct a convolutional neural network with two convolutional layers and three fully connected layers that introduces a differential privacy mechanism. The introduced differential privacy is (ε, δ) differential privacy, as shown in formula (1): Pr[M(D)∈S M ]≤e ε ×Pr[M(D')∈S M ]+δ (1) Where M is a given random algorithm; D and D' are neighbor datasets that differ by at most one record; S M are all possible outputs of the random algorithm M on the data sets D and D'; ε and δ represent the privacy budget and privacy error value respectively; Step 2: In the parameter optimization stage of the deep learning network, add Gaussian noise to the gradient in combination with differential privacy theory; specifically: from the training data set X = {x1, x2, ..., x n } randomly selects small batches of training data for input, the batch size is m, and calculates the gradient value g corresponding to each training data t (x i )←▽θ t L(θ t ,x i ) ; perform gradient clipping on the L2 norm of each gradient and calculate the average value to obtain a new gradient value within the similarity threshold C Then at the new gradient value Add Gaussian noise V~N(0,σ 2 ) perturbs the output of the gradient, σ is the noise added scale; finally, the new gradient is Move back one step and update the gradient value parameter θ t ; Step 3: Calculate the privacy loss of step 2 by combining the composable characteristics of differential privacy. The calculation of privacy loss is expressed by formula (2): Where M is a given random algorithm; D and D' are two adjacent data sets, aux is the input auxiliary parameter, s represents the output and s∈R; The added Gaussian noise has Markov properties, and combined with the definition of differential privacy, we get formula (3) as follows: When Gaussian noise V and V' are added to adjacent data sets D and D', formula (4) is satisfied as follows: V′=V+Dd (4) Where Dd is the differential privacy sensitivity; Finally, combining the characteristics of the Gaussian mechanism, we get After simplifying formulas (2), (3), and (4), the privacy loss in the process of adding Gaussian noise is obtained as formula (5) as follows: Step 4: Use the WGAN generative model to generate a generated image processed with differential privacy parameters; and also use the WGAN generative model to generate images for the original data that has not been processed in any way; the loss function of WGAN is shown in formula (6): Among them, P d represents the real data distribution, P g Indicates the generated data distribution; when updating the weights, the network parameters need to be maintained within the range that satisfies the Lipschitz condition; Step 5: Select the best image result from the generated images processed by differential privacy parameters, compare the difference between the best image and the image generated by the original data, and calculate the similarity difference C acc The optimal selection of the generated image after privacy parameter processing depends on the classification accuracy and visual evaluation. The similarity difference is calculated by subtracting the classification accuracy of the optimal selection from the classification accuracy of the generated image without any processing, as shown in formula (7): C = acc-acc (7) acc rp Among them, acc r Indicates the classification accuracy of the generated image without any processing; acc p represents the classification accuracy of the generated image of the best choice; Step 6: Under the similarity threshold, feedback the relevant privacy parameters in the adjustment model to minimize the privacy loss in step 3 and achieve a balance between privacy protection and data availability. The similarity threshold C is set to 10%. Calculate C obtained in step 5. acc The size of the similarity threshold C set; if C acc When the value of is greater than C, reselect the generated image and repeat step 5 until C acc Less than C; when C acc When the value of is less than C, the size of the privacy loss is evaluated through step 3, and the privacy loss is minimized by selecting ε and δ to meet the conditions of Gaussian noise, ultimately achieving a balance between privacy protection and data availability.
