Membership inference attack method in federated learning scenario in image classification field
By using poisoning attacks and sequence confidence data methods in federated learning in the field of image classification, the model is guided to overfit and the shadow model is used to extract sequence confidence data, which solves the problem of poor member inference attacks in the existing technology. Efficient privacy data extraction and leakage risk reduction are achieved.
Patent Information
- Application Number
- CN202311350111.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-18
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2043-10-18
AI Technical Summary
In federated learning scenarios in the field of image classification, existing member inference attack methods are ineffective and difficult to effectively extract the data details implicit in the model, leading to the risk of privacy leakage.
By using poisoning attacks and sequence confidence data methods, the target model is guided to overfit in federated learning, and the shadow model and binary classifier are used to extract model parameters, generate sequence confidence data for attack, and achieve member and non-member data point distinction.
It improves the accuracy and effect of the attack, can effectively extract the data details hidden in the model, enhances the risk of privacy leakage, and has less impact on model performance.
Smart Images

Figure CN117372839B
Abstract
Description
Technical Field
[0001] The present invention belongs to an attack technology in the image-related field, and specifically involves an inference attack on model privacy in a federated learning scenario in the image classification field. More specifically, it is a member inference attack method in a federated learning scenario in the image classification field. Background Art
[0002] In the era of digital economy, a large amount of data allows models to be trained more perfectly, but many of these training data involve personal privacy. If the previous integrated learning method is used, it will undoubtedly pose a great threat to the privacy security of personal data. Therefore, using the federated learning framework for model training has become a popular choice.
[0003] Federated learning is a distributed training method. Personal data is distributed in each person's device without uploading to the server. Training is performed on the local client, and then the trained model gradient data is uploaded to the central server. The server aggregates and updates the gradient and then sends the updated model to each client. This is how the federated model is trained. However, even if the federated learning training method is adopted, the user's privacy is still likely to be leaked. The main security and privacy threats are currently divided into four categories: poisoning attacks, adversarial sample attacks, model extraction attacks, and model reverse attacks.
[0004] This invention mainly studies the member reasoning attack under the federated learning framework, which is a type of model reversal attack. It was born in the machine learning as a service scenario and is a privacy attack technology targeting model data and user data. In 2020, member reasoning attacks have become the third largest attack method against artificial intelligence systems, accounting for 3.5% of the number of attacks throughout the year. Although member reasoning attacks are only an indirect form of privacy theft, when member reasoning attacks are combined with other attacks as part of the Advanced Persistent Threat (APT) attack chain, such as acting as a pre-attack for attacks such as data reconstruction attacks, sensitive member information will make these attacks more targeted and destructive.
[0005] Chinese patent 2022113908705 discloses a member reasoning attack method and device in federated learning, the method comprising: determining the critical round K of the attacker in the training process of the target model; inputting the target sample into the target model to obtain sample features; the sample features include the loss value of the target sample at the critical round K of the target model and the loss value at the last round, the true label, the parameter gradient and the output; assigning weights to the loss value of the target sample at the critical round K of the target model and the loss value at the last round; inputting the weighted sample features into the attack model, and outputting the probability value of the target sample being a member sample to determine whether the target sample is a member sample. This application adopts overfitting feature perception, finds a critical round K that can distinguish members and non-members with similar performance during the training process of the target model, and uses the Transformer model to assign weights of the critical round and the last round to different samples to improve the attack accuracy.
[0006] Chinese patent 2022112120329 discloses a method and application for training a member reasoning attack model based on federated learning, the method comprising: constructing a labeled training data pool based on the first training samples with labels contained in each attacker in the federated learning model, and constructing an unlabeled training data pool based on the second training samples generated by the generative adversarial network; selecting part of the second training samples in the unlabeled training data pool to set labels based on the adversarial representation active learning model, and adding part of the second training samples with labels to the labeled training data pool; training a member reasoning attack model based on the first training samples with labels in the labeled training data pool, part of the second training samples, and the remaining second training samples in the unlabeled training data pool. This method achieves the enrichment of the diversity of attack data, the enhancement of training data, and the minimization of the required data labels, the reduction of data labeling costs, and the improvement of data accuracy.
[0007] The above two methods also belong to the membership reasoning attack method in federated learning, but unlike the method of this application, the method of Chinese Patent 2022113908705 uses a specific key round K in training, implements an attack in this key round, and then uses the loss value, true label, parameter gradient and output of the target sample in this key round and the last round to determine whether the sample is a member sample or a non-member sample. The method of Chinese Patent 2022112120329 mainly uses a generative adversarial network to enrich the diversity of attack data to achieve the purpose of enhancing training data, and then implements the attack. After searching, there is no identical patent document for the multiple rounds and sequence confidence methods used in the attack method of this application. Summary of the invention
[0008] The purpose of the present invention is to provide a membership inference attack method in a federated learning scenario in the field of image classification. This method aims to address the problem that the existing membership inference attack methods in the federated learning scenario in the field of image classification are not effective. The attack is successfully implemented by slightly contaminating the target data set to cause the target model to overfit and using sequence confidence data to extract the detailed information of a single data point implied in the model to the greatest extent, and the attack effect is good.
[0009] The technical solution of the present invention is:
[0010] A member reasoning attack method in a federated learning scenario in the field of image classification is characterized in that the attack is carried out in the federated learning scenario by using poisoning attack and sequence confidence data methods. First, the target client is guided to download pictures that cause the local data of the target client to be contaminated, that is, a small amount of contaminated data sets are used to cause a certain degree of overfitting of the target model; secondly, the method of extracting the parameters of the target model and generating sequence confidence for inference is used in the process of federated learning to successfully carry out the attack, which specifically includes the following steps:
[0011] Step 1: Generate a contaminated dataset;
[0012] Step 2: Train the model under the federated learning framework. At the same time, the attacker will collect the training model parameters during the training process.
[0013] Step 3: Use the attacker's own shadow dataset to train the shadow model to simulate the model parameters of the target model, and use the parameters to train the binary classifier for member reasoning attack;
[0014] Step 4: Use our attack method to use the current mainstream datasets CIFAR10, CIFAR100, MNIST, Fashion-MNIST on the current mainstream networks ResNet18, AlexNet, MobileNetV2, InceptionV3 to implement attacks and test performance.
[0015] More specific steps are:
[0016] Step 1 specifically uses label reversal attack as the attack method to pollute the dataset. At the beginning of the attack, shadow Extract b images of class c from the dataset; for each sample (x, c), change their label c to any label i, generate data (x, c) and i≠c, and form D attack ; Then compare this transformed dataset with the original training dataset D train Merge together to get the final training dataset D for the attack poison .
[0017] Specifically, step 2 is that no matter the attacker is acting as a central server or a local client, the attacker will use model parameters from multiple different global training rounds to attack during the implementation of the attack; when the server acts as an attacker, the model parameters of the target client are saved separately in a specific training round as the model parameters used in the attack; and when the local client acts as an attacker, the aggregated model parameters sent by the central server in a specific training round are retained as the model parameters used in the attack.
[0018] Specifically, step 3 uses images with the same category but different data as the target training dataset as a shadow dataset to train a shadow model with the same architecture as the target model; then uses the sequence confidence data generated by the shadow model to train the selected attack classifier, and then performs threshold judgment based on the confidence data generated by the sequence confidence data to finally obtain the attack result.
[0019] Specifically, step 4 uses several mainstream data sets CIFAR10, CIFAR100, MNIST, and Fashion-MNIST to test the attack effect in a federated learning scenario using ResNet18, AlexNet, MobileNetV2, and InceptionV3 as pre-training models.
[0020] Effect of the present invention: The present invention uses a small amount of contaminated data sets to cause a certain degree of overfitting in the target model, and then extracts the parameters of the target model in a specific global training round during the federated learning process, and then uses the sequence confidence method to extract the detailed information of the data implicit in the model to the greatest extent, and finally uses a binary classifier to distinguish these detailed information to achieve a better attack effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a flowchart of the present invention;
[0022] Figure 2 It is the attack flow chart of the federated learning training phase of the present invention;
[0023] Figure 3 It is a flow chart of using shadow model and shadow data to train a binary classifier for attack in the present invention;
[0024] Figure 4 It is a visualization diagram of the effect of the present invention; the eight figures are MI-AUC values of experiments conducted under different network models and data sets.
[0025] Figure 5It is a visualization diagram of the principle of the present invention, which shows the distribution of different data points when the poisoning rate is 0%, 20%, 40%, 60%, 80% and 100%. DETAILED DESCRIPTION
[0026] The present invention will be further described below by way of the accompanying drawings and examples.
[0027] See also Figure 1-3 A member reasoning attack method in the federated learning scenario in the field of image classification is used to implement the attack in the federated learning scenario by using poisoning attack and sequence confidence data. First, the target client is guided to download images that cause the local data of the target client to be contaminated, that is, a small amount of contaminated data sets are used to make the target model overfit to a certain extent. Secondly, the method of extracting the parameters of the target model and generating sequence confidence for inference is used in the process of federated learning to successfully implement the attack. The following steps are included:
[0028] Step 1: Generate a contaminated dataset;
[0029] Step 2: Train the model under the federated learning framework. At the same time, the attacker will collect the training model parameters during the training process.
[0030] Step 3: Use the attacker's own shadow dataset to train the shadow model to simulate the model parameters of the target model, and use the parameters to train the binary classifier for member inference attack.
[0031] Step 4: Use the current mainstream datasets CIFAR10, CIFAR100, MNIST, and Fashion-MNIST to implement attacks and test performance on the current mainstream networks ResNet18, AlexNet, MobileNetV2, and InceptionV3.
[0032] More specific steps are:
[0033] Step 1 specifically uses label reversal attack as the attack method to pollute the dataset. At the beginning of the attack, shadow Extract b images of class c from the dataset; for each sample (x, c), change their label c to any label i, generate data (x, c) and i≠c, and form D attack ; Then compare this transformed dataset with the original training dataset D train Merge together to get the final training dataset D for the attack poison .
[0034] Step 2 is that no matter the attacker is a central server or a local client, the attacker will use multiple model parameters from different global training rounds to attack. When the server acts as an attacker, the target client's model parameters in a specific training round are saved separately as the model parameters used in the attack. When the local client acts as an attacker, the aggregated model parameters sent by the central server in a specific training round are saved as the model parameters used in the attack.
[0035] Specifically, step 3 uses images with the same category but different data as the target training dataset as a shadow dataset to train a shadow model with the same architecture as the target model; then uses the sequence confidence data generated by the shadow model to train the selected attack classifier, and then performs threshold judgment based on the confidence data generated by the sequence confidence data to finally obtain the attack result.
[0036] Specifically, step 4 uses several mainstream data sets CIFAR10, CIFAR100, MNIST, and Fashion-MNIST to test the attack effect in a federated learning scenario using ResNet18, AlexNet, MobileNetV2, and InceptionV3 as pre-training models.
[0037] See also Figure 5 ,After successfully using this method for membership inference attack, we aim to understand the reasons behind its success. Therefore, t-SNE is used to visualize the ,confidence scores of member and non-member data points in two-dimensional space. ,500 member data points and 500 non-member data points are selected for ,visualization. Figure 5 Visualization results of the global attack method on the CIFAR-10 dataset are shown, where the number of poisonings ranges from 0 to 500. As the number of poisonings increases, it can be observed that the member and non-member data points are gradually separated and a clear decision boundary is formed. This shows that the attack method can effectively infer whether the data point belongs to a member or a non-member. These results demonstrate the ability of the attack method to successfully distinguish between member and non-member data points by forming a shared decision boundary when the number of poisonings increases.
[0038] Table 1 is divided into global attack method part and local attack method part:
[0039] The global attack method section of Table 1 shows the results of using the membership inference attack method when the central server is used as an attacker. It can be observed that the method achieves significant attack results on multiple models and datasets. The AUC value of the target category t increases with the degree of contamination of the dataset, indicating that the risk of privacy leakage increases. In addition, due to the multi-party aggregation nature of federated learning, the impact on the accuracy of the main task of the model is minimal and difficult to detect. For example, when using the ResNet18 model and the MNIST dataset, the AUC value increases from 0.523 to 0.955 as the degree of contamination of private data increases. The privacy leakage of the model is significantly increased, while the loss of global model accuracy is less than 1%. Therefore, even in the case of a small amount of contamination of the dataset or a small amount of human error leading to incorrect data labeling, there is a risk of increased privacy leakage. These results highlight the attack effectiveness of the attack method while minimizing its impact on the overall model performance.
[0040] exist Figure 4 In , the inventors show ROC curves of some experiments.
[0041] The attack results when the membership inference attack method is used when the local client is the attacker are presented in the local attack method section of Table 1. The MI-AUC value is expressed as the area under the ROC curve, and TPR@FPR=1% is the true positive rate value when the false positive rate is 1%. In this attack, the model parameters of the target client are aggregated by the central server, which greatly reduces the contribution of each client's specific privacy data point to the overall model. However, due to training on the contaminated local dataset, the global model still retains some changes in the model parameters. Therefore, when the model is used for federated learning training, the attack on the aggregated model distributed by the central server will still be successful. Table 1 shows the model data that can be successfully attacked. Since the attack method relies on poisoning to induce the model to overfit so that it can remember the details of private data, even when attacking the aggregated model parameters, high accuracy can still be achieved by exploiting the detailed information about the target local client data in the aggregated model. For example, using the ResNet-18 network on the CIFAR10 dataset, an AUC value of up to 0.899 can be obtained.
[0042] Table 1
[0043]
[0044] In summary, the present invention is a member reasoning attack method in the federated learning scenario in the field of image classification. It uses a small amount of contaminated data sets to cause a certain degree of overfitting in the target model. Then, in the process of federated learning, the parameters of the target model are extracted in a specific global training round. Then, the sequence confidence method is used to extract the detailed information of the data implicit in the model to the greatest extent. Finally, a binary classifier is used to distinguish these detailed information, and a good attack effect has been achieved.
[0045] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still falls within the scope of the technical solution of the present invention.
Claims
1. A member reasoning attack method in the federated learning scenario in the field of image classification. The attack is carried out in the federated learning scenario by using poisoning attack and sequence confidence data. First, the target client is guided to download pictures that cause the local data of the target client to be contaminated, that is, a small amount of contaminated data set is used to cause a certain degree of overfitting of the target model. Secondly, the method of extracting the parameters of the target model and generating sequence confidence for inference is used in the process of federated learning to successfully carry out the attack, which includes the following steps: Step 1: Generate a contaminated image dataset; Step 2: Train the model under the federated learning framework. At the same time, the attacker collects the training parameters of the target model during the training process. Step 3: Use the attacker's own shadow data set to train the shadow model to simulate the model parameters of the target model, and use the parameters to train the binary classifier for member reasoning attack; Step 4: Use the current mainstream data sets CIFAR10, CIFAR100, MNIST, and Fashion-MNIST to attack the current mainstream network models ResNet18, AlexNet, MobileNetV2, and InceptionV3 to test the attack performance; It is characterized in that: the more specific steps are: Step 1 is to use label reversal attack to poison the target dataset. At the beginning of the attack, shadow Extract b images of class c from the image library. For each sample (x, c), change their label c to any label i, generate data (x, c) with i≠c and form D attack , and then compare this transformed dataset with the original training dataset D train Combined together, we get the final training data set D for attacking poison ; Specifically, in step 2, during the test, when the attacker acts as a central server or as a local client, the attacker will use model parameters under multiple different global training rounds to carry out the attack; when the central server acts as an attacker, it will save the model parameters of the target client in a specific training round as the model parameters used for the attack; and when the local client acts as an attacker, it will save the aggregated model parameters sent by the central server in a specific training round as the model parameters used for the attack; Step 3 is to use a shadow dataset with the same category but different instances as the target training dataset to train a shadow model with the same architecture as the target model; then use the sequence confidence data generated by the shadow model to train the selected attack binary classifier, and perform threshold discrimination on the discriminant data generated by the sequence confidence data to finally obtain the attack results of member and non-member information; Specifically, step 4 uses several mainstream data sets CIFAR10, CIFAR100, MNIST, and Fashion-MNIST to test the attack effect in a federated learning scenario using ResNet18, AlexNet, MobileNetV2, and InceptionV3 as pre-training models.
Citation Information
Patent Citations
Member reasoning attack method and device in federal learning
CN115640847A
Federal learning member reasoning attack defense method based on adversarial interference
CN113792331A
Federal learning member inference method based on prediction confidence sequence
CN113850399A
Federal learning-oriented sample poisoning attack resisting method
CN114764499A
Machine learning model-oriented label flipping attack and defense method thereof
CN114925358A
