Edge federated image classification method based on local differential privacy

By adopting the edge federated learning method of local differential privacy in image classification, only the part with the largest absolute value of the weight parameters of the image classification model is perturbed and aggregated at the edge server, which solves the problems of privacy security and high communication overhead. Improved model accuracy and reduced communication overhead.

CN114612715BActive Publication Date: 2024-09-24XIDIAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210220176.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-08
Publication Date
2024-09-24
Estimated Expiration
2042-03-08

AI Technical Summary

Technical Problem

Existing technologies have privacy security issues and high communication overhead in image classification, and differential privacy perturbations lead to reduced model accuracy.

Method used

The edge federated image classification method using local differential privacy reduces the number of communication rounds between local participants and parameter servers by aggregating at the edge server, and only perturbs the part with the largest absolute value of the weight parameters to improve model accuracy and reduce Communication overhead.

Benefits of technology

It effectively improves the accuracy of the image classification model, reduces the communication overhead of the system, and ensures the privacy and security of the training data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114612715B
    Figure CN114612715B
Patent Text Reader

Abstract

The present invention proposes an edge federated image classification method based on local differential privacy, and the implementation steps are as follows: construct an edge federated learning system; local participants obtain training sample sets and test sample sets; the parameter server constructs an image classification model for each local participant; the local participant initializes training parameters; the edge server sets edge update parameters; the local participant performs local optimization on the weight parameters of the image classification model; the edge server obtains and sends the edge updated results; the parameter server obtains and sends the global updated results; the local participant obtains the image classification results. In the process of uploading the local differential privacy perturbation of the weight parameters, the present invention only selects part of the parameter perturbation to upload, which reduces the introduced noise and improves the accuracy of the model. At the same time, by performing edge aggregation first and then global aggregation, the number of communication rounds with the parameter server is reduced, thereby reducing the communication overhead of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image processing, and relates to an image classification method, and specifically to an edge federated image classification method based on local differential privacy. Background Art

[0002] Image classification is one of the core issues in the field of image processing technology. Its purpose is to distinguish different categories of objects based on their different features reflected in the image information. The main image classification method is to train image classification models through convolutional neural networks, but training a good image classification model requires a large amount of image data. However, user image data often contains a lot of sensitive information, so the interaction of massive image data during convolutional neural network model training will inevitably bring privacy and security issues.

[0003] For the above reasons, a privacy-preserving method is needed to support data sharing and model training, so Google proposed federated learning, whose main execution process is: the parameter server builds and initializes the model for each local participant, each participant updates the model parameters locally and sends the results to the parameter server, the parameter server performs global aggregation and sends the results to each participant, and then performs a new round of iterations until the loss function converges or reaches the allowed number of iterations. Although federated learning can protect the data privacy security of the participants to a certain extent, studies have shown that attackers can infer the original data of the participants through the uploaded model parameters. For example, a semi-honest parameter server can determine whether the training set of the participant contains the specific sample based on the uploaded model parameters and the specific sample, thereby leaking the privacy of the participants.

[0004] For example, a patent application with application publication number CN 113642664 A and name “Privacy-preserving image classification method based on federated learning” discloses a privacy-preserving image classification method based on federated learning, the method mainly includes the following steps: the server obtains and preprocesses public data; the server initializes and sends data to each client through a shuffler; the client trains a local neural network; the shuffler randomly subsamples the client; the subsampled client predicts public data, perturbs and encrypts it, and then sends it to the shuffler; the shuffler forges and randomly arranges the predictions and then sends anonymous predictions to the server; the server aggregates anonymous predictions and trains a global neural network; the server sends the trained global neural network to each client; the client uses the trained global neural network to classify images.

[0005] However, due to the high communication overhead of federated learning itself, the existing technology introduces a shuffler during the training process to further increase the communication overhead. Therefore, a method that can reduce the communication overhead is needed, and edge computing has the advantages of low latency and low bandwidth operation. By using edge servers for edge aggregation and reducing the number of communication rounds between local participants and parameter servers, the communication overhead can be effectively reduced. At the same time, the number of parameters of the local participants is large. If all of them are uploaded after differential privacy perturbation, the privacy budget allocated to each parameter will become smaller and the introduced noise will become larger, which will reduce the accuracy of the final trained model. Summary of the invention

