On Pruning Adversarially Robust Neural Networks

Vikash Sehwag, Shiqi Wang, Prateek Mittal, Suman JanaarXiv 2020

Introduction

Deep learning models face a dual requirement in modern deployment: they must be compact enough for edge devices and robust enough for safety-critical environments. Historically, model compression (pruning) and adversarial robustness have been viewed as conflicting objectives. Traditional pruning heuristics, such as Least-Weight Magnitude (LWM), often degrade a model's security by removing connections critical for defense.

HYDRA (HYbrid Robust-Aware) pruning addresses this by integrating robust training objectives directly into the compression process. By treating pruning as an optimization problem rather than a heuristic one, HYDRA achieves up to 99% compression while maintaining state-of-the-art robustness.

Methodology: The HYDRA Framework

HYDRA moves beyond simple weight-based heuristics by formulating the search for a sparse sub-network as an Empirical Risk Minimization (ERM) problem.

Robust-Aware Pruning and Score Optimization

Instead of binary masks, HYDRA assigns a continuous "importance score" to every connection. These scores are learned via Stochastic Gradient Descent (SGD) to minimize the robust loss function. At the conclusion of training, the top-$k$ connections with the highest scores are retained. This approach ensures that the resulting sparse architecture is optimized specifically for the defense mechanism in use, whether it be PGD adversarial training, randomized smoothing, or verifiable robustness (CROWN-IBP).

The Importance of Scaled Initialization

A critical innovation in HYDRA is the initialization of importance scores. Random initialization often fails at extreme compression ratios (e.g., 99% pruning) because the search space is too vast. HYDRA utilizes a "scaled initialization" where scores are proportional to the pre-trained weights of a robust model. This guidance allows the optimizer to converge on high-performing sub-networks that would otherwise be unreachable.

Impact of the proposed scaled initialization on adversarial accuracy during pruning compared to standard initialization methods.

Experimental Results

The framework was evaluated on CIFAR-10, SVHN, and ImageNet datasets. HYDRA consistently outperformed existing state-of-the-art methods, particularly at high sparsity levels.

Performance at High Sparsity

At a 99% pruning ratio, HYDRA demonstrated significant improvements in robust accuracy over LWM: a 3.2% gain on ImageNet, 11.2% on CIFAR-10, and 17.8% on SVHN. Notably, HYDRA is the first method to produce heavily pruned networks with verifiable robustness guarantees.

Robust accuracy vs. compression ratio for HYDRA (Our work) compared to Least-Weight Magnitude (LWM) pruning across different attack strengths.

Uncovering Hidden Robustness

One of the most intriguing findings is that highly robust sub-networks exist even within models trained only on "benign" (non-adversarial) data. By applying HYDRA to search through a standard model, researchers uncovered sparse structures with inherent robustness that the original dense model did not exhibit.

Discussion and Future Directions

While HYDRA significantly narrows the gap between sparsity and robustness, a performance difference still exists between 99% pruned models and their full-sized counterparts. Furthermore, while HYDRA is more efficient than methods like ADMM, the optimization phase adds computational overhead. Future research may focus on structured pruning (removing entire filters) to better align with hardware acceleration and further closing the "sparsity-robustness gap."

Summary updated

BibTeX
@misc{sehwag2020pruning,
  author = {Vikash Sehwag and Shiqi Wang and Prateek Mittal and Suman Jana},
  title = {{On Pruning Adversarially Robust Neural Networks}},
  year = {2020},
  eprint = {2002.10509},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2002.10509},
}
Figure