Year: 2019

Abstract:
Deep learning models are known to be vulnerable to adversarial examples. A practical adversarial attack should require as little as possible knowledge of attacked models. Current substitute attacks need pre-trained models to generate adversarial examples and their attack success rates heavily rely on the transferability of adversarial examples. Current score-based and decision-based attacks require lots of queries for the attacked models. In this study, we propose a novel adversarial imitation attack. First, it produces a replica of the attacked model by a two-player game like the generative adversarial networks (GANs). The objective of the generative model is to generate examples which lead the imitation model returning different outputs with the attacked model. The objective of the imitation model is to output the same labels with the attacked model under the same inputs. Then, the adversarial examples generated by the imitation model are utilized to fool the attacked model. Compared with the current substitute attacks, imitation attack can use less training data to produce a replica of the attacked model and improve the transferability of adversarial examples. Experiments demonstrate that our imitation attack requires less training data than the black-box substitute attacks, but achieves an attack success rate close to the white-box attack on unseen data with no query.

heading: 1 INTRODUCTION
text: Deep neural networks are often vulnerable to imperceptible perturbations of their inputs, causing incorrect predictions (Szegedy et al., 2014). Studies on adversarial examples developed attacks and defenses to assess and increase the robustness of models, respectively. Adversarial attacks include white-box attacks, where the attack method has full access to models, and black-box attacks, where the attacks do not need knowledge of models structures and weights.
White-box attacks need training data and the gradient information of models, such as FGSM (Fast Gradient Sign Method) (Goodfellow et al., 2015), BIM (Basic Iterative Method) (Kurakin et al., 2017a) and JSMA (Jacobian-based Saliency Map Attack) (Papernot et al., 2016b). However, the gradient information of attacked models is hard to access, the white-box attack is not practical in real-world tasks. Literature shows adversarial examples have transferability property and they can affect different models, even the models have different architectures (Szegedy et al., 2014; Papernot et al., 2016a; Liu et al., 2017). Such a phenomenon is closely related to linearity and over-fitting of models (Szegedy et al., 2014; Hendrycks & Gimpel, 2017; Goodfellow et al., 2015; Tramèr et al., 2018). Therefore, substitute attacks are proposed to attack models without the gradient information. Substitute black-box attacks utilize pre-trained models to generate adversarial examples and apply these examples to attacked models. Their attack success rates rely on the transferability of adversarial examples and are often lower than that of white-box attacks. Black-box score-based attacks (Chen et al., 2017; Ilyas et al., 2018a;b) do not need pre-trained models, they access the output probabilities of the attacked model to generate adversarial examples iteratively. Black-box decisionbased attacks (Brendel et al., 2017; Cheng et al., 2018; Chen et al., 2019) require less information than the score-based attacks. They utilize hard labels of the attacked model to generate adversarial examples.
Adversarial attacks need knowledge of models. However, a practical attack method should require as little as possible knowledge of attacked models, which include training data and procedure, models weights and architectures, output probabilities and hard labels (Athalye et al., 2018). The disadvantage of current substitute black-box attacks is that they need pre-trained substitute models trained by
the same dataset with attacked model T (Hendrycks & Gimpel, 2017; Goodfellow et al., 2015; Kurakin et al., 2017a) or a number of images to imitate the outputs of T to produce substitute networks (Papernot et al., 2017). Actually, the prerequisites of these attacks are hard to obtain in real-world tasks. The substitute models trained by limited images hardly generate adversarial examples with well transferability. The disadvantage of current decision-based and score-based black-box attacks is that every adversarial example is synthesized by numerous queries.
Hence, developing a practical attack mechanism is necessary. In this paper, we propose an adversarial imitation training, which is a special two-player game. The game has a generative model G and a imitation model D. The G is designed to produce examples to make the predicted label of the attacked model T and D different, while the imitation model D fights for outputting the same label with T . The proposed imitation training needs much less training data than the T and does not need the labels of these data, and the data do not need to coincide with the training data. Then, the adversarial examples generated by D are utilized to fool the T like substitute attacks. We call this new attack mechanism as adversarial imitation attack. Compared with current substitute attacks, our adversarial imitation attack requires less training data. Score-based and decision-based attacks need a lot of queries to generate each adversarial attack. The similarity between the proposed method and current score-based and decision-based attacks is that adversarial imitation attack also needs to obtain a lot of queries in the training stage. The difference between these two kinds of attack is our method do not need any additional queries in the test stage like other substitute attacks. Experiments show that our proposed method achieves state-of-the-art performance compared with current substitute attacks and decision-based attack. We summarize our main contributions as follows:
• The proposed new attack mechanism needs less training data of attacked models than current substitute attacks, but achieves an attack success rate close to the white-box attacks.
• The proposed new attack mechanism requires the same information of attacked models with decision attacks on the training stage, but is query-independent on the testing stage.