[0006] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and propose an edge federated image classification method based on local differential privacy, which reduces the communication overhead of the system and improves the accuracy of the image classification model while ensuring the privacy security of training data.

[0007] To achieve the above object, the technical solution adopted by the present invention includes the following steps:

[0008] (1) Building an edge federated learning system:

[0009] Construct a parameter server and J edge servers E={E j |1≤j≤J}, each edge server E j Including I local participants P = {P j,i |1≤i≤I}, where I≥2, J≥2, E j represents the jth edge server, P j,i represents the jth edge server E j The i-th local participant in ;

[0010] (2) Local participants obtain training sample sets and test sample sets:

[0011] Each local participant P j,i Obtain N images containing C target categories, and after annotating the targets in each image, more than half of the images and their labels form a training sample set The remaining images and their labels form the test sample set Among them, C ≥ 2, N ≥ 200;

[0012] (3) The parameter server is used for each local participant P j,i Build the image classification model H j,i :

[0013] The parameter server is for each local participant P j,iConstruct an image classification convolutional neural network model H consisting of a stacked input layer, a hidden layer, and an output layer j,i , the hidden layer includes l stacked convolutional layers-ReLU layers-pooling layers, and the output layer includes multiple stacked fully connected layers, where l ≥ 2;

[0014] (4) Local participants initialize training parameters:

[0015] Each local participant P j,i The number of initialization iterations is t, the maximum number of iterations is T, T ≥ 50, and each image classification model H j,i The weight parameter is The number of parameters is d, d ≥ 10000, let t = 1;

[0016] (5) The edge server sets edge update parameters:

[0017] Each edge server E j Set the number of edge updates to k, the maximum number of updates to K, K ≥ 10, and k = 1;

[0018] (6) Local participants perform local optimization on the weight parameters of the image classification model:

[0019] (6a) Each local participant P j,i The training sample set B training samples are randomly selected with replacement as the image classification model H j,i The input of l hidden layers extracts features from each training sample and compresses the extracted features. The output layer classifies each training sample according to the compressed features to obtain a set of predicted labels for B training samples.

[0020] (6b) Each local participant P j,i Using the cross entropy loss function, by predicting the label value and its corresponding true label value Calculate the image classification model H j,i The loss value Then ask For H j,i The weight parameter The partial derivative of The stochastic gradient descent algorithm is used For the image classification model H j,i The weight parameter Update and get the weight parameter of this iteration

[0021] (6c) Each local participant P j,i Filter out weight parameters The m parameters with the largest absolute values And use the local differential privacy algorithm for each parameter v s Perform disturbance and obtain the parameter set after disturbance Then Upload to the corresponding edge server E j ;

[0022] (7) The edge server obtains the updated result of the edge and sends it:

[0023] Each edge server E j Upload parameters Aggregation is performed to obtain Aggregation results And determine whether k ≥ K is true. If so, get the edge update result of this iteration And the corresponding image classification model H' j , and After sending to the parameter server, execute step (8), otherwise, set k = k + 1. H j,i =H' j , and execute step (6);

[0024] (8) The parameter server obtains the globally updated result and sends it:

[0025] The parameter server uploads Aggregation is performed to obtain The aggregation result w t , and determine whether t≥T holds. If so, obtain the trained image classification model H' and send it to each local participant P j,i , otherwise, let t = t + 1, H j,i =H', and execute step (5);

[0026] (9) Local participants obtain image classification results:

[0027] Each local participant P j,i The test sample set It is used as the input of the trained image classification model H' for forward propagation to obtain the predicted label values ​​of all test samples.

[0028] Compared with the prior art, the present invention has the following advantages:

[0029] 1. In the process of training the image classification model of each local participant and obtaining the image classification results, the present invention first updates the weight parameters of each model, then selects some parameters with the largest absolute value after update, and uses the local differential privacy algorithm to perturb them, thereby solving the problem of large noise introduced by the perturbation of all parameters by local differential privacy and reducing the model accuracy, and effectively improves the accuracy of the final image classification model.

