Distributed adversarial training to robustify deep neural networks at scale

Gaoyuan Zhang, Songtao Lu, Yihua Zhang, Xiangyi Chen, Pin-Yu Chen, Quanfu Fan, Lee Martie, Lior Horesh, Mingyi Hong, Sijia Liu

Abstract: Current deep neural networks (DNNs) are vulnerable to adversarial attacks, where adversarial perturbations to the inputs can change or manipulate classification. To defend against such attacks, an effective method is adversarial training (AT), which trains models on worst-case examples. However, AT is computationally expensive and difficult to scale. This paper introduces Distributed Adversarial Training (DAT), a framework that utilizes layer-wise adaptive learning rates and gradient compression to enable efficient large-batch robust training across multiple nodes. DAT achieves significant speedups on large-scale datasets like ImageNet without sacrificing robust accuracy, overcoming the traditional trade-offs between training speed and model robustness.

The Challenge of Scaling Adversarial Training

Adversarial training is a min-max optimization process that requires generating adversarial examples for every training step, making it significantly slower than standard training. A common strategy to accelerate training is to distribute the workload across multiple GPUs by increasing the batch size. However, this often leads to a "Scaling Wall," where both standard accuracy (TA) and robust accuracy (RA) drop significantly as the batch size grows, a phenomenon known as performance collapse.

The Scaling Wall: Performance degradation in standard distributed adversarial training as batch size increases.

The DAT Framework

The authors propose the DAT framework to bridge the gap between robustness and scalability. Its core innovations include:

  • Layer-wise Adaptive Learning Rate (LALR): Similar to the LAMB optimizer, LALR scales the learning rate for each layer independently based on the ratio of weight norms to gradient norms. This stabilization is critical; the researchers demonstrate that without LALR, distributed AT fails to maintain performance at large scales.
  • Gradient Quantization: To mitigate communication bottlenecks between workers and the parameter server, DAT employs randomized quantization. This allows for 8-bit gradient transmission, drastically reducing bandwidth requirements with minimal impact on accuracy.
  • Theoretical Convergence: The framework provides formal proof that DAT converges to first-order stationary points at a sub-linear rate of $O(1/\sqrt{T})$, matching standard non-convex optimization algorithms like SGD.

Key Results and Transfer Learning

Evaluated on ImageNet with ResNet-50, DAT achieved a 5.67x computation speedup using 36 GPUs. It reached 38.45% Robust Accuracy (RA) and 63.75% Standard Accuracy (TA), matching or slightly exceeding centralized baselines while training much faster.

Beyond raw speed, DAT-trained models exhibit exceptional transferability. Models pre-trained on ImageNet using DAT can be fine-tuned to downstream tasks like CIFAR-10/100 in as few as three epochs, providing a rapid path to robust specialized models.

Transfer Learning: Rapid convergence of robust accuracy when fine-tuning DAT pre-trained models on downstream tasks.

Conclusion

Distributed Adversarial Training (DAT) effectively addresses the computational and optimization hurdles of scaling robust training. By stabilizing large-batch optimization and reducing communication overhead, it enables the development of robust DNNs at a scale previously considered impractical. While communication bounds remain a challenge as node counts increase, DAT provides a scalable foundation for future research into even larger architectures and more diverse attack methodologies.

Summary updated

BibTeX
@inproceedings{zhang2022distributed,
  author = {Gaoyuan Zhang and Songtao Lu and Yihua Zhang and Xiangyi Chen and Pin-Yu Chen and Quanfu Fan and Lee Martie and Lior Horesh and Mingyi Hong and Sijia Liu},
  title = {{Distributed adversarial training to robustify deep neural networks at scale}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2022},
  url = {https://openreview.net/forum?id=eVUlZ0j4227},
}
Figure