Neural network backdoor risk assessment method, system and device based on multi-type mapping

Through the multi-type mapping neural network backdoor risk assessment method, multiple poisoning sample sets are constructed and risk scores are calculated, which solves the problem of single backdoor attack form and incomplete assessment in the existing technology, and realizes a comprehensive backdoor for deep learning models. Security risk assessment and detection.

CN115018069BInactive Publication Date: 2024-09-13WUHAN UNIV RIZHAO INFORMATION TECH RES INST
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210598454.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-30
Publication Date
2024-09-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technology cannot comprehensively and systematically assess the backdoor security risks faced by deep learning models, and existing methods use a single attack form and cannot effectively detect the concealment of backdoor attacks.

Method used

Using a multi-type mapping neural network backdoor risk assessment method, by determining the neural network model, original training set and test set, setting the poisoning ratio, backdoor trigger and label mapping method, constructing multiple poisoning sample sets, training the backdoor model, And calculate the risk score, comprehensively evaluate the backdoor attack effect and classification accuracy difference of the model, and achieve a comprehensive risk assessment.

Benefits of technology

It realizes the diversity assessment of backdoor attack forms of deep learning models, can effectively measure the backdoor security risks of neural network models, and provides more comprehensive security risk assessment and detection capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115018069B
    Figure CN115018069B
Patent Text Reader

Abstract

The present invention discloses a neural network backdoor risk assessment method, system and device for multi-type mapping. First, the target model is trained on a clean sample set and the accuracy is counted. Then, different poisoning training sets are constructed according to four mapping strategies, and multiple target models with backdoors implanted are trained and the accuracy is counted. Finally, an attack test set is constructed and the attack performance of different backdoor models is tested. The risk score is calculated by combining various indicators to achieve backdoor security risk assessment of the target deep learning model. The present invention solves the problem of security risk assessment of deep learning models facing backdoor attacks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of information security technology in computer science, and relates to a neural network backdoor risk assessment method, system and device, and specifically to a neural network backdoor risk assessment method, system and device for multi-type mapping. Background Art

[0002] In recent years, deep learning technology has achieved fruitful results in many fields, and the applications based on deep learning technology have been continuously expanded, such as face recognition, autonomous driving, and smart medical care. At present, due to the lack of computing resources and training data, more people choose to outsource training tasks to third parties or use data provided by third parties to train models. This training mode brings new security risks to deep learning models. Attackers can inject malicious samples into training data and then implant backdoors into the model. On the one hand, backdoor attacks can cause the attacked model to mistakenly predict samples with triggers as target categories specified by the attacker, such as identifying a stop sign with a trigger pattern as acceleration, which may cause serious security problems. On the other hand, the attacked model maintains a high classification accuracy on clean samples, making the backdoor itself well concealed and difficult to detect.

[0003] Although there are some methods for implementing backdoor attacks and testing on deep learning models, the attack forms adopted by these methods are relatively simple and cannot conduct a comprehensive and systematic assessment of the backdoor security risks faced by deep learning models. Summary of the invention

[0004] In order to solve the problem in the prior art that backdoor attacks are limited to a single attack form and cannot achieve comprehensive security risk assessment, the present invention proposes a neural network backdoor risk assessment method, system and device with multi-type mapping.

[0005] The technical solution adopted by the method of the present invention is: a neural network backdoor risk assessment method of multi-type mapping, comprising the following steps:

[0006] Step 1: Determine the neural network model to be evaluated and the original clean training set D train and the original clean test set, using the original clean training set to train the neural network model to obtain a trained clean neural network model, and calculating the classification accuracy of the clean neural network model on the original clean test set;

[0007] Step 2: Determine the backdoor attack settings, including selecting the poisoning ratio, backdoor trigger, and label mapping method;

[0008] The poisoning ratio η is the ratio of poisoned samples to all training samples; the backdoor trigger used for attack is selected, including setting the pattern style p of the backdoor trigger, the backdoor trigger mask m, and the backdoor trigger transparency α; the label mapping method is from the real label y of the sample to the target label y ~ The mapping function L(y)

