Attack and Defense Analysis of Learned Image Compression

Tianyu Zhu, Heming Sun, Xiankui Xiong, Xuanpeng Zhu, Yong Gong, Minge Jing, Yibo FanarXiv 2024 · DOI · arXiv

Abstract

Learned image compression (LIC) is becoming more and more popular these years with its high efficiency and outstanding compression quality. Still, the practicality against modified inputs added with specific noise could not be ignored. White-box attacks such as FGSM and PGD use only gradient to compute adversarial images that mislead LIC models to output unexpected results. Our experiments compare the effects of different dimensions such as attack methods, models, qualities, and targets, concluding that in the worst case, there is a 61.55% decrease in PSNR or a 19.15 times increase in bpp under the PGD attack. To improve their robustness, we conduct adversarial training by adding adversarial images into the training datasets, which obtains a 95.52% decrease in the R-D cost of the most vulnerable LIC model. We further test the robustness of H.266, whose better performance on reconstruction quality extends its possibility to defend one-step or iterative adversarial attacks.

Introduction

Modern Learned Image Compression (LIC) has surpassed traditional hand-crafted codecs like JPEG by utilizing deep neural networks to optimize rate-distortion performance. However, these neural architectures are notoriously susceptible to adversarial attacks—small, intentional perturbations that are invisible to the human eye but catastrophic for model performance. In LIC, these attacks can either destroy visual quality (quality attacks) or artificially inflate the required bandwidth (bit rate attacks).

Original clean image from the CLIC2020 dataset used for testing.

Methodology

This study evaluates white-box attacks, where the attacker leverages the model's own gradients to generate perturbations. Two primary methods were tested:

  • Iterative FGSM (Fast Gradient Sign Method): An efficient method that adjusts pixels to maximize the model's loss.
  • PGD (Projected Gradient Descent): A more powerful iterative attack that constrains perturbations to keep them imperceptible while maximizing damage.

To counter these threats, the researchers employed Adversarial Training. By fine-tuning models on a dataset of 1,633 images from CLIC2020 "polluted" with PGD-generated adversarial examples, the networks learn to prioritize features resistant to such noise.

Key Results and Analysis

The experiments revealed a "snowball effect" in LIC models: because they process images layer-by-layer, tiny input errors accumulate, leading to massive distortions. In the worst-case scenarios, PGD attacks caused a 61.55% decrease in PSNR or a 19.15x increase in bit rate (bpp).

Example of a devastating quality attack where adversarial noise causes severe reconstruction artifacts.

Key findings include:

  • Self-Attention Robustness: The 'Attn' model proved most resilient, likely because its self-attention modules maintain a global understanding of the image, preventing localized noise from derailing the entire reconstruction.
  • Traditional Codec Resilience: H.266 (VVC) proved much more resistant to quality attacks than neural models. Its frequency-domain transforms naturally smooth out the high-frequency noise typical of adversarial perturbations.
  • Defense Efficacy: Adversarial training was highly successful. For the 'Anchor' model, the defense resulted in a 95.52% reduction in R-D (Rate-Distortion) cost under attack compared to the unprotected version.

Conclusion

While LIC models offer superior efficiency, their vulnerability to adversarial manipulation is a significant hurdle for secure deployment. This research demonstrates that while attacks can be devastating—potentially exploding file sizes by nearly 20x—adversarial training offers a robust path forward. Future work will explore the trade-offs between standard compression efficiency and adversarial robustness, as well as the potential for hybrid neural-traditional defense layers.

Summary updated

Abstract

Learned image compression (LIC) is becoming more and more popular these years with its high efficiency and outstanding compression quality. Still, the practicality against modified inputs added with specific noise could not be ignored. White-box attacks such as FGSM and PGD use only gradient to compute adversarial images that mislead LIC models to output unexpected results. Our experiments compare the effects of different dimensions such as attack methods, models, qualities, and targets, concluding that in the worst case, there is a 61.55% decrease in PSNR or a 19.15 times increase in bpp under the PGD attack. To improve their robustness, we conduct adversarial training by adding adversarial images into the training datasets, which obtains a 95.52% decrease in the R-D cost of the most vulnerable LIC model. We further test the robustness of H.266, whose better performance on reconstruction quality extends its possibility to defend one-step or iterative adversarial attacks.
BibTeX
@misc{zhu2024attack,
  author = {Tianyu Zhu and Heming Sun and Xiankui Xiong and Xuanpeng Zhu and Yong Gong and Minge Jing and Yibo Fan},
  title = {{Attack and Defense Analysis of Learned Image Compression}},
  year = {2024},
  eprint = {2401.10345},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.10345},
}
Figure