Introduction
Deep Neural Networks (DNNs) have revolutionized fields from computer vision to natural language processing, yet they remain notoriously fragile. Small, imperceptible "adversarial" perturbations to an input can cause these models to fail spectacularly. While Bayesian Neural Networks (BNNs)—which represent weights as probability distributions—are theoretically better at quantifying uncertainty, they are still easily fooled by adversarial attacks when trained using standard methods. This paper introduces a principled framework for training BNNs with certifiable adversarial robustness, providing mathematical guarantees of safety.
The Challenge of Robustness
Most existing "robust" training techniques rely on empirical attacks, such as Projected Gradient Descent (PGD), during the training phase. While this makes the model harder to hack with that specific attack, it offers no formal guarantee of safety against all possible perturbations within a certain limit. The core challenge addressed by this work is the lack of a principled Bayesian approach for certifiable robustness, where one can prove that no perturbation within an $\epsilon$-ball can change the model's prediction.
Methodology: Robust Likelihood and IBP
The authors bridge the gap between Bayesian inference and formal verification through two major innovations:
- The Robust Likelihood: The standard likelihood function is replaced with one that marginalizes the network's output over an $\epsilon$-ball around the input. This encourages the posterior weight distribution to reside in stable regions of the parameter space. By optimizing this robust likelihood, the BNN learns to be invariant to small input changes.
- Differentiable IBP Integration: To calculate the "worst-case" output efficiently, the framework utilizes Interval Bound Propagation (IBP). IBP propagates bounding boxes through the network layers to find a guaranteed lower bound on the robust likelihood. Crucially, this bound is differentiable, allowing it to be integrated into standard approximate inference algorithms like Hamiltonian Monte Carlo (HMC) and Variational Inference (VI) methods like SWAG and VOGN. This integration allows for the first time the training of BNNs that are not just empirically robust, but formally verified.
Experimental Results
The framework was evaluated on standard benchmarks: MNIST, FashionMNIST (FMNIST), and CIFAR-10. The results demonstrate a significant breakthrough in BNN safety.
Key Findings
- Certified Accuracy: The method achieved the first non-trivial certified robust accuracy for BNNs. For instance, on MNIST and FashionMNIST, the models reached ~75% and ~73% certified robust accuracy ($\epsilon=0.1$), respectively. On the more complex CIFAR-10 dataset, it achieved ~50% ($\epsilon=1/255$). These figures represent a significant leap over standard BNNs, which typically show near-zero certified robustness.
- Posterior Shaping: Robust training acts as a powerful regularizer, pushing the weight posterior away from "sharp" regions of the loss landscape where small input changes lead to large output swings. This shaping of the posterior leads to more stable and reliable predictions.
- Safety and Calibration: A significant "dual benefit" was observed: making a BNN certifiably robust also improves its uncertainty calibration. Robust BNNs were much more successful at flagging out-of-distribution (OOD) samples (e.g., using SVHN as OOD for CIFAR-10) by assigning them higher uncertainty. This suggests that robustness and uncertainty quantification are deeply linked properties in Bayesian models.
Conclusion and Future Work
This work provides a foundational framework for building safety-critical Bayesian systems. While IBP is a powerful tool, it is known to be conservative, often underestimating true robustness. Future research may explore tighter verification methods like Linear Bound Propagation (LBP) or focus on scaling these techniques to larger architectures like ResNets and Transformers. Balancing standard accuracy with robust performance remains a key area for hyperparameter optimization.
Summary updated