heading: 2 RELATED WORK
text: Adversarial Scenes Adversarial attacks happen in two scenes, namely the white-box and the black-box settings. In the white-box settings, the attack method has complete access to attacked models, such as models internal, training strategy and data. While in the black-box settings, the attack method has little knowledge of attacked models. The black-box attack utilizes the transferability property of adversarial examples, only needs the labeled training data, but its attack success rate is often lower than that of the white-box attack method if attacked models have no defense. Actually, attack methods requiring lots of prior knowledge of attacked models are difficult to apply in practical applications (Athalye et al., 2018).
Adversarial Attacks Several methods for generating adversarial examples were proposed. Goodfellow et al. (2015) proposed a one-step attack called FGSM. On the basis of the FGSM, Kurakin et al. (2017a) came up with BIM, an iterative optimization-based attack. Another iterative attack called DeepFool (Moosavi-Dezfooli et al., 2016) aims to find an adversarial example that would cross the decision boundary. Carlini & Wagner (2017b) provided a stronger attack by simultaneously minimizing the perturbation and the LF norm of the perturbation. Rony et al. (2018) generated adversarial examples through decoupling the direction and the norm of the perturbation, which is also constrained by the LF norm. Liu et al. (2017) showed that targeted adversarial examples hardly have transferability, they proposed ensemble-based methods to generate adversarial examples having stronger transferability. Papernot et al. (2017) proposed a practical black-box attack which accesses the hard label to train substitute models. For score-based attacks, Chen et al. (2017) proposed the zeroth-order based attack (ZOO) which uses gradient estimates to attack a black-box model. Ilyas et al. (2018b) improves the way to estimate gradients. Guo et al. (2019) proposed a simple black-box score-based attack on DCT space. For decision-based attacks, Brendel et al. (2017) first proposed decision-based attacks which do not rely on gradients. Cheng et al. (2018) and Chen et al. (2019) improve the query efficiency of the decision-based attack.
Adversarial Defenses To increase the robustness of models, methods for defending against adversarial attacks are being proposed. Adversarial training (Szegedy et al., 2014; Madry et al., 2018;
Kurakin et al., 2017b; Tramèr et al., 2018) can be considered as a kind of data augmentation. It applies adversarial examples to the training data, resulting in a robust model against adversarial attacks. Defenses based on gradient masking (Tramèr et al., 2018; Dhillon et al., 2018) provide robustness against optimization-based attacks. Random transformation (Kurakin et al., 2017a; Meng & Chen, 2017; Xie et al., 2018) on inputs of models hide the gradient information, eliminate the perturbation. Buckman et al. (2018) proposed thermometer encoding based on one-hot encoding, it applied a nonlinear transformation to inputs of models, aiming to reduce the linearity of the model. However, most defenses above are still unsafe against some attacks (Carlini & Wagner, 2017a; He et al., 2017). Especially Athalye et al. (2018) showed that defenses based on gradient masking actually are unsafe against attacks. Instead, some researchers focus on detecting adversarial examples. Some use a neural network (Gong et al., 2017; Grosse et al., 2017; Metzen et al., 2017) to distinguish between adversarial examples and clean examples. Some achieve statistical properties (Bhagoji et al., 2017; Hendrycks & Gimpel, 2017; Feinman et al., 2017; Ma et al., 2018; Papernot & McDaniel, 2018) to detect adversarial examples.

heading: 3 IMITATION ATTACK
text: In this section, we introduce the definition of adversarial examples and then propose a new attack mechanism based on adversarial imitation training.