[0009] Step 3: Randomly select a portion of samples from the original clean training set according to the poisoning ratio as the initial poisoning set to obtain the initial poisoning sample set D m ; The remaining clean training sample set in the original clean training set is denoted as D c , then the original clean training set D train =D m ∪D c ;

[0010] Step 4: Modify each sample in the initial poisoned sample set according to the backdoor attack settings to construct N poisoned sample sets; where N is the number of label mapping methods;

[0011] Step 5: Separately combine the N poisoned sample sets and the remaining clean training sample set D in the original clean training set c Combine them as the poisoned training set, use the poisoned training set to train the neural network model, get N backdoor models, and count the classification accuracy of the N backdoor models on the original clean test set;

[0012] Step 6: Generate a corresponding attack sample for each sample in the original clean test set to form an attack test set; Input the attack samples in the attack test set into N backdoor models for prediction, and calculate the attack success rate ASR and protection attack sample accuracy ACC of different backdoor models. protect ;

[0013] Step 7: Calculate the difference ΔACC between the classification accuracy of the clean neural network model and the backdoor model on the original clean test set clean , according to the classification accuracy of the backdoor model on the original clean test set and ΔACC clean 、ASR、ACC protect , a score is calculated for each of the N backdoor models, and the total risk score is obtained by summing them up; the higher the total risk score, the higher the backdoor security risk faced by the neural network model.

[0014] The technical solution adopted by the system of the present invention is: a neural network backdoor risk assessment system with multiple types of mappings, including the following modules:

[0015] Module 1 is used to determine the neural network model to be evaluated and the original clean training set Dtrain and the original clean test set, train the neural network model using the original clean training set to obtain a trained clean neural network model, and calculate the classification accuracy of the clean neural network model on the original clean test set;

[0016] Module 2 is used to determine the backdoor attack settings, including selecting the poisoning ratio, backdoor triggers, and label mapping methods;

[0017] The poisoning ratio η is the ratio of poisoned samples to all training samples; the backdoor trigger used for attack is selected, including setting the pattern style p of the backdoor trigger, the backdoor trigger mask m, and the backdoor trigger transparency α; the label mapping method is from the real label y of the sample to the target label y ~ The mapping function L(y)

[0018] Module 3 is used to randomly select a part of samples from the original clean training set according to the poisoning ratio as the initial poisoning set to obtain the initial poisoning sample set D m ; The remaining clean training sample set in the original clean training set is denoted as D c , then the original clean training set D train =D m ∪D c ;

[0019] Module 4 is used to modify each sample in the initial poisoned sample set according to the backdoor attack setting to construct N poisoned sample sets; where N is the number of label mapping methods;

[0020] Module 5 is used to respectively separate the N poisoned sample sets and the remaining clean training sample set D in the original clean training set c Combine them as the poisoned training set, use the poisoned training set to train the clean neural network model, obtain N backdoor models, and count the classification accuracy of the N backdoor models on the original clean test set;

[0021] Module 6 is used to generate a corresponding attack sample for each sample in the original clean test set to form an attack test set; the attack samples in the attack test set are input into N backdoor models for prediction, and the attack success rate ASR and the accuracy rate ACC of the protection attack samples of different backdoor models are counted. protect ;

[0022] Module 7 is used to calculate the difference ΔACC between the classification accuracy of the clean neural network model and the backdoor model on the original clean test set clean , according to the classification accuracy of the backdoor model on the original clean test set and ΔACC clean 、ASR、ACC protect, a score is calculated for each of the N backdoor models, and the total risk score is obtained by summing them up; the higher the total risk score, the higher the backdoor security risk faced by the neural network model.

[0023] The technical solution adopted by the device of the present invention is: a multi-type mapping neural network backdoor risk assessment device, comprising:

[0024] one or more processors;

