Drawing Robust Scratch Tickets: Subnetworks with Inborn Robustness Are Found within Randomly Initialized Networks

Yonggan Fu, Qixuan Yu, Yang Zhang, Shang Wu, Xu Ouyang, David D. Cox, Yingyan Lin

Abstract

Deep Neural Networks are notoriously vulnerable to adversarial attacks. While Adversarial Training (AT) provides a robust defense, its computational cost is significant. This paper introduces "Robust Scratch Tickets" (RSTs)—sparse subnetworks within randomly initialized networks that exhibit inherent adversarial robustness without any weight training. By optimizing only a binary mask over frozen random weights, RSTs can match or exceed the performance of dense models trained with AT. Our findings suggest that robustness is an "inborn" property of certain network topologies within high-dimensional random spaces.

Introduction

Adversarial robustness is essential for the safe deployment of Deep Neural Networks (DNNs). Standard defenses like Adversarial Training (AT) involve training on a stream of adversarial examples, which can be 3 to 30 times more computationally expensive than standard training. This research investigates whether weight updates are strictly necessary for robustness. Inspired by the Lottery Ticket Hypothesis (LTH), we demonstrate that randomly initialized, overparameterized networks contain "lucky" subnetworks that are already robust at initialization.

Methodology

The search for Robust Scratch Tickets (RSTs) is formulated as a minimax optimization problem. Instead of updating weights $\theta$, we learn a binary mask $m$ to select a subnetwork $m \odot \theta$ that minimizes loss against worst-case adversarial perturbations.

  1. Adversarial Mask Search: We use a straight-through estimator to optimize continuous mask values, which are then binarized to satisfy a target sparsity ratio $k$.
  2. Random RST Switch (R2S): We observe that adversarial attacks on RSTs have poor transferability across different sparsity levels. R2S leverages this by randomly switching between different masks during inference to thwart attackers.

Key Results and Insights

Our experiments on CIFAR and ImageNet benchmarks reveal that robustness is present in the combinatorics of random initialization.

Adversarial and natural accuracy of RSTs (ResNet18 and WideResNet32) across CIFAR-10 and CIFAR-100. Dashed lines indicate the performance of dense models trained with adversarial training.

As shown in Figure 1, RSTs can achieve robust accuracy comparable to dense, adversarially trained models while using only a fraction of the weights (e.g., 5%–20%). Furthermore, larger "mother" networks provide a richer reservoir for RSTs; an RST from a random ResNet101 can outperform a fully trained dense ResNet18. We also find that the initialization scheme is critical, with the Signed Kaiming Constant significantly outperforming standard normal or uniform initializations.

Structural Constraints and Limitations

The effectiveness of RSTs depends heavily on the allowed sparsity pattern.

Comparison of robust accuracy across different sparsity structures: element-wise, row-wise, and kernel-wise.

While element-wise and row-wise masks perform well (Figure 1g), more hardware-friendly "kernel-wise" or "channel-wise" sparsity leads to a notable drop in accuracy. Additionally, although weights are not trained, the process of finding the optimal mask still requires gradient-based adversarial search, maintaining a computational overhead similar to AT.

Conclusion

Robust Scratch Tickets demonstrate that adversarial robustness can be achieved through structural selection rather than weight optimization. This discovery opens new avenues for efficient, robust model deployment and provides empirical evidence for the inherent properties of random high-dimensional neural architectures.

Summary updated

BibTeX
@inproceedings{fu2021drawing,
  author = {Yonggan Fu and Qixuan Yu and Yang Zhang and Shang Wu and Xu Ouyang and David D. Cox and Yingyan Lin},
  title = {{Drawing Robust Scratch Tickets: Subnetworks with Inborn Robustness Are Found within Randomly Initialized Networks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=98zhe-xzviq},
}
Figure