heading: 3.1 ADVERSARIAL EXAMPLES
text: X refers to the samples from the input space of the attacked model T , ytrue refers to the true labels of the samples X. T (y|X, θ) is the attacked model parameterized by θ. For a non-targeted attack, the objective of the adversarial attack can be formulated as:
min ‖ ‖ subject to argmax
yi
T (yi|X = X+ , θ) 6= ytrue
and ‖ ‖ ≤ r, (1)
where the and r are perturbation of the sample and upper bound of the perturbation, respectively. To guarantee that is imperceptible, r is set to a small value in applications. X = X + are the adversarial examples which can fool the attacked model T . θ refers to the parameters of the model T .
For white-box attacks, they obtain gradient information of T to generate adversarial examples, and attack the T directly. For substitute attacks, they generate adversarial examples from a substitute model T̂ , and transfer the examples to attack the T . The key point of a successful attack is the transferability of the adversarial examples.
To improve the transferability of adversarial examples and avoid output query, we utilize an imitation network to imitate the characteristics of the T by accessing its output labels to improve the transferability of adversarial examples, which are generated by the imitation network. After the adversarial imitation training, adversarial examples generated by imitation network do not need additional query. In the next subsection, we introduce the proposed adversarial imitation training and imitation attack.

heading: 3.2 ADVERSARIAL IMITATION TRAINING
text: Inspired by the generative adversarial network (GAN) (Goodfellow et al., 2014), we use the adversarial framework to copy the attacked model. We propose a two-player game based adversarial imitation training to replicate the information of attacked model T , which is shown in Figure 1. To learn the characteristics of T , we define an imitation network D, and train it using disturbed input X̂ = G(X) +X and the corresponding output label yT (X̂) of attacked model. X denotes training samples here. The role of G is to create new samples that yT (X̂) 6= yD(X̂). Thus, D, G and T play a special two-player game. To simplify the expression but without loss of generality, we just analyze the case of binary classification. The value function of players can be presented as:
max G min D VG,D = −yT (X̂)logD(X̂)− (1− yT (X̂))log(1−D(X̂))
subject to X̂ = G(X) +X. (2)
Note that the T is equivalent to the referee of this game. The two players G and D optimize their parameters based on the output yT (X̂). We suppose that adversarial perturbation ≤ r1, and ∀ X̂ = G(X) +X, ‖G(X)‖ ≤ r2, r1 ≤ r2. If the D can achieve yD(X̂) = yT (X̂), our imitation attack will have the same success rate as the white-box attack without the gradient information of T . Therefore, for a well-trained imitation network, adversarial examples generated by D have strong transferability for T . A proper upper bound (r2 ≥ r1) of G(X) is the key points for training an efficient imitation network D. Especially in targeted attacks (T outputs the specified wrong label), if the characteristics of D is more similar to that of the attacked model, the transferability of adversarial examples will be stronger.
In the training stage, the loss function of D is JD = VG,D. Because G is more hard to train than D, sometimes the ability of D is much stronger than G, so the loss of G fluctuates during the training stage. In order to maintain the stability of training, the loss function of G is designed as JG = e−VG,D . Therefore, the global optimal imitation network D is obtained if and only if ∀ X̂, D(X̂) = yT (X̂). At this point, JD = 0 and JG = e0 = 1. The loss of G is always in a controllable value in training stage.
As we discussed before, if r1 ≤ r2, the adversarial examples generated by a well-trained D have strong transferability for T . Because the attack perturbation of adversarial examples is set to be a small value, we constrain the ‖G(X)‖ in training stage to limit the search space of G, which can reduce the number of queries efficiently.
For training methodology, we alternately train the G and D in every mini-batch, and use L2 penalty to constrain the search space of G. The procedure is shown in algorithm 1.
Algorithm 1 Mini-batch stochastic gradient descent training of imitation network.
1 : for number of training iterations do 2 : Sample mini-batch of m examples{X(1), . . . ,X(m)} from training set. 3 : Update the imitation model by descending its loss function : 4 : −yT (X̂)logD(X̂)− (1− yT (X̂))log(1−D(X̂)). 5 : Update the generative model by descending its loss function : 6 : e−VG,D + α‖G(X̂)‖. 7 : end for
In adversarial attacks, when the optimal D is obtained, the adversarial examples generated by D are utilized to attack T .

heading: 4 EXPERIMENTS

