QUERY-EFFICIENT HARD-LABEL BLACK-BOX ATTACK: AN OPTIMIZATION-BASED APPROACH
Year: 2019

Abstract:
We study the problem of attacking machine learning models in the hard-label black-box setting, where no model information is revealed except that the attacker can make queries to probe the corresponding hard-label decisions. This is a very challenging problem since the direct extension of state-of-the-art white-box attacks (e.g., C&W or PGD) to the hard-label black-box setting will require minimizing a non-continuous step function, which is combinatorial and cannot be solved by a gradient-based optimizer. The only two current approaches are based on random walk on the boundary (Brendel et al., 2017) and random trials to evaluate the loss function (Ilyas et al., 2018), which require lots of queries and lacks convergence guarantees. We propose a novel way to formulate the hard-label black-box attack as a real-valued optimization problem which is usually continuous and can be solved by any zeroth order optimization algorithm, such as randomized gradientfree method (Nesterov & Spokoiny, 2017). We demonstrate that our proposed method outperforms the previous stochastic approaches to attacking convolutional neural networks on MNIST, CIFAR, and ImageNet datasets. More interestingly, the proposed algorithm can also be used to attack other discrete and non-continuous machine learning models, such as Gradient Boosting Decision Trees.

text: We study the problem of attacking machine learning models in the hard-label black-box setting, where no model information is revealed except that the attacker can make queries to probe the corresponding hard-label decisions. This is a very challenging problem since the direct extension of state-of-the-art white-box attacks (e.g., C&W or PGD) to the hard-label black-box setting will require minimizing a non-continuous step function, which is combinatorial and cannot be solved by a gradient-based optimizer. The only two current approaches are based on random walk on the boundary (Brendel et al., 2017) and random trials to evaluate the loss function (Ilyas et al., 2018), which require lots of queries and lacks convergence guarantees. We propose a novel way to formulate the hard-label black-box attack as a real-valued optimization problem which is usually continuous and can be solved by any zeroth order optimization algorithm, such as randomized gradientfree method (Nesterov & Spokoiny, 2017). We demonstrate that our proposed method outperforms the previous stochastic approaches to attacking convolutional neural networks on MNIST, CIFAR, and ImageNet datasets. More interestingly, the proposed algorithm can also be used to attack other discrete and non-continuous machine learning models, such as Gradient Boosting Decision Trees.

heading: 1 INTRODUCTION
text: It has been observed recently that machine learning algorithms, especially deep neural networks, are vulnerable to adversarial examples (Goodfellow et al., 2014; Szegedy et al., 2013; Moosavi-Dezfooli et al.; Moosavi Dezfooli et al., 2016; Chen et al., 2018a; Cheng et al., 2018). For example, in image classification problems, attack algorithms (Carlini & Wagner, 2017; Goodfellow et al., 2014; Chen et al., 2017) can find adversarial examples for almost every image with very small humanimperceptible perturbation. The problem of finding an adversarial example can be posed as solving an optimization problem—within a small neighbourhood around the original example, find a point to optimize the cost function measuring the “successfulness” of an attack. Solving this objective function with gradient-based optimizer leads to state-of-the-art attacks (Carlini & Wagner, 2017; Goodfellow et al., 2014; Chen et al., 2017; Szegedy et al., 2013; Madry et al., 2018).
Most current attacks (Goodfellow et al., 2014; Carlini & Wagner, 2017; Szegedy et al., 2013; Chen et al., 2018b) consider the “white-box” setting, where the machine learning model is fully exposed to the attacker. In this setting, the gradient of an attacking objective function can be computed by back-propagation, so attacks can be done very easily. This white-box setting is clearly unrealistic when the model parameters are unknown to an attacker. Instead, several recent works consider the “score-based black-box” setting, where the machine learning model is unknown to the attacker, but it is possible to make queries to obtain the corresponding probability outputs of the model (Chen et al., 2017; Ilyas et al., 2018). However, in many cases real-world models will not provide probability outputs to users. Instead, only the final decision (e.g., top-1 predicted class) can be observed. It is therefore interesting to show whether machine learning model is vulnerable in this setting.
Furthermore, existing gradient-based attacks cannot be applied to some non-continuous machine learning models which involve discrete decisions. For example, the robustness of decision-tree based models (random forest and gradient boosting decision trees (GBDT)) cannot be evaluated using gradient-based approaches, since the gradient of these functions may not exist.
In this paper, we develop an optimization-based framework for attacking machine learning models in a more realistic and general “hard-label black-box” setting. We assume that the model is not revealed and the attacker can only make queries to acquire the corresponding hard-label decision instead of the probability outputs (also known as soft labels).
We make hard-label black-box attacks query-efficient by reformulating the attack as a novel realvalued optimization problem, which is usually continuous and much easier to solve. Although the objective function of this reformulation cannot be written in an analytical form, we show how to use (hard-label) model queries to evaluate its function value and thus any zeroth order optimization algorithm can be applied to solve it. In the experiments, we show our algorithm can be successfully used to attack hard-label black-box CNN models on MNIST, CIFAR, and ImageNet with far less number of queries compared to the state-of-art algorithm both in L2 and L∞ metric.
Moreover, since our algorithm does not depend on the gradient of the classifier, we can apply it to attack other non-differentiable classifiers besides neural networks. We show an interesting application in attacking Gradient Boosting Decision Tree, which cannot be attacked by all the existing gradientbased methods even in the white-box setting. Our method can successfully find adversarial examples with imperceptible perturbations for a GBDT within 30,000 queries.

