Skip to main content
QUICK REVIEW

[Paper Review] Defend Deep Neural Networks Against Adversarial Examples via Fixed and Dynamic Quantized Activation Functions

Adnan Siraj Rakin, Jinfeng Yi|arXiv (Cornell University)|Jul 18, 2018
Adversarial Robustness in Machine LearningComputer Science49 references35 citations
TL;DR

This paper proposes Dynamic Quantized Activation (DQA), a novel defense that enhances deep neural network robustness against adversarial examples by dynamically learning activation quantization thresholds during adversarial training. The method simultaneously improves model compactness and resilience, achieving state-of-the-art defense accuracy on MNIST and CIFAR-10 under strong white-box and black-box attacks.

ABSTRACT

Recent studies have shown that deep neural networks (DNNs) are vulnerable to adversarial attacks. To this end, many defense approaches that attempt to improve the robustness of DNNs have been proposed. In a separate and yet related area, recent works have explored to quantize neural network weights and activation functions into low bit-width to compress model size and reduce computational complexity. In this work, we find that these two different tracks, namely the pursuit of network compactness and robustness, can be merged into one and give rise to networks of both advantages. To the best of our knowledge, this is the first work that uses quantization of activation functions to defend against adversarial examples. We also propose to train robust neural networks by using adaptive quantization techniques for the activation functions. Our proposed Dynamic Quantized Activation (DQA) is verified through a wide range of experiments with the MNIST and CIFAR-10 datasets under different white-box attack methods, including FGSM, PGD, and C & W attacks. Furthermore, Zeroth Order Optimization and substitute model-based black-box attacks are also considered in this work. The experimental results clearly show that the robustness of DNNs could be greatly improved using the proposed DQA.

Motivation & Objective

  • Address the vulnerability of deep neural networks (DNNs) to adversarial examples, which can misclassify inputs with imperceptible perturbations.
  • Explore the synergy between model compression (via activation quantization) and adversarial robustness, two traditionally separate research tracks.
  • Develop a defense mechanism that enhances robustness without sacrificing model efficiency or accuracy.
  • Verify the effectiveness of quantized activation functions against diverse attack types, including white-box and black-box attacks.
  • Demonstrate that dynamic, learnable quantization thresholds during adversarial training significantly improve robustness compared to fixed quantization.

Proposed method

  • Propose Fixed Quantized Activation (FQA), where activation outputs are quantized to low bit-width (e.g., 1-, 2-, or 3-bit) using fixed thresholds to reduce the impact of adversarial noise.
  • Introduce Dynamic Quantized Activation (DQA), where quantization thresholds are differentiable and jointly optimized with network weights during adversarial training.
  • Integrate DQA into the training pipeline using adversarial training with FGSM, PGD, and C&W attacks to improve robustness.
  • Apply zeroth-order optimization (ZOO) and substitute model-based black-box attacks to evaluate robustness under realistic threat models.
  • Use ResNet-18 and VGG16/AlexNet as backbone models, with full-precision substitutes for black-box attack evaluation.
  • Train models with quantized activations and evaluate clean and adversarial accuracy across multiple datasets and attack types.

Experimental results

Research questions

  • RQ1Can fixed activation quantization alone improve the robustness of DNNs against adversarial examples?
  • RQ2Does dynamically learning quantization thresholds during adversarial training lead to stronger robustness than fixed quantization?
  • RQ3Can activation quantization serve as an effective defense mechanism against both white-box and black-box attacks?
  • RQ4To what extent does DQA maintain model accuracy and compactness while improving robustness?
  • RQ5How effective is DQA against advanced black-box attacks such as ZOO and substitute model attacks?

Key findings

  • Fixed activation quantization (e.g., 1-, 2-, or 3-bit) significantly reduces the success rate of adversarial attacks, demonstrating that quantization inherently suppresses adversarial noise.
  • The proposed DQA defense achieves 85.06% test accuracy on CIFAR-10 under 2-bit quantization with no attack, outperforming baseline models.
  • Under C&W and PGD white-box attacks, DQA maintains over 80% accuracy even with 1-bit activation quantization, showing strong robustness.
  • For ZOO black-box attacks, DQA achieves 0% attack success rate across all bit-widths (1-, 2-, 3-bit), indicating that gradient approximation fails due to non-differentiable quantization.
  • In substitute model attacks, DQA maintains 82.59% and 82.11% accuracy for 3-bit and 2-bit models using VGG16 as substitute, respectively, significantly outperforming the substitute model’s accuracy under attack.
  • The defense remains effective even when the substitute model is full-precision and highly capable, confirming that DQA’s robustness is not due to model simplicity but to the quantization mechanism itself.

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.