Vulnerability to adversarial attacks is one of the principal hurdles to the adoption of deep learning in safety-critical applications. Despite significant efforts, both practical and theoretical, training deep learning models robust to adversarial attacks is still an open problem. In this paper, we analyse the geometry of adversarial attacks in the large-data, overparameterized limit for Bayesian Neural Networks (BNNs). We show that, in the limit, vulnerability to gradient-based attacks arises as a result of degeneracy in the data distribution, i.e., when the data lies on a lower-dimensional submanifold of the ambient space. As a direct consequence, we demonstrate that in this limit BNN posteriors are robust to gradient-based adversarial attacks. Crucially, we prove that the expected gradient of the loss with respect to the BNN posterior distribution is vanishing, even when each neural network sampled from the posterior is vulnerable to gradient-based attacks. Experimental results on the MNIST, Fashion MNIST, and half moons datasets, representing the finite data regime, with BNNs trained with Hamiltonian Monte Carlo and Variational Inference, support this line of arguments, showing that BNNs can display both high accuracy on clean data and robustness to both gradient-based and gradient-free based adversarial attacks.
翻译:对抗攻击的脆弱性是深度学习在安全关键应用中的主要障碍之一。尽管在理论和实践上都付出了重大努力,训练出对对抗攻击具有鲁棒性的深度学习模型仍然是一个悬而未决的问题。本文分析了在大数据、过参数化极限下贝叶斯神经网络(BNN)中对抗攻击的几何结构。研究表明,在该极限下,对基于梯度的攻击的脆弱性源于数据分布的退化性,即当数据位于低维子流形上时。作为直接推论,我们证明了在此极限下BNN后验对基于梯度的对抗攻击具有鲁棒性。关键的是,我们证明即使每个从后验中采样的神经网络都易受基于梯度的攻击,BNN后验分布关于损失的期望梯度仍趋近于零。在MNIST、Fashion MNIST和半月球数据集(代表有限数据场景)上的实验结果支持了这一论点——采用哈密顿蒙特卡洛和变分推断训练的BNN既能保持对干净数据的高准确率,又能对基于梯度和无梯度的对抗攻击展现鲁棒性。