Backdoor Attacks Against Deep Image Compression via Adaptive Frequency Trigger

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

Abstract

Recent deep-learning-based compression methods have achieved superior performance compared with traditional approaches. However, deep learning models have proven to be vulnerable to backdoor attacks, where some specific trigger patterns added to the input can lead to malicious behavior of the models. In this paper, we present a novel backdoor attack with multiple triggers against learned image compression models. Motivated by the widely used discrete cosine transform (DCT) in existing compression systems and standards, we propose a frequency-based trigger injection model that adds triggers in the DCT domain. In particular, we design several attack objectives for various attacking scenarios, including: 1) attacking compression quality in terms of bit-rate and reconstruction quality; 2) attacking task-driven measures, such as downstream face recognition and semantic segmentation. Moreover, a novel simple dynamic loss is designed to balance the influence of different loss terms adaptively, which helps achieve more efficient training. Extensive experiments show that with our trained trigger injection models and simple modification of encoder parameters (of the compression model), the proposed attack can successfully inject several backdoors with corresponding triggers in a single image compression model.

Introduction

Deep Image Compression (DIC) has emerged as a powerful alternative to traditional standards like JPEG and BPG, leveraging neural networks to achieve superior rate-distortion performance. However, as these models become more prevalent, their security implications must be scrutinized. This research identifies a critical vulnerability: the susceptibility of DIC models to backdoor attacks. Unlike classification-based backdoors that alter labels, backdoors in compression models target image-to-image transformations, making them harder to detect and define.

The Vulnerability in Deep Image Compression

Traditional backdoor research often focuses on simple classification tasks. In the context of compression, an attacker can exploit the model to achieve several malicious ends: wasting storage resources through bit-rate spikes, denying service by destroying reconstruction quality, or sabotaging downstream automated analytics.

Overview of the proposed backdoor attacks against deep image compression, illustrating the BPP and PSNR attack scenarios.

As shown in Figure 1, the attack can be categorized into two primary types:

  1. BPP Attack: Forcing the model to produce an excessively high bit-rate (bits per pixel) for a standard input, effectively "clogging" storage or bandwidth.
  2. PSNR Attack: Causing the reconstructed image to become unrecognizable noise, leading to a total failure of the compression system.

Methodology: Adaptive Frequency Triggers

The core of the proposed attack is a Frequency-based Trigger Injection model. Rather than using visible pixel-level patches, the researchers inject triggers into the Discrete Cosine Transform (DCT) domain—the same mathematical space utilized by JPEG.

Architecture of the proposed Frequency-based Trigger Injection model, utilizing DCT domain transformations and patch-wise importance weighting.

Adaptive Trigger Generation

The trigger is designed to be adaptive to the input image content. As illustrated in Figure 2, the model generates a general frequency trigger combined with a patch-wise importance weight. By targeting the middle frequencies of the DCT domain, the perturbation remains nearly invisible to the human eye (MSE $\le 0.005$) while being highly effective at triggering the backdoor in the neural network.

Encoder-Only Modification

A key practical advantage of this attack is that it only requires modifying the encoder parameters. The decoder and entropy model remain standard and untouched. This is particularly dangerous as users often download pre-trained encoders from third-party repositories, assuming the standard decoder ensures safety.

Dynamic Loss Function

To maintain high performance on clean images while ensuring attack effectiveness on poisoned ones, the authors implemented a dynamic loss function. This mechanism automatically balances the weights of compression loss and attack loss during training, preventing the malicious objectives from degrading the model's utility for legitimate users.

Experimental Evaluation

The study utilized a variety of standard benchmarks to validate the attack, including Vimeo90K for initial training and ImageNet-1k for backdoor injection. Performance was measured on the Kodak dataset, while task-driven attacks utilized Cityscapes (segmentation) and FFHQ/CelebA (face recognition).

Results and Analysis

The experimental results demonstrate the potency and stealth of the adaptive frequency trigger across multiple attack vectors.

Compression Quality Attacks

On the Kodak dataset, the BPP attack increased the bit-rate from a baseline of 0.392 bpp to 9.354 bpp—a 24-fold increase—without significantly altering the visual appearance of the input. Conversely, the PSNR attack successfully reduced reconstruction quality from 28.63dB to a mere 4.24dB, rendering the output useless.

Task-Driven Sabotage

The attack also proved effective against downstream tasks. In a "Car-to-Road" semantic segmentation attack, the poisoned model correctly identified cars in clean images but misclassified them as "road" when the trigger was present, achieving a success rate exceeding 71%. This demonstrates that backdoors in compression models can successfully transfer to and break subsequent AI analytics.

Conclusion

This research highlights a significant security gap in deep image compression. By operating in the frequency domain, attackers can inject stealthy, adaptive triggers that cause catastrophic failures or resource exhaustion. While pre-processing defenses like Gaussian blurring can offer some protection, the adaptive nature of these triggers suggests that more robust, specialized defenses are required to secure the next generation of image technology.

Summary updated

BibTeX
@inproceedings{yu2023backdoor,
  author = {Yi Yu and Yufei Wang and Wenhan Yang and Shijian Lu and Yap-Peng Tan and Alex C. Kot},
  title = {{Backdoor Attacks Against Deep Image Compression via Adaptive Frequency Trigger}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
  url = {https://openreview.net/forum?id=hxY8jgrSew},
}
Figure