[0025] A storage device is used to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the neural network backdoor risk assessment method for multi-type mapping.

[0026] The present invention first trains the target model on the original training set and calculates the classification accuracy of the model. Then, different poisoning training sets are constructed according to four mapping strategies, and multiple target models with backdoors are trained and their classification accuracy is calculated. Finally, an attack test set is constructed and the attack performance of different backdoor models is tested. The risk score of the model is calculated by combining various indicators to achieve backdoor security risk assessment of the target deep learning model.

[0027] The beneficial effects of the present invention are mainly reflected in the following aspects:

[0028] (1) The present invention provides a neural network backdoor risk assessment method with multi-type mapping. Compared with the existing assessment technology that only considers a single attack form, the present method is based on four label mapping strategies, which expands and enriches the backdoor attack forms used to assess security risks, thereby achieving a more comprehensive backdoor risk assessment.

[0029] (2) The present invention designs a risk score calculation method, which integrates the classification performance indicators and backdoor attack effect indicators of the backdoor model and the clean neural network model, and can effectively measure the security of the neural network model against backdoor attacks. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 is an overall flow chart of the method in an embodiment of the present invention;

[0031] Figure 2 The flowchart of constructing a poisoning training set in an embodiment of the present invention. DETAILED DESCRIPTION

[0032] In order to facilitate the understanding and implementation of the present invention by those skilled in the art, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the embodiments described herein are only used to illustrate and explain the present invention and are not used to limit the present invention.

[0033] In order to solve the shortcomings of existing risk assessment schemes, such as single backdoor attack form and incomplete assessment, the present invention designs a neural network backdoor risk assessment method with multi-type mapping, which is used to comprehensively and systematically evaluate the backdoor security risks faced by deep learning models.

[0034] Please see Figure 1 The present invention provides a neural network backdoor risk assessment method for multi-type mapping, comprising the following steps:

[0035] Step 1: Determine the neural network model to be evaluated and the original clean training set D train and the original clean test set, using the original clean training set to train the neural network model to obtain a trained clean neural network model, and calculating the classification accuracy of the clean neural network model on the original clean test set;

[0036] Step 2: Determine the backdoor attack settings, including selecting the poisoning ratio, backdoor trigger, and label mapping method;

[0037] The poisoning ratio η is the ratio of poisoned samples to all training samples; the backdoor trigger used in the attack is selected, including setting the pattern style p of the backdoor trigger, the mask m of the backdoor trigger, and the transparency α of the backdoor trigger; the label mapping method is from the real label y of the sample to the target label y ~ The mapping function L(y)

[0038] In this embodiment, to ensure the concealment of the attack, the poisoning ratio is generally below 20%, and a commonly used setting is 10%. The pattern style can be selected from various patterns such as color pattern, logo pattern, noise pattern, etc. The trigger mask is a binary matrix used to determine the shape and position of the trigger. The trigger transparency selection range is [0,1).

[0039] This embodiment provides four label mapping strategies: all-to-one, all-to-multi, sub-to-one, and sub-to-multi;

[0040] All-to-one, all categories are mapped to one target category;

[0041] all-to-multi, all categories are mapped to multiple target categories;

[0042] Sub-to-one, only some categories are affected by the attack, called attacked categories, and some categories are not affected by the attack, called protected categories; the protected categories are still mapped to the original real categories, while the attacked categories are mapped to a target category; attackers can use this attack strategy to bypass some existing backdoor defenses, making the implanted backdoor more hidden.

[0043] sub-to-multi, only some categories are affected by the attack; the protection category is mapped to the original true category, and the attacked category is mapped to multiple target categories respectively;

[0044] A specific label mapping method is randomly selected under each mapping strategy, and finally a set of label mapping methods Label_Mapping_set={L1, L2, L3, L4} is determined.

[0045] Step 3: Randomly select a portion of samples from the original clean training set according to the poisoning ratio as the initial poisoning set to obtain the initial poisoning sample set D m ; The remaining clean training sample set in the original clean training set is denoted as D c , then the original clean training set D train =D m ∪D c ;