heading: 2 BACKGROUND AND RELATED WORK
text: We will first introduce our problem setting and give a brief literature review to highlight the difficulty of attacking hard-label black-box models. Problem Setting For simplicity, we consider attacking a K-way multi-class classification model in this paper. Given the classification model f : Rd → {1, . . . ,K} and an original example x0, the goal is to generate an adversarial example x such that
x is close to x0 and f(x) 6= f(x0) (i.e., x is misclassified by model f .) (1)
White-box attacks Most attack algorithms in the literature consider the white-box setting, where the classifier f is exposed to the attacker. For neural networks, under this assumption, backpropagation can be conducted on the target model because both network structure and weights are known by the attacker. For classification models in neural networks, it is usually assumed that f(x) = argmaxi(Z(x)i), where Z(x) ∈ RK is the final (logit) layer output, and Z(x)i is the prediction score for the i-th class. The objectives in (1) can then be naturally formulated as the following optimization problem:
argmin x
{Dis(x,x0) + cL(Z(x))} := h(x), (2)
where Dis(·, ·) is some distance measurement (e.g., L2, L1 or L∞ norm in Euclidean space), L(·) is the loss function corresponding to the goal of the attack, and c is a balancing parameter. For untargeted attack, where the goal is to make the target classifier misclassify, the loss function can be defined as
L(Z(x)) = max{[Z(x)]y0 −max i 6=y0 [Z(x)]i,−κ}, (3)
where y0 is the original label predicted by the classifier, κ is the margin (usually set to be 1 or 0) of the hinge loss. For targeted attack, where the goal is to turn it into a specific target class t, the loss function can also be defined accordingly.
Therefore, attacking a machine learning model can be posed as solving this optimization problem (Carlini & Wagner, 2017; Chen et al., 2018b), which is also known as the C&W attack or the EAD attack depending on the choice of the distance measurement. To solve (2), one can apply any gradient-based optimization algorithm such as SGD or Adam, since the gradient of L(Z(x)) can be computed via back-propagation.
The ability of computing gradient also enables many different attacks in the white-box setting. For example, eq (2) can also be turned into a constrained optimization problem, which can then
be solved by projected gradient descent (PGD) (Madry et al., 2018). FGSM (Goodfellow et al., 2014) is the special case of one step PGD with L∞ norm distance. Other algorithms such as Deepfool (Moosavi Dezfooli et al., 2016) also solve similar optimization problems to construct adversarial examples.
Previous work on black-box attack In real-world systems, usually the underlying machine learning model will not be revealed and thus white-box attacks cannot be applied. This motivates the study of attacking machine learning models in the black-box setting, where attackers do not have any information about the function f . And the only valid operation is to make queries to the model and acquire the corresponding output f(x). The first approach for black-box attack is using transfer attack (Papernot et al., 2017) – instead of attacking the original model f , attackers try to construct a substitute model f̂ to mimic f and then attack f̂ using white-box attack methods. This approach has been well studied and analyzed in (Liu et al., 2017; Bhagoji et al., 2017). However, recent papers have shown that attacking the substitute model usually leads to much larger distortion and low success rate (Chen et al., 2017). Therefore, instead, (Chen et al., 2017) considers the score-based black-box setting, where attackers can use x to query the softmax layer output in addition to the final classification result. In this case, they can reconstruct the loss function (3) and evaluate it as long as the objective function h(x) exists for any x. Thus a zeroth order optimization approach can be directly applied to minimize h(x). (Tu et al., 2018) further improves the query complexity of (Chen et al., 2017) by introducing an autoencoder-based approach to reduce query counts and an adaptive random gradient estimation to balance query counts and distortion.
Difficulty of hard-label black-box attacks Throughout this paper, the hard-label black-box setting refers to cases where real-world ML systems only provide limited prediction results of an input query. Specifically, only the final decision (top-1 predicted label) instead of probability outputs is known to an attacker.
Attacking in this setting is indeed very challenging. In Figure 1a, we show a simple 3-layer neural network’s decision boundary. Note that the L(Z(x)) term is continuous as in Figure 1b because the logit layer output is real-valued functions. However, in the hard-label black-box setting, only f(·) is available instead of Z(·). Since f(·) can only be a one-hot vector, if we plug-in f into the loss function, L(f(x)) (as shown in Figure 1c) will be discontinuous and with discrete outputs.
Optimizing this function will require combinatorial optimization or search algorithms, which is challenging given the high dimensionality of the problem. The only two current approaches (Brendel et al., 2017; Ilyas et al., 2018) are based on random-walk on the boundary and random trails on the loss function. Although these “Boundary attack” and “Limited attack” can find adversarial examples with comparable distortion with white-box attacks, they need lots of queries to explore the high-dimensional space and lack convergence guarantees. We show that our optimization-based algorithm can significantly reduce the number of queries, and has guaranteed convergence in the number of iterations (queries) when the objective function is lipschitz smooth.