[0030] 2. In the process of uploading the perturbed weight parameters of the image classification model of each local participant, the present invention first uploads the perturbed weight parameters to the edge server for edge aggregation, and then uploads the edge aggregation results to the parameter server for global aggregation, thereby reducing the number of communication rounds between the local participants and the parameter server, and effectively reducing the communication overhead of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a flow chart for realizing the present invention;

[0032] Figure 2 Schematic diagram of the edge federated learning system constructed for the present invention. DETAILED DESCRIPTION

[0033] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:

[0034] Reference Figure 1 , the present invention comprises the following steps:

[0035] Step 1) Build an edge federated learning system:

[0036] Construct a parameter server and J edge servers E={E j |1≤j≤J}, each edge server E j Including I local participants P = {P j,i |1≤i≤I}, the structure of the edge federated learning system is as follows Figure 2 As shown, S represents the parameter server, I≥2, J≥2, E j represents the jth edge server, P j,i represents the jth edge server E j The i-th local participant in ; in this embodiment, J=5, I=10.

[0037] Step 2) The local participant obtains the training sample set and the test sample set:

[0038] Each local participant P j,iObtain N images containing C target categories, and after annotating the targets in each image, more than half of the images and their labels form a training sample set The remaining images and their labels form the test sample set Among them, C ≥ 2, N ≥ 200;

[0039] In this embodiment, the MNIST handwritten digital image dataset is used. The labels corresponding to the dataset are digits from 0 to 9. Let C = 10. The MNIST dataset includes 60,000 training image samples and 10,000 test image samples. Each image sample is a grayscale image with a size of 28×28. The embodiment sets each local participant P j,i There are 1200 training image samples and 200 test image samples.

[0040] Step 3) The parameter server is used for each local participant P j,i Build the image classification model H j,i :

[0041] The parameter server is for each local participant P j,i Construct an image classification convolutional neural network model H consisting of a stacked input layer, a hidden layer, and an output layer j,i , the hidden layer includes l stacked convolutional layers-ReLU layers-pooling layers, and the output layer includes multiple stacked fully connected layers, where l ≥ 2;

[0042] In this embodiment, the number of convolutional layers-ReLU layers-pooling layers in the hidden layer is l=2, and the convolution kernel size of the convolutional layers in the two convolutional layers-ReLU layers-pooling layers is 5, and the step size is 1;

[0043] The padding of the convolution layer in the first convolution layer-ReLU layer-pooling layer is 2, and the number of convolution kernels is set to 6;

[0044] The padding of the convolution layer in the second convolution layer-ReLU layer-pooling layer is 0, and the number of convolution kernels is set to 16;

[0045] The number of fully connected layers included in the output layer is 3. The input of the first fully connected layer is 400 and the output is 120. The input of the second fully connected layer is 120 and the output is 84. The input of the third fully connected layer is 84 and the output is 10.

[0046] Step 4) The local participant initializes the training parameters:

[0047] Each local participant P j,i The number of initialization iterations is t, the maximum number of iterations is T, T ≥ 50, and each image classification model H j,i The weight parameter is The number of parameters is d, d≥10000, and t=1; in this embodiment, d=61706, T=50.

[0048] Step 5) The edge server sets the edge update parameters:

[0049] Each edge server E j The number of edge updates is set to k, the maximum number of updates is K, K≥10, and k=1; in this embodiment, K=10.

[0050] Step 6) The local participant performs local optimization on the weight parameters of the image classification model:

[0051] Step 6a) Each local party P j,i The training sample set B training samples are randomly selected with replacement as the image classification model H j,i The input of l hidden layers extracts features from each training sample and compresses the extracted features. The output layer classifies each training sample according to the compressed features to obtain a set of predicted labels for B training samples.

[0052] In this embodiment, B=20. When each input training sample passes through the first convolution layer-ReLU layer-pooling layer, the convolution layer performs feature extraction to obtain 6 28×28 features, and the pooling layer performs feature compression to obtain 6 14×14 features. Then, when passing through the second convolution layer-ReLU layer-pooling layer, the convolution layer performs feature extraction to obtain 16 10×10 features, and the pooling layer performs feature compression to obtain 16 5×5 features. Finally, the results after the pooling layer are classified through 3 fully connected layers to obtain 20 prediction labels.

