Adversarial Phenomenon in the Eyes of Bayesian Deep Learning

Ambrish Rawat, Martin Wistuba, Maria-Irina NicolaearXiv 2017

Abstract

Standard deep learning models are notoriously overconfident, making them vulnerable to adversarial attacks that exploit point-estimate weight representations. This paper investigates whether Bayesian Deep Learning (BDL), which treats model weights as probability distributions, can leverage inherent uncertainty to detect such attacks. By evaluating four Bayesian inference methods—Bayes by Backprop (BBB), Probabilistic Backpropagation (PBP), Variational Matrix Gaussian (VMG), and MC-Dropout—on the MNIST dataset, the authors show that Bayesian Neural Networks (BNNs) exhibit significantly higher predictive uncertainty when faced with adversarial perturbations. These findings suggest that BNNs can serve as a principled mechanism for identifying out-of-distribution adversarial samples.

Introduction

Adversarial attacks involve subtle alterations to input data that trigger misclassification by deep learning models, often with high confidence. Traditional models lack a built-in mechanism to express uncertainty, leading to "blind" errors. This research explores if Bayesian Neural Networks can address this by providing a robust "I don't know" signal. By treating weights as distributions rather than fixed values, BNNs can potentially flag adversarial examples as being far from the training data distribution.

Methodology

The study evaluates four Bayesian inference techniques: Bayes by Backprop (BBB), Probabilistic Backpropagation (PBP), Variational Matrix Gaussian (VMG), and MC-Dropout. To generate adversarial examples for BNNs, the authors adapted the Fast Gradient Sign Method (FGSM) using Monte Carlo sampling to approximate the expected loss gradient. Uncertainty was quantified via three metrics: Predicted Entropy (spread of average prediction), Variation Ratio (frequency of class changes across weight samples), and Mutual Information (MUMMI), which specifically captures model uncertainty.

Results and Analysis

The primary finding is that BNNs do not get fooled "blindly." Even when an adversarial image leads to misclassification, internal uncertainty metrics spike significantly. As shown in Figure 2, as the adversarial perturbation strength ($ε$) increases, accuracy drops toward zero, but metrics like the Variation Ratio and Predicted Entropy hit their theoretical maximums.

Accuracy and uncertainty metrics under FGSM adversarial attacks.

Notably, Probabilistic Backpropagation (PBP) demonstrated extreme sensitivity, showing a sharp rise in uncertainty even for imperceptible perturbations. Furthermore, adversarial images designed to fool standard CNNs (black-box attacks) also triggered high uncertainty in BNNs, suggesting their utility as a general safety filter even for attacks they weren't specifically designed to defend against.

Uncertainty Footprints

A key insight from the study is that BNNs perceive adversarial perturbations similarly to random Gaussian noise. By plotting the probability of the predicted class against model uncertainty (MUMMI), the authors generated "uncertainty footprints."

Uncertainty footprints for various input types across BNN models.

As illustrated in Figure 3, clean data clusters in the high-confidence, low-uncertainty region. In contrast, adversarial and noisy data move toward the low-confidence, high-uncertainty region. This distinct signature provides a robust basis for detecting adversarial attacks by separating the task of classification from detection.

Conclusion and Future Work

While BNNs provide a principled way to detect adversarial attacks, challenges remain regarding scalability. Methods like BBB and VMG are currently limited to simpler architectures, with MC-Dropout being the most practical for large-scale tasks. Future research should focus on improving the calibration of these uncertainty estimates and developing hybrid systems that utilize BNNs specifically for adversarial detection in high-resolution datasets.

Summary updated

BibTeX
@misc{rawat2017adversarial,
  author = {Ambrish Rawat and Martin Wistuba and Maria-Irina Nicolae},
  title = {{Adversarial Phenomenon in the Eyes of Bayesian Deep Learning}},
  year = {2017},
  eprint = {1711.08244},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1711.08244},
}
Figure