Abstract
Deep neural networks (DNNs) are one of the most prominent technologies of our time, achieving state-of-the-art performance in many machine learning tasks. However, recent research has indicated ever-increasing concern on the robustness to adversarial examples. Studies have unveiled the vulnerability of a well-trained DNN by demonstrating the ability of generating barely noticeable adversarial images that lead to misclassification. Furthermore, researchers have shown that these adversarial images are highly transferable by simply training and attacking a substitute model built upon the target model, known as a black-box attack. In this paper, we propose an effective black-box attack that only has access to the input images and output confidence scores of a targeted DNN. Different from leveraging attack transferability, we propose zeroth order optimization (ZOO) based attacks to directly estimate the gradients of the targeted DNN. We use zeroth order stochastic coordinate descent along with dimension reduction, hierarchical attack, and importance sampling techniques to efficiently attack black-box models. Experimental results on MNIST, CIFAR10, and ImageNet show that the proposed ZOO attack is as effective as state-of-the-art white-box attacks and significantly outperforms existing black-box attacks via substitute models.
1. Introduction
Deep Neural Networks (DNNs) are notoriously vulnerable to adversarial examples—images subtly tweaked to fool a classifier. Most powerful attacks are "white-box," meaning the attacker has full access to the model's internal weights and can use backpropagation to calculate exactly how to change pixels to cause a misclassification.
In the real world, however, models are often "black-boxes" hidden behind APIs (like Clarifai or Google Cloud Vision). Previous black-box attacks relied on transferability: an attacker trains their own "substitute" model to mimic the target, attacks that substitute, and hopes the same tricks work on the original. This is often inefficient, fails to scale to large datasets like ImageNet, and loses effectiveness during the "transfer" process. This paper asks: Can we attack the black-box directly by estimating its gradients from the outside?
2. Methodology: Zeroth Order Optimization (ZOO)
The authors propose ZOO (Zeroth Order Optimization). Instead of using backpropagation (which requires internal access), they estimate the gradient of the loss function by slightly perturbing individual pixels and observing the change in the output confidence scores.
2.1 Key Innovations
- Zeroth-Order Gradient Estimation: The symmetric difference quotient is used to estimate the derivative of each pixel. By nudging a pixel up and down and observing score changes, the "direction" of the attack is found.
- ZOO-ADAM & ZOO-Newton: Popular optimization algorithms (ADAM and Newton's Method) are adapted to work with these estimated gradients.
- Attack-space Dimension Reduction: To handle high-resolution images (e.g., 299x299), the attack optimizes a smaller "noise image" (e.g., 32x32) and uses bilinear upscaling to apply it to the full-sized image.
- Hierarchical Attack: The attack starts at a low resolution and gradually increases, refining the adversarial noise as it goes.
- Importance Sampling: Instead of random updates, pixels near the main object are prioritized, where changes are most effective.
3. Experimental Evaluation
The researchers evaluated ZOO on three standard benchmarks:
- MNIST: Handwritten digits (28x28 pixels).
- CIFAR10: Small color images of 10 categories (32x32 pixels).
- ImageNet: Large-scale, high-resolution images. Specifically, they targeted the Inception-v3 model, a massive network that was previously considered very difficult to attack in a black-box setting.
4. Results and Key Insights
ZOO achieved a 100% success rate for untargeted attacks on MNIST and CIFAR10, and nearly 90% on ImageNet within just 1,500 iterations (approx. 20 minutes per image). The $L_2$ distortion (how much the image was changed) was significantly lower than previous substitute-model attacks. In many cases, the adversarial noise is completely invisible to the human eye.
4.1 Key Insights
- Direct is Better than Transfer: Directly estimating gradients avoids the "transferability gap" where an attack works on the substitute but fails on the target.
- The Power of Log-Probabilities: Performing optimization in the log-space of confidence scores prevents gradients from vanishing, making the attack much more stable.
- Efficiency via Sparsity: Using stochastic coordinate descent (updating small batches of pixels) makes the attack computationally feasible even for large images.
- Hessians for "Free": The authors show that you can estimate the curvature (Hessian) of the loss function with just one additional function evaluation, allowing for second-order optimization in a black-box setting.
5. Conclusion
While ZOO is much faster than naive estimation, it still requires thousands of queries to the model API. However, ZOO's performance is nearly identical to the Carlini & Wagner (C&W) attack, which is widely considered the strongest white-box attack available. This demonstrates that black-box models are significantly more vulnerable than previously thought, and ZOO can be used to improve "adversarial training" to build more robust models.
Summary updated