[0053] Step 6b) Each local party P j,i Using the cross entropy loss function, by predicting the label value and its corresponding true label value Calculate the image classification model H j,i The loss value Then ask For H j,i The weight parameter The partial derivative of The stochastic gradient descent algorithm is used For the image classification model H j,i The weight parameter Update and get the weight parameter of this iteration

[0054] In this step, each local participant P j,iCalculate the image classification model H j,i The loss value And the image classification model H j,i The weight parameter To update, the calculation and update formulas are:

[0055]

[0056]

[0057] Where η represents the learning rate, 0.001≤η≤1, Represents the gradient operator.

[0058] Step 6c) Each local participant P j,i Filter out weight parameters The m parameters with the largest absolute values And use the local differential privacy algorithm for each parameter v s Perform disturbance and obtain the parameter set after disturbance Then Upload to the corresponding edge server E j ;

[0059] In this step, the weight parameters of the image classification model have d=61706 values. If all of them are uploaded after differential privacy perturbation, the privacy budget allocated to each parameter will become smaller, the introduced noise will become larger, and the final image classification model accuracy will become lower. Existing studies have shown that the larger the absolute value of the parameter, the greater the impact on the training of the model. Uploading only part of the parameters will not affect the accuracy of the final model, and may even improve the accuracy of the model. In this embodiment, m=15426.

[0060] In this step, the local differential privacy algorithm is used to calculate each parameter v s Perform disturbance, the disturbance formula is:

[0061]

[0062] in represents the local differential privacy algorithm, ε represents the privacy budget, 0.1≤ε≤1, and wp represents probability.

[0063] Local differential privacy can provide quantitative privacy protection for local participants through the parameter ε. Attackers cannot infer the original data of the participants through the perturbed values. The smaller ε is set, the better the privacy protection effect. In this embodiment, ε = 0.5.

[0064] For local differential privacy algorithms It needs to satisfy the definition of local differential privacy: for any two input values ​​v and v', the output value o satisfies Where Pr[·] represents probability. In order to meet the definition of local differential privacy, the original data [-1,1] is mapped to the probability interval through random response technology. A linear mapping relationship is obtained, and then one of the perturbation values ​​Q, 0, and R is returned through the mapped probability value. In order to satisfy the unbiasedness of the perturbation value to the original data It can be calculated and in

[0065] Express expectations.

[0066] Step 7) The edge server obtains the updated result of the edge and sends it:

[0067] Each edge server E j Upload parameters Aggregation is performed to obtain Aggregation results And determine whether k ≥ K is true. If so, get the edge update result of this iteration And the corresponding image classification model H' j , and After sending to the parameter server, execute step (8), otherwise, set k = k + 1. H j,i =H' j , and execute step (6);

[0068] In this step, the edge server E j For the weight parameter The aggregation formula is:

[0069]

[0070] The edge server is located at the edge of the network close to the local participants, and has the advantages of low bandwidth operation and low latency. The local participants upload the perturbed weight parameters to the edge server for aggregation, which can reduce the number of communication rounds with the parameter server. At the same time, during the aggregation process, since the perturbation value satisfies the unbiased property with respect to the original value, no other operations are required after aggregation.

[0071] Step 8) The parameter server obtains the globally updated result and sends it:

[0072] The parameter server uploads Aggregation is performed to obtain The aggregation result w t, and determine whether t≥T holds. If so, obtain the trained image classification model H' and send it to each local participant P j,i , otherwise, let t = t + 1, H j,i =H', and execute step (5);

[0073] In this step, the parameter server calculates the weight parameters The aggregation formula is:

[0074]

[0075] Step 9) The local participant obtains the image classification results:

[0076] Each local participant P j,i The test sample set It is used as the input of the trained image classification model H' for forward propagation to obtain the predicted label values ​​of all test samples.

[0077] In this step, the image classification accuracy obtained by all local participants was 98.11%.

Claims

