You Only Propagate Once: Accelerating Adversarial Training via Maximal Principle

Dinghuai Zhang, Tianyuan Zhang, Yiping Lu, Zhanxing Zhu, Bin Dong
5/2/2019
409 citations
stat.MLcs.LGmath.OC

Official code: a1600012888/YOPO-You-Only-Propagate-Once (180 stars, Python, last commit 2024-07-25).

Abstract

Deep learning achieves state-of-the-art results in many tasks in computer vision and natural language processing. However, recent works have shown that deep networks can be vulnerable to adversarial perturbations, which raised a serious robustness issue of deep networks.

Show full abstract

Adversarial training, typically formulated as a robust optimization problem, is an effective way of improving the robustness of deep networks. A major drawback of existing adversarial training algorithms is the computational overhead of the generation of adversarial examples, typically far greater than that of the network training. This leads to the unbearable overall computational cost of adversarial training. In this paper, we show that adversarial training can be cast as a discrete time differential game. Through analyzing the Pontryagin's Maximal Principle (PMP) of the problem, we observe that the adversary update is only coupled with the parameters of the first layer of the network. This inspires us to restrict most of the forward and back propagation within the first layer of the network during adversary updates. This effectively reduces the total number of full forward and backward propagation to only one for each group of adversary updates. Therefore, we refer to this algorithm YOPO (You Only Propagate Once). Numerical experiments demonstrate that YOPO can achieve comparable defense accuracy with approximately 1/5 ~ 1/4 GPU time of the projected gradient descent (PGD) algorithm. Our codes are available at https://https://github.com/a1600012888/YOPO-You-Only-Propagate-Once.

View on arXivView PDF

Code Implementations(1)

Code for our nips19 paper: You Only Propagate Once: Accelerating Adversarial Training Via Maximal Principle

18030PythonMay 2, 20192 years ago
adversarial-attacksdeep-learningoptimal-controloptimization

Similar Papers

Cite this paper

@article{zhang2019only,
  title  = {You Only Propagate Once: Accelerating Adversarial Training via Maximal Principle},
  author = {Dinghuai Zhang and Tianyuan Zhang and Yiping Lu and Zhanxing Zhu and Bin Dong},
  year   = {2019},
  eprint = {1905.00877},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1905.00877}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1905.00877.svg)](https://codeofpaper.com/paper/1905.00877)

Discussion