Title: ADVERSARIAL REPROGRAMMING OF NEURAL NETWORKS

Abstract: Deep neural networks are susceptible to adversarial attacks. In computer vision, well-crafted perturbations to images can cause neural networks to make mistakes such as confusing a cat with a computer. Previous adversarial attacks have been designed to degrade performance of models or cause machine learning models to produce specific outputs chosen ahead of time by the attacker. We introduce attacks that instead reprogram the target model to perform a task chosen by the attacker-without the attacker needing to specify or compute the desired output for each test-time input. This attack finds a single adversarial perturbation, that can be added to all test-time inputs to a machine learning model in order to cause the model to perform a task chosen by the adversary-even if the model was not trained to do this task. These perturbations can thus be considered a program for the new task. We demonstrate adversarial reprogramming on six ImageNet classification models, repurposing these models to perform a counting task, as well as classification tasks: classification of MNIST and CIFAR-10 examples presented as inputs to the ImageNet model.

1. INTRODUCTION:

The study of adversarial examples is often motivated in terms of the danger posed by an attacker whose goal is to cause model prediction errors with a small change to the model's input. Such an attacker could make a self-driving car react to a phantom stop sign (Evtimov et al., 2017) by means of a sticker (a small L 0 perturbation), or cause an insurance company's damage model to overestimate the claim value from the resulting accident by subtly doctoring photos of the damage (a small L ∞ perturbation). With this context, various methods have been proposed both to construct (Szegedy et al., 2013; Papernot et al., 2015; 2017; 2016; Brown et al., 2017; Liu et al., 2016) and defend against (Goodfellow et al., 2014; Kurakin et al., 2016; Madry et al., 2017; Tramèr et al., 2017; Kolter & Wong, 2017; Kannan et al., 2018) this style of adversarial attack. Thus far, the majority of adversarial attacks have consisted of untargeted attacks that aim to degrade the performance of a model without necessarily requiring it to produce a specific output, or targeted attacks in which the attacker designs an adversarial perturbation to produce a specific output for that input. For example, an attack against a classifier might target a specific desired output class for each input image, or an attack against a reinforcement learning agent might induce that agent to enter a specific state (Lin et al., 2017) .

In practice, there is no requirement that adversarial attacks will adhere to this framework. Thus, it is crucial to proactively anticipate other unexplored adversarial goals in order to make machine learning systems more secure. In this work, we consider a novel and more challenging adversarial goal: reprogramming the model to perform a task chosen by the attacker, without the attacker needing to compute the specific desired output. Consider a model trained to perform some original task: for inputs x it produces outputs f (x). Consider an adversary who wishes to perform an adversarial task: for inputs x (not necessarily in the same domain as x) the adversary wishes to compute a function g(x). We show that an adversary can accomplish this by learning adversarial reprogramming functions h f (•; θ) and h g (•; θ) that map between the two tasks. Here, h f converts inputs from the domain of x into the domain of x (i.e., h f (x; θ) is a valid input to the function f ), while h g maps output of f (h(x; θ)) back to outputs of g(x). The parameters θ of the adversarial program are then adjusted to achieve h g (f (h f (x))) = g (x).

In our work, for simplicity, we define x to be a small image, g a function that processes small images, x a large image, and f a function that processes large images. Our function h f then just consists of drawing x in the center of the large image and θ in the borders (though see Section 4.5 for other schemes), and h g is simply a hard coded mapping between output class labels. However, the idea is more general; h f (h g ) could be any consistent transformation that converts between the input (output) formats for the two tasks and causes the model to perform the adversarial task.

We refer to the class of attacks where a model is repurposed to perform a new task as adversarial reprogramming. We refer to θ as an adversarial program. In contrast to most previous adversarial work, the attack does not need to be imperceptible to humans, or even subtle, in order to be considered a success. However, we note that it is still possible to construct reprogramming attacks that are imperceptible. Potential consequences of adversarial reprogramming include theft of computational resources from public facing services, repurposing of AI-driven assistants into spies or spam bots, and abusing machine learning services for tasks violating the ethical principles of system providers. Risks stemming from this type of attack are discussed in more detail in Section 5.2.

