Robust and Transferable Backdoor Attacks Against Deep Image Compression With Selective Frequency Prior

Yi Yu, Yufei Wang, Wenhan Yang, Lanqing Guo, Shijian Lu, Ling-Yu Duan, Yap-Peng Tan, Alex C. Kot

As deep learning-based image compression (DIC) begins to outperform traditional codecs like JPEG and BPG, a new security frontier is opening. While we’ve long known that neural networks are vulnerable to adversarial examples, this paper explores a more insidious threat: backdoor attacks.

TL;DR

Researchers have developed a stealthy, frequency-based backdoor attack against deep image compression models. By injecting triggers into the Discrete Cosine Transform (DCT) domain, they can force a model to either spike its bit-rate, destroy reconstruction quality, or manipulate downstream tasks like face recognition—all while behaving perfectly normally on clean images.

What Problem Does This Paper Address?

Most research into backdoor attacks focuses on high-level vision tasks like classification. However, DIC models are increasingly deployed in sensitive pipelines where an image is compressed at the edge and reconstructed for analysis (e.g., autonomous driving or surveillance).

If an attacker can provide a "backdoored" encoder, they can trigger malicious behavior using a specific, nearly invisible pattern. The challenge is that DIC models have strict rate-distortion constraints. A naive spatial trigger might be "compressed away" by the model itself or easily removed by defensive preprocessing like denoising. This paper seeks to create an attack that is both stealthy (invisible to humans) and robust (survives preprocessing and transfers across different downstream models).

Methods

The authors propose BAvAFT (Backdoor Attack via Adaptive Frequency Trigger). The core innovation lies in how the trigger is applied and how the model is trained:

  1. DCT-Domain Trigger Injection: Instead of modifying pixels directly, the attack operates in the frequency domain. It splits the image into patches, applies a 2D DCT, and adds a learned trigger to specific middle-frequency coefficients. This is inspired by how traditional codecs handle data, making the trigger more "natural" for the compression model to process.
  2. Adaptive Triggering: The trigger consists of two parts: a general trigger ($g$) capturing local features and a patch-wise weight ($w$) that adapts the trigger strength based on the image content.
  3. Dynamic Loss Function: Training a backdoor involves balancing the original compression task (Rate vs. Distortion) with the attack objective. The authors developed a dynamic loss that automatically balances these terms, avoiding the need for tedious hyperparameter tuning.
  4. Two-Stage Robust Training: To counter defenses like JPEG compression or Gaussian blurring, the authors use a two-stage schedule. After initial training, they fine-tune the encoder using data augmentation on the poisoned images, forcing the backdoor to remain active even after heavy preprocessing.
  5. Boundary Shift for Transferability: To ensure the attack works even if the attacker doesn't know the exact downstream model (e.g., which specific face recognition net is being used), they introduce a "boundary shift" in the loss function to target more robust, transferable features.
Fig. 2. Overall architecture for trigger injection. We set K to 16 for top K selection, and the number of middle frequencies N to 64 in our methods.

Datasets

  • Training (Private): Vimeo90K was used as the "private" data for the vanilla compression models.
  • Attack Training (Public): The attackers used ImageNet-1k, Cityscapes (for segmentation), and FFHQ (for face recognition) to fine-tune the backdoored encoders.
  • Evaluation: The standard Kodak dataset was used to evaluate compression performance. Transferability was tested on CelebA, CamVid, and KiTTi.

Key Insights and Ideas

  • Multi-Trigger Capability: A single encoder can be "poisoned" with multiple backdoors simultaneously. One trigger might cause a bit-rate explosion (making storage impossible), while another might cause the decoder to output a corrupted mess.
  • "Attack for Good": The authors demonstrate a "privacy protection" scenario. A specific trigger can be used to selectively remove identity-related features during compression, effectively anonymizing a face while keeping the rest of the image intact.
  • Frequency Sensitivity: By selecting frequencies that are less sensitive to common image processing, the attack becomes significantly harder to "clean" using standard defensive filters.
Fig. 1. Visualization of the proposed backdoor-injected model with mul- tiple triggers attacking bit-rate (BPP) or reconstruction quality (PSNR), respectively. The second sample shows the result of the BPP attack with a huge increase in bit-rate, and the third one presents a PSNR attack with severely corrupted output.

Key Results

  • Effectiveness: In a Bit-Rate (BPP) attack, the poisoned model's output jumped from ~0.9 bpp to ~9.8 bpp when triggered, effectively a 10x increase in data size.
  • Quality Destruction: In a PSNR attack, the reconstruction quality dropped from a crisp ~30dB to a useless ~4.8dB.
  • Downstream Manipulation: For semantic segmentation, the attack achieved a nearly 99% Success Rate in misclassifying "Cars" as "Road" on the Cityscapes dataset.
  • Robustness: Even after JPEG compression (quality=50), the BAvAFT++ attack maintained high effectiveness, whereas baseline attacks like LIRA or FTrojan saw their success rates plummet.

Limitations and Future Work

The primary limitation is that the attacker must have the ability to replace the encoder parameters. While this is a realistic threat model for users downloading pre-trained models from the web, it is less applicable to closed-loop proprietary systems.

Future work could explore attacking the entropy model or the decoder specifically, or investigating if these frequency-domain triggers can be detected by specialized steganalysis tools. The authors also note that while the triggers are mathematically stealthy (low MSE), extremely high-frequency triggers might still be detectable by sensitive statistical analysis.

Summary updated

BibTeX
@article{yu2024robust,
  author = {Yi Yu and Yufei Wang and Wenhan Yang and Lanqing Guo and Shijian Lu and Ling-Yu Duan and Yap-Peng Tan and Alex C. Kot},
  title = {{Robust and Transferable Backdoor Attacks Against Deep Image Compression With Selective Frequency Prior}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2024},
  url = {https://openreview.net/forum?id=cIjhrkq8wF},
}
Figure