heading: 4.1 EXPERIMENT SETTING
text: In this subsection, we introduce the settings for our experiments.
Datasets: we evaluate our proposed method on MNIST (LeCun et al., 1998) and CIFAR-10 (Krizhevsky & Hinton, 2009). Because we need to use data different with the training set of T to train the imitation network, we divided the test sets (10k) from MNIST and CIFAR-10 into two parts. One part contains 9500 images for training and another part contains 500 images for evaluating the attack performance.
Model architecture and attack method: in order to get the information of the attacked model T as little as possible, we only utilize the output label (not the probability) of the T to train the imitation network. The imitation network has no prior knowledge of the attacked model, which means it does not load any pre-trained model in experiments. For the experiments on MNIST, we design 3 different network architectures with different capacity (small network, medium network and large network) for evaluating the performance of our imitation attack with models having different capacity. We utilize the pre-trained medium network and VGG-16 (Simonyan & Zisserman, 2015) as the attacked model on MNIST and CIFAR-10, respectively. In order to compare the success rate of the proposed imitation attack with current substitute attack, we utilize 4 attack methods, FGSM, BIM, projected gradient descent (PGD) (Madry et al., 2018), C&W to generate adversarial examples. For testing, we use AdverTorch library (Ding et al., 2019) to generate adversarial examples. On the other hand, for comparing the performance of our method with current decision-based attacks and score-based attacks, we utilize Boundary Attack (Brendel et al., 2017), HSJA Attack (Chen et al., 2019), SimBADCT Attack (Guo et al., 2019) as comparison methods. Note that score-based attacks require output probabilities of T , which contain much more information than labels.
Evaluation criteria: the goals of non-targeted attack and targeted attack are to lead the attacked model to output a wrong label and a specific wrong label, respectively. In non-targeted attacks, we only generate adversarial examples on the images classified correctly by the attacked model. In targeted attacks, we only generate adversarial examples on the images which are not classified to the specific wrong labels. The success rates of adversarial attack are calculated by n/m, where n and m are the number of adversarial examples which can fool the attacked model and the total number of adversarial examples, respectively.

heading: 4.2 EXPERIMENTAL ANALYSIS OF ADVERSARIAL ATTACK
text: In this subsection, we utilize the proposed adversarial imitation training to train imitation models and evaluate the performance in terms of attack success rate.
To compare our method with substitute attack, We utilize the medium network and VGG-16 as attacked models on MNIST and CIFAR-10, respectively. Then we use the same train dataset to obtain a pre-trained large network (the architecture is also in Table 9) and ResNet-50 (He et al., 2016) to generate substitute adversarial examples. We obtain imitation networks by using the proposed adversarial imitation training. The large network and ResNet-16 are used as the model architectures of imitation networks on MNIST and CIFAR-10, respectively. The imitation models are only trained by 9500 samples of the test dataset, which are much less than the training sets of MNIST (60000 samples) and CIFAR-10 (50000 samples). The results of experiments are evaluated on the other 500 samples of the test dataset and are shown in Table 1 and Table 2. The success rates of the proposed imitation attack far exceed the success rates of the substitute attack in all experiments.
The experiments of Table 1 and Table 2 show that the proposed new attack mechanism needs less training images than substitute attacks, but achieves an attack success rate close to the white-box attack. The experiments indicate that the adversarial samples generated by a well-trained imitation model have a higher transferability than the substitute attack.
To compare our method with decision-based and score-based attacks, we evaluate the performance of these attacks. We utilize 9500 images from the test set of MNIST and CIFAR-10 to train the imitation network, and use other 500 images from the test set as unseen data for our method. The other decision-based and score-based attacks are evaluated on the test set of MNIST and CIFAR-10
dataset. Note that score-based attacks require much more information (output probabilities) than decision-based attacks (output labels). The results on MNIST and CIFAR-10 are shown in Table 3 and Table 4, respectively. Because our imitation attack only needs queries on the training stage, we evaluate performances of our method on its train and unseen sets. We set the iteration of adversarial imitation training to 1800, so the average number of query per image is 1800. We utilize BIM attack to generate adversarial examples as our imitation attack in this experiment.
This experiment shows that our imitation attack achieves state-of-the-art performance in decisionbased methods. Even compared with the score-based attack, our imitation attack outperforms it in terms of perturbation distance and attack success rate. More importantly, it also obtains good results on unseen data, which indicates our imitation attack can be applied to query-independent scenarios.

