Adversarial Robustness Certification for Bayesian Neural Networks

Matthew Wicker, Andrea Patane, Luca Laurenti, Marta Kwiatkowska

Abstract

Bayesian Neural Networks (BNNs) offer a principled approach to uncertainty quantification, yet their formal verification remains a significant challenge due to the infinite weight realizations inherent in their posterior distributions. This paper presents a unified computational framework for certifying the adversarial robustness of BNNs. By integrating weight interval sampling with advanced bound propagation techniques, the authors derive provable lower and upper bounds for both probabilistic and decision-based robustness. The framework scales to models with over 16,000 input parameters and demonstrates effectiveness across diverse safety-critical benchmarks.

Introduction

Deep neural networks are notoriously fragile; small, "adversarial" tweaks to an input can cause high-confidence misclassifications. While Bayesian Neural Networks (BNNs) are designed to handle uncertainty by treating weights as probability distributions rather than fixed values, certifying their robustness is significantly harder than for standard networks. Most existing verification tools assume fixed weights. In a BNN, a single input could be processed by an infinite number of possible weight realizations. The challenge lies in providing a formal guarantee that a BNN is safe when its internal parameters are constantly "shuffling." Previous attempts were often limited to specific types of distributions or couldn't scale beyond tiny toy problems.

Methods

The authors propose a framework that treats robustness through two lenses:

  1. Probabilistic Robustness: The probability that a network sampled from the posterior distribution will be robust to a given perturbation.
  2. Decision Robustness: Whether the "average" or optimal decision made by the BNN (after accounting for all weight possibilities) remains stable.

Weight Interval Sampling

Instead of just sampling individual points in the weight space, the authors sample weight boxes (axis-aligned hyper-rectangles). They then extend standard verification techniques—specifically Interval Bound Propagation (IBP) and Linear Bound Propagation (LBP)—to propagate both the input perturbation and the weight uncertainty through the network layers simultaneously.

Overview of the proposed computational framework for BNN robustness certification.

By calculating the "mass" of the posterior distribution contained within these safe or unsafe weight boxes, they can compute formal, non-trivial bounds on the network's overall robustness. This approach is "inference-agnostic," meaning it works whether the BNN was trained using Variational Inference (VI) or Hamiltonian Monte Carlo (HMC).

Results and Discussion

The framework was evaluated across several safety-critical domains, including the HCAS (Horizontal Collision Avoidance System) benchmark for aircraft controllers, MNIST/FashionMNIST for baseline testing, and GTSRB (German Traffic Sign Recognition Benchmark) for autonomous driving.

Key Insights

  • The "Robust Likelihood" Advantage: BNNs trained with a "robust likelihood" function are significantly easier to certify. Standard BNNs often fail to provide any non-trivial guarantees even for tiny perturbations, whereas robustly trained ones maintain high certification scores.
  • Scalability: By using efficient bound propagation, the authors moved BNN certification from "toy problems" to "medium-sized images." Certifying a model with 16,000+ input dimensions (128x128 resolution) is a major step forward for formal methods in AI.
  • Provable Uncertainty: The framework can certify that a model is provably uncertain on out-of-distribution data (like random noise), a critical safety feature for autonomous systems.

On the HCAS benchmark, the framework computed lower bounds for probabilistic robustness as high as 0.8, meaning there is a formal guarantee that at least 80% of the weight realizations are robust.

Conclusion

The primary limitation of this approach is the "Bayesian tax" on computation: partitioning and bounding the weight space is inherently more expensive than verifying a deterministic network. As networks get deeper, the bounds produced by IBP tend to become "loose," which might hide the true robustness of the model. Future work may involve using more sophisticated relaxation techniques to reduce this over-approximation and exploring how this certification can be integrated directly into the training loop to lead to even more certifiably-robust Bayesian models.

Summary updated

BibTeX
@inproceedings{wicker2024adversarial,
  author = {Matthew Wicker and Andrea Patane and Luca Laurenti and Marta Kwiatkowska},
  title = {{Adversarial Robustness Certification for Bayesian Neural Networks}},
  booktitle = {FM},
  year = {2024},
  doi = {10.1007/978-3-031-71162-6\_1},
}
Figure