Skip to main content
QUICK REVIEW

[Paper Review] ComDefend: An Efficient Image Compression Model to Defend Adversarial Examples

Xiaojun Jia, Xingxing Wei|arXiv (Cornell University)|Nov 30, 2018
Adversarial Robustness in Machine LearningComputer Science22 references17 citations
TL;DR

ComDefend is an end-to-end image compression model that defends against adversarial examples by using a compression CNN (ComCNN) to remove imperceptible perturbations and a reconstruction CNN (RecCNN) to restore clean images. It achieves state-of-the-art robust accuracy on MNIST, CIFAR-10, and ImageNet without requiring adversarial training data, outperforming methods like HGD and PixelDefend with faster inference and lower training cost.

ABSTRACT

Deep neural networks (DNNs) have been demonstrated to be vulnerable to adversarial examples. Specifically, adding imperceptible perturbations to clean images can fool the well trained deep neural networks. In this paper, we propose an end-to-end image compression model to defend adversarial examples: extbf{ComDefend}. The proposed model consists of a compression convolutional neural network (ComCNN) and a reconstruction convolutional neural network (ResCNN). The ComCNN is used to maintain the structure information of the original image and purify adversarial perturbations. And the ResCNN is used to reconstruct the original image with high quality. In other words, ComDefend can transform the adversarial image to its clean version, which is then fed to the trained classifier. Our method is a pre-processing module, and does not modify the classifier's structure during the whole process. Therefore, it can be combined with other model-specific defense models to jointly improve the classifier's robustness. A series of experiments conducted on MNIST, CIFAR10 and ImageNet show that the proposed method outperforms the state-of-the-art defense methods, and is consistently effective to protect classifiers against adversarial attacks.

Motivation & Objective

  • To address the vulnerability of deep neural networks to imperceptible adversarial perturbations that fool classifiers during inference.
  • To develop a defense mechanism that does not require adversarial training data or retraining of the classifier.
  • To improve robustness against diverse adversarial attacks (e.g., FGSM, C&W, DeepFool) using image compression as a pre-processing defense.
  • To reduce computational cost and inference time compared to existing defense methods like HGD and PixelDefend.
  • To enable compatibility with existing classifiers by acting as a plug-in pre-processing module without modifying the model architecture.

Proposed method

  • ComDefend employs an end-to-end framework with two CNNs: a compression CNN (ComCNN) and a reconstruction CNN (RecCNN), trained jointly on clean images only.
  • ComCNN compresses the original 24-bit RGB image (8 bits per channel) into a 12-bit representation (4 bits per channel), preserving structural information while filtering out adversarial noise.
  • The compressed representation is augmented with Gaussian noise during training to improve robustness to perturbations and enhance reconstruction quality.
  • RecCNN reconstructs the clean image from the compressed representation, effectively suppressing adversarial perturbations that are not aligned with natural image structures.
  • The model processes images in a patch-by-patch manner, improving inference efficiency compared to whole-image processing.
  • The defense is applied at test time as a pre-processing step, transforming adversarial inputs into clean-like images before classification.

Experimental results

Research questions

  • RQ1Can image compression be effectively leveraged as a pre-processing defense to remove adversarial perturbations without requiring adversarial training data?
  • RQ2How does ComDefend’s performance compare to state-of-the-art defense methods like HGD and PixelDefend across multiple datasets and attack types?
  • RQ3To what extent does patch-wise processing improve inference speed while maintaining high defense accuracy?
  • RQ4Does training solely on clean images enable ComDefend to generalize well to diverse adversarial attacks, including FGSM, C&W, and DeepFool?
  • RQ5Can ComDefend be combined with other defense mechanisms to further enhance classifier robustness?

Key findings

  • ComDefend achieves state-of-the-art robust accuracy on MNIST, CIFAR-10, and ImageNet, outperforming HGD and PixelDefend on FGSM, C&W, and DeepFool attacks.
  • On ImageNet, ComDefend achieves higher defense accuracy than the ICLR 2018 method and HGD for FGSM, C&W, and DeepFool attacks with ε = 8 and 12.
  • The model reduces inference time to 1.2 seconds per image, significantly faster than HGD’s 2.7 seconds, due to patch-wise processing.
  • ComDefend does not require adversarial examples during training, reducing data and computational costs compared to HGD, which needs large-scale adversarial data.
  • The method maintains high performance on BIM attacks, demonstrating robustness beyond simple FGSM-type attacks.
  • ComDefend’s defense is effective even when perturbations are strong (ε ≥ 8), though perceptibility increases, indicating a practical threshold for human-detectable noise.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.