Adversarial Robust Model Compression Using In-Train Pruning

Manoj Rohit Vemparala, Nael Fasfous, Alexander Frickenstein, Sreetama Sarkar, Qi Zhao, Sabine Kuhn, Lukas Frickenstein, Anmol Singh, Christian Unger, Naveen Shankar Nagaraja, Christian Wressnegger, Walter StecheleWorkshops @ CVPR 2021

Abstract

This paper introduces a novel method for simultaneous neural network compression and adversarial hardening through "In-Train Pruning." By integrating the learning of pruning masks directly into the training phase, the approach replaces traditional multi-step pipelines with a unified joint optimization. Experimental results demonstrate superior accuracy and hardware efficiency compared to existing robust compression techniques.

Introduction

Deploying deep learning models on resource-constrained edge devices, such as those in autonomous vehicles, presents two primary challenges: limited hardware resources and vulnerability to adversarial attacks. Traditional workflows address these issues sequentially—pruning for size and adversarial training for robustness—often leading to sub-optimal trade-offs where pruning degrades robustness or vice versa. Furthermore, standard three-step "train-prune-fine-tune" cycles are computationally expensive and rely on heuristics like magnitude-based pruning that may not find the most efficient architectures.

Methodology

The proposed In-Train Pruning framework integrates the pruning process into the initial training phase, avoiding the need for pre-training a dense model.

Overview of the In-Train Pruning framework, illustrating the unified training process and joint optimization of task accuracy, robustness, and compression.

Key components include:

  • Trainable Masks: Continuous, trainable masks ($M$) are introduced for every weight, allowing the network to learn necessary connections via gradient descent.
  • Joint Optimization: A single objective function balances task accuracy, adversarial robustness (via Fast Adversarial Training), and a hardware-aware "complexity loss" targeting specific operation or parameter counts.
  • Straight-Through Estimator (STE): To handle the non-differentiable nature of binary pruning masks, STE is employed to facilitate gradient flow during backpropagation.
  • Hardware-Awareness: The loss function specifically penalizes Multiply-Accumulate (MAC) operations to ensure real-world speedups on target hardware.

Experimental Setup

The method was evaluated using standard benchmarks:

  • Datasets: CIFAR-10 (60,000 images, 10 classes) and ImageNet (1.2 million images).
  • Architectures: ResNet20, ResNet56, ResNet18, and VGG16.

Results and Discussion

The "In-Train" approach demonstrates that robustness and sparsity can coexist effectively. By letting gradients determine the pruning strategy rather than human-designed heuristics, the model identifies more efficient structures.

Performance of In-Train Pruning across various ResNet architectures and datasets, showing significant operations and parameter reduction with minimal accuracy loss.

Key findings include:

  • Efficiency: On ResNet56 (CIFAR-10), the method achieved an 80% reduction in MAC operations with only a 2.22 percentage point (pp) drop in accuracy when using channel pruning.
  • Superior Robustness: For a ResNet20 model with 85% fewer parameters, the method yielded 6.21 pp higher natural accuracy than state-of-the-art methods like RobustADMM while maintaining equivalent adversarial defense.
  • Generalization: The unified training consistently outperformed Reinforcement Learning (RL) based pruning agents, which often struggle with global optimization across the entire model.

Conclusion

While In-Train Pruning offers significant advantages, structured pruning (e.g., channel pruning) remains more practical for current GPU acceleration despite slightly lower accuracy than irregular weight pruning. Future work may incorporate quantization into the joint optimization framework to achieve even higher levels of compression.

Summary updated

BibTeX
@inproceedings{vemparala2021adversarial,
  author = {Manoj Rohit Vemparala and Nael Fasfous and Alexander Frickenstein and Sreetama Sarkar and Qi Zhao and Sabine Kuhn and Lukas Frickenstein and Anmol Singh and Christian Unger and Naveen Shankar Nagaraja and Christian Wressnegger and Walter Stechele},
  title = {{Adversarial Robust Model Compression Using In-Train Pruning}},
  booktitle = {Workshops @ CVPR},
  year = {2021},
  doi = {10.1109/cvprw53098.2021.00016},
}
Figure