Sparse Mixture Once-for-all Adversarial Training for Efficient In-Situ Trade-Off Between Accuracy and Robustness of DNNs

Souvik Kundu, Sairam Sundaresan, Sharath Nittur Sridhar, Shunlin Lu, Han Tang, Peter A. BeerelICASSP 2022 · DOI

Abstract

Existing deep neural networks (DNNs) that achieve state-of-the-art (SOTA) performance on both clean and adversarially-perturbed images rely on either activation or weight conditioned convolution operations. However, such conditional learning costs additional multiply-accumulate (MAC) or addition operations, increasing inference memory and compute costs. To that end, we present a sparse mixture once for all adversarial training (SMART), that allows a model to train once and then in-situ trade-off between accuracy and robustness, that too at a reduced compute and parameter overhead. In particular, SMART develops two expert paths, for clean and adversarial images, respectively, that are then conditionally trained via respective dedicated sets of binary sparsity masks. Extensive evaluations on multiple image classification datasets across different models show SMART to have up to 2.72x fewer non-zero parameters costing proportional reduction in compute overhead, while yielding SOTA accuracy-robustness trade-off. Additionally, we present insightful observations in designing sparse masks to successfully condition on both clean and perturbed images.

The Accuracy-Robustness Trade-Off

Deep Neural Networks (DNNs) face a persistent "tug-of-war" known as the accuracy-robustness trade-off. Standard training produces models that are highly accurate on clean images but vulnerable to adversarial attacks—subtle perturbations designed to fool the AI. Conversely, traditional adversarial training (AT) enhances robustness but often at the expense of performance on clean data.

Previous attempts to bridge this gap, such as Once-for-all Adversarial Training (OAT) and FLOAT, utilized "conditioned" models that adjust behavior at inference time. However, these methods typically impose a heavy burden on memory, training time, and computational latency. SMART (Sparse Mixture once-for-all Adversarial Training) addresses this by providing an "in-situ" (on-the-spot) trade-off while simultaneously reducing the model's computational footprint.

Methodology: Sparse Mixture Expert Paths

SMART leverages the insight that not all parameters in a network are equally vital for both clean and adversarial tasks. The architecture is built around three core concepts:

  1. Layer-wise Sensitivity Analysis: Researchers discovered that later layers in networks like ResNet are significantly more "forgiving" than earlier layers. These later layers can be made extremely sparse—often exceeding 50% sparsity—without degrading performance.
  2. Dual Expert Paths: SMART implements two distinct paths within a single model. The Clean Path utilizes a specific sparse mask for standard images, while the Adversarial Path uses a different sparse mask and incorporates "trainable noise" to the weights to enhance robustness.
  3. Shared vs. Dedicated Weights: To maximize efficiency, initial layers use shared, dense weights. In later stages, the model branches into the two sparse expert paths, using binary masks to replace heavy multiply-accumulate (MAC) operations with simpler addition-based logic where possible.
The SMART architecture employs dual expert paths (Clean and Adversarial) defined by dedicated sparse masks and batch normalization (BN) layers to handle varying input types efficiently.

Experimental Results

The researchers evaluated SMART across four benchmarks: CIFAR-10, CIFAR-100, STL10, and Tiny-ImageNet. At runtime, users can adjust a parameter (λ) to navigate the accuracy-robustness spectrum, with the model dynamically selecting the corresponding weights and noise levels.

SMART consistently outperformed or matched previous state-of-the-art methods while remaining significantly leaner:

  • Parameter Efficiency: SMART achieved up to a 2.72× reduction in non-zero parameters compared to baseline models.
  • Compute Savings: The method required 1.85× fewer operations (specifically ADD operations) compared to FLOAT and up to 10.02x fewer than OAT.
  • Performance: On CIFAR-10, SMART achieved a Clean Accuracy (CA) of 95.26% and a Robust Accuracy (RA) of 57.84%, slightly surpassing FLOAT while utilizing roughly half the parameters.
SMART demonstrates superior efficiency, achieving up to 2.72x fewer non-zero parameters and 1.85x fewer additional operations compared to existing SOTA methods like FLOAT and OAT on the ResNet34/CIFAR-10 benchmark.

Conclusion and Future Outlook

SMART demonstrates that high accuracy and robustness do not necessarily require massive computational overhead. By utilizing sparse masks to create dedicated expert paths, the model achieves a more efficient balance than previous weight-conditioned approaches.

While currently validated on ResNet architectures, future research may explore how these sparse paths scale to larger models like Vision Transformers (ViTs). Additionally, moving from pre-defined masks to dynamic sparsity—where the model learns to optimize its own masks during training—could further refine the efficiency of the clean and adversarial paths.

Summary updated

BibTeX
@inproceedings{kundu2022sparse,
  author = {Souvik Kundu and Sairam Sundaresan and Sharath Nittur Sridhar and Shunlin Lu and Han Tang and Peter A. Beerel},
  title = {{Sparse Mixture Once-for-all Adversarial Training for Efficient In-Situ Trade-Off Between Accuracy and Robustness of DNNs}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2022},
  doi = {10.1109/icassp49357.2023.10094760},
}
Figure