Multi-trigger label consistent backdoor attack method based on cumulative effect
By adopting a multi-trigger tag consistent backdoor attack method based on cumulative effect in the deep learning model, the multi-trigger tag consistent backdoor attack is used to form a cumulative effect in the test stage, and the problem of unsatisfactory tag consistent backdoor attack in the existing technology is solved, and the problem of unsatisfactory tag consistent backdoor attack in the existing technology is realized. It has high success rate and concealment, and is suitable for real-life attack scenarios.
Patent Information
- Application Number
- CN202411039046.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-12-03
AI Technical Summary
In the prior art, the tag consistent backdoor attack method has a single backdoor triggering effect that requires poisoning a large number of data samples to achieve the attack effect, and is easily detected, lacking concealment and high attack success rate.
Using a multi-trigger tag consistent backdoor attack method based on cumulative effect, randomly select samples in a clean training set and add triggers, generate a backdoor instance set, and mix it with the clean training set to generate a poisoning training set, train a classification model, and use multi-backdoor triggering The device forms a cumulative effect to activate the attack during the test phase, enhancing concealment and success rate.
It achieves a high attack success rate of nearly 100%, reduces the model accuracy, is highly concealed, can withstand the detection of classic defense methods, and has a small number of poisonings, which is suitable for real-life attack scenarios.
Smart Images

