Black-box Bayesian adversarial attack with transferable priors

Shudong Zhang, Haichang Gao, Chao Shu, Xiwen Cao, Yunyi Zhou, Jianping He

Abstract

Deep Neural Networks (DNNs) are notoriously vulnerable to adversarial examples, but black-box scenarios—where the attacker lacks access to model internals—pose a significant challenge due to the high query costs required to find successful perturbations. This paper introduces BO-ATP (BayesOpt attack with transferable priors), a highly query-efficient black-box attack. By combining transfer learning with Bayesian Optimization, BO-ATP searches for perturbations in a low-dimensional latent space learned from source models. Experimental results on ImageNet and CIFAR-10 demonstrate that BO-ATP achieves high success rates with an order of magnitude fewer queries than previous state-of-the-art methods, often requiring as few as 2 to 4 queries for untargeted attacks on ImageNet.

Introduction

The security of Deep Neural Networks (DNNs) is a critical concern, particularly their susceptibility to adversarial examples—inputs specifically crafted to trigger misclassification. In "white-box" settings, where the attacker knows the model's weights, generating these examples is straightforward using gradient-based methods. However, real-world attacks are typically "black-box," where the attacker can only observe the model's output for a given input.

The primary challenge in black-box attacks is query efficiency. Existing methods often rely on local gradient estimation or random searches, which are slow, expensive, and easily detected by rate-limiting defenses. BO-ATP addresses this gap by leveraging prior knowledge from known models to make the search for adversarial perturbations significantly smarter and faster.

Methodology: The BO-ATP Framework

The authors propose a two-stage attack named BayesOpt attack with transferable priors (BO-ATP). This approach shifts the search from the massive pixel space to a more manageable latent representation.

1. Learning Transferable Priors

Instead of searching in the high-dimensional pixel space (e.g., $224 \times 224 \times 3$ for ImageNet), the authors train a generator (an encoder-decoder architecture) on several "source" models. These source models are white-box models available to the attacker. The generator learns a mapping from a low-dimensional latent space to effective adversarial perturbations. This ensures the search starts in a region where perturbations are already likely to be "transferable" across different models, providing a significant "warm start."

2. Bayesian Optimization in Latent Space

Once the latent space is defined, the attack uses Bayesian Optimization (BayesOpt) to find the specific point in that space that fools the target black-box model.

  • Surrogate Model: They use a Gaussian Process (GP) to model the relationship between latent perturbations and the target model's output scores. Unlike gradient-estimation methods that "forget" previous queries once a local step is taken, the Bayesian approach utilizes the information from every single past query to refine its surrogate model.
  • Acquisition Function: They use the Upper Confidence Bound (UCB) to decide where to query next, effectively balancing "exploitation" (searching near known good perturbations) and "exploration" (searching in uncertain areas).

By compressing the search space into a tiny latent vector (e.g., $3 \times 14 \times 14$ for ImageNet), the "curse of dimensionality" is mitigated, allowing the Gaussian Process to converge much faster.

Experimental Evaluation

The authors evaluated BO-ATP on three standard computer vision benchmarks: MNIST, CIFAR-10, and ImageNet. They used various architectures (ResNet, VGG, DenseNet, etc.) as both source models and target models.

Key Results

The results demonstrate a massive leap in efficiency:

  • Query Count: On ImageNet (untargeted), BO-ATP required an average of only 2 to 4 queries to succeed, compared to dozens or hundreds for methods like TREMBA or Square Attack.
  • Success Rate: Even with a strict budget of only 1,000 queries, BO-ATP achieved nearly 100% Attack Success Rate (ASR) on most untargeted tasks.
  • Targeted Attacks: In the much harder "targeted" attack setting, BO-ATP remained highly efficient, often requiring 10x to 20x fewer queries than competing methods like SimBA.
  • Breaking Defenses: The attack successfully bypassed "Adversarial Training" (PGD-AT and TRADES), which are currently considered the strongest defenses against adversarial examples.

Discussion and Limitations

While BO-ATP is highly effective, it has certain limitations:

  • Computational Overhead: Gaussian Processes have a computational complexity of $O(n^3)$ relative to the number of queries ($n$). While this is acceptable for the low query counts BO-ATP targets, the method would become computationally sluggish if tens of thousands of queries were required.
  • Source Model Dependency: The effectiveness of the "transferable prior" depends on the diversity and quality of the source models used to train the generator. If the target model is radically different from the source models, the efficiency might drop.

Conclusion

BO-ATP represents a significant step forward in black-box adversarial research. By utilizing the entire history of queries and leveraging transferable priors, it achieves unprecedented efficiency. Future directions include exploring different kernels for the Gaussian Process or more advanced acquisition functions to further improve performance in extremely high-dimensional tasks.

Summary updated

BibTeX
@article{zhang2024black,
  author = {Shudong Zhang and Haichang Gao and Chao Shu and Xiwen Cao and Yunyi Zhou and Jianping He},
  title = {{Black-box Bayesian adversarial attack with transferable priors}},
  journal = {Machine Learning},
  year = {2024},
  doi = {10.1007/s10994-022-06251-3},
}
Figure