[0046] In this embodiment, a portion of samples are randomly selected from the training samples of each category in the original clean training set according to the poisoning ratio, and then these samples are collected together to obtain the initial poisoning sample set D m After excluding this part of samples from the training set, the remaining clean training sample set is D c Therefore, the original training set D train =D m ∪D c .

[0047] Step 4: Modify each sample in the initial poisoned sample set according to the backdoor attack settings to construct 4 poisoned sample sets; where 4 is the number of label mapping methods;

[0048] In this embodiment, for the initial set of poisoned samples, the image modification and label modification operations are performed according to each label mapping method;

[0049] The image modification operation is to add a trigger to each image x in the initial poisoned sample set according to the trigger setting determined in step 2 in the manner of (1-m)⊙x+m⊙[αx+(1-α)p], where ⊙ represents a dot product operation;

[0050] Modify the label operation, for each modified image x ~ , determine the poisoning label y according to the real label y of the image and the label mapping method ~ .

[0051] Step 5: Separately combine the four poisoned sample sets and the remaining clean training sample set D in the original clean training setc Combine them as the poisoned training set, use the poisoned training set to train the clean neural network model, and get 4 backdoor models. Count the classification accuracy of the 4 backdoor models on the original clean test set.

[0052] In this embodiment, clean neural network model training is performed on four poisoned training sets respectively with the goal of reducing cross entropy loss to obtain four backdoor models, and then the classification accuracy of different backdoor models on the original clean test set is counted.

[0053] Step 6: Generate a corresponding attack sample for each sample in the original clean test set to form an attack test set; Input the attack samples in the attack test set into the four backdoor models for prediction, and calculate the attack success rate ASR and the accuracy rate ACC of the protection attack samples of different backdoor models. protect (Only for backdoor models generated by sub-to-one and sub-to-multi strategies);

[0054] In this embodiment, for each sample (x, y) in the original clean test set, a trigger is added to the image x in the manner of (1-m)⊙x+m⊙[αx+(1-α)p] to obtain the attack image x ~ ; All attack images constitute an attack test set.

[0055] In this embodiment, the attack success rate is calculated as follows: the proportion of attack samples of the attacked category (the category that you want the model to misclassify) that are successfully misclassified by the model as their corresponding target category. The accuracy rate of the protection attack samples is calculated as follows: the proportion of attack samples of the protection category (a category that is not affected by the attack, and images of the protection category will not be misclassified by the model even if a backdoor trigger is added, and the protection category is not the target category of the attack) that are predicted by the model as their true category.

[0056] Step 7: Calculate the difference ΔACC between the classification accuracy of the clean neural network model and the backdoor model on the original clean test set clean , according to the classification accuracy of the backdoor model on the original clean test set and ΔACC clean 、ASR、ACC protect , calculate a score for each of the four backdoor models, and add them up to get the total risk score; the higher the total risk score, the higher the backdoor security risk faced by the neural network model;

[0057] In this embodiment, a single score is calculated as follows:

[0058] When ΔACC clean> 3% or the classification accuracy of the backdoor model on the original clean test set minus ACC protect When it is greater than 10%, the backdoor attack fails and the score is directly recorded as 0; because one of the necessary conditions for a successful backdoor attack is ΔACC clean is relatively small. If the difference in classification accuracy between the model without being implanted with a backdoor and the model implanted with a backdoor is obvious, then users using the model will be suspicious. In addition, for sub-to-one and sub-to-multi backdoor attacks, if ACC protect differs too much from the classification accuracy of the backdoor model on clean samples, it indicates that the backdoor cannot achieve the attack goal of only affecting samples of some categories, so the attack fails.

[0059] Otherwise, score according to the size of the attack success rate ASR: ASR ≤ 20% is recorded as 0 points, 20% < ASR ≤ 40% is recorded as 1 point, 40% < ASR ≤ 60% is recorded as 2 points, 60% < ASR ≤ 80% is recorded as 3 points, 80% < ASR ≤ 100% is recorded as 4 points.

