Prior Convictions: Black-Box Adversarial Attacks with Bandits and Priors

Andrew Ilyas, Logan Engstrom, Aleksander Madry

Abstract

Generating black-box adversarial examples typically requires a prohibitively large number of model queries. We demonstrate that while current gradient estimation methods are mathematically optimal under standard assumptions, their efficiency can be significantly improved by incorporating prior information. We introduce a bandit optimization framework that leverages spatial and temporal correlations in gradients. Our resulting attacks, Bandits$_{TD}$, achieve a 2-4x reduction in query complexity and significantly lower failure rates compared to previous state-of-the-art methods.

Introduction

Deep neural networks are notoriously vulnerable to adversarial examples—small, carefully crafted perturbations that trigger misclassification. While white-box attacks like Projected Gradient Descent (PGD) are highly effective, they require direct access to model gradients. In practical scenarios, attackers often face a black-box setting, limited to querying the model for loss or confidence scores.

The primary challenge in black-box attacks is query efficiency. Estimating gradients in high-dimensional spaces, such as ImageNet images with hundreds of thousands of pixels, typically requires an immense number of queries. This makes attacks slow and easily detectable. This work addresses the fundamental question: how can we drastically reduce the query complexity of black-box adversarial attacks?

Methodology: Breaking the Optimality Ceiling

The authors first prove that the current state-of-the-art method, Natural Evolution Strategies (NES), is equivalent to least-squares gradient estimation. Under the assumption that the target gradient is an arbitrary, unknown vector, least-squares is mathematically optimal. To surpass this limit, we must change the underlying assumptions: gradients are not arbitrary.

We propose a bandit optimization framework that integrates two key priors:

  1. Time-dependent priors: Iterative attacks exhibit high correlation between gradients at successive steps. We maintain a latent vector to carry this directional information forward.
  2. Data-dependent priors: Gradients of image classifiers exhibit spatial locality, similar to the images themselves. We exploit this by "tiling" (average-pooling) the gradient, reducing the search space dimensionality without significant loss in accuracy.

The framework treats gradient estimation as an online game, using a two-query spherical gradient estimator to update a latent "prior" vector, which is then projected back into the valid perturbation space.

Key Insights

The success of this approach rests on two empirical observations:

  • Gradients Mirror Image Structure: The data-dependent prior reveals that classifier gradients share the spatial structure of the input image. Blurring or pooling these gradients into large tiles still yields a vector pointing in a useful adversarial direction.
  • Temporal Persistence: During a PGD attack, the cosine similarity between gradients at step $t$ and $t+1$ is remarkably high (~0.9). Previous methods discarded this information at each step, leading to massive query waste.
Cosine similarity between successive gradients over attack steps.

Experimental Results

The attacks were evaluated on 10,000 ImageNet validation images targeting Inception-v3, ResNet-50, and VGG16 models. The proposed method, Bandits$_{TD}$, strictly outperformed NES across both $L_\infty$ and $L_2$ threat models.

Comparison of query efficiency and failure rates between NES and Bandit-based attacks.

Key findings include:

  • Reduced Failure Rates: On Inception-v3 ($L_\infty$), Bandits$_{TD}$ reduced the failure rate from 22.2% (NES) to just 4.6%.
  • Query Efficiency: For successful $L_\infty$ attacks, Bandits$_{TD}$ required an average of 1,117 queries compared to 1,735 for NES. On images where both succeeded, Bandits$_{TD}$ achieved a ~2.5x speedup (703 queries vs 1,735).
  • $L_2$ Robustness: Similar improvements were seen in the $L_2$ model, with failure rates dropping from 34.4% to 15.5%.

Conclusion and Future Work

By framing black-box attacks as a bandit optimization problem, we can leverage structural priors to break through the theoretical limits of standard zeroth-order optimization. While the current "tiling" prior is image-specific, the bandit framework is general. Future work involves identifying priors for other domains like audio or text and applying these techniques to broader fields like reinforcement learning where gradient estimation is a core bottleneck.

Summary updated

BibTeX
@inproceedings{ilyas2019prior,
  author = {Andrew Ilyas and Logan Engstrom and Aleksander Madry},
  title = {{Prior Convictions: Black-Box Adversarial Attacks with Bandits and Priors}},
  booktitle = {International Conference on Learning Representations},
  year = {2019},
  url = {https://openreview.net/forum?id=YFLCyW6OExE},
}
Figure