1. An edge federated image classification method based on local differential privacy, characterized in that: The steps include: (1) Building an edge federated learning system: Construct a parameter server and J edge servers E={E j |1≤j≤J}, each edge server E j Including I local participants P = {P j,i |1≤i≤I}, where I≥2, J≥2, E j represents the jth edge server, P j,i represents the jth edge server E j The i-th local participant in ; (2) Local participants obtain training sample sets and test sample sets: Each local participant P j,i Obtain N images containing C target categories, and after annotating the targets in each image, more than half of the images and their labels form a training sample set The remaining images and their labels form the test sample set Among them, C ≥ 2, N ≥ 200; (3) The parameter server is used for each local participant P j,i Build the image classification model H j,i : The parameter server is for each local participant P j,i Construct an image classification convolutional neural network model H consisting of a stacked input layer, a hidden layer, and an output layer j,i , the hidden layer includes l stacked convolutional layers-ReLU layers-pooling layers, and the output layer includes multiple stacked fully connected layers, where l ≥ 2; (4) Local participants initialize training parameters: Each local participant P j,i The number of initialization iterations is t, the maximum number of iterations is T, T ≥ 50, and each image classification model H j,i The weight parameter is The number of parameters is d, d ≥ 10000, let t = 1; (5) The edge server sets edge update parameters: Each edge server E j Set the number of edge updates to k, the maximum number of updates to K, K ≥ 10, and k = 1; (6) Local participants perform local optimization on the weight parameters of the image classification model: (6a) Each local participant P j,i The training sample set B training samples are randomly selected with replacement as the image classification model H j,i The input of l hidden layers extracts features from each training sample and compresses the extracted features. The output layer classifies each training sample according to the compressed features to obtain a set of predicted labels for B training samples. (6b) Each local participant P j,i Using the cross entropy loss function, by predicting the label value and its corresponding true label value Calculate the image classification model H j,i The loss value Then ask For H j,i The weight parameter The partial derivative of The stochastic gradient descent algorithm is used For the image classification model H j,i The weight parameter Update and get the weight parameter of this iteration (6c) Each local participant P j,i Filter out weight parameters The m parameters with the largest absolute values And use the local differential privacy algorithm for each parameter v s Perform disturbance and obtain the parameter set after disturbance Then Upload to the corresponding edge server E j ; (7) The edge server obtains the updated result of the edge and sends it: Each edge server E j Upload parameters Aggregation is performed to obtain Aggregation results And determine whether k ≥ K is true. If so, get the edge update result of this iteration And the corresponding image classification model H' j , and After sending to the parameter server, execute step (8), otherwise, set k = k + 1. H j,i =H' j , and execute step (6); (8) The parameter server obtains the globally updated result and sends it: The parameter server uploads Aggregation is performed to obtain The aggregation result w t , and determine whether t≥T holds. If so, obtain the trained image classification model H' and send it to each local participant P j,i , otherwise, let t = t + 1, H j,i =H', and execute step (5); (9) Local participants obtain image classification results: Each local participant P j,i The test sample set It is used as the input of the trained image classification model H' for forward propagation to obtain the predicted label values ​​of all test samples.

2. The edge federated image classification method based on local differential privacy according to claim 1, characterized in that: The image classification convolutional neural network model H described in step (3) j,i ,in: The number of convolutional layers, ReLU layers, and pooling layers in the hidden layer is l=2. The convolution kernel size of the two convolutional layers, ReLU layers, and pooling layers is 5, and the step size is 1. The padding of the convolutional layer in the first convolutional layer, ReLU layer, and pooling layer is 2, and the number of convolution kernels is set to 6. The padding of the convolutional layer in the second convolutional layer, ReLU layer, and pooling layer is 0, and the number of convolution kernels is set to 16. The number of fully connected layers included in the output layer is 3.

3. The edge federated image classification method based on local differential privacy according to claim 1, characterized in that: The computational image classification model H described in step (6b) j,i The loss value And the image classification model H j,i The weight parameter To update, the calculation and update formulas are: Where η represents the learning rate, 0.001≤η≤1, Represents the gradient operator.

4. The edge federated image classification method based on local differential privacy according to claim 1, characterized in that: The local differential privacy algorithm described in step (6c) is used for each parameter v s Perform disturbance, the disturbance formula is: in represents the local differential privacy algorithm, ε represents the privacy budget, 0.1≤ε≤1, and wp represents probability.