It may seem unlikely that an additive offset to a neural network's input would be sufficient on its own to repurpose the network to a new task. However, this flexibility stemming only from changes to a network's inputs is consistent with results on the expressive power of deep neural networks. For instance, in Raghu et al. (2016) it is shown that, depending on network hyperparameters, the number of unique output patterns achievable by moving along a one-dimensional trajectory in input space increases exponentially with network depth. Further, Li et al. (2018) shows that networks can often be trained to high accuracy even if parameter updates are restricted to occur only in a low dimensional subspace. An additive offset to a neural network's input is equivalent to a modification of its first layer biases (for a convolutional network with biases shared across space, this operation effectively introduces new parameters because the additive input is not shared across space), and therefore an adversarial program corresponds to an update in a low dimensional parameter subspace.

In this paper, we present the first instances of adversarial reprogramming. In Section 2, we discuss related work. In Section 3, we present a training procedure for crafting adversarial programs, which cause a neural network to perform a new task. In Section 4, we experimentally demonstrate adversarial programs that target several convolutional neural networks designed to classify ImageNet data. These adversarial programs alter the network function from ImageNet classification to: counting squares in an image, classifying MNIST digits, and classifying CIFAR-10 images. Next, we examine the susceptibility of trained and untrained networks to adversarial reprogramming. We then demonstrate the possibility of reprograming adversarial tasks with adversarial data that has no resemblance to original data, demonstrating that results from transfer learning do not fully explain adversarial reprogramming. Further, we demonstrate the possibility of concealing adversarial programs and data. Finally, we end in Sections 5 and 6 by discussing and summarizing our results.

2. BACKGROUND AND RELATED WORK:



2.1. ADVERSARIAL EXAMPLES:

One definition of adversarial examples is that they are "inputs to machine learning models that an attacker has intentionally designed to cause the model to make a mistake" (Goodfellow et al., 2017) . They are often formed by starting with a naturally occuring image and using a gradient-based optimizer to search for a nearby image that causes a mistake (Biggio et al., 2013; Szegedy et al., 2013; Carlini & Wagner, 2017) . These attacks can be either untargeted (the adversary succeeds when causing any mistake at all) or targeted (the adversary succeeds when causing the model to predict a specific incorrect class). Adversarial attacks have been also proposed for other domains like malware detection (Grosse et al., 2017) , generative models (Kos et al., 2017) , network policies for reinforcement learning tasks (Huang et al., 2017) , and network interpretation (Ghorbani et al. 2017). In these domains, the attack remains either untargeted (generally degrading the performance) or targeted (producing a specific output). We extend this line of work by developing reprogramming methods that aim to produce specific functionality rather than a specific hardcoded output.

Several authors have observed that the same modification can be applied to many different inputs in order to form adversarial examples (Goodfellow et al., 2014; Moosavi-Dezfooli et al., 2017) . For example, Brown et al. (2017) designed an "adversarial patch" that can switch the prediction of many models to one specific class (e.g. toaster) when it is placed physically in their field of view. We continue this line of work by finding a single adversarial program that can be presented with many input images to cause the model to process each image according to the adversarial program.

2.2. PARASITIC COMPUTING AND WEIRD MACHINES:

Parasitic computing involves forcing a target system to solve a complex computational task it wasn't originally designed to perform, by taking advantage of peculiarities in network communication protocols (Barabasi et al., 2001; Peresini & Kostic, 2013) . Weird machines, on the other hand, are a class of computational exploits where carefully crafted inputs can be used to run arbitrary code on a targeted computer (Bratus et al., 2011) . Adversarial reprogramming can be seen as a form of parasitic computing, though without the focus on leveraging the communication protocol itself to perform the computation. Similarly, adversarial reprogramming can be seen as an example of neural networks behaving like weird machines, though adversarial reprogramming functions only within the neural network paradigm -we do not gain access to the host computer.

2.3. TRANSFER LEARNING:

