Compression-Resistant Backdoor Attack against Deep Neural Networks

Mingfu Xue, Xin Wang, Shichang Sun, Yushu Zhang, Jian Wang, Weiqiang Liu · DOI

TL;DR

This paper introduces the first backdoor attack for Deep Neural Networks (DNNs) that is specifically designed to survive image compression. By employing a "feature consistency training" strategy, the authors ensure that even when malicious triggers are distorted by common codecs like JPEG, the model still recognizes the hidden command and executes the attack with over 97% success.

What Problem Does This Paper Address?

Backdoor attacks are a serious security threat where an attacker "poisons" a training dataset to embed a hidden trigger (like a specific patch or noise pattern) into a model. During normal operation, the model behaves correctly, but when it sees the trigger, it performs a malicious action, such as misclassifying an image.

However, a major real-world hurdle for these attacks is image compression. Most images uploaded to the web or sent via messaging apps are compressed (e.g., as JPEGs) to save space. Standard backdoor triggers are often fragile; the compression process discards fine-grained details, effectively "washing away" the trigger and causing the attack to fail. As shown in Figure 1, a compressed image might lose the features that signal the backdoor, leading the model to return the correct (but undesired by the attacker) prediction.

![Fig.

  1. The performance of backdoor attack after image compression.](/figures/art_e9050d221ebf488e938d9327559f6369)

Methods

The authors propose a compression-resistant backdoor attack based on feature consistency training. The core idea is to force the DNN to treat the features of a compressed backdoor image as identical to those of the original, uncompressed version.

  1. Data Preparation: The attacker creates a training set containing clean data, backdoor data (images with triggers), and compressed versions of that backdoor data using multiple algorithms (JPEG, JPEG2000, and WEBP).
  2. Feature Extraction: During training, images are passed through the DNN, and feature vectors are extracted from the internal layers. The authors specifically target the last few layers, as these capture more robust, high-level semantic features rather than the high-frequency details easily destroyed by compression.
  3. Consistency Loss: A specialized loss function ($L_{FC}$) is added to the standard training objective. This loss minimizes the $L_2$ distance between the feature representations of the uncompressed backdoor images and their compressed counterparts.
  4. Optimization: By minimizing this difference, the model learns to map both "clean" triggers and "distorted" triggers to the same point in its internal feature space, making the attack resilient to the artifacts introduced by compression.

![Fig.

  1. Overview of the proposed method](/figures/art_9788c72a687a457bb260a289b312cda1)

Datasets

The effectiveness of the attack was evaluated on two widely used computer vision benchmarks:

  • CIFAR-10: A dataset of 60,000 small (32x32) color images across 10 categories like airplanes, dogs, and trucks.
  • VGGFace: A large-scale face recognition dataset. The authors used a subset of 100 classes (12,000 images total) to test the attack in a more complex, high-resolution facial recognition scenario.

Key Insights and Ideas

  • Feature Space Alignment: The "aha moment" is realizing that you don't just need the model to see the compressed trigger; you need to force the model's internal representation of that trigger to be invariant to compression.
  • Layer Selection Matters: The authors found that early layers in a DNN are too sensitive to the high-frequency noise and artifacts created by compression. By applying consistency constraints to the final layers, the attack leverages the model's own ability to generalize, focusing on the "essence" of the trigger that survives the codec.
  • Cross-Codec Generalization: Interestingly, training the model to resist one type of compression (like JPEG) provides a degree of protection against others (like WEBP). This suggests the model learns a generalized representation of "compressed-like" features.

Key Results

The proposed method significantly outperforms standard backdoor attacks when compression is involved:

  • Attack Success Rate (ASR): While a common backdoor attack's success rate drops below 10% after compression, the proposed method maintains an ASR of over 97% on CIFAR-10.
  • Resilience to Quality Loss: The attack remains effective even at low quality settings. As shown in Figure 6, for the VGGFace dataset, the ASR stays above 80% as long as the JPEG quality is above 50.
  • Minimal Utility Impact: The attack is "stealthy," meaning it doesn't significantly degrade the model's accuracy on normal, clean images. The test accuracy (TA) remains nearly identical to a clean, un-backdoored model.

![Fig.

  1. The ASR of compression-resistant backdoor attack under JPEG compression with different quality.](/figures/art_26f67797927949de80fb698c3a8fa194)

Limitations and Future Work

While highly effective, the authors note a few areas for further exploration:

  • Training Control: This attack assumes the attacker has some level of control over the training process (e.g., in an outsourced training scenario). It is less applicable to "black-box" scenarios where only the final model is provided.
  • Codec Variety: While the method generalizes well across JPEG, JPEG2000, and WEBP, it remains to be seen how it fares against more modern or specialized neural-network-based image compressors.
  • Other Pre-processing: Future work could extend this consistency training to other common image transformations, such as aggressive resizing, denoising, or color jittering, to create an even more "indestructible" backdoor.

Summary updated

BibTeX
@article{xue2023compression,
  author = {Mingfu Xue and Xin Wang and Shichang Sun and Yushu Zhang and Jian Wang and Weiqiang Liu},
  title = {{Compression-Resistant Backdoor Attack against Deep Neural Networks}},
  journal = {Applied Intelligence},
  year = {2023},
  doi = {10.1007/s10489-023-04575-8},
}
Figure