[0060] It should be understood that the above description of the embodiments is relatively detailed, and it should not be considered as a limitation to the protection scope of the present invention patent. Under the inspiration of the present invention, those of ordinary skill in the art can also make substitutions or deformations without departing from the protection scope defined by the claims of the present invention, and all fall within the protection scope of the present invention. The scope of protection claimed by the present invention shall be subject to the appended claims.

Claims

1. A neural network backdoor risk assessment method based on multi-type mapping, characterized in that: The following steps are involved: Step 1: Determine the neural network model to be evaluated and the original clean training set D train and the original clean test set, using the original clean training set to train the neural network model to obtain a trained clean neural network model, and calculating the classification accuracy of the clean neural network model on the original clean test set; Step 2: Determine the backdoor attack settings, including selecting the poisoning ratio, backdoor trigger, and label mapping method; The poisoning ratio η is the ratio of poisoned samples to all training samples; the backdoor trigger used for attack is selected, including setting the pattern style p of the backdoor trigger, the backdoor trigger mask m, and the backdoor trigger transparency α; the label mapping method is from the real label y of the sample to the target label y ~ The mapping function L(y) Step 3: Randomly select a portion of samples from the original clean training set according to the poisoning ratio as the initial poisoning set to obtain the initial poisoning sample set D m ; The remaining clean training sample set in the original clean training set is denoted as D c , then the original clean training set D train =D m ∪D c ; Step 4: Modify each sample in the initial poisoned sample set according to the backdoor attack settings to construct N poisoned sample sets; where N is the number of label mapping methods; Step 5: Separately combine the N poisoned sample sets and the remaining clean training sample set D in the original clean training set c Combine them as the poisoned training set, use the poisoned training set to train the neural network model, get N backdoor models, and count the classification accuracy of the N backdoor models on the original clean test set; Step 6: Generate a corresponding attack sample for each sample in the original clean test set to form an attack test set; input the attack samples in the attack test set into N backdoor models for prediction, and calculate the attack success rate ASR and protection attack sample accuracy ACC of different backdoor models. protect ; Step 7: Calculate the difference ΔACC between the classification accuracy of the clean neural network model and the backdoor model on the original clean test set clean , according to the classification accuracy of the backdoor model on the original clean test set and ΔACC clean 、ASR、ACC protect , a score is calculated for each of the N backdoor models, and the total risk score is obtained by summing them up; the higher the total risk score, the higher the backdoor security risk faced by the neural network model.

2. The neural network backdoor risk assessment method of multi-type mapping according to claim 1 is characterized in that: In step 2, there are four label mapping strategies: all-to-one, all-to-multi, sub-to-one, and sub-to-multi. The all-to-one method maps all categories to one target category. The all-to-multi method is that all categories are mapped to multiple target categories. In the sub-to-one method, only some categories are affected by the attack, called the attacked categories, and some categories are not affected by the attack, called the protected categories. The protected categories are still mapped to the original true categories, while the attacked categories are all mapped to a target category; In the sub-to-multi case, only a part of the categories are affected by the attack; The protected category is mapped to the original true category, and the attacked category is mapped to multiple target categories respectively; Under the four mapping strategies, N specific label mapping methods are randomly selected, and finally a set of label mapping methods Label_Mapping_set = {L1, ..., L N }.

3. The neural network backdoor risk assessment method of multi-type mapping according to claim 1 is characterized in that: In step 4, for the initial poisoned sample set, the image and label are modified according to each label mapping method to generate N poisoned sets; The image modification operation is to add a trigger to each image x in the initial poisoned sample set according to the trigger setting determined in step 2 in the manner of (1-m)⊙x+m⊙[αx+(1-α)p], where ⊙ represents a dot product operation; The label modification operation is for each modified image x ~ , determine the poisoning label y according to the real label y of the image and the label mapping method ~ .