heading: 4.3 EXPERIMENTAL ANALYSIS OF NETWORK CAPACITY
text: In the above subsection, we utilize a more complex network than the attacked model to replicate the attacked model. In this subsection, we study the impact of model capacity on the ability of imitation.
To evaluate the imitation performance of the network with less capacity than the attacked model, we train the small network, medium network, and large network to imitate the pre-trained medium network on MNIST dataset, and train VGG-13, VGG-16 and ResNet-50 to imitate VGG-16 on CIFAR-10. The performance of models with different capacities are shown in Table 5 and 6. The results show that an imitation model with a lower capacity than the attacked model can also achieve a good imitation performance. Attack success rates of all imitation models far exceed the substitute attacks in Table 1 and 2. Most experiments show that the larger capacity the imitation network has, the higher attack success rate it can achieve (FGSM, BIM, PGD in MNIST and BIM in CIFAR10). However, some experiments show models having a larger capacity do not have a higher attack success rate (FGSM and PGD in CIFAR-10). We surmise that the performance of imitating an attacked model is not only influenced by the capacity of the imitation model D, but also influenced by the capability of the G.

heading: 4.4 EXPERIMENTAL ANALYSIS OF MODEL REPLICATION
text: In this subsection, we only use 200 images (20 samples per class) to train the imitation networks and discuss characteristics of the model replication.
We train the imitation network using 200 images from MNIST and CIFAR-10 test set, and compare its performance with Practical Attack (Papernot et al., 2017) on other images from MNIST and CIFAR-10 test set. The results are shown in Table 7 and 8. The practical attack uses the output labels of attacked models to train substitute models under the scenario, which they can make an infinite number of queries for attacked models. It is hard to generate adversarial examples to fool the attacked models by limited training samples. Note that what the substitute models imitate is the response for perturbations of the attacked model. A substitute model that can generate adversarial examples with a higher attack success rate is a better replica. Our adversarial imitation attack can produce a substitute model with much higher classification accuracy and attack success rate than Practical Attack for both non-targeted and targeted attacks in this scenario (with an infinite number of queries). We also show the performances of these two methods with limited query numbers in Figure 6. Additionally, the imitation model with low classification accuracy still can produce
adversarial examples that have well transferability. It shows that our adversarial imitation training can efficiently steal the information from the attacked model of their classification characteristics under perturbations.

heading: 5 CONCLUSION
text: Practical adversarial attacks should have as little as possible knowledge of attacked model T . Current black-box attacks need numerous training images or queries to generate adversarial images. In this study, to address this problem, we combine the advantages of current black-box attacks and proposed a new attack mechanism, imitation attack, to replicate the information of the T , and generate adversarial examples fooling deep learning models efficiently. Compared with substitute attacks, imitation attack only requires much less data than the training set of T and do not need the labels of the training data, but adversarial examples generated by imitation attack have stronger transferability for the T . Compared with score-based and decision-based attacks, our imitation attack only needs the same information with decision attacks, but achieves state-of-the-art performances and is query-independent on testing stage. Experiments showed the superiority of the proposed imitation attack. Additionally, we observed that deep learning classification model T is easy to be stolen by limited unlabeled images, which are much fewer than the training images of T . In future work, we will evaluate the performance of the proposed adversarial imitation attack on other tasks except for image classification.

heading: A NETWORK ARCHITECTURES
text: B VISUALIZATION OF ADVERSARIAL EXAMPLES
In this section, we visualize the adversarial examples generated by the imitation model. The results are shown in Figure 2 and Figure 3. The experiments show that adversarial examples generated by the proposed imitation attack can fool the attacked model with a small perturbation.
C VISUALIZATION OF DISTURBANCES GENERATED BY GENERATOR IN TRAINING STAGE
In this section, we visualize the disturbances generated by generator in training stage.

heading: D ACCURACY CURVE OF THE IMITATION MODEL ON TRAINING STAGE

heading: E COMPARISON OF ATTACK SUCCESS RATE BETWEEN THE PROPOSED METHOD AND THE PRACTICAL METHOD

Review summaries:
The authors propose to use a generative adversarial network to train a substitute that replicates (imitates) a learned model under attack. They then show that the adversarial examples for the substitute can be effectively used to attack the learned model. The idea is straightforward. The proposed approach leads to better success rates of attacking than other substitute-training approaches that require more training examples. Promising experimental results against decision and score-based attach schemes also demonstrate the effectiveness of the proposed approach.