Transfer learning (Raina et al., 2007; Mesnil et al., 2011) and adversarial reprogramming share the goal of repurposing networks to perform a new task. Transfer learning methods use the knowledge obtained from one task as a base to learn how to perform another. Neural networks possess properties that can be useful for many tasks (Yosinski et al., 2014) . For example, neural networks when trained on images develop features that resemble Gabor filters in early layers even if they are trained with different datasets or different training objectives such as supervised image classification (Krizhevsky et al., 2012) , unsupervised density learning (Lee et al., 2009) , or unsupervised learning of sparse representations (Le et al., 2011) . Empirical work has demonstrated that it is possible to take a convolutional neural network trained to perform one task, and simply train a linear SVM classifier to make the network work for other tasks (Razavian et al., 2014; Donahue et al., 2014) . However, transfer learning is very different from the adversarial reprogramming task in that it allows model parameters to be changed for the new task. In typical adversarial settings, an attacker is unable to alter the model, and instead must achieve their goals solely through manipulation of the input. Further, one may wish to adversarially reprogram across tasks with very different datasets. This makes the task of adversarial reprogramming more challenging than transfer learning.

3. METHODS:

In this work, we consider an adversary with access to the parameters of a neural network that is performing a specific task. The objective of the adversary is to reprogram the model to perform a new task by crafting an adversarial program to be included within the network input. Here, the network was originally designed to perform ImageNet classification, but the methods discussed here can be directly extended to other settings.

Our adversarial program is formulated as an additive contribution to network input. Note that unlike most adversarial perturbations, the adversarial program is not specific to a single image. The same adversarial program will be applied to all images. We define the adversarial program as:

P = tanh (W M ) (1)

where W ∈ R n×n×3 is the adversarial program parameters to be learned, n is the ImageNet image width, and M is a masking matrix that is 0 for image locations that corresponds to the adversarial data for the new task, otherwise 1. Note that the mask M is not required -we mask out the central region of the adversarial program purely to improve visualization of the action of the adversarial program. Also, note that we use tanh (•) to bound the adversarial perturbation to be in (-1, 1) -the same range as the (rescaled) ImageNet images the target networks are trained to classify.

Let, x ∈ R k×k×3 be a sample from the dataset to which we wish to apply the adversarial task, where k < n. X ∈ R n×n×3 is the equivalent ImageNet size image with x placed in the proper area, defined by the mask M . The corresponding adversarial image is then:

EQUATION

Let P (y|X) be the probability that an ImageNet classifier gives to ImageNet label y ∈ {1, . . . , 1000}, given an input image X. We define a hard-coded mapping function h g (y adv ) that maps a label from an adversarial task y adv to a set of ImageNet labels. For example, if an adversarial task has 10 different classes (y adv ∈ {1, . . . , 10}), h g (•) may be defined to assign the first 10 classes of ImageNet, any other 10 classes, or multiple ImageNet classes to the adversarial labels. Our adversarial goal is thus to maximize the probability P (h g (y adv )|X adv ). We set up our optimization problem as

EQUATION

where λ is the coefficient for a weight norm penalty, to reduce overfitting. We optimize this loss with Adam while exponentially decaying the learning rate. Hyperparameters are given in Appendix A. Note that after the optimization the adversarial program has minimal computation cost for the adversary, as it only requires computing X adv (Equation 2), and mapping the resulting ImageNet label to the correct class. In other words, during inference the adversary needs only store the program and add it to the data, thus leaving the majority of computation to the target network.

One interesting property of adversarial reprogramming is that it must exploit nonlinear behavior of the target model. This is in contrast to traditional adversarial examples, where attack algorithms based on linear approximations of deep neural networks are sufficient to cause a high error rate (Goodfellow et al., 2014) . Consider a linear model that receives an input x and a program θ concatenated into a single vector: x = [x, θ] . Suppose that the weights of the linear model are partitioned into two sets, 

v = [v x, v θ ] . The output of the model is v x = v x x + v θ θ.

4.1. COUNTING SQUARES:

To illustrate the adversarial reprogramming procedure, we start with a simple adversarial task. That is counting the number of squares in an image. We generated images (x) of size 36 × 36 × 3 that include 9 × 9 white squares with black frames. Each square could appear in 16 different position in the image, and the number of squares ranged from 1 to 10. The squares were placed randomly on gridpoints (Figure 1b left). We embedded these images in an adversarial program (Figure 1b middle ).

The resulting images (X adv ) are of size 299 × 299 × 3 with the 36 × 36 × 3 images of the squares at the center (Figure 1b right). Thus, the adversarial program is simply a frame around the counting task images. We trained one adversarial program per ImageNet model, such that the first 10 ImageNet labels represent the number of squares in each image (Figure 1c ). Note that the labels we used from ImageNet have no relation to the labels of the new adversarial task. For example, a 'White Shark' has nothing to do with counting 3 squares in an image, and an 'Ostrich' does not at all resemble 10 squares. We then evaluated the accuracy in the task by sampling 100,000 images and comparing the network prediction to the number of squares in the image.

