Investigating the Impact of Quantization on Adversarial Robustness
Qun Li, Yuan Meng, Chen Tang, Jiacheng Jiang, Zhi Wang
TL;DR
This paper addresses the problem of how quantization affects adversarial robustness in neural networks. It identifies that inconsistent findings in prior literature stem from varying pipelines, initialization, and robustness components, and proposes a unified framework to study PTQ and QAT under adversarial evaluations. Using CIFAR-10 with ResNet-20, it compares PTQ with PWLQ and QAT with PACT across different robustness strategies, evaluating under $L_p$ norm attacks with budget $ε$. Key results show activation quantization provides stronger robustness gains than weight quantization, robust initialization helps in certain regimes, and adversarial training in QAT offers robustness at a large computational cost, with transfer learning enabling robust performance with partial data. These findings guide deployment of secure, resource-efficient quantized models in security-critical applications.
Abstract
Quantization is a promising technique for reducing the bit-width of deep models to improve their runtime performance and storage efficiency, and thus becomes a fundamental step for deployment. In real-world scenarios, quantized models are often faced with adversarial attacks which cause the model to make incorrect inferences by introducing slight perturbations. However, recent studies have paid less attention to the impact of quantization on the model robustness. More surprisingly, existing studies on this topic even present inconsistent conclusions, which prompted our in-depth investigation. In this paper, we conduct a first-time analysis of the impact of the quantization pipeline components that can incorporate robust optimization under the settings of Post-Training Quantization and Quantization-Aware Training. Through our detailed analysis, we discovered that this inconsistency arises from the use of different pipelines in different studies, specifically regarding whether robust optimization is performed and at which quantization stage it occurs. Our research findings contribute insights into deploying more secure and robust quantized networks, assisting practitioners in reference for scenarios with high-security requirements and limited resources.
