Hello everyone, my name is Mustafa Al-Zantout, I am a PhD candidate at UCLA. Hi, my name is Yash Sharma, I'm a visitor at Cornell. Our talk today about practical adversarial attacks in challenging environments is a joint work with my advisor, Professor Manis Ravistafa from UCLA, Shabru Shakraborty from IBM Research, and Sram Swamy from ARL, and all other collaborators. Of course, everyone here in the audience knows that artificial intelligence is playing a big role in our lives today. It is used in different applications, like self-driving cars, e-health, augmented surveillance, and fraud detection. And as you notice, many of these applications are security-critical and safety-critical applications. So we need to have an accurate artificial intelligence model. And most of these models of artificial intelligence rely on what's called machine learning, which starts with having a set of training data. Then you apply a training algorithm or learning algorithm on this training data to learn a model. And this model, it helps to understand what is the pattern that exists in the training data, and then generalize later to distant data at the inference time. This model is called machine learning. This learning model is often deployed as a service, where users can feed some new test data, and this data will produce an output protection from the model. But if we have an attacker or a malicious user, he can manipulate the new data in order to force the model to produce some desired outputs. Here is an example. Of course, we know that all humans are good. It's good, it's good, it's good. Humans are good at recognizing objects. So it's easy for a human to tell which image, like the first image is a panda, and second one is a school bus. Even a small kid can do this task and do it very well. But not only humans are good at object recognition right now. Machines are also getting better. So a decent computer vision algorithm can also tell, like, the first image is a panda, and the second one is a school bus. And they can do this very accurately. It was even in 2014 that the best machine learning model for computer vision on the ImageNet dataset could achieve the human accuracy on the same dataset. So it can have a super human accuracy. But does this mean that we are now at the point at which we can rely on machine learning in doing all our tasks? Given that the tasks are mostly safety and security critical applications, and machine learning can do it even more accurately than human, let's take this example. Here is the same image we have shown before, like a human and a machine. Both of them can recognize it correctly. And if there is a malicious user or an attacker, he can add some small, cleverly computed perturbation noise to this image, such that the result, it still looks for me as a school bus. So a human who looks at the output image, the one to the right, will say, okay, this is still a school bus. But the machine learning model who previously recognized the original image correctly, with very high accuracy, it will now be fooled. It will say, this is an ostrich. And that's a serious threat. Because the attacker can even have control on what would be the output misclassification label by the machine learning model. So he can force it. So he can force it. And he can force the model to produce the output he wants to set to protect. And this idea is known as adversarial attacks or adversarial examples. It was first discovered in 2014 by CZK et al., who have noticed that in their paper called Incorrecting Proverbs of New York Networks, they have noticed that small perturbation in the input can lead to significant output changes in the output. And for example, when they add this, when they add this small noise to this school bus image, it will now be predicted as an ostrich instead of a school bus. And at the same year, Ion could follow. He started studying this phenomena more and more in his paper called Explaining and Harnessing Adversarial Examples. And he came up with a method called FGSM, or Fast Gradient Sign Method, which is an efficient method to compute what would be the adversarial noise, what would be the small perturbation. We can add to the original image to cause the model to misclassify, or misprotect. And the idea is very simple. So given an input image, he computes the loss of the model for this input image, and then he computes the gradient of the loss with respect to the input, and then he takes the sign and adds this to the original image after scaling it down. So that the perturbation will be small. And the intuition here is that the loss, is a quantification of the error produced by the network. And the gradient of the loss is the direction at which it will maximize this error rate. And during the training, you add to the weights some update in the opposite direction of the gradient of the loss to minimize the error. But if you want to make the model misclassify or misprotect, you need to add an update to the input in the direction of the gradient of the loss. And by applying this, instead of having the model predicting the left image as a panda correctly, it will now say it is a gibbon with 99% accuracy. It is not only wrong, but it is wrong with very high confidence. And this happens four years ago, but right now, after four years of research, we have a lot of updates in this domain. A lot of researchers are studying this phenomena, and there have been many other attack methods for generation of adversarial attacks. For example, there is a project gradient descent, there is a deep pool, Carlini and Elastic Network, and Houdini and many others. But all of these share a common thing. They rely on the same idea introduced by Ian Goodfellow in 2014, which is computing the loss of the network, finding the gradient, and then adding some perturbation in the direction that maximizes the loss. But not only researchers have been studying attacks, they have also been studying defense. And there is a software library called the IBM Adversarial Robustness Toolkit, and there is another software library called the Cleaver Hands, which is like a benchmark of attacks, algorithm implemented for researchers to use. And there is competitions organized around this domain, like the NEPS 2013 competition. And the CAC competition that we had yesterday in this conference. And yeah, one of the recent updates in this domain is the adversarial batch work, which is like the following. They can, researchers have found that they can have a printed physical batch that if you put it like next to any object, then a machine learning model looking at the image of this object, it will mis-protect it. So for example, the original image, if you have a banana, and take a photo of it, and fit it into the machine learning model, it will say it is a banana with 99% accuracy. But if you put this small piece of sticker paper next to it, take another photo, then it will say like it is a toaster with 99% accuracy. And this is a physical world batch. This is not a modification of the image. This is something you put it like next to the banana in the physical world. So, so cool. Does this mean are we done with this problem? Like is everything solved? The answer is we believe it is no, because there are a lot of remaining open challenges. And our purpose of the talk today is to introduce to you like a few of these open challenges. Like not all of them, because there exist many open problems, but we want to like highlight some few open challenges and what research work we have done in this domain. So the first one is like how to attack machine learning model, while you are having only limited access to this model and only limited knowledge about the model. Second one is how to attack machine learning model that is not doing only images, but other things like natural language, understanding models. And third one is to how to achieve physical world like attacks against speech recognition models. So to start with the first one, let me recap and give you a reminder of how to complete access. For example, remember what we have said about we need to complete a small perturbation that will maximize the error. This small perturbation, if we denote it as R, it is desired for the objective of the talker is to have F of X plus R, the projection of the model, equal to a desired label, L, the target label. Such is like the image after adding the noise, still remains... close to the original image. And most of the work in doing this rely on iterative gradient computation. So it needs to complete the gradient of the loss with respect to the input. And that will be the perturbation you add to the original image. But computing the gradient, it's only possible if you... first, you need to know like what is the model architecture, and you need to know what is the model weights and parameters in order to complete this gradient. So this approach is... are only successful in a white-box setting, where you have complete knowledge about the model and its internals. But black-box attacks are more practical, because in practice you will be willing to attack a model, you only have access to use it, but you don't have access to its internals, and you don't know its structure or its weight. So there have been research work about this, including the Bevernot et al. in 2016, that trained substitute models, for... trained using the result of query outputs to the victim model, and then they attack their own substitute model, and they hope that this attack will transfer to the other model. And there is other work by Chen et al. in 2017, this is one of state-of-the-art works in black-box attacks. Instead of computing the exact gradient, by knowledge of the model internals, they tried to estimate an approximate gradient, through only black-box queries to the model. So they do a difference equation estimation, they change every pixel in the image a little bit, and they estimate what is the result of changing this pixel. How much does it affect the cardiac score probability. But the problem with this method is that they are not efficient. They require doing a huge number of queries to the victim model. But if you have limited access to the model, then you want to do an attack with a small number of queries, to prevent the model owner from knowing that something bad is happening. And that's why we introduced our work called GenAttack. So GenAttack is a black-box attack against machine learning models. It can be done without knowing the internal model architecture or parameters, and it assumes that the attacker only has the capability to query the model as a black-box function. So you feed an input, and you get the prediction scores out of the model, without knowing anything about what's happening inside the model. And the idea is the following. Instead of relying on gradient computing, which requires knowledge of the model internals, or gradient approximate estimation, which requires a huge number of queries, we use a gradient-free optimization. So we don't even need to estimate or approximate the gradient. And within the gradient-free optimization, we can compute our adversarial examples. And right now, Yash is going to tell you more details about how does it work. Okay. Thank you, Mustafa. So how does our GenAttack work? So it's basically an implementation of genetic algorithms. It's based upon that. So how do genetic algorithms work? So first you initialize the population, and the way you do that is you make a bunch of random perturbations of the input, and that becomes your population. You then evaluate the fitness of each member. You want to see how good they are. And the way you evaluate the fitness in this case is look at the target prediction probability. How good are they at getting the model to misclassify? How good are they at being adversarial? If the example is already adversarial, you're done. You output it. If not, you need to start iterating. You need to start optimizing. So you then do random selection. What is each individual population's perturbation? Their random perturbations of the image. So the way genetic algorithms work is that because you don't have access to the gradient, you don't know exactly what direction to go in, you try to search the space as efficiently as possible. So you try to randomly search and hit on all possible places. So you initialize the population, these random perturbations. You evaluate the fitness. Some are good, some aren't. You then, if you're done, you're done. If not, then you then select a few of these. And these are the parents, which is why they're called genetic algorithms. And the selection is done with a probability proportional to the fitness score. Because we would rather select parents which are good. The way you do crossover is you just randomly combine these parents, and you get out children, which is why it's called genetic algorithms. I'm not sure what you mean. So crossover is usually, you get one point, and then crossover, and you just, there's one point where you swap, or two points where you take a segment, and you swap them? The way we did it is just, so we have vector, these are vectors basically, and we just did a random combination of the vector. Oh, each individual? Yes, yes, yes. So we do crossover, and then with a small probability, a mutation probability, we do a mutation. And the mutation is just a random change. And so in this way, we try to explore the space very, very well. So now we're going to present our results. So we were expecting this attack would be good, but we were expecting that it would probably be more query efficient than the zoo attack, which is the current state of the art, because estimating the gradient is so costly. But genetic algorithms are known to have high computational complexity. So we weren't expecting that much of an improvement. However, we were very surprised. It was a tremendous improvement. So for example, here are the CIFAR-10 examples. So on the left, you can see the original label. On the top, you can see the predicted label. Clearly, it looks like the original example. However, they're all classified as adversarial to each of the corresponding classes. So we were able to succeed against all of the classes. And we were also able to attack ImageNet models, which are the more realistic images. These are the larger-scale, higher-resolution images. We were able to attack ImageNet models. So for example, that example is a bird, a caroto gallerita. And we were able to get it to classify as a trolley bus. And it looks basically the same. So in terms of evaluation, here we found a big difference. So the current state of the art is Zoo, which is estimating the gradient. So for MNIST and CIFAR-10, Zoo and Genetech do pretty well. MNIST is small-scale images. They're black and white, and they're numbers. CIFAR-10 are small-scale images, but they're color images. ImageNet images are larger-scale, higher-resolution images. So the feature space is way bigger. It's harder to attack. Interestingly, Zoo, because it's so computationally inefficient, it takes so many queries to estimate the gradient, it's not able to succeed on ImageNet in the targeted case. Targeted case meaning instead of just getting the model to misclassify, which is very easy on ImageNet because there's so many classes, you could get it to misclassify from an arctic fox to a white fox, and that qualifies as an adversarial example. But for example, a targeted case where you wanted to get it classified as a trolley bus. Zoo actually failed in this case relatively frequently while Genetech didn't, basically due to the fact that it was actually tractable on ImageNet. So this really expresses the query efficiency. So we just measured the mean number of queries it took to compute a successful adversarial example. For MNIST CIFAR-10 ImageNet, what Zoo would do is they would try to run iterative optimization and once they were successful they would abort. So we were expecting that for MNIST and CIFAR-10 there would be much less queries. However, it wasn't. It was basically the same, only about 500,000 more on ImageNet, which is a lot, but seeing how inefficient Zoo is, it's not that much relatively. However, for Genetech, for the smaller scale images because they're easier and the feature space is smaller, we were able to succeed in a drastic fraction of queries. So about 2,000 times more query efficient. And for ImageNet, which are drastically larger feature space, we were 27 times more query efficient, which is very good. However, there is more improvement to be done just because it's a much, much harder case. So now we're going to attack defenses. So there's been a lot of defenses proposed, but the one defense which has kind of stood the test of time is adversarial training. And adversarial training is very, very natural. So what it is is, oh, we're weak against adversarial examples, let's train with them. And so we're going to train with them and maybe we'll be robust against adversarial examples. So a few caveats in this. You can't just take a bunch of adversarial examples and then train with them and then expect to be extremely robust. So Madri, who's part of this MIT lab, they noticed that the way in which you can get this is you increase the model capacity. So assuming that adversarial examples are outside the distribution, the data distribution that the model is seeing, which is pretty plausible for the fact that the model is misclassifying them, you need more capacity to be able to handle this larger data distribution. So for example, for MNIST, which is a relatively easy data set, they had to increase their model by 10 times to be robust to small perturbation attackers. And also, instead of using FGSM, which is that single step attacker in the direction of the gradient, use iterative attackers. And the reason why iterative attackers are better is because now instead of making a big jump, when you had to actually make a curved jump, a nonlinear jump, you can make small iterative linear jumps and that's approximately nonlinear. So there are a few methods. So the standard way is exactly what you would think. So while you're training you supplanted with adversal examples and keep going. However, there's a problem with that in that you're generating adversal examples against a weak model because the model is currently training. You want the model to be robust to strong adversal examples. Also, the adversal example generation process is tied in with the model training. So you might learn some degenerate solution where the actual adversal examples are weak and it's because that would just minimize the loss because the only optimization objective here is the loss. So ensemble can generate adversal examples against an ensemble that's already been trained and use that to train your original model. And they found much better results. And it actually was validated in the NIPS competition which we talked about before. Almost all the defenses are based upon this model. So now we attack this model which is found to basically be the most robust defense and we were able to succeed. And it only took a few more queries than attacking a clean model but still able to succeed. And I think it was about 100,000 for inception V3 a clean model. It was 200,000 for the ensemble defense. Took a little bit longer but way more tractable than Zoom. And see we can still that's a sea anemone and now it's a park meter. Next we then tackle the big problem in machine learning or adversal machine learning. So Anisha Thalia who is at also at MIT he introduced this problem obfuscated gradients. And this actually got awarded the ICML 2018 best paper showing that it's a big problem in the community. So we found there's sort of a bunch of defenses which were published and he attacked them and he found that oh all of these defenses aren't really more robust they're relying upon a phenomenon which is why they have high robustness. So remember that before GenAttack basically all attacks were gradient based. So what they did was oh instead of becoming actually robust to perturbations we're just going to mess up the gradients so attackers fail. And they found three instances of this. So shattered gradients is when the defense renders a gradient to be non-existent or incorrect. Stochastic gradients is when they just make it randomized. It becomes very random it becomes very hard to optimize. And exploding or vanishing gradients where the gradients just start exploding and again these are all just harming optimization attacks which are based on the gradient. So they had a bunch of methods to circumvent. So BPDA was just oh let's analyze the model find the non-differentiable component or replace it with something that's approximately equal but differentiable. Now we succeed. Or EOT which was for succeeding in stochastic gradients where we instead of just optimizing random sample of the defense you just keep randomly sampling from the defense so you optimize through the random transformation. And you could be robust to the whole all the random perturbations it introduces. However this only works in the white box case. You need to know what's the non-differentiable component to use BPDA. You need to know that this is a randomized defense to actually do put in the computational budget to actually optimize through this transformation. However as we discussed GenAttack is gradient free. It doesn't estimate the gradient it doesn't need the gradient. So it should work against these defenses. We found that to be true. So bit depth we attacked a bunch of non-differentiable input transformations which are the normal ones that are used. So bit depth reduction is the images are represented using a limited number of bits. You cut off the last few bits which is non-differentiable. These gradient based attacks fail. We were able to succeed. For JPEG compression you just take your image you save it as JPEG which compresses the image into the non-differentiable transformation. We succeeded. Zoo failed. And TVM is a very costly attack. One it's randomized because the way it works it's total variance minimization. So they do random dropout on the pixels and then afterwards they minimize the total variation across the example. So one it's very costly because they're solving an optimization problem every time they do inference. And two it's randomized. So it's much harder. Zoo because it's so computationally costly a little tidbit on that to actually run Zoo on a hundred image net images it takes five days on a Titan X GPU which is really expensive. So when the actual inference is literally an optimization problem Zoo becomes completely intractable. However algorithm wasn't and we were able to succeed about 70% of the time. So we targeted basically the number one defense is adversarial training which has stood the test of time and obfuscated grains which is what almost all the defenses currently are relying upon. So now we've discussed attacking models with limited access. Now we're going to discuss attacking natural language models. So why can't we just do the same thing we do with images in the natural language case? Well natural language models are different. First words and text are discrete unlike image pixels which are continuous. So you might say oh but word to vec word embeddings it maps these words to these vector representations. So how about you take the gradient you go in the direction of the gradient and you pick a word replacement which is in that direction of that gradient. However with pixels and with images you can make a worst case perturbation and you can make it imperceptible up to a very large scale parameter. With natural language if you change a single word and you just change a single word so it maximizes the target label it's going to probably have nothing to do with the sentence and so it's going to be easily detected and it's going to completely ruin the semantics of the sentence. So you can't really do that. Secondly that word change needs to satisfy the language's grammar constraints. If you change a noun to a verb even if it's related to the context of the sentence it's going to make the sentence make no sense and it's going to be easily detected. So these are all the difficulties which is why it's very hard to apply gradient based optimization. So how about you use Genetech genetic algorithms. So again here's the same algorithm and again this is really the only tower of knowledge the only algorithm in the literature which is able to actually make adversarial changes and get adversarial examples which are semantically and syntactically similar and also it's black box which makes it practical. So the thing is we did the exact same thing as before. The fitnesses the target label prediction probability all of these things except the mutation is different and instead of just making a random change we now want to make a change such that the word replacement is semantically and syntactically similar. So how do we do that? So first we compute the n nearest neighbors of selected word in the embedding space. So these are supposed to be similar. However we did use a counterfeited embedding because actually in the embedding space good and bad are very similar because these word embedding models are trained on co-occurrence good and bad appear in similar context however if you replace good with bad you completely ruined the semantics of the sentence. So the counterfeited embedding is it takes these word embeddings and injects synonym and antonym sort of constraints so that the only words that are close to this particular word are ones which appear in the same context and are synonyms so the antonyms are far away. Then after that we have our nearest neighbors but we don't know if they fit in the context we don't know if they're the right part of speech all these things. Then we take a language model which is used to predict the next word in a sentence so if the next word is something which doesn't appear in that context given the previous word in the sentence and we filter out words which don't fit in the context so now we have words which are semantically similar and syntactically similar and at that point we now perform the replacement by maximizing the target probability. So we have these synonym constraints semantic and syntactic constraints and then we try to make the replacement based on the target probability and we actually found very good results so for example this is the IODB data set which is the classic data set for sentiment analysis and as you can see here this review is very negative it's negative and the original text prediction was negative with 78% confidence however all the algorithm did was it changed terrible to horrific which is a synonym and it changed regarded considered to regarded which is another synonym and it changed kids to youngsters which is another synonym and now it classifies it as positive which is a vulnerability and it's actually a true adversarial example because it retained the semantics in syntactics. Next we attack textual entailment so what textual entailment is is you have some premise some situation you could say and then you have some hypothesis and then the model predicts whether this hypothesis entails the premise contradicts the premise or is neutral to the premise so for example in this original prediction a runner wearing purple strives for the finish line the hypothesis the runner wants to head to the finish line so this does entail the premise which is correct however the adversarial example is it just replaced runner with racer which is a synonym so it should still entail the premise however the model predicts contradiction so that's definitely a problem the second example it's now one that's originally a contradiction the premise is a man and a woman stand in front of a Christmas tree contemplating a single thought the hypothesis is two people talk loudly in front of a cactus which does not entail the premise so it's a contradiction however if you change people talk to humans chit chat now it says it entails the premise which is clearly wrong so now I'm going to pass it over to Mustafa we're going to talk about the open problems in speech recognition Thanks Thank you Thanks Yesh So that's a kind of modality that we the machine learning models typically accept in our nowadays world is the speech the speech modality and of course like many of us have in their home these smart smart speakers that can listen to your voice voice commands and apply it for example Siri and Google Google Home you can ask them to do online transactions for you so So the equivalent of adversarial attacks in speech recognition wordlet is the following. You want to, like, produce some word such that a human who listens to it will say that this word is yes, while the machine learning model will conflict with this, will say no. No. And this word was a no, while it still sounds for the human as a yes. And we did this work. It was published in NEFS machine conception workshop 2017. It is a black box attack on speech recognition model using, again, our genetic algorithm optimization approach. So the victim model we used. And there was another word. Another work by Carlini from UC Berkeley, which was going to white box attack against speech recognition models. Our work was against speech commands data set, which recognized, like, a single command word, like yes, no, up, down, and so. But Carlini's work, it is a white box, but it can perform attack against a whole sentence classification model. So we have found. We can achieve very high success rate. So for example, every word in the data set that says can be converted to be misclassified as a no with 96% accuracy, so attack success rate. And it can be targeted to be misclassified as an up with 80% under the same limit of perturbation we add to the input audio waveform. And we qualify it. And what is the human perception of the words after you add this adversarial noise? So I found that on average, like 90% of human listeners who were recruited for this study, they still recognize the word as the source label, the original label, even though the model will misclassify it as a target label. And 9% of them will say that this word is a non-word for me, or like it's a corrupt word. And only one of them, 1% of them, recognized it as a target word. But the challenge right here in this problem right now is that this work on adversarial attack against speech recognition model, they assume you have a direct access to the model. So you can feed your audio directly into the model as an input. But there is no equivalent yet for a physical warlike attacks against speech recognition model. For example, in case of images, there is this physical warlike attacks against image recognition model, like the adversarial batch we have shown before, which is like a physical warlike sticker. Or there is this work by Alex Kroken and the MIT team is like taking a picture of adversarial printed image, and it will still remain adversarial. But in physical warlike attack against speech recognition, if you play the adversarial audio from a speaker and record it on the other side from a microphone and feed it into the model, it will no longer become adversarial. So that remains an open challenge, is how to develop robust over-the-air adversarial audio attacks. So as a reminder, there are still many, many, many, many open challenges. We just like to highlight a few of them and the work we have done for each one of them. And we'll be happy to accept your questions. Yes, exactly. We have a constraint on the L-infinity norm. No, we developed our own. And actually, most of our work is available as a one source. Yeah. Okay. Thank you. And other questions? Thank you. Thank you. Thank you. Thank you. Thank you.