heading: 3 ALGORITHMS
text: Now we introduce a novel way to re-formulate hard-label black-box attack as another optimization problem, show how to evaluate the function value using hard-label queries, and then apply a zeroth order optimization algorithm to solve it.

heading: 3.1 A BOUNDARY-BASED RE-FORMULATION
text: For a given example x0, true label y0 and the hard-label black-box function f : Rd → {1, . . . ,K}, we define our objective function g : Rd → R depending on the type of attack:
Untargeted attack: g(θ) = min λ>0
λ s.t f(x0 + λ θ
||θ|| ) 6= y0 (4)
Targeted attack (given target t): g(θ) = min λ>0
λ s.t f(x0 + λ θ
||θ|| ) = t (5)
In this formulation, θ represents the search direction and g(θ) is the distance from x0 to the nearest adversarial example along the direction θ. The difference between (4) and (5) corresponds to the different definitions of “successfulness” in untargeted and targeted attack, where the former one aims to turn the prediction into any incorrect label and the later one aims to turn the prediction into the target label. For untargeted attack, g(θ) also corresponds to the distance to the decision boundary along the direction θ. In image problems the input domain of f is bounded, so we will impose corresponding upper/lower bounds in the definition of (4) and (5).
Instead of searching for an adversarial example, we search the direction θ to minimize the distortion g(θ), which leads to the following optimization problem:
min θ g(θ). (6)
Finally, the adversarial example can be found by x∗ = x0 + g(θ∗) θ ∗
‖θ∗‖ , where θ ∗ is the optimal solution of (6).
Note that unlike the C&W or PGD objective functions, which are discontinuous step functions in the hard-label setting (see Section 2), g(θ) maps input direction to real-valued output (distance to decision boundary), which is usually continuous – a small change of θ usually leads to a small change of g(θ), as can be seen from Figure 2.
Moreover, we give three examples of f(x) defined in two dimension input space and their corresponding g(θ). In Figure 3a, we have a continuous classification function defined as follows
f(x) = { 1, if ‖x‖22 ≥ 0.4 0, otherwise.
In this case, as shown in Figure 3c, g(θ) is continuous. Moreover, in Figure 3b and Figure 1a, we show decision boundaries generated by GBDT and neural network classifier, which are not continuous. However, as showed in Figure 3d and Figure 1d, even if the classifier function is not continuous, g(θ) is still continuous. This makes it easy to apply zeroth order method to solve (6).
Compute g(θ) up to certain accuracy. We are not able to evaluate the gradient of g, but we can evaluate the function value of g using the hard-label queries to the original function f . For simplicity, we focus on untargeted attack here, but the same procedure can be applied to targeted attack as well.
First, we discuss how to compute g(θ) directly without additional information. This is used in the initialization step of our algorithm. For a given normalized θ, we do a coarse-grained search and then a binary search. In coarse-grained search, we query the points {x0 + αθ,x0 + 2αθ, . . . } one by one until we find f(x+ iαθ) 6= y0. This means the boundary lies between [x0 + (i− 1)αθ,x0 + iαθ]. We then enter the second phase and conduct a binary search to find the solution within this region (same with line 11–17 in Algorithm 1). Note that there is an upper bound of the first stage if we
choose θ by the direction of x− x0 with some x from another class. This procedure is used to find the initial θ0 and corresponding g(θ0) in our optimization algorithm. We omit the detailed algorithm for this part since it is similar to Algorithm 1.
Next, we discuss how to compute g(θ) when we know the solution is very close to a reference point v. This is used in all the function evaluations in our optimization algorithm, since the current solution is usually close to the previous solution, and when we estimate the gradient using (7), the queried direction will only be a slight modification of the previous one. In this case, we first increase or decrease v in the local region to find the interval that contains the nearby boundary (e.g, f(x0 + vθ) = y0 and f(x0 + v′θ) 6= y0), then conduct a binary search to find the final value of g. Our procedure for computing the g value is presented in Algorithm 1.
Algorithm 1 Compute g(θ) locally 1: Input: Hard-label model f , original image x0, query direction θ, previous solution v, in-
crease/decrease ratio α = 0.01, stopping tolerance (maximum tolerance of computed error) 2: θ ← θ/||θ|| 3: if f(x0 + vθ) = y0 then 4: vleft ← v, vright ← (1 + α)v 5: while f(x0 + vrightθ) = y0 do 6: vright ← (1 + α)vright 7: else 8: vright ← v, vleft ← (1− α)v 9: while f(x0 + vleftθ) 6= y0 do
10: vleft ← (1− α)vleft 11: ## Binary Search within [vleft, vright] 12: while vright − vleft > do 13: vmid ← (vright + vleft)/2 14: if f(x0 + vmidθ) = y0 then 15: vleft ← vmid 16: else 17: vright ← vmid 18: return vright

heading: 3.2 HARD-LABEL BLACK-BOX ATTACKS WITH L∞ NORM CONSTRAINT
text: Although we could let ‖θ‖ = ‖θ‖∞ in (4) and (5) directly, g(θ) will be harder to optimize in practice because of introducing the max term in ‖ · ‖∞. Instead, with an L∞ constraint ε , we design a smooth approximation loss as follows:
Untargeted attack: g(θ) = min λ { d∑ i=1 (max{λ |θi| ‖θ‖∞ − ε, 0})2} s.t f(x0 + λ θ ‖θ‖∞ ) 6= y0
Targeted attack: g(θ) = min λ { d∑ i=1 (max{λ |θi| ‖θ‖∞ − ε, 0})2} s.t f(x0 + λ θ ‖θ‖∞ ) = t.
Here θi is the i-th coordinate of θ. Notably, when λ ≤ ε, we have g(θ) = 0. That’s to say, we have obtained a legitimate θ to make a valid adversarial example x0 + λ∗ θ‖θ‖∞ .

heading: 3.3 ZEROTH ORDER OPTIMIZATION
text: To solve the optimization problem (6) for which we can only evaluate function value instead of gradient, zeroth order optimization algorithms can be naturally applied. In fact, after the reformulation, the problem can be potentially solved by any zeroth order optimization algorithm, like zeroth order gradient descent, genetic algorithm (Alzantot et al., 2018) or coordinate descent (see Conn et al. (2009) for a comprehensive survey).
Here we propose to solve (1) using Randomized Gradient-Free (RGF) method proposed in (Nesterov & Spokoiny, 2017; Ghadimi & Lan, 2013). In practice, we found it outperforms zeroth-order coordinate descent. At each iteration, the gradient is estimated by
ĝ = g(θ + βu)− g(θ)
β · u (7)
Algorithm 2 RGF for hard-label black-box attack 1: Input: Hard-label model f , original image x0, initial θ0. 2: for t = 0, 1, 2, . . . , T do 3: Randomly choose ut from a zero-mean Gaussian distribution 4: Evaluate g(θt) and g(θt + βu) using Algorithm 1
5: Compute ĝ = g(θt + βu)− g(θt)
β · u
6: Update θt+1 = θt − ηtĝ 7: return x0 + g(θT )θT
where u is a random Gaussian vector, and β > 0 is a smoothing parameter (we set β = 0.005 in all our experiments). The solution is then updated by θ ← θ − ηĝ with a step size η. The procedure is summarized in Algorithm 2.
Also, if g(θ) is Lipschitz-smooth, we are able to bound the number of iterations needed with O( dδ2 ) for our algorithm to achieve stationary points. See the appendix for details.

heading: 3.3.1 IMPLEMENTATION DETAILS
text: There are several implementation details when we apply this algorithm. First, for high-dimensional problems, we found the estimation in (7) is very noisy. Therefore, instead of using one vector, we sample q vectors from Gaussian distribution and average their estimators to get ĝ. We set q = 20 in all the experiments. Second, instead of using a fixed step size (suggested in theory), we use a backtracking line-search approach to find step size at each step. This leads to additional query counts, but makes the algorithm more stable and eliminates the need to hand-tuning the step size. Third, instead of using a random direction θ as initialization, we sample t vectors from Gaussian distribution and choose the one with smallest g(θ) as our initialization. It helps us to find a good initialization direction and thus get a smaller distortion in the end with limited number of additional queries. We set t = 100 in all the experiments.

heading: 4 EXPERIMENTAL RESULTS
text: We test the performance of our hard-label black-box attack algorithm on convolutional neural network (CNN) models and compare with Boundary attack (Brendel et al., 2017), Limited attack (Ilyas et al., 2018) and a random trail baseline. Furthermore, we show our method can be applied to attack Gradient Boosting Decision Tree (GBDT) and present some interesting findings.

heading: 4.1 ATTACKING CNN IMAGE CLASSIFICATION MODELS
text: We use three standard datasets: MNIST (LeCun et al., 1998), CIFAR-10 (Krizhevsky, 2009) and ImageNet-1000 (Deng et al., 2009). To have a fair comparison with previous work, we adopt the same networks used in both Carlini & Wagner (2017) and Brendel et al. (2017). In detail, both MNIST and CIFAR use the same network structure with four convolution layers, two max-pooling layers and two fully-connected layers. Using the parameters provided by Carlini & Wagner (2017), we could achieve 99.5% test accuracy on MNIST and 82.5% test accuracy on CIFAR-10, which is similar to accuracy reported in Carlini & Wagner (2017). For Imagenet-1000, we use the pretrained network Resnet-50 (He et al., 2016) and Inception-V3 (Szegedy et al., 2016) provided by torchvision1, which could achieve 76.15% and 77.45 % top-1 test accuracy respectively. For simplicity, all images are normalized into [0, 1]d scale. All models are trained using Pytorch and our source code is publicly available2.
We include the following algorithms for comparisons in attacking performance:
• Opt-based black-box attack (Opt-attack): our proposed algorithm. • Boundary black-box attack (Brendel et al., 2017) (Boundary-attack): first work on attacking
hard-label black box model in L2 distance metric. We use the authors’ implementation and the parameters provided in Foolbox3.
1https://github.com/pytorch/vision/tree/master/torchvision 2https://github.com/LeMinhThong/blackbox-attack 3https://github.com/bethgelab/foolbox
• Limited black-box attack (Ilyas et al., 2018) (Limited-attack): previous work on targeted blackbox attack in L∞ distance constraint in the hard-label setting. We use the authors’ implementation and the parameters provided in Github4. • C&W white-box attack (Carlini & Wagner, 2017): one of the current state-of-the-art attacking algorithm in the white-box setting. We do binary search on parameter c per image to achieve the best performance. Attacking in the white-box setting is a much easier problem, so we include C&W attack just for reference and indicate the best performance we can possibly achieve. • Random distortion: we use 300,000 and 480,000 i.i.d random directions as the baseline. We note that while all other methods could achieve 100 % attack success rate (ASR), the ASR of random distortion appears to be quite low.
For all the cases except Limited-attack, we conduct adversarial attacks for randomly sampled N = 100 images from validation sets. Note that all three attacks (Opt-attack, Boundary-attack, C&W attack) have 100% successful rates, and we report the average L2 distortion, defined by 1 N ∑N i=1 ‖x(i) − x (i) 0 ‖2, where x(i) is the adversarial example constructed by an attack algorithm and x(i)0 is the original i-th example. For black-box attack algorithms, we also report average and median number of queries for comparison. To compare with Limited-attack, we randomly sampled 50 images and report targeted ASR with average and median number of queries when limiting L∞ distortion to be 0.3 and 0.15 for ImageNet dataset. We also restrict the maximum number of queries to be 1,000,000 for all attacks.

heading: 4.1.1 UNTARGETED ATTACK
text: For untargeted attack, the goal is to turn a correctly classified image into any other label. The results are presented in Table 1. Note that for both Opt-attack and Boundary-attack, by changing the stopping conditions we can attain different distortions by varying the number of queries.
First, we compare Boundary-attack and the proposed Opt-attack in Table 1 and Table 5 in appendix. Our algorithm consistently achieves smaller distortion with less number of queries than Boundaryattack. For example, on MNIST data, we are able to reduce the number of queries by 3-4 folds, and Boundary-attack converges to worse solutions in all the 3 datasets. In addition, we include the average L2 norm distortion plot with different query budgets in Figure 5(a) in appendix. And our method consistently outperforms the Boundary-attack and achieves nearly 2x speedup on both datasets.
Compared with C&W attack, we found black-box attacks attain slightly worse distortion on MNIST and CIFAR. This is reasonable because white-box attack has much more information than black-box attack and is strictly easier. We note that the experiments in Brendel et al. (2017) conclude that C&W and Boundary-attack have similar performance because they only run C&W attack with a single regularization parameter c, without doing binary search to obtain the optimal parameter. For ImageNet, since we constraint the number of queries, the distortion of black-box attacks is much worse than C&W attack. The gap can be reduced by increasing the number of queries as showed in Figure 5(b) in appendix.

heading: 4.1.2 TARGETED ATTACK
text: The results for targeted attack is presented in Table 2 and Table 5 in appendix. Following the experiments in Brendel et al. (2017), for each randomly sampled image with label i we set target label t = (i + 1) module 10. On MNIST, we found our algorithm is more than 4 times faster (in terms of number of queries) than Boundary-attack and converges to a better solution. On CIFAR, our algorithm has similar efficiency with Boundary-attack at the first 60,000 queries, but converges to a slightly worse solution. Also, we show an example quality comparison from the same starting point to the original sample in Figure 4. And we also include some adversarial example in Figure 4.
4https://github.com/labsix/limited-blackbox-attacks
For attacks in L∞ norm constraint, we conduct experimental comparisons with Limited-attack5. the results are shown in Table 3. In the cases of an L∞ constraint ∈ {0.15, 0.3}, our Opt-attack roughly halves the average number of queiries relative to Limited-attack. In addition, our ASR is 40% higher than Limited-attack when = 0.15.

heading: 4.1.3 ATTACKING GRADIENT BOOSTING DECISION TREE (GBDT)
text: To evaluate our method’s ability to attack models with discrete decision functions, we conduct our untargeted attack on gradient booting decision tree (GBDT). In this experiment, we use two standard datasets: HIGGS (Baldi et al., 2014) for binary classification and MNIST (LeCun et al., 1998) for multi-class classification. We use popular LightGBM framework to train the GBDT models and use suggested parameters in https://github.com/Koziev/MNIST_Boosting. To be more specific, for MNIST model, it has 100 trees and the max number of leaves in each tree is 100. For Higgs model, it has 255 trees and the max number of leaves in each tree is 500. And we don’t limit the max depth on both models. We could achieve 0.8457 AUC for HIGGS and 98.09% accuracy for MNIST. The results of untargeted attack on GBDT are given in Table 4.
As shown in Table 4, by using around 30K queries, we could get a small distortion on both datasets, which firstly uncovers the vulnerability of GBDT models. Tree-based methods are well-known for its good interpretability. And because of that, they are widely used in the industry. However, we show that even with good interpretability and a similar prediction accuracy with convolution neural network, the GBDT models are vulnerable under our Opt-attack. This result raises a question about tree-based models’ robustness, which will be an interesting direction in the future.
5Note that there’s a bug in the original version of (Ilyas et al., 2018) for counting number of queries, which makes the reported number of queries less than they actually used. We use their modified version in our experiments, which has fixed this bug.

heading: 5 CONCLUSION
text: In this paper, we propose a generic and optimization-based hard-label black-box attack algorithm, which can be applied to discrete and non-continuous models other than neural networks, such as the gradient boosting decision tree. Our method enjoys query-efficiency and has a theoretical convergence guarantee on the attack performance under mild assumptions. Moreover, our attack achieves smaller or similar distortion using 3-4 times less queries compared with the state-of-the-art algorithms.

heading: ACKNOWLEDGEMENT
text: We acknowledge the support by NSF IIS1719097, Intel faculty award, Google Cloud and AITRICS.

heading: 6 APPENDIX

heading: 6.1 MEDIAN RESULT
text: 6.2 RESULTS ON DIFFERENT NUMBER OF SAMPLE DIRECTIONS ut

heading: 6.3 L2 DISTORTION VERSUS MODEL QUERIES PLOT

heading: 6.4 THEORETICAL ANALYSIS
text: If g(θ) can be computed exactly, it has been proved in Nesterov & Spokoiny (2017) that RGF in Algorithm 2 requires at most O( dδ2 ) iterations to converge to a point with ‖∇g(θ)‖
2 ≤ δ2. However, in our algorithm the function value g(θ) cannot be computed exactly; instead, we compute it up to -precision, and this precision can be controlled by binary threshold in Algorithm 1. We thus extend the proof in Nesterov & Spokoiny (2017) to include the case of approximate function value evaluation, as described in the following theorem.
Theorem 1 In Algorithm 2, suppose g has Lipschitz-continuous gradient with constant L1(g) and g∗ (optimal value) is finite. If the error of function value evaluation is controlled by = O(βδ2)
and β ≤ δdL1(g) , then in order to obtain 1 N+1 N∑ k=0 EUk(‖∇g(θk)‖2) ≤ δ2, the upper bound of total number of iterations is O( dδ2 ).
Note that the binary search procedure could obtain the desired function value precision in O(log δ) steps. By using the same idea with Theorem 1 and following the proof in Nesterov & Spokoiny (2017), we could also achieve O(d 2
δ3 ) complexity when g(θ) is non-smooth but Lipschitz continuous.
Because there is a stopping criterion in Algorithm 1, we couldn’t achieve the exact g(θ). Instead, we could get g̃ with error, i.e., g(θ)− ≤ g̃(θ) ≤ g(θ) + . Also, we define ĝ(θ) = g̃(θ+βu)−g̃(θ)β ·u to be the noise gradient estimator.
Following Nesterov (2011), we define the Guassian smoothing approximation over g(θ), i.e,
gβ(θ) = 1
κ ∫ E g(θ + βu)e− 1 2 ||u|| 2 du. (8)
Also, we have the upper bounds for the momentsMp = 1κ ∫ E ||u||pe− 12 ||u||2du from Nesterov (2011) Lemma 1.
For p ∈ [0, 2], we have Mp ≤ dp/2. (9) If p ≥ 2, we have two-sided bounds np/2 ≤Mp ≤ (p+ n)p/2. (10)

heading: 6.5 PROOF OF THEOREM 1
text: Suppose f has a lipschitz-continuous gradient with constant L1(g), then
|g(y)− g(x)− 〈∇g(x), y − x〉| ≤ 1 2 L1(g)||x− y||2 (11)
We could bound Eu(||ĝ(θ)||2) as follows, Since (g̃(θ + βu)− g̃(θ))2 = [g̃(θ + βu)− g̃(θ)− β〈∇g(θ), u〉+ β〈∇g(θ), u〉]2
≤ 2(g(θ + βu)− g(θ) + θ+βu − θ − β〈∇g(θ), u〉)2 + 2β2〈∇g(θ), u〉2 (12)
Because | θ+βu − θ| ≤ 2 ,
[g̃(θ + βu)− g̃(θ)]2 ≤ 2(β 2
2 L1(g)||u||2)2 + 4β2L1(g)||u||2 + 8 2 + 2β2〈∇g(θ), u〉2 (13)
Take expectation over u, and with Theorem 3 in Nesterov (2011), which is Eu(||g′(θ, u) · u||2) ≤ (d+ 4)||∇g(θ)||2 Eu(||ĝ(θ)||2) ≤ β2
2 L21(g)Eu(||u||6) + 2Eu(||g′(θ, u) · u||2) + 4L1(g) Eu(||u||4) + 8
2
β2 Eu(||u||2)
≤ β 2
2 L21(g)(d+ 6)
3 + 2(d+ 4)||∇g(θ)||2 + 4 L1(g)(d+ 4)2 + 8 2
β2 d
(14) With = O(δ2β), we could bound Eu(||g̃(θ)||2)
Eu(||ĝ(θ)||2) ≤ β2
2 L21(g)(d+ 6) 3 + 2(d+ 4)||∇g(θ)||2 + 4βL1(g)(d+ 4)2δ2 + 8dδ4 (15) And with
||∇g(θ)||2 ≤ 2||∇gβ(θ)||2 + β2
2 L21(g)(d+ 4) 2 (16) Which is proved in Nesterov (2011) Lemma 4.
Therefore, since (n+ 6)3 + 2(n+ 4)3 ≤ 3(n+ 5)3, we could get
Eu(||ĝ(θ)||2) ≤ β2
2 L21(g)(d+ 6) 3 + 2(d+ 4)||∇g(θ)||2 + 2(d+ 4)||∇g(θ)||2
+ 4βL1(g)(d+ 4) 2δ2 + 8dδ4
≤ β 2
2 L21(g)(d+ 6)
3 + 2(d+ 4)(2||∇gβ(θ)||2 + β2
2 L21(g)(d+ 4) 2)
+ 4βL1(g)(d+ 4) 2δ2 + 8dδ4
≤ 4(d+ 4)||∇gβ(x)||2 + 3β2
2 L21(g)(d+ 5) 3 + 4βL1(g)(d+ 4) 2δ2 + 8dδ4
(17)
Therefore, since gβ(θ) has Lipshcitz-continuous gradient:
|gβ(θk+1)− gβ(θk) + α〈∇gβ(θk), ĝβ(θk)〉| ≤ 1
2 α2L1(gβ)||ĝβ(θk)||2 (18)
So that gβ(θk+1) ≤ gβ(θk)− α〈∇gβ(θk), ĝβ(θk)〉+ 1
2 α2L1(gβ)||ĝβ(θk)||2 (19)
Since
Eu(ĝ(θk)) = 1
κ ∫ E g(θ + βu)− g(θ) + θ+βu − θ β ue− 1 2 ||u|| 2 du
= ∇gβ(θk) + 1
κ ∫ E θ+βu − θ β ue− 1 2 ||u|| 2 du
≤ ∇gβ(θk) + 2
β n1/2 · 1
(20)
where 1 is a all-one vector. Taking the expectation in uk, we obtain Euk(gβ(θk+1)) ≤ gβ(θk)− αk||∇gβ(θk)||2 + αk〈∇gβ(θk), 2
β d1/2 · 1〉+ 1 2 α2kL1(gβ)Euk ||ĝβ(θk)||2
Euk(gβ(θk+1)) ≤ gβ(θk)− αk||∇gβ(θk)||2 + αk 2
β n1/2||∇gβ(θk)||
+ 1
2 α2kL1(g)(4(d+ 4)||∇gβ(θk)||2 +
3β2
2 L21(g)(d+ 5) 3 + 4βL1(g)(d+ 4) 2δ2 + 8dδ4)
(21) Choosing αk = α̂ = 14(d+4)L1(g) , we obtain
Euk(gβ(θk + 1)) ≤ gβ(θk)− 1
2 α̂||∇gβ(θk)||2 + α̂
2 β d1/2||∇gβ(θk)||+
3β2
64 L1(g)
(d+ 5)3
(d+ 4)2
+ β
8 δ2 +
d
4(d+ 4)2L1(g) δ4
(22) Since (d+5)3 ≤ (d+8)(d+4)2, taking expectation over Uk, where Uk = {u1, u2, . . . , uk}, we get φk+1 ≤ φk− 1
2 α̂EUk(||∇gβ(θk)||2)+
3β2(d+ 8)
64 L1(g)+
β 8 δ2+
d
4(d+ 4)2L1(g) δ4+α̂d1/2EUk(||∇gβ(θk)||)δ2
(23) Where φk = EUk−1(g(θk)), k ≥ 1 and φ0 = g(θ0).
Assuming g(x) ≥ g∗, summing over k and divided by N+1, we get 1
N + 1 N∑ k=0 EUk(||∇gβ(θk)||2) ≤ 8(d+ 4)L1(g)[ g(x0)− g∗ N + 1 + 3β2(d+ 8) 16 L1(g) + β 8 δ2
+ d
4(d+ 4)2L1(g) δ4 +
1
N + 1 N∑ k=0 EUk(||∇gβ(θk)||)δ2] (24)
Clearly, 1N+1 N∑ k=0 EUk(||∇gβ(θk)||) ≤ δ2.
Since ϑ2k = EUk(||∇g(θk)||2) ≤ 2EUk(||∇gβ(θk)||2) + β2(d+4)2 2 L 2 1(g), ϑ 2 k is in the same order of
EUk(||∇gβ(θk)||2). In order to get 1N+1 N∑ k=0 ϑ2k ≤ δ2, we need to choose β ≤ δdL1(g) , then N is bounded by O( dδ2 )

Review summaries:
In this paper the authors propose optimizing for adversarial examples against black box models by considering minimizing the distance to the decision boundary.  They show that because this gives real valued feedback, the optimizer is able to find closer adversarial examples with fewer queries.  This would be heavily dependent on the model structure (with more complex decision boundaries likely being harder to optimize) but they show empirically in 4 models that this method works well.

This paper addresses black-box classifier attacks in the “hard-label” setting, meaning that the only information the attacker has access to is single top-1 label predictions. Relative to even the standard black-box setting where the attacker has access to the per-class logits or probabilities, this setting is difficult as it makes the optimization landscape non-smooth. The proposed approach reformulates the optimization problem such that the outer-loop optimizes the direction using approximate gradients, and the inner-loop estimates the distance to the nearest attack in a given direction. The results show that the proposed approach successfully finds both untargeted and targeted adversarial examples for classifiers of various image datasets (including ImageNet), usually with substantially better query-efficiency and better final results (lower distance and/or higher success rate) than competing methods.