4. The neural network backdoor risk assessment method of multi-type mapping according to claim 1 is characterized in that: In step 6, for each sample (x, y) in the original clean test set, a trigger is added to the image x in the manner of (1-m)⊙x+m⊙[αx+(1-α)p] to obtain the attack image x ~ ; All attack images constitute an attack test set.

5. The neural network backdoor risk assessment method of multi-type mapping according to claim 1 is characterized in that: In step 6, the attack success rate is the proportion of attack samples of the attacked category that are successfully mispredicted by the backdoor model as the corresponding target category.

6. The neural network backdoor risk assessment method of multi-type mapping according to claim 1 is characterized in that: In step 6, the accuracy rate of the protection class attack samples is the proportion of the protection class attack samples predicted as true classes by the backdoor model.

7. The neural network backdoor risk assessment method of multiple types of mapping according to any one of claims 1 to 6, characterized in that: In step 7, the individual scores are calculated as follows: When ΔACC clean >3% or the classification accuracy of the backdoor model on the original clean test set minus ACC protect When it is greater than 10%, the backdoor attack fails and the score is directly recorded as 0; Otherwise, points are calculated according to the attack success rate ASR: ASR≤20% is 0 points, 20%<ASR≤40% is 1 point, 40%<ASR≤60% is 2 points, 60%<ASR≤80% is 3 points, and 80%<ASR≤100% is 4 points.

8. A neural network backdoor risk assessment system with multiple types of mappings, characterized in that: Includes the following modules: Module 1 is used to determine the neural network model to be evaluated and the original clean training set D train and the original clean test set, using the original clean training set to train the neural network model to obtain a trained clean neural network model, and calculating the classification accuracy of the clean neural network model on the original clean test set; Module 2 is used to determine the backdoor attack settings, including selecting the poisoning ratio, backdoor triggers, and label mapping methods; The poisoning ratio η is the ratio of poisoned samples to all training samples; the backdoor trigger used for attack is selected, including setting the pattern style p of the backdoor trigger, the backdoor trigger mask m, and the backdoor trigger transparency α; the label mapping method is from the real label y of the sample to the target label y ~ The mapping function L(y) Module 3 is used to randomly select a part of samples from the original clean training set according to the poisoning ratio as the initial poisoning set to obtain the initial poisoning sample set D m ; The remaining clean training sample set in the original clean training set is denoted as D c , then the original clean training set D train =D m ∪D c ; Module 4 is used to modify each sample in the initial poisoned sample set according to the backdoor attack setting to construct N poisoned sample sets; where N is the number of label mapping methods; Module 5 is used to respectively separate the N poisoned sample sets and the remaining clean training sample set D in the original clean training set c Combine them as the poisoned training set, use the poisoned training set to train the clean neural network model, get N backdoor models, and count the classification accuracy of the N backdoor models on the original clean test set; Module 6 is used to generate a corresponding attack sample for each sample in the original clean test set to form an attack test set; the attack samples in the attack test set are input into N backdoor models for prediction, and the attack success rate ASR and the accuracy rate ACC of the protection attack samples of different backdoor models are counted. protect ; Module 7 is used to calculate the difference ΔACC between the classification accuracy of the clean neural network model and the backdoor model on the original clean test set clean , according to the classification accuracy of the backdoor model on the original clean test set and ΔACC clean 、ASR、ACC protect , a score is calculated for each of the N backdoor models, and the total risk score is obtained by summing them up; the higher the total risk score, the higher the backdoor security risk faced by the neural network model.

9. A multi-type mapping neural network backdoor risk assessment device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the neural network backdoor risk assessment method for multi-type mapping as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Clean tag neural network backdoor implantation method based on general adversarial trigger

    CN113269308A

  • Backdoor attack defense method and system based on training process deconstruction

    CN114003909A

  • System and method for detecting backdoor attacks in convolutional neural networks

    US20200410098A1