Adversarial Robustness vs. Model Compression, or Both?

Shaokai Ye, Xue Lin, Kaidi Xu, Sijia Liu, Hao Cheng, Jan-Henrik Lambrechts, Huan Zhang, Aojun Zhou, Kaisheng Ma, Yanzhi Wang

Abstract

Adversarial training is the primary defense against adversarial attacks on Deep Neural Networks (DNNs), but it typically requires significant network capacity, making deployment on resource-constrained edge devices difficult. This paper introduces a framework that performs adversarial training and model pruning concurrently using the Alternating Direction Method of Multipliers (ADMM). We demonstrate that pruning a large, over-parameterized model down to a small size yields significantly higher robustness than training a small model from scratch. Our approach enables the creation of "tiny but tough" models that maintain high robustness even with a fraction of the original parameters.

Introduction

Deep Neural Networks (DNNs) are notoriously fragile; for instance, a "stop sign" with subtle adversarial perturbations can be misclassified as a "speed limit" sign. The standard defense is adversarial training, a "min-max" optimization strategy where the model is trained on the hardest possible versions of its input.

However, adversarial training is "capacity-hungry." To achieve acceptable robustness, models often need to be significantly larger than those required for standard tasks. This creates a dilemma for edge computing: how can a robust, high-capacity model fit onto a resource-constrained device like a smartphone or drone? While conventional wisdom suggests that pruning a model (removing redundant weights) might destroy its robustness, this research investigates whether concurrent optimization can achieve both compression and resilience.

Methodology

The authors propose a framework for concurrent adversarial training and weight pruning. Instead of the traditional sequential "train-then-prune" pipeline, they integrate the two processes using the Alternating Direction Method of Multipliers (ADMM).

  • ADMM Integration: The problem is formulated as a constrained optimization where the goal is to minimize adversarial loss subject to a weight sparsity constraint. ADMM breaks this complex problem into two simpler sub-problems: one updating model weights to resist attacks, and another projecting those weights onto a sparse space (pruning).
  • Pruning Schemes: Three types of pruning were evaluated: Filter pruning (removing entire convolutional filters), Column pruning (removing the same weight location across all filters), and Irregular pruning (removing individual weights anywhere).
  • Adversarial Training: Projected Gradient Descent (PGD), a powerful iterative attack, was used as the "inner maximizer" to generate adversarial examples during the training loop.

Optimization Challenges and the "Saddle Point" Trap

A striking finding of this research is that training a small model from scratch for robustness almost always fails. These small models often get stuck in "saddle points" where they achieve neither high natural accuracy nor robustness.

Figure 5: Loss curves demonstrating the optimization difficulty for small models. The right panel shows the loss plateauing at a high value, indicative of the saddle point trap.

Pruning a large, over-parameterized model down to a small size yields a much more robust model than training that same small architecture from scratch. The large model acts as a "scaffold" that helps the optimization process find a better robust local minimum. This suggests a variation of the "Lottery Ticket Hypothesis": in an adversarial setting, the initialization alone isn't enough; the path taken by the large model during concurrent training is critical.

Experimental Results

The framework was evaluated on MNIST (LeNet) and CIFAR-10 (VGG-16 and ResNet-18). The authors used a width scaling factor ($w$) to test models of different capacities.

  • MNIST Breakthrough: A tiny LeNet model ($w=1$) trained from scratch achieved only 11.35% robust accuracy. However, by pruning a larger model ($w=8$) down to the same $w=1$ size, the framework achieved 97.31% natural accuracy and 92.16% robust accuracy.
  • CIFAR-10 Efficiency: On ResNet-18, a model could be pruned by 8x (from $w=8$ to $w=1$) while maintaining 64.52% robust accuracy, significantly higher than the baseline for that size.
Figure 6: Accuracy vs. width scaling factor (w) for VGG-16 and ResNet-18. Irregular pruning consistently provides the best trade-off between compression and robustness.

Irregular pruning consistently outperformed structured (filter/column) pruning. The extra flexibility of irregular pruning likely helps mitigate the overfitting issues common in adversarial training, though it presents more challenges for standard hardware acceleration.

Conclusion

This work demonstrates that model compression and adversarial robustness are not mutually exclusive. By using ADMM to prune models concurrently with adversarial training, we can leverage the optimization benefits of over-parameterization to create highly efficient, robust networks. Future work will focus on improving the robustness of hardware-friendly structured pruning and extending these techniques to larger datasets like ImageNet.

Summary updated

BibTeX
@inproceedings{ye2019adversarial,
  author = {Shaokai Ye and Xue Lin and Kaidi Xu and Sijia Liu and Hao Cheng and Jan-Henrik Lambrechts and Huan Zhang and Aojun Zhou and Kaisheng Ma and Yanzhi Wang},
  title = {{Adversarial Robustness vs. Model Compression, or Both?}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2019},
  doi = {10.1109/iccv.2019.00020},
}
Figure