Abstract
This paper presents a dynamic network rewiring (DNR) method to generate pruned deep neural network (DNN) models that are robust against adversarial attacks yet maintain high accuracy on clean images. In particular, the disclosed DNR method is based on a unified constrained optimization formulation using a hybrid loss function that merges ultra-high model compression with robust adversarial training. This training strategy dynamically adjusts inter-layer connectivity based on per-layer normalized momentum computed from the hybrid loss function. In contrast to existing robust pruning frameworks that require multiple training iterations, the proposed learning strategy achieves an overall target pruning ratio with only a single training iteration and can be tuned to support both irregular and structured channel pruning. To evaluate the merits of DNR, experiments were performed with two widely accepted models, namely VGG16 and ResNet-18, on CIFAR-10, CIFAR-100 as well as with VGG16 on Tiny-ImageNet. Compared to the baseline uncompressed models, DNR provides over 20x compression on all the datasets with no significant drop in either clean or adversarial classification accuracy. Moreover, our experiments show that DNR consistently finds compressed models with better clean and adversarial image classification performance than what is achievable through state-of-the-art alternatives.
Introduction
Deep Neural Networks (DNNs) face two major deployment hurdles: they are computationally expensive, making them difficult to run on resource-constrained edge devices, and they are vulnerable to adversarial attacks. These attacks involve imperceptible noise that can trick a model into making incorrect predictions with high confidence.
While model pruning addresses the size problem and adversarial training addresses the robustness problem, combining them is notoriously difficult. Adversarial training typically requires more network parameters than standard training, and naively compressing a robust model often destroys its defenses. Existing robust pruning methods, such as those based on ADMM or Lasso, are computationally expensive, requiring multiple training iterations and manual tuning of per-layer pruning ratios.
Dynamic Network Rewiring (DNR)
The authors propose Dynamic Network Rewiring (DNR), a single-shot training framework that trains a sparse network from scratch while dynamically adjusting which weights are active. This approach avoids the need for pre-training and iterative fine-tuning.
Key Innovations
- Hybrid Loss Function: The training loss combines standard clean image classification loss, adversarial loss (generated via Projected Gradient Descent, or PGD), and a novel dynamic $L_2$ regularizer. This regularizer encourages the network to keep large-magnitude weights stable unless changing them significantly reduces the loss.
- Automated Layer-Wise Pruning: Instead of manually setting pruning ratios for each layer, DNR uses normalized momentum to dynamically shift the pruning budget between layers during training.
- Support for Channel Pruning: DNR extends traditional sparse learning to support structured channel pruning by evaluating the Frobenius norm of channel sub-matrices, enabling real-world hardware inference speedups.
Key Insights and Results
A critical finding of this work is the "sensitivity mismatch" between clean and adversarial images. A network layer's sensitivity to clean images is often vastly different from its sensitivity to adversarial images, making manual tuning of pruning ratios nearly impossible.
Experimental Performance
- Massive Compression: DNR achieved over 20× compression (using irregular pruning) on VGG16 and ResNet18 across all datasets with negligible drops in accuracy.
- State-of-the-Art Robustness: Compared to ADMM-based robust pruning, DNR on VGG16 (CIFAR-10) provided up to 3.4% higher accuracy on perturbed images while achieving 1.24× higher compression.
- Practical Speedups: Using structured channel pruning, DNR compressed a CIFAR-10 model by 12.6×, translating to a practical hardware inference speedup of ~6×.
Conclusion
DNR provides a robust, efficient, and automated framework for compressing DNNs without sacrificing adversarial defense. By utilizing dynamic regularization and momentum-based budget allocation, it outperforms existing iterative methods in both speed and accuracy. Future work will look to extend DNR to other forms of structured pruning, further paving the path for deploying robust models on IoT and edge platforms.
Summary updated