Despite the dissimilarity of ImageNet labels and adversarial labels, and that the adversarial program is equivalent simply to a first layer bias, the adversarial program masters this counting task for all networks (Table 1 ). These results demonstrate the vulnerability of neural networks to reprogramming on this simple task using only additive contributions to the input.

4.2. MNIST CLASSIFICATION:

In this section, we demonstrate adversarial reprogramming on somewhat more complex task of classifying MNIST digits. We measure test and train accuracy, so it is impossible for the adversarial program to have simply memorized all training examples. Similar to the counting task, we embedded MNIST digits of size 28 × 28 × 3 inside a frame representing the adversarial program, we assigned the first 10 ImageNet labels to the MNIST digits, and trained an adversarial program for each ImageNet model. Figure 2 shows examples of the adversarial program for each network being applied.

Our results show that ImageNet networks can be successfully reprogramed to function as an MNIST classifier by presenting an additive adversarial program. The adversarial program additionally generalized well from the training to test set, suggesting that the reprogramming does not function purely by memorizing train examples, and is not brittle to small changes in the input. 1 ). This accuracy is near what is expected from typical fully connected networks (Lin et al., 2015) but with minimal computation cost from the adversary side at inference time. One observation is that although adversarial programs trained to classify CIFAR-10 are different from those that classify MNIST or perform the counting task, the programs show some visual similarities, e.g. ResNet architecture adversarial programs seem to possess some low spatial frequency texture (Figure Supp. 2a).

4.4. INVESTIGATION OF THE EFFECT OF THE TRAINED MODEL DETAILS AND ORIGINAL DATA:

One important question is what is the degree to which susceptibility to adversarial reprogramming depends on the details of the model being attacked. To address this question, we examined attack success on an Inception V3 model that was trained on ImageNet data using adversarial training (Tramèr et al., 2017) . Adversarial training augments data with adversarial examples during training, and is one of the most common methods for guarding against adversarial examples. As in Section 4.2, we adversarially reprogrammed this network to classify MNIST digits. Our results (Table 1 ) indicate that the model trained with adversarial training is still vulnerable to reprogramming, with only a slight reduction in attack success. This finding shows that standard approaches to adversarial defense has little efficacy against adversarial reprogramming. This is likely explained by the differences between adversarial reprogramming and standard adversarial attacks. First, that the goal is to repurpose the network rather than cause it to make a specific mistake, second that the magnitude of adversarial programs can be large, while traditional adversarial attacks are of a small perturbations magnitude, and third adversarial defense methods may be specific to original data and may not generalize to data from the adversarial task.

To further explore dependence on the details of the model, we performed adversarial reprogramming attacks on models with random weights. We used the same experiment set up and MNIST reprogramming task as in Section 4.2 -we simply used the ImageNet models with randomly initialized rather than trained weights. The MNIST classification task was easy for networks pretrained on ImageNet (Table 1 ). However, for random networks, training was very challenging and generally converged to a much lower accuracy (only ResNet V2 50 could train to a similar accuracy as trained ImageNet models; see Table 1 ). Moreover, the appearance of the adversarial programs was qualitatively distinct from the adversarial programs obtained with networks pretrained on ImageNet (see Figure Supp. 2b) . This finding demonstrates that the original task the neural networks perform is important for adversarial reprogramming. This result may seem surprising, as random networks have rich structure adversarial programs might be expected to take advantage of. 

2017):

. Other work has demonstrated that it is possible to use random networks as generative models for images (Ustyuzhaninov et al., 2016; He et al., 2016) , further supporting their potential richness. One explanation may be that randomly initialized networks perform poorly for simple reasons, such as poor scaling of network weights at initialization, whereas the trained weights are better conditioned.

