HopSkipJumpAttack: A Query-Efficient Decision-Based Attack

Jianbo Chen, Michael I. Jordan, Martin J. Wainwright

Abstract

Decision-based adversarial attacks represent the most restrictive black-box setting, where an attacker only has access to the final predicted label of a model. While previous methods like the Boundary Attack demonstrated feasibility, they suffered from extreme query inefficiency. This paper introduces HopSkipJumpAttack (HSJA), a novel algorithm that utilizes an unbiased estimate of the gradient direction at the decision boundary. HSJA significantly reduces the query budget required for successful attacks across various datasets and architectures, outperforming existing state-of-the-art methods by orders of magnitude.

1. Introduction: The Decision-Based Attack Landscape

Adversarial attacks on machine learning models are typically categorized by the level of information available to the attacker. White-box attacks assume full knowledge of the model's architecture and weights, allowing for direct gradient-based optimization. Black-box attacks are more realistic, further divided into score-based (where class probabilities are visible) and decision-based (where only the final label is visible).

Comparison of attack settings: White-box, Score-based, and Decision-based (label-only).

Decision-based attacks are the most challenging because the feedback is binary (correct/incorrect label). Previous approaches, such as the "Boundary Attack," relied on heuristic random walks along the decision boundary. While effective at finding perturbations, these methods often require hundreds of thousands of queries, making them impractical for real-world systems with rate limits. HopSkipJumpAttack (HSJA) addresses this by providing a mathematically grounded framework for gradient estimation using only label feedback.

2. The HopSkipJumpAttack Algorithm

The core of HSJA is an iterative optimization process designed to find the minimum perturbation required to change a model's prediction. Each iteration consists of three primary phases:

  1. Boundary Search: Starting from a point $\tilde{x}_t$ that is already adversarial (i.e., has the wrong label), the algorithm uses a binary search to find a point $x_t$ exactly on the decision boundary between the original image and the target class.
  2. Gradient Direction Estimation: This is the critical innovation of HSJA. Since the model is a black box, the gradient cannot be computed directly. Instead, HSJA uses a Monte Carlo estimate by sampling random noise around the boundary point $x_t$. By observing which noisy samples result in a label change, the algorithm constructs an unbiased estimate of the gradient direction.
  3. Step-Size Search: The image is updated along the estimated gradient direction. A geometric progression search is then employed to find the optimal step size that moves the point closer to the original image while remaining adversarial.
The iterative steps of HopSkipJumpAttack: boundary search, gradient estimation, and step size update.

Unlike previous heuristics, HSJA's gradient estimate is theoretically proven to be asymptotically unbiased. The authors also include variance reduction techniques to stabilize the estimation when the point is not perfectly on the boundary.

3. Experimental Evaluation

The authors evaluated HSJA across several standard benchmarks, including MNIST, CIFAR-10, CIFAR-100, and ImageNet. The attack was tested against various architectures such as ResNets and DenseNets, as well as models protected by defensive distillation and adversarial training.

3.1 Key Results

  • Efficiency: HSJA demonstrates a significant leap in query efficiency. On CIFAR-10, it achieves a median $\ell_2$ distance of 0.559 with only 1,000 queries. In contrast, the Boundary Attack requires approximately 20,000 queries to reach the same level of perturbation.
  • Targeted Attacks: The algorithm is highly effective at targeted attacks. On high-resolution ImageNet data, HSJA can craft human-indistinguishable targeted examples within 1,000 to 2,000 queries.
  • Defeating Defenses: Because HSJA relies on sampling rather than local derivatives, it is immune to "gradient masking" defenses. It successfully bypassed Adversarial Training (Madry et al.) and Region-based Classification with success rates exceeding 80% on MNIST.

4. Discussion and Insights

A key insight of this work is that binary feedback is sufficient to recover the geometric direction of the decision boundary. Furthermore, the error in HSJA's gradient estimate is largely independent of the input dimensionality, explaining its robust performance on high-resolution images where other black-box methods fail.

While HSJA is highly effective, its performance can be impacted by stochastic defenses that introduce randomness into model outputs, as this interferes with the precision of the binary boundary search. Future work may involve combining HSJA with transfer-based attacks—using a local surrogate model to provide an initial gradient estimate—to further reduce the query budget into the low hundreds.

5. Conclusion

HopSkipJumpAttack represents a major advancement in making black-box attacks practical. By transforming the decision-based attack into a query-efficient optimization problem with unbiased gradient estimation, it demonstrates that even the most restrictive "label-only" interfaces are vulnerable to sophisticated adversarial techniques.

Summary updated

BibTeX
@inproceedings{chen2020hopskipjumpattack,
  author = {Jianbo Chen and Michael I. Jordan and Martin J. Wainwright},
  title = {{HopSkipJumpAttack: A Query-Efficient Decision-Based Attack}},
  booktitle = {SP},
  year = {2020},
  doi = {10.1109/sp40000.2020.00045},
}
Figure