Figure CN119066649A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence security, and in particular to a multi-trigger label consistent backdoor attack method based on cumulative effect. Background Art
[0002] In recent years, machine learning and deep learning models have been increasingly used in various aspects of daily life, such as image classification, face recognition, autonomous driving, machine translation, speech recognition, and other fields. However, in order to achieve satisfactory results, these models usually require a large amount of data for training. Therefore, a key issue is the demand for computing resources. However, in the real world, many researchers and users often lack sufficient data and computing resources. Therefore, they usually cooperate with third parties to use cloud computing platforms (such as MLaaS) for deep learning model training, or use open source data and pre-trained models.
[0003] This collaborative training method will cause users to lose control of the model training process. Assuming that the third-party platform has malicious intentions, attackers can easily destroy the model, causing serious consequences. Specifically, attackers can implant hidden backdoors in the model. When the backdoor is not activated, the attacked model performs well on benign samples, but when the backdoor hidden in the model is activated, the prediction results of the model will be maliciously tampered with to generate the target label preset by the attacker, thereby achieving the attack goal. This type of attack is called a backdoor attack and is an emerging threat in the DNN model training process.
[0004] Among the existing attack methods, they can be divided into two categories according to whether the poisoned data label is consistent with the true label: inconsistent label type backdoor attack and consistent label type backdoor attack.
[0005] Most of the attack methods are label-inconsistent backdoor attacks. Gu et al. first proposed the concept of deep learning model backdoor attacks, which is a pioneering work in the field of backdoor attacks; Chen et al. discussed the stealth of backdoor attacks from the perspective of the visibility of backdoor triggers; Xue et al. proposed two new types of backdoor attacks: multi-target backdoor attacks and multi-trigger backdoor attacks. Regardless of the effectiveness of the attacks, they all have a serious weakness: the injected data instances are obviously mislabeled, so they can be easily detected if the training data set is manually inspected.
[0006] For label-consistent backdoor attacks, the simplest idea is to directly add a backdoor trigger to the target class. Currently, most of the research on label-consistent backdoor attacks is limited to single backdoor triggers. The results show that a considerable portion of data samples need to be poisoned to achieve the attack effect, which is obviously unreasonable. Summary of the invention
[0007] In view of the deficiencies in the prior art, the object of the present invention is to provide a multi-trigger tag consistent backdoor attack method based on cumulative effect.
[0008] The technical solution adopted by the present invention is as follows: a multi-trigger tag consistent backdoor attack method based on cumulative effect, characterized in that it includes the following steps:
[0009] Step 1: Generate a backdoor instance set:
[0010] Randomly select a target class in the clean training set, and then randomly select several samples in this class for poisoning. The specific steps of poisoning are as follows:
[0011] For each sample to be poisoned, randomly select one of the four corners of the sample. If the number of triggers added at the corner is not greater than a certain threshold, then add a trigger at this position of the sample, and the number of trigger counters at this position will be incremented. If the number of triggers added at the corner is greater than the threshold, no operation is performed and the next cycle is entered. After k rounds of such cycles, the required backdoor instance set can be obtained.
[0012] Step 2: Generate poisoned training set:
[0013] The remaining clean training sets that are not poisoned are screened out and mixed with the backdoor instance set to generate the final poisoned dataset required;
[0014] Step 3: Put the poisoning training set into the classification model for training to obtain the poisoning model;
[0015] Step 4: Test the performance of the poisoning model. The testing process is as follows:
[0016] Eliminate samples that are originally in the target category, then inject only a single backdoor into the remaining samples, input them into the poisoning model to calculate the attack success rate, repeat this step, and inject different locations each time; inject all backdoors into the remaining samples and calculate the attack success rate.
[0017] In step 1 of the present invention, k=700.
[0018] In step 1 of the present invention, the number of trigger positions is 4.
[0019] In step 1 of the present invention, the threshold is k / 4.
[0020] In step 1 of the present invention, the trigger is a publicly released hidden backdoor attack trigger.
[0021] The backdoor instances generated in step 1 of the present invention do not change their own label values.
[0022] In step 2 of the present invention, the poisoned data set D p , clean training set D B , the remaining clean training set D c The following relationship needs to be satisfied between the three: D p =D c ∪D b .
[0023] In step 3 of the present invention, in the training phase, the poisoned training set D is used. p The classification model F is trained using the standard training process. The training expression is as follows:
[0024]
[0025] Where L represents the target loss function cross-entropy, F represents the model, and θ represents the parameters of the model.
[0026] In step 4 of the present invention, the attack success rate ASR calculation formula is as follows:
[0027]
[0028] Where N 012 Represents the number of samples that are misclassified as target categories, N 344 Represents the number of all backdoor images submitted during the testing phase.
[0029] In step 4 of the present invention, the accuracy of the clean sample is also tested to calculate the accuracy of the clean sample in the clean model A. c The accuracy in the poisoned model and the accuracy in the poisoned model A b The difference between the two is calculated as follows: AD = A c -A b .
[0030] Compared with the prior art, the present invention has the following advantages:
[0031] Multi-trigger based on cumulative effect: In the present invention, a small number of backdoor instances with a single backdoor trigger are injected into the training set, so that a single backdoor is not sufficient to significantly affect the prediction of the model; however, in the test phase, when an image contains multiple backdoor triggers at the same time, the model's prediction confidence for the target category will increase significantly due to the joint effect of these triggers, forming a cumulative effect, thereby triggering the backdoor attack. This cumulative effect allows the attack to be activated only when all backdoor conditions are met, enhancing the concealment and success rate of the attack.
[0032] High attack success rate: as many backdoor samples (x+δ) as possible can be misclassified as target class y t, the attack success rate (ASR) is almost close to 100%.
[0033] Model Accuracy Degradation: The model accuracy degradation (AD) is low after the backdoor is introduced, which does not arouse user suspicion.
[0034] Sufficient robustness: It can resist detection by some classic defense methods.
[0035] High concealment: the number of poisonings required is small and the poisoning rate is low.
[0036] Reasonable attack scenarios: There are fewer restrictions on the attacker's capabilities, allowing the attacker to poison some training data. They have neither information about the model nor can they manipulate the inference process, which is more reasonable in those realistic attack scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 Schematic diagram of a flow chart of an embodiment of the present invention.
[0038] Figure 2 This is a diagram showing the impact of different numbers of poisoning on the attack effect during the experiment of the embodiment of the present invention.
[0039] Figure 3 This is a diagram showing the impact of different trigger sizes on attack effects during the experiment of an embodiment of the present invention.
[0040] Figure 4 This is a diagram showing the ability to resist the STRIP defense method during the experiment of the embodiment of the present invention.
[0041] Figure 5 This is a diagram showing the resistance to the Neural Cleanse defense method during the experiment of the embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0043] one, Figure 1 The overall flow chart of the present invention is shown. The embodiment of the present invention includes the following steps:
[0044] Step 1: Generate backdoor instance set D b .
[0045] In the clean training set Randomly select a target class y from t , and then randomly select k samples in this category for poisoning. The specific steps of poisoning are as follows:
[0046] For each sample x1 to be poisoned, randomly select the positions b of the four corners of the sample > If the corner is located at position b > The number of triggers added count > <= k / 4, then at this position b of the sample x1 > Add trigger δ, and the number of trigger counters at this position should be incremented by count > =count > +1, if the corner is located at position b > The number of triggers added count > >k / 4, no operation is performed and the next cycle is entered; after k rounds of such cycles, the required K backdoor instances can be obtained, forming a backdoor instance set k=700.
[0047] The trigger of this embodiment is a Hidden Trigger Backdoor Attack (HTBA) trigger, and the size of the trigger is 6 × 6. The backdoor instances generated in step 1 do not change their own label values.
[0048] Step 2: Generate poisoned training set D p .
[0049] In the clean training set D B The remaining clean training set D that is not poisoned v Filter out and compare with the backdoor instance set D b After mixing, the final required poisoning data set D is generated p . Poisoning Dataset D p , clean training set D B , the remaining clean training set D c The following relationship needs to be satisfied between the three: D p =D c ∪D b .
[0050] Step 3: Take the poisoned dataset D p Put it into the classification model F for training and get the poisoning model F'.
[0051] In the training phase, the poisoned training set D is used. p The classification model F is trained using the standard training process. The training expression is as follows: Where L represents the target loss function, cross-entropy is used here. F represents the classification model, and θ represents the parameters of the model.
[0052] Step 4: Test the performance of the poisoning model F'. The test process is as follows:
[0053] Eliminate those samples x1 that are originally the target category, and then inject only a single backdoor into the remaining samples, input them into the poisoning model F' to calculate the attack success rate ASR, repeat this step 4 times, and inject position b each time > Different; inject all four backdoors δ into the remaining samples and calculate the attack success rate ASR. The attack success rate ASR calculation formula is as follows: Where N 012 Represents the number of samples that are misclassified as target categories, N 344 represents the number of all backdoor images submitted during the test phase. In addition, the accuracy of clean samples is also tested to calculate the accuracy of clean samples in the clean model A. c The accuracy in the poisoned model and the accuracy in the poisoned model A b The difference between the two is calculated as follows: AD = A v -A b .
[0054] 2. The following is the experimental process of the present invention.
[0055] (1) Experimental dataset and experimental model.
[0056] The experiment in the embodiment of the present invention uses the CIFAR10 dataset and the VGG16 model. The dataset contains RGB color images of size 32×32 in 10 categories, with 6,000 images in each category, a total of 50,000 training images and 10,000 test images. The model includes 13 convolutional layers and 3 fully connected layers, and the filter size of the 13 convolutional layers is 3×3, with a stride of 1.
[0057] (2) Experimental attack scenarios.
[0058] The attacker is allowed to poison some training data and they have neither information about the model nor can they manipulate the inference process.
[0059] (3) Basic experimental settings.
[0060] Deep learning framework: Pytorch, programming language: python, hardware: RTX 3070 GPU. Use the SGD optimizer and set the initial learning rate to 0.01. The epoch and batch sizes are set to 40 and 128 respectively. The sample poisoning rate in this experiment is set to 1.4% (700 / 50000). This experiment uses the publicly released hidden trigger backdoor attack (HTBA) trigger, and the trigger size is 6×6. This experiment uses the attack success rate (ASR) and the model's accuracy degradation (AD) as measures of the effectiveness of the attack in this experiment. The attack success rate (ASR) refers to the percentage of test samples that originally did not belong to the target class that were mistakenly classified as target class samples after the backdoor mode was applied, and the model's accuracy degradation (AD) refers to the overall performance degradation of the DNN model caused by the introduction of the backdoor.
[0061] (4) Experimental results of attack effectiveness.
[0062] Table 1. Experimental results on the effectiveness of attacks on the CIFAR10 dataset
[0063]
[0064] The attack method achieved an average attack rate of 98.33% when only a small number of training samples of the target class were poisoned. Moreover, the accuracy of the model was only reduced by an average of 0.49%. Specifically, in all experiments of 10 target classes, when only one backdoor was applied, the attack success rate was as high as 55.41%, as low as 1.82%, and as high as 28.58%, which indicates that a single backdoor cannot trigger a backdoor attack. When four backdoors were applied, the attack success rate was as high as 100.00%, as low as 90.46%, and as high as 98.33%, achieving a good attack effect.
[0065] (5) The impact of hyperparameters on attack effectiveness.
[0066] Figure 2 The graph shows the impact of different poisoning numbers on the attack effect. In general, whether it is a single backdoor or four backdoors, the attack success rate (ASR) increases with the increase in the number of poisoning. Specifically, on the CIFAR10 dataset, when the number of poisoning reaches 700, the attack success rate can reach more than 98% and tends to a stable state. Figure 3 A visual representation of the effect of different trigger sizes on attack effectiveness. The attack success rate increases with the size of the trigger. This is expected, as a larger trigger may block the main object in certain locations, making the attack easier.
[0067] (6) Resistance to classical defense methods.
[0068] STRIP filters attacked samples by superimposing various image patterns on suspicious samples. The smaller the randomness between the predictions of the interference input, the higher the probability that the suspicious sample is attacked. Figure 4 A graph showing the resistance to the STRIP defense method is shown. The results show that the entropy range of the clean model and the backdoor model generated by the method is comparable, indicating that the attack can resist the runtime defense STRIP. Neural Cleanse uses a technique similar to adversarial sample generation to reverse engineer the input pattern so that all samples with that pattern are classified to the same target label. It then checks whether any label has a significantly smaller pattern as a sign of a backdoor. Neural cleaner quantifies it through the anomaly index metric, setting the clean / backdoor threshold to 2. Figure 5 The resistance diagram of the Neural Cleanse defense method is shown. The results show that the backdoor model of this embodiment can bypass the detection of Neural Cleanse.
[0069] Obviously, the above embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
Claims
1. A multi-trigger tag consistent backdoor attack method based on cumulative effect, characterized in that: The steps include: Step 1: Generate a backdoor instance set: Randomly select a target class in the clean training set, and then randomly select several samples in this class for poisoning. The specific steps of poisoning are as follows: For each sample to be poisoned, randomly select one of the four corners of the sample. If the number of triggers added at the corner is not greater than a certain threshold, then add a trigger at this position of the sample, and the number of trigger counters at this position will be incremented. If the number of triggers added at the corner is greater than the threshold, no operation is performed and the next cycle is entered. After k rounds of such cycles, the required backdoor instance set can be obtained. Step 2: Generate poisoned training set: The remaining clean training sets that are not poisoned are screened out and mixed with the backdoor instance set to generate the final poisoned dataset required; Step 3: Put the poisoning training set into the classification model for training to obtain the poisoning model; Step 4: Test the performance of the poisoning model. The testing process is as follows: Eliminate samples that are originally in the target category, then inject only a single backdoor into the remaining samples, input them into the poisoning model to calculate the attack success rate, repeat this step, and inject different locations each time; inject all backdoors into the remaining samples and calculate the attack success rate.
2. The method for multi-trigger label consistent backdoor attack based on cumulative effect according to claim 1 is characterized in that: In step 1, k=700.
3. The multi-trigger tag consistent backdoor attack method based on cumulative effect according to claim 1 is characterized in that: In step 1, the number of trigger positions is 4.
4. The method for multi-trigger label consistent backdoor attack based on cumulative effect according to claim 1 is characterized in that: In step 1, the threshold is k / 4.
5. The method for multi-trigger label consistent backdoor attack based on cumulative effect according to claim 1 is characterized in that: In step 1, the trigger is a publicly released hidden backdoor attack trigger.
6. The method for multi-trigger label consistent backdoor attack based on cumulative effect according to claim 1 is characterized in that: The backdoor instances generated in step 1 do not change their own label values.
7. The method for multi-trigger label consistent backdoor attack based on cumulative effect according to claim 1 is characterized in that: In step 2, the poisoned data set D p , clean training set D B , the remaining clean training set D c The following relationship needs to be satisfied between the three: D p =D c ∪D b .
8. The method for multi-trigger label consistent backdoor attack based on cumulative effect according to claim 1 is characterized in that: In step 3, during the training phase, the poisoned training set D is used. p The classification model F is trained using the standard training process. The training expression is as follows: Where L represents the target loss function cross-entropy, F represents the model, and θ represents the parameters of the model.
9. The method for multi-trigger tag consistent backdoor attack based on cumulative effect according to claim 1 is characterized in that: In step 4, the attack success rate ASR calculation formula is as follows: Where N 012 Represents the number of samples that are misclassified as target categories, N 344 Represents the number of all backdoor images submitted during the testing phase.
10. The method for multi-trigger label consistent backdoor attack based on cumulative effect according to claim 1 is characterized in that: In step 4, the accuracy of the clean sample is also tested to calculate the accuracy of the clean sample in the clean model A. c The accuracy in the poisoned model and the accuracy in the poisoned model A b The difference between the two is calculated as follows: AD = A v -A b .
