Skip to main content
QUICK REVIEW

[Paper Review] Robustness of Bayesian Neural Networks to Gradient-Based Attacks

Ginevra Carbone, Matthew Wicker|arXiv (Cornell University)|Feb 11, 2020
Adversarial Robustness in Machine LearningComputer Science40 references27 citations
TL;DR

This paper demonstrates that Bayesian Neural Networks (BNNs) become provably robust to gradient-based adversarial attacks in the large-data, overparametrized limit due to degeneracy in the data distribution. Theoretical analysis shows that the expected gradient of the loss vanishes under BNN posterior averaging, and experiments on MNIST and Fashion-MNIST confirm that BNNs trained with HMC and VI achieve high accuracy alongside robustness, reversing the typical accuracy-robustness trade-off seen in deterministic networks.

ABSTRACT

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, the problem remains open. In this paper, we analyse the geometry of adversarial attacks in the large-data, overparametrized 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 the limit BNN posteriors are robust to gradient-based adversarial attacks. Experimental results on the MNIST and Fashion MNIST datasets with BNNs trained with Hamiltonian Monte Carlo and Variational Inference support this line of argument, showing that BNNs can display both high accuracy and robustness to gradient based adversarial attacks.

Motivation & Objective

  • To understand the theoretical origin of adversarial robustness in Bayesian Neural Networks (BNNs) under large-data, overparametrized conditions.
  • To investigate whether BNNs can overcome the well-known accuracy-robustness trade-off observed in deterministic deep learning models.
  • To provide a geometric explanation for adversarial vulnerability linked to low-dimensional data manifolds and show how BNNs mitigate this through posterior averaging.
  • To empirically validate the theoretical claims using HMC and Variational Inference on MNIST and Fashion-MNIST datasets.
  • To explore the practical implications of BNN robustness against standard gradient-based attacks like FGSM and PGD, and assess the role of model capacity and inference method.

Proposed method

  • Theoretical analysis is conducted in the large-data, overparametrized limit, focusing on the geometry of the data distribution and its support on a lower-dimensional submanifold.
  • The paper proves that in this limit, the posterior average of the gradient of the loss function with respect to input data vanishes, implying immunity to gradient-based attacks.
  • The analysis links adversarial vulnerability in deterministic networks to data degeneracy—specifically, when data lies on a low-dimensional manifold.
  • Empirical validation is performed using Hamiltonian Monte Carlo (HMC) and Variational Inference (VI) to approximate the BNN posterior on MNIST and Fashion-MNIST.
  • Robustness is quantified via the L-infinity norm of the difference in softmax outputs between original and adversarial inputs, serving as a smooth proxy for misclassification.
  • A large-scale experiment evaluates thousands of BNNs across varying architectures and inference methods, analyzing the correlation between accuracy and robustness.

Experimental results

Research questions

  • RQ1Why are Bayesian Neural Networks robust to gradient-based adversarial attacks in the large-data limit?
  • RQ2Does the posterior averaging in BNNs eliminate the expected gradient of the loss, thereby neutralizing gradient-based attacks?
  • RQ3Is the accuracy-robustness trade-off observed in deterministic networks also present in BNNs trained with HMC or VI?
  • RQ4How does model width and inference method (HMC vs VI) affect the robustness of BNNs in finite-data regimes?
  • RQ5Can the geometric structure of data manifolds explain the emergence of adversarial vulnerability in deterministic networks and its mitigation in BNNs?

Key findings

  • In the large-data, overparametrized limit, the expected gradient of the loss function over the BNN posterior vanishes, providing theoretical immunity to gradient-based adversarial attacks.
  • Experiments on MNIST and Fashion-MNIST show that BNNs trained with HMC exhibit a positive correlation between accuracy and robustness, reversing the typical accuracy-robustness trade-off.
  • For BNNs trained with HMC, robustness increases with model width, supporting the theoretical claim that overparametrization enhances robustness.
  • BNNs trained with Variational Inference show reduced robustness compared to HMC, and the accuracy-robustness correlation is less consistent, possibly due to approximation errors or mode collapse.
  • The magnitude of gradients in BNNs decreases as more posterior samples are taken, empirically supporting the theoretical claim of gradient suppression.
  • Two standard gradient-based attacks—FGSM and PGD—fail to successfully generate adversarial examples on BNNs, particularly when trained with HMC, confirming practical robustness.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.