One explanation of adversarial reprogramming that is motivated by transfer learning (Yosinski et al., 2014) is that the network may be relying on some similarities between original and adversarial data. To address this hypothesis, we randomized the pixels on MNIST digits such that any resemblance between the adversarial data (MNIST) and images in the original data (ImageNet) is removed (see Figure Supp . 3). We then attempted to reprogram pretrained ImageNet networks to classify the shuffled MNIST digits. Despite shuffled MNIST not sharing any spatial structure with images, we managed to reprogram the ImageNet network for this task (Table Supp . 7) with almost equal accuracy to standard MNIST (in some cases shuffled MNIST even achieved higher accuracy). We also investigated the possibility of reprogramming shuffled CIFAR-10 images. Our results show that it is possible to reprogram neural networks to classify shuffled CIFAR-10 images (Table Supp. 7 ). The accuracy for shuffled CIFAR-10 decreased as the convolutional structure of the network is not useful to classify the shuffled images. However, the accuracy was comparable to that expected from fully connected networks (Novak et al., 2019) . These results thus suggest that transferring knowledge between the original and adversarial data does not completely explain the susceptibility to adversarial reprogramming. Even more interestingly, these results suggest the possibility of reprogramming across tasks with unrelated datasets and across domains.

4.5. CONCEALING ADVERSARIAL PROGRAMS:

In our previous experiment, there were no constraints on the size (number of program pixels) or scale (magnitude of perturbations) of the adversarial program. Here, we demonstrate the possibility of limiting the visibility of the adversarial perturbations by limiting the program size, scale, or even concealing the whole adversarial task. In these experiments, we used an Inception V3 model pretrained to classify ImageNet.

In our first experiment, we adversarially reprogrammed the network to classify MNIST digits while limiting the size of the program (Figure 3a ). Our results show that adversarial reprogramming is still successful, yet with lower accuracy, even if we use a very small adversarial program. In our next experiment, we made the adversarial program nearly imperceptible by limiting the L inf norm of the adversarial perturbation to a small percentage of the pixel values. Our results show that adversarial reprogramming is still successful (Figure 3b ) even with nearly imperceptible programs.

Further, we tested the possibility of concealing the whole adversarial task by hiding both the adversarial data and program within a normal image from ImageNet. To do this, we shuffled the pixels of the adversarial data (here MNIST), so that the adversarial data structure is hidden. Then, we limited the scale of both the adversarial program and data to a small fraction of the possible pixel values. We added the resulting image to a random image from ImageNet. Formally, we extended our reprogramming method as follows:

EQUATION

where X, M and W are as described in Section 3, P X is the adversarial data combined with the adversarial program, ix is the shuffling sequence (same for M and ∀X), α is a scalar used to limit the perturbation scale, and X ImageN et is an image chosen randomly from ImageNet, which is the same for all MNIST examples. We then optimized the adversarial program for the network to classify MNIST digits (see Equation 3). The resulting adversarial images are very similar to normal images from ImageNet (see Figure 3c ), yet the network is successfully reprogrammed to classify MNIST digits, though with lower accuracy (see Figure 3c ). This result demonstrates the possibility of hiding the adversarial task. Here, we used a simple shuffling technique and picked an image from ImageNet to hide the adversarial task, but one could go further and use more complex schemes for hiding the adversarial task and optimize the choice of the image from ImageNet, which may make adversarial reprogramming more effective and harder to detect.

5. DISCUSSION:



5.1. FLEXIBILITY OF TRAINED NEURAL NETWORKS:

We found that trained neural networks were more susceptible to adversarial reprogramming than random networks. Further, we found that reprogramming is still successful even when data structure is very different from the structure of the data in the original task. This demonstrates a large flexibility of repurposing trained weights for a new task. Our results suggest that dynamical reuse of neural circuits should be practical in modern artificial neural networks. This holds the promise of enabling machine learning systems which are easier to repurpose, more flexible, and more efficient due to shared compute. Indeed, recent work in machine learning has focused on building large dynamically connected networks with reusable components (Shazeer et al., 2017) .

It is unclear whether the reduced performance when targeting random networks, and when reprogramming to perform CIFAR-10 classification, was due to limitations in the expressivity of the adversarial perturbation, or due to the optimization task in Equation 3 being more difficult in these situations. Disentangling limitations in expressivity and trainability will be an interesting future direction.

5.2. ADVERSARIAL GOALS BEYOND THE IMAGE DOMAIN:

