Universal compression backdoor attack resistance based on image compression method characteristics
By placing a trigger in the low-frequency part of the brightness component block in the image compression algorithm to generate an anti-compression backdoor instance, the problem of insufficient robustness of the backdoor attack method in the image compression algorithm in the existing technology is solved, and a high success rate and Versatility.
Patent Information
- Application Number
- CN202410609826.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-16
- Publication Date
- 2024-08-27
AI Technical Summary
Existing backdoor attack methods have harsh execution conditions and insufficient applicability in terms of image compression algorithm robustness, making it difficult to adapt to multiple image compression algorithms, resulting in a decrease in attack success rate.
By analyzing the characteristics of the image compression algorithm, the trigger is placed in the low-frequency part of the brightness component block, and methods such as color space conversion and two-dimensional discrete cosine transform are used to generate anti-compression backdoor instances to ensure that the trigger maintains integrity during the compression process. Enhance the robustness of attacks.
It achieves a high post-compression attack success rate, is suitable for a variety of image compression algorithms, and does not require strict implementation conditions, significantly improving the versatility and robustness of backdoor attacks.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_4
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of deep learning and digital image processing, designs a deep neural network classification system, and specifically relates to a universal anti-compression backdoor attack based on the characteristics of an image compression method. Background Art
[0002] In recent years, the rapid development of artificial intelligence has led to the widespread application of deep neural networks (DNN) in various fields. However, the large amount of resources required to train the model limits its use. In order to make model training more convenient, using third-party data sets and other methods has become a better choice for users. However, security issues such as the opacity of the third-party training process have brought many security vulnerabilities to the model. Backdoor attacks are one of the most serious threats.
[0003] Backdoor attacks pose a significant threat to models due to their unique risks. They usually control the model by modifying the training data set, causing the model to classify backdoor instances, i.e. images with triggers, as target labels, thereby reducing the classification accuracy of the model and having a huge impact on the credibility of the model.
[0004] Due to network traffic and other limitations, images are compressed before transmission. Therefore, backdoor attacks are very susceptible to image compression algorithms. Figure 1As shown in the figure, when a clean image is input into a model infected by a backdoor attack, the model outputs the correct label. When a backdoor instance is input into the infected model, the model classifies the backdoor instance into the target label. For the compressed backdoor instance, the infected model classifies it into the correct label instead of the target label. Although several methods have been proposed to solve this problem, those methods still have many defects. The existing methods to enhance the robustness of backdoor attacks against image compression algorithms include CRBA (Compression-Resistant Backdoor Attack against Deep Neural Networks), CBA (Conditional Backdoor Attack via JPEG Compression) and Color Backdoor (Color Backdoor: A Robust Poisoning Attack in Color Space). The CRBA method (see Xue, M., Wang, X., Sun, S., Zhang, Y., Wang, J., Liu, W.: Compression-resistant backdoor attack against deep neural networks. Applied Intelligence 53(17), 20402–20417(2023).) uses compressed backdoor instances and backdoor instances as training data sets, and trains the model according to special training steps to enhance the robustness of backdoor attacks to image compression algorithms. CBA (see Duan, Q., Hua, Z., Liao, Q., Zhang, Y., Zhang, LY: Conditional backdoor attack via jpeg compression. Proc. of the AAAI Conference on Artificial Intelligence 38(18), 19823–19831(2024).) also controls the training steps of the model, training the model on backdoor instances compressed by a single compression algorithm and uncompressed backdoor instances, so as to use the single compression algorithm used as a triggering mechanism for the backdoor. The trained model will classify the backdoor instances compressed by that compression algorithm as the target label, and for the backdoor instances that are not compressed or compressed by other compression methods, the model will classify them as the correct label.Color Backdoor (see Jiang, W., Li, H., Xu, G., Zhang, T.: Colorbackdoor: A robust poisoning attack in color space. In: Proc. of IEEE / CVFConference on Computer Vision and Pattern Recognition, pp. 8133–8142 (2023).) uses certain restrictions and particle swarm optimization (PSO) algorithm to retrieve the optimal trigger with strong attack effect and robustness to a certain image compression algorithm, so as to generate compression-resistant backdoor attack. From the above description of existing work, it can be found that although many works have enhanced the robustness of backdoor attacks to image compression algorithms, they have the disadvantages of strict backdoor attack execution requirements such as the need to control training steps and insufficient adaptability to unknown compression algorithms. The diversity of image compression algorithms makes it very challenging to develop a universal compression-resistant backdoor attack. Summary of the invention
[0005] In view of the shortcomings of most current methods, such as harsh execution conditions and weak applicability, the present invention provides a universal anti-compression backdoor attack method based on the characteristics of image compression algorithms. By analyzing a variety of image compression algorithms, we found that: during the compression process, the low-frequency part of the brightness component block is less affected by the image compression algorithm. This method takes advantage of this feature and places the trigger in the backdoor attack on this part, which largely avoids the damage of the image compression algorithm to the trigger, maintains the integrity of the trigger, and achieves a high success rate of post-compression attacks.
[0006] In order to greatly enhance the robustness of backdoor attacks to image compression algorithms and ensure the success rate of attacks after compression, the present invention proposes a backdoor attack method that embeds triggers into the area of the image that is least affected by the image compression algorithm. In the proposed method, the attacked deep neural network model is a general classification model, such as VGG-16. The general training process of the model is to use a training data set to train the model. Afterwards, the test data set is used to evaluate the effect of the trained model. The loss function used in the present invention is a cross-entropy loss function (English: Cross-Entropy Loss) to calculate the loss value.
[0007] During the training phase, we use a training data set containing a certain proportion of backdoor instances to train the model. This process will force the model to add a mapping from triggers to specified labels. When the trained model faces clean samples without triggers, the model will accurately classify them, and for backdoor instances with triggers, the model will classify them as specified labels. The main content of the present invention lies in the generation of backdoor instances. The designed generation process ensures that the generated samples can maintain strong aggressiveness even if they are affected by compression. The generation of the compression-resistant backdoor attack backdoor instance borrows the characteristics we discovered before: image compression has little effect on the low-frequency part of the brightness component block of the image. The steps for generating the compression-resistant backdoor attack backdoor instance are as follows:
[0008] (I) We first convert the clean samples from the original RGB space to the YCbCr space using the color space conversion formula. Then we divide the Y component obtained after the conversion space into blocks of eight rows and eight columns. For each block obtained, we perform a two-dimensional discrete cosine transform (2D-Discrete Cosine Transform, abbreviated as 2D-DCT) to separate the high, medium and low frequency information of the block.
[0009] (ii) We perform Z-coding on the matrix after the 2D DCT, extract the low-frequency part in the block, and add a certain proportion of disturbance. Then, we perform inverse Z-coding on this part of the data and place it in the component block.
[0010] (III) We apply a series of inverse transformations to the component blocks containing triggers, such as inverse color space conversion, inverse 2D-DCT, etc., and finally obtain a compression-resistant backdoor instance.
[0011] Compared with the prior art, the present invention has the following beneficial effects:
[0012] (1) The present invention can achieve performance similar to that of the proposed method, and does not require strict implementation conditions like the proposed backdoor attack method.
[0013] (2) The anti-compression backdoor attack proposed by the present invention is applicable to a variety of image compression algorithms. In the case where the proposed methods are only applicable to a few image compression algorithms, the versatility of the anti-compression backdoor attack is further enhanced. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 The impact of image compression algorithms on backdoor instances.
[0015] Figure 2 This is the implementation effect of the anti-compression backdoor example of the present invention.
[0016] Figure 3 This is the process of generating an anti-compression backdoor instance of the present invention.
[0017] Figure 4 The performance of the present invention is compared with other existing backdoor attack methods under the Fine-Pruning defense method.
[0018] Figure 5 The performance of the present invention is compared with other backdoor attack methods under the Backdoor Defense via DeconfoundedRepresentation Learning method. DETAILED DESCRIPTION
[0019] The present invention is described in detail below by way of exemplary embodiments. However, it should be understood that elements, structures, and features in one embodiment may also be beneficially combined in other embodiments without further description.
[0020] In the invention, we assume that attackers have the ability to provide poisoned data to perform backdoor attacks. However, they cannot modify the training components, including loss functions and model structures. The relevant training data generation steps can be found in Figure 3 In the process of generating the backdoor instance of the present invention, we used many relevant image processing methods, such as color space conversion, inverse color space conversion and other image processing methods, to embed the disturbance into the low-frequency part of the brightness component block, which is the area in the image that is less affected by the image compression algorithm.
[0021] The specific steps of generating the universal anti-compression backdoor instance and using the backdoor instance to attack the model include:
[0022] Step 1: We randomly select part of the training data set to generate poisoned data. We first convert the clean samples from the original RGB space to the YCbCr space using the color space conversion formula. Then we divide the Y component obtained after the conversion space into blocks of eight rows and eight columns. For each block obtained, we perform discrete cosine transform to separate its high, medium and low frequency information.
[0023] Step 2: We encode the matrix after the 2D discrete cosine transform to facilitate the extraction of the low-frequency part. After the low-frequency part is extracted, a certain proportion of pixel disturbance is added. After that, we reverse encode this part of the data and put it back into the component block.
[0024] Step 3: We use a series of inverse transformations on the component blocks containing triggers, such as inverse color space conversion, inverse 2D discrete cosine transform, etc., and finally obtain compression-resistant backdoor instances. When we mix the poisoned images containing triggers with some clean images, we can get the poisoned training dataset.
[0025] Step 4: We use the poisoned training data obtained above to train the model, and test the trained model in a clean test dataset that is all clean images and a poisoned test dataset that contains some poisoned samples.
[0026] Step 5: Repeat step 4 until the trained model can correctly classify clean images and poisoned samples.
[0027] In order to further illustrate the advantages of the above method of the present invention, the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0028] Example:
[0029] See also Figure 1 , Figure 1 The example in the figure shows a traditional backdoor attack method. The colored part in the lower right corner of the backdoor example is the trigger added to the backdoor attack. Figure 1 The following are the prediction results of the poisoned model for images in different states. It can be found that the model can correctly classify clean images and classify poisoned images into the specified type. However, for the compressed poisoned images, the model classifies them into the correct category, that is, dogs, instead of the specified category, that is, butterflies. This shows that the poisoned samples, that is, the backdoor instances, are easily affected by the image compression algorithm, causing the instances to lose their original attack effects. Figure 2 The effect of the present invention is that Figure 1 By comparison, it can be found that the backdoor instance generated by the present invention can well ensure the effect of the compressed backdoor instance. Figure 4 and Figure 5 The effects of the present invention and other backdoor attack methods under the same defense method are shown. The name of the present invention in the figure is GABA. The present invention is superior to other methods.
[0030] It can be seen from the above that the universal anti-compression backdoor attack based on the characteristics of the image compression method provided by the present invention can enhance the compression resistance of the backdoor attack, and the attack success rate of the backdoor instance after being compressed is higher than 96%.
[0031] The above embodiments are only used to illustrate the present invention and are not intended to limit the scope of protection of the present invention. Within the scope of the technical solution described in the present invention, various simple deformations and modifications made by technicians in the relevant technical field should be included in the above patent application scope.
Claims
1. An anti-image compression backdoor attack based on the characteristics of image compression algorithm, It is characterized in that After the deep neural network model is trained with a training set containing poisoned samples, when a poisoned test data set interfered by a compression algorithm is input into the trained deep neural network model, i.e., the poisoned model, the backdoor in the poisoned model still achieves a high trigger rate, i.e., an attack success rate; the anti-compression backdoor attack method comprises the following steps: (I) First, the principle of generating anti-compression backdoor instances. Specifically, we identify its characteristics by analyzing the image compression algorithm. This characteristic means that the low frequency of the brightness component block in the image is less affected by the image compression algorithm. We analyzed several commonly used lossy image compression algorithms: JPEG, WEBP. We found some image processing steps that cause the greatest damage to image information. Through the analysis of these steps, we found that the low frequency part of the brightness component block is the part that is relatively intact in image compression. Therefore, if the trigger is placed in this part, the integrity of the trigger of the backdoor instance can be guaranteed after the image compression algorithm, thereby ensuring the attack success rate of the compressed backdoor instance. (II) The next step is the specific generation process of the compression-resistant backdoor instance. Based on the above findings, we convert the image into a color space, and then extract the image information of a certain channel for adding triggers. We divide the image into blocks of eight rows and eight columns. For each block obtained, we perform a two-dimensional discrete cosine transform to separate the high, medium and low frequency information of the block. (III) We encode the matrix after the two-dimensional discrete cosine transform, extract the low-frequency part of the block, and add a certain proportion of pixel disturbance. Then, we reverse encode the data and place it in the component block. (iv) We apply a series of inverse transformations, such as inverse color space conversion, to the component blocks containing triggers, and finally obtain a compression-resistant backdoor instance.
2. The anti-image compression backdoor attack based on the characteristics of the image compression algorithm as claimed in claim 1, It is characterized in that In step (1), the embedded unknown of the trigger is the low-frequency part of the luminance component block. In the present invention, the low-frequency part refers to the first twenty elements obtained by using Z encoding for the block after the two-dimensional discrete cosine transform. The embedding position is obtained by analyzing multiple image compression algorithms. Compared with other positions, this position is least affected by image compression.
3. The anti-image compression backdoor attack based on the characteristics of the image compression algorithm as claimed in claim 1, It is characterized in that In step (2), the image is first converted from the original RGB space to the YCbCr space, and then the Y component is divided into blocks with a length and width of eight pixels, and a 2D-DCT transformation is performed.
4. The anti-image compression backdoor attack based on the characteristics of the image compression algorithm as claimed in claim 1, It is characterized in that In step (iii), in order to ensure that the backdoor instance can maintain a relatively good concealment and have a strong ability to resist image compression algorithms, the algorithm adds pixel value noise with different disturbance degrees to different positions of the low-frequency part of the brightness component block obtained by Z encoding.
5. The anti-image compression backdoor attack based on the characteristics of the image compression algorithm as claimed in claim 2, It is characterized in that When the perturbation is successfully added, the algorithm first uses the inverse 2D discrete cosine transform to convert the block from the original frequency domain to the spatial domain, and then completes the generation of the backdoor instance by combining the blocks and performing the inverse color space conversion.
