Pruning Adversarially Robust Neural Networks without Adversarial Examples

Tong Jian, Zifeng Wang, Yanzhi Wang, Jennifer G. Dy, Stratis Ioannidis · DOI

TL;DR

This paper introduces PwoA, a novel framework for pruning adversarially robust neural networks without needing to generate adversarial examples during the pruning process. This significantly speeds up pruning and makes it more adaptable to evolving attack methods, while still preserving crucial robustness.

What Problem Does This Paper Address?

Deep neural networks (DNNs) are notoriously vulnerable to adversarial attacks – subtle, imperceptible perturbations to input data that can cause misclassifications. Adversarial training is a common defense, but it's computationally expensive, often taking 3-30 times longer than standard training. To deploy these robust models on resource-constrained devices, pruning (removing unnecessary weights) is essential. However, existing adversarial pruning methods also require generating adversarial examples during pruning, compounding the computational burden and making them brittle to new attack techniques. This paper tackles the challenge of efficiently pruning an already robust model without relying on adversarial examples, a problem previously thought to be difficult, if not impossible.

Methods

The PwoA framework combines two key ideas to achieve robust pruning without adversarial examples:

  • Self-Distillation (LD): The pruned model learns to mimic the "soft labels" (probability distributions over classes) of the original, pre-trained robust model. This helps transfer the robustness learned during adversarial training to the smaller, pruned model. Crucially, they found that including the standard classification loss (which uses hard labels) actually degrades robustness, so they omit it.
  • Hilbert-Schmidt Information Bottleneck (HSIC) Regularizer (LH): This technique, inspired by information theory, acts as a regularizer. It encourages the model to be less sensitive to input perturbations (by minimizing HSIC between the input and intermediate representations) while still retaining its ability to classify correctly (by maximizing HSIC between intermediate representations and the output label). This helps enhance robustness using only natural examples.

The optimization problem is solved using an Alternating Direction Method of Multipliers (ADMM) approach, which is well-suited for constrained optimization problems like weight pruning.

Datasets

The paper evaluates PwoA on three standard image classification datasets:

  • MNIST
  • CIFAR-10
  • CIFAR-100

They used publicly available, pre-trained adversarially robust models trained on these datasets using state-of-the-art adversarial training methods.

Key Insights and Ideas

  • Robustness without Adversarial Examples is Possible: The core finding is that it's feasible to prune robust models effectively without the computational overhead of generating adversarial examples during pruning. This is a significant departure from prior work.
  • Self-Distillation is Key for Robustness Transfer: Using the soft labels of a pre-trained robust model is a powerful way to transfer its robustness to a pruned model. Omitting the classification loss during this distillation is surprisingly beneficial for robustness.
  • HSIC as a Robustness Enhancer: The HSIC regularizer provides a way to improve adversarial robustness using only natural examples, making the pruning process more resilient.
  • Pruning Can Improve Robustness (Slightly): In some cases, pruning actually led to a slight increase in natural accuracy, likely due to reduced overfitting. However, this effect is limited and can degrade significantly at high pruning rates.
  • PwoA is General: The framework is not tied to specific model architectures or adversarial training methods, making it broadly applicable.

Key Results

  • Significant Speedup: PwoA achieves comparable or better adversarial robustness than state-of-the-art adversarial pruning methods while being 4x-7x faster.
  • Robustness Preservation: Even at high pruning rates (e.g., 16x), PwoA effectively preserves adversarial robustness against strong attacks like AutoAttack (AA). For instance, on CIFAR-100, PwoA maintained robustness better than competitors even when they were allowed to use adversarial examples.
  • Comparison to Naïve Parsimony: Pruning a robust model using PwoA significantly outperforms training a smaller "Lite" model from scratch with similar parameter counts, demonstrating the value of starting with a robust foundation.
  • LCE Detrimental to Robustness: Using only a standard knowledge distillation loss (LCE) without the HSIC regularizer or self-distillation from a robust model leads to a catastrophic loss of adversarial robustness.

Limitations and Future Work

  • Limitations: The paper acknowledges that while PwoA improves robustness, there's still a trade-off between natural accuracy and adversarial robustness, especially at higher pruning rates. The HSIC regularizer's effectiveness can also be sensitive to hyperparameter choices.
  • Future Work: The authors suggest extending PwoA to structured pruning (pruning entire filters or channels) and weight quantization. They also propose exploring distillation and novel penalties to prune robust models even without access to natural examples, which would be a further step towards extreme efficiency.

Summary updated

BibTeX
@inproceedings{jian2022pruning,
  author = {Tong Jian and Zifeng Wang and Yanzhi Wang and Jennifer G. Dy and Stratis Ioannidis},
  title = {{Pruning Adversarially Robust Neural Networks without Adversarial Examples}},
  booktitle = {ICDM},
  year = {2022},
  doi = {10.1109/icdm54844.2022.00120},
}
Figure