We demonstrated adversarial reprogramming on classification tasks in the image domain. It is an interesting area for future research whether similar attacks might succeed for audio, video, text, or other domains and tasks. Our finding that trained networks can be reprogrammed to classify shuffled images, which do not retain any of the original spatial structure, suggests that reprogramming across domains is likely possible.

Adversarial reprogramming of recurrent neural networks (RNNs) would be particularly interesting, since RNNs (especially those with attention or memory) can be Turing complete (Neelakantan et al., 2015) . An attacker would thus only need to find inputs which induced the RNN to perform a number of simple operations, such as increment counter, decrement counter, and change input attention location if counter is zero (Minsky, 1961) . If adversarial programs can be found for these simple operations, then they could be composed to reprogram the RNN to perform any computational task.

A variety of nefarious ends may be achievable if machine learning systems can be reprogrammed by a specially crafted input. The most direct of these is the theft of computational resources. For instance, an attacker might develop an adversarial program which causes the computer vision classifier in a cloud hosted photos service to solve image captchas and enable creation of spam accounts. If RNNs can be flexibly reprogrammed as mentioned above, this computational theft might extend to more arbitrary tasks. A major danger beyond the computational theft is that an adversary may repurpose computational resources to perform a task which violates the code of ethics of system providers. This is particularly important as ML service providers are invested in protecting the ethical principles and guidelines that governs the use of their services.

6. CONCLUSION:

In 

:



Figures and Tables:

,

Figure 1: Illustration of adversarial reprogramming. (a) Mapping of ImageNet labels to adversarial task labels (squares count in an image). (b) Two examples of images from the adversarial task (left) are embedded at the center of an adversarial program (middle), yielding adversarial images (right). The adversarial program shown repurposes an Inception V3 network to count squares in images. (c) Illustration of inference with adversarial images. The network when presented with adversarial images will predict ImageNet labels that map to the adversarial task labels.

Figure 2: Examples of adversarial programs for MNIST classification. Adversarial programs which cause six ImageNet models to function as MNIST classifiers. Each program is shown being applied to an MNIST digit.

Figure 3: Adversarial programs may be limited in size or concealed. In all panels, an Inception V3 model pretrained on ImageNet is reprogrammed to classify MNIST digits. Example images (a) with adversarial programs of different sizes, and (b) with adversarial programs of different perturbation scales. In (c), the adversarial data + program (right) are hidden inside a normal image from ImageNet (left), yielding an adversarial image (center) that is able to reprogram the network to function as an MNIST classifier. The pixels of the adversarial data are shuffled to conceal its structure.

Neural networks adversarially reprogrammed to perform a variety of tasks. Table gives accuracy of reprogrammed networks to perform a counting task, MNIST classification task, CIFAR-10 classification task, and Shuffled MNIST classification task.

Table content: <table><tr><td>Model</td><td/><td colspan="3">Pretrained on ImageNet</td><td>Untrained</td></tr><tr><td/><td>Counting</td><td colspan="2">MNIST</td><td colspan="2">CIFAR-10</td><td>MNIST</td></tr><tr><td/><td/><td>train</td><td>test</td><td>train</td><td>test</td><td>test</td></tr><tr><td>Incep. V3</td><td>0.9993</td><td colspan="4">0.9781 0.9753 0.7311 0.6911 0.4539</td></tr><tr><td>Incep. V4</td><td>0.9999</td><td colspan="4">0.9638 0.9646 0.6948 0.6683 0.1861</td></tr><tr><td colspan="2">Incep. Res. V2 0.9994</td><td colspan="4">0.9773 0.9744 0.6985 0.6719 0.1135</td></tr><tr><td>Res. V2 152</td><td>0.9763</td><td colspan="4">0.9478 0.9534 0.6410 0.6210 0.1032</td></tr><tr><td>Res. V2 101</td><td>0.9843</td><td colspan="4">0.9650 0.9664 0.6435 0.6301 0.1756</td></tr><tr><td>Res. V2 50</td><td>0.9966</td><td colspan="3">0.9506 0.9496 0.6</td><td>0.5858 0.9325</td></tr><tr><td>Incep. V3 adv.</td><td/><td colspan="2">0.9761 0.9752</td><td/></tr><tr><td>4.3 CIFAR-10</td><td/><td/><td/><td/></tr></table>

this work, we proposed a new class of adversarial attacks that aim to reprogram neural networks to perform novel adversarial tasks. Our results demonstrate for the first time the possibility of such attacks. They are also illustrative of both surprising flexibility and surprising vulnerability in deep neural networks. Future investigation should address the properties and limitations of adversarial reprogramming, and possible ways to mitigate or defend against it.Table Supp. 3: Hyper-parameters for adversarial program training for MNIST classification adversarial task. For all models, we used the Adam optimizer with its default parameters while decaying the learning rate exponentially during training. We distributed training data across a number of GPUs (each GPU receive 'batch' data samples ). We then performed synchronized updates of the adversarial program parameters. (The Model Inception V3 adv is pretrained on ImageNet data using adversarial training method.Table Supp. 4: Hyper-parameters for adversarial program training for CIFAR-10 classification adversarial task. For all models, we used ADAM optimizer with its default parameters while decaying the learning rate exponentially during training. We distributed training data on number of GPUS (each GPU receive 'batch' data samples ). We then performed synchronized updates of the adversarial program parameters. TableSupp. 5: Hyper-parameters for adversarial program training for MNIST classification adversarial task. For all models, we used the Adam optimizer with its default parameters while decaying the learning rate exponentially during training. We distributed training data across a number of GPUs (each GPU receive 'batch' data samples ). We then performed synchronized updates of the adversarial program parameters. TableSupp. 6: Hyper-parameters for adversarial program training for Shuffled CIFAR-10 classification task. For all models, we used 1 GPU and a batch size of 100. We decayed the learning rate with a cosine schedule over 200 epochs. We performed hyperparameters tuning and picked the best parameters based on a held-out validation set. The best parameters are shown below.

Table content: <table><tr><td>ImageNet Model</td><td>λ</td><td colspan="6">batch GPUS learn rate decay epochs/decay steps</td></tr><tr><td>Inception V3</td><td colspan="2">0.05 100</td><td>4</td><td>0.05</td><td>0.96</td><td>2</td><td>60000</td></tr><tr><td>Inception V4</td><td colspan="2">0.05 100</td><td>4</td><td>0.05</td><td>0.96</td><td>2</td><td>60000</td></tr><tr><td colspan="3">Inception Resnet V2 0.05 50</td><td>8</td><td>0.05</td><td>0.96</td><td>2</td><td>60000</td></tr><tr><td>Resnet V2 152</td><td colspan="2">0.05 50</td><td>8</td><td>0.05</td><td>0.96</td><td>2</td><td>60000</td></tr><tr><td>Resnet V2 101</td><td colspan="2">0.05 50</td><td>8</td><td>0.05</td><td>0.96</td><td>2</td><td>60000</td></tr><tr><td>Resnet V2 50</td><td colspan="2">0.05 100</td><td>4</td><td>0.05</td><td>0.96</td><td>2</td><td>60000</td></tr><tr><td>Inception V3 adv.</td><td colspan="2">0.01 50</td><td>6</td><td>0.05</td><td>0.98</td><td>4</td><td>100000</td></tr><tr><td>ImageNet Model</td><td>λ</td><td colspan="6">batch GPUS learn rate decay epochs/decay steps</td></tr><tr><td>Inception V3</td><td colspan="2">0.01 50</td><td>6</td><td>0.05</td><td>0.99</td><td>4</td><td>300000</td></tr><tr><td>Inception V4</td><td colspan="2">0.01 50</td><td>6</td><td>0.05</td><td>0.99</td><td>4</td><td>300000</td></tr><tr><td colspan="3">Inception Resnet V2 0.01 50</td><td>6</td><td>0.05</td><td>0.99</td><td>4</td><td>300000</td></tr><tr><td>Resnet V2 152</td><td colspan="2">0.01 30</td><td>6</td><td>0.05</td><td>0.99</td><td>4</td><td>300000</td></tr><tr><td>Resnet V2 101</td><td colspan="2">0.01 30</td><td>6</td><td>0.05</td><td>0.99</td><td>4</td><td>300000</td></tr><tr><td>Resnet V2 50</td><td colspan="2">0.01 30</td><td>6</td><td>0.05</td><td>0.99</td><td>4</td><td>300000</td></tr><tr><td>Random Model</td><td>λ</td><td colspan="6">batch GPUS learn rate decay epochs/decay steps</td></tr><tr><td>Inception V3</td><td colspan="2">0.01 50</td><td>4</td><td>0.05</td><td>0.96</td><td>2</td><td>100000</td></tr><tr><td>Inception V4</td><td colspan="2">0.01 50</td><td>4</td><td>0.05</td><td>0.96</td><td>2</td><td>100000</td></tr><tr><td colspan="3">Inception Resnet V2 0.01 50</td><td>4</td><td>0.05</td><td>0.96</td><td>2</td><td>60000</td></tr><tr><td>Resnet V2 152</td><td colspan="2">0.01 20</td><td>4</td><td>0.05</td><td>0.96</td><td>2</td><td>60000</td></tr><tr><td>Resnet V2 101</td><td colspan="2">0.01 20</td><td>4</td><td>0.05</td><td>0.96</td><td>2</td><td>60000</td></tr><tr><td>Resnet V2 50</td><td colspan="2">0.01 50</td><td>4</td><td>0.05</td><td>0.96</td><td>2</td><td>60000</td></tr><tr><td/><td colspan="2">ImageNet Model</td><td>λ</td><td>optimizer</td><td colspan="2">learn rate</td></tr><tr><td/><td colspan="2">Inception V3</td><td>0</td><td colspan="2">Momentum 0.1</td><td/></tr><tr><td/><td colspan="2">Inception V4</td><td>0.1</td><td colspan="3">Momentum 0.001</td></tr><tr><td/><td colspan="3">Inception Resnet V2 0</td><td>ADAM</td><td colspan="2">0.001</td></tr><tr><td/><td colspan="2">Resnet V2 152</td><td>0.1</td><td colspan="2">Momentum 0.1</td><td/></tr><tr><td/><td colspan="2">Resnet V2 101</td><td colspan="3">0.01 Momentum 0.1</td><td/></tr><tr><td/><td colspan="2">Resnet V2 50</td><td colspan="3">0.01 Momentum 0.1</td><td/></tr></table>

Peer review (iclr2019):
 Summary: The authors present a novel adversarial attack scheme where a neural net is repurposed or "reprogrammed" to accomplish a different task than it the one it was originally trained on. This reprogramming from task1 to task2 is done through a given image from task2 additively enhanced with an adversarial program which is trained given the knowledge of the models parameters. A mapping from the repurposed output from task1 to relevant output for taks2 is also necessary (h_g function). Review: This approach seems quite novel as it enables the repurposing of ImageNet classifiers to be used for counting dots in images, MNIST and CIFAR10 classifications. This new type of "adversarial attack" by repurposing a model shows surprising efficacy at allowing an attacked models to change its task at hand. Some tasks being more difficult (CIFAR10) than MNIST or counting dots. The paper is well-written and explains clearly the proposed technique. The proposed technique is simple in its formulation. The assumption it is based on (access to model parameters) is acceptable for the sake of proof of concept. Overall it is an interesting paper to read and seems of significance for the community working on adversarial attacks. Few comments/questions come to mind though: - The adversarial images are quite different from a common image as they embed the program around the new task images. This makes the technique itself quite susceptible to detection (just look at the statistics of the input images). - How do you handle front end processing? Usually for ImageNet classification, a system will (for instance) resize its input to 256x256, center crop to 224x224 and renormalize the RGB features to match the statistics from the training data. It looks like the images generated are passed as inputs to the system. Do you assume that the front-end steps are not applied or do you assume it is (by including them in the network while training your program W). My assumption is that you include those steps in the training network for W. - The size of the program is disproportionately big compare to the task2 embedded image. This begs the question: what happens when you limit the size of the program to a smaller percentage of the whole image? When do you see a break in the reprogramming? Do you need that much extra programming W in your adversarial images? - As the adversarial images seem to be quite easy to detect, would it be easy to integrate it into some task1 images? The equation (2) gives X_{adv} = .tilda{X} + P, could you use X_{adv} + w * X_{task1}, basically finding a way to hide the program and task2 image within a task1 image. This seems difficult, but have you thought of such approach? Overall this is a paper that is a pleasant read and should be considered for publication. Post Rebuttal: The draft paper improves on the original paper and demonstrates possible concealment of the program. I adjusted my rating upward to 8.