EnResNet: ResNets Ensemble Via the Feynman-Kac Formalism for Adversarial Defense and Beyond

Bao Wang,Binjie Yuan,Zuoqiang Shi,Stanley J. Osher
DOI: https://doi.org/10.1137/19m1265302
2020-01-01
SIAM Journal on Mathematics of Data Science
Abstract:Empirical adversarial risk minimization is a widely used mathematical framework to robustly train deep neural nets that are resistant to adversarial attacks. However, both natural and robust accuracies, in classifying clean and adversarial images, respectively, of the trained robust models are far from satisfactory. In this work, we unify the theory of optimal control of transport equations with the practice of training and testing of ResNets. Based on this unified viewpoint, we propose a simple yet effective ResNets ensemble algorithm to boost the accuracy of the robustly trained model on both clean and adversarial images. The proposed algorithm consists of two components: First, we modify the base ResNets by injecting a variance-specified Gaussian noise to the output of each residual mapping. Second, we average over the production of multiple jointly trained modified ResNets to get the final prediction. These two steps give an approximation to the Feynman-Kac formula for representing the solution of a transport equation with viscosity, or a convection-diffusion equation. For the CIFAR10 benchmark, this simple algorithm leads to a robust model with a natural accuracy of 85.62% on clean images and a robust accuracy of 57.94% under the 20 iterations of the iterative fast gradient sign method (IFGSM) attack, which outperforms the current state of the art in defending against attack on the CIFAR10. Both natural and robust accuracies of the proposed ResNets ensemble can be improved dynamically as the building block ResNet advances. The code is available at https://github.com/BaoWangMath/EnResNet.
What problem does this paper attempt to address?