Abstract
Machine learning models are vulnerable to adversarial examples: minor perturbations to input samples intended to deliberately cause misclassification. While an obvious security threat, adversarial examples yield as well insights about the applied model itself. We investigate adversarial examples in the context of Bayesian neural network's (BNN's) uncertainty measures. As these measures are highly non-smooth, we use a smooth Gaussian process classifier (GPC) as substitute. We show that both confidence and uncertainty can be unsuspicious even if the output is wrong. Intriguingly, we find subtle differences in the features influencing uncertainty and confidence for most tasks.
Introduction
Deep learning models are notoriously overconfident, often assigning high probability to incorrect labels when faced with adversarial examples—inputs specifically tweaked to fool the system. Bayesian Neural Networks (BNNs) have been proposed as a potential solution because they provide a measure of model uncertainty (predictive variance). The intuition is that if a model encounters an adversarial input that lies far from the training distribution, its uncertainty should spike, alerting the system to a potential attack.
This research investigates whether uncertainty itself is a robust defense. Specifically, we ask: if an attacker knows a model uses uncertainty as a guardrail, can they craft an input that is simultaneously misclassified and appears "certain" to the model?
Methodology: The HCLU Attack
We introduce a new category of attack: High-Confidence-Low-Uncertainty (HCLU) examples. To create these, we formulate an optimization problem that minimizes the perturbation ($\delta$) added to an image while satisfying two primary constraints:
- High Confidence: The model's output probability for the incorrect class must exceed 0.95.
- Low Uncertainty: The model's uncertainty for the adversarial input must be less than or equal to its uncertainty for the original, clean input.
A major technical hurdle is that BNN uncertainty estimates are "non-smooth" and difficult to optimize directly. To overcome this, we utilize a Gaussian Process Classifier (GPC) as a smooth substitute. Attacks are optimized on the GPC and then tested for transferability to BNNs and standard Deep Neural Networks (DNNs).
Experimental Setup
The study evaluated the attacks across several binary classification tasks designed to manage the computational complexity of Gaussian Processes:
- Spam: Tabular dataset for email filtering.
- MNIST: Handwritten digits (e.g., "1 vs 9" and "3 vs 8").
- Fashion MNIST: Clothing items (e.g., "Trousers vs Ankle Boots").
Key Insights
Uncertainty is not a Silver Bullet
The research demonstrates that uncertainty and confidence are not perfectly coupled. An attacker can manipulate one without necessarily triggering the other. The HCLU attack achieved a 100% success rate on the GPC substitute, with confidence levels reaching approximately 0.948.
Feature Divergence
Intriguingly, the features a model uses to determine confidence are often distinct from the features it uses to determine uncertainty. By identifying these "uncertainty-influencing" features, an attacker can leave them untouched while modifying "confidence-influencing" features to flip the label. This is visualized in the saliency maps where HCLU perturbations target different regions than standard High Confidence (HC) attacks.
Transferability and the "Silent" Attack
Attacks optimized on a Gaussian Process successfully transferred to BNNs. While BNNs usually show high uncertainty for standard adversarial examples, they exhibited low uncertainty for HCLU examples, even when the classification was incorrect. Unlike standard attacks which often inadvertently increase model uncertainty, HCLU attacks are "silent," bypassing the monitoring systems designed to catch them.
Conclusion
Our findings suggest that predictive variance in Bayesian models is not a foolproof defense against motivated adversaries. Because uncertainty measures can be systematically subverted while maintaining visual similarity to the original input, the community must develop more robust detection methods that do not rely solely on model uncertainty. Future work will focus on scaling these optimization techniques to multi-class problems and larger datasets.
Summary updated