Many thanks to Rohan and Amogh for your excellent presentation. And now let's welcome Wei-Ling from Baidu X-Lab. Yeah, he will give us the... Sorry, what was it? Magic tricks for self-driving cars. Yeah, let's welcome. Thanks for the introduction. So good morning, everyone. Thanks for attending our talk. So my name is Wei-Ling Xu. I'm a PhD student in computer science at the University of Virginia. And I'm currently an... I'm an intern researcher at Baidu X-Lab. So today I'm not going here to defend Baidu's deep speech against Berkeley attack. I'm going to show you some interesting magic tricks for self-driving cars. And this is a joint work with my colleagues at Baidu X-Lab, Dr. Zheng Yuzhong and Dr. Yuanhan Jia. So... So is this working? Or should you just use keyboard? Okay, so before my presentation, I wanted to do some... I'll do several... Several clarifications. First, this is just a proof of concept. Second, we are not targeting any autonomous vehicle vendors. And instead, our target is the general computer vision technique that could be used on many self-driving cars. So we are not going to make any big news. Of course, PR... Of course, PR... PR crisis for anybody. So... And... But I believe our attack is very practical and has some implications about self-driving cars. So we ask you not to reproduce our magic tricks against your neighbor's self-driving car. And we are not responsible for any good or bad consequences. Okay. So, first of all, let me briefly introduce typical autonomous vehicle framework. So... So... So, a self-driving car does not necessarily look very different from the other cars we are driving every day. It may have the same cabin, the same wheels, and the same power chain. It's said that it has extra sensors and actuators, as well as a brand, which consists of three major components. The procession module, the prediction module, and the planning module. So, for a self-driving car to drive... To finish... To finish the driving task, it requires some sensors, such as a radar, LiDAR, or camera, to perceive the surroundings on the road. For example, it needs to recognize the drivable areas, and it needs to recognize the other road... Objects on the road, such as the other cars or pedestrians, and something like that. And the perception module recognizes those objects, but it only knows the situation at that moment. And... But... That's why we need a prediction module. So, using... Using the prediction module, we can predict the location of those objects in the future seconds. So that the planning module could make a plan to drive the vehicle smoothly, to avoid obstacles, and to reach the destination. So, in this work, we focus on the camera-based perception techniques. So, it should work like this. Using the camera input... The object detection module should be able to recognize the size and the location of those objects, such as the cars. And the objects could be very close to the camera, and it could be very far from the camera. So, the detection module should be able to recognize all those important objects to make the driving smooth. And here, we want to show you some metrics. So, here we have the DEF CON flag. I think everyone... Everyone here recognizes this as the DEF CON flag. And so, we want to put this in our scene. So, here we just put it on the floor. And you can see that the target perception module just recognized the DEF CON flag as a car with very high confidence. So, we can change the viewpoint of the camera, and the prediction is still very confident. So, next, I will introduce... I will introduce how we implement those attacks. Okay, so this is our target. It's the YOLO V3 model, which is very famous in the computer vision. And I believe some self-driving cars use the similar architectures, even though they use different training sets to get a model on their cars. And this model takes the input of 416 by 416 and in three channels, RGB channels. So, it's a color image input. And the Model V3 model is huge. It has 147 trainable layers and 62 million trainable parameters in total. So, it's a very large and complicated model. And the YOLO V3 model can output 3,549 bonding boxes. Of course, we only show the bonding boxes with a high confidence here, such as the stop sign on the corner. And the target model we use here, it was trained with the COCO data set, the MS COCO data set. So, it has 80 classics in total. But here, we only focus on those important classics, such as the person, car, truck, bus, and bicycle, motorcycles, because those are more related to self-driving cars. And in order to attack the YOLO V3 model, we need to understand how the model does that. And that's the inference. So, for an input image, the YOLO model first spread into several grids. So, the YOLO model actually uses three different grids. This is the first one, the 13 by 3 grid. And it has the 26 by 26 and 52 by 52. Here, we will just use this 13 by 13 as a running example because it's more visible on slides. So, for any unit on this grid, the model will give some prediction about the objects at the center point within this yellow unit. And this prediction will not be wild. It should have some references. So, the technique YOLO V3 uses is called anchor box. So, anchor box is like a reference for a specific prediction of the object detection. So, for each unit of the grid and then for each anchor box, you have a prediction about a specific object. And it is a very long vector. So, I will explain how should we interpret those vectors. And the first four scales are about the boundary box about the detected object. And first, we need to determine the center point of this object. We use the location of this yellow unit. So, here at 11 and 2 on this grid. And we need the output of Tx and Ty to calculate the center point. For example, in this example, the center point is at a green point. And next, we need to use the third and fourth output to calculate the object size. So, it is calculated with one of the anchor boxes. The first one, the width and height of the anchor box. So, here we got this. The detected object should be in this size. And so, this is the location and size of the boundary box. And at this point, we do know which object class is the prediction. So, we have 80 scalars about the boundary box. This is the prediction on the class X. So, YOLOv3 used 80 different sigma outputs to do this class prediction. Instead of the more commonly used softmax function. And here, we can tell that the stop sign should have the highest probability if the model is a good model. But there are some other cases that a boundary box may not contain any objects. So, the YOLOv3 model uses an output called objectnext. So, it is also a sigma output. The higher objectnext means that the higher confidence there is an object in this boundary box. So, we do this multiplication and get the final confidence for this boundary box. So, we know that stop sign has the highest confidence. So, we know that YOLOv3 model predicts this. So, we can see the stop sign at this location. Okay, that's the YOLOv3 model. And let me introduce our third model. I think it's different from many adversarial machine learning work. Because we don't assume that the perturbation we add is invisible to human eyes. So, actually, in our third model, we can put any image patch on the surface of any object in our scene. So, in this case, we put it on the front. Because it's more visible to our camera. And, of course, we will add some perturbations. And it's calculated by our algorithm. And then it will be interpreted differently to human vision. Okay, next, I will introduce videos in this attack. And, first, we need to implement this input construction pipeline. Because we need the algorithm to calculate it. To get the input that would make our objective function to the destination we want. And, first, we need to resize the picture to a specific size. So that it will fit the location we want it to put on. And then we need to do this perspective transformation. So that we can get a credit viewpoint from the camera. And then we remove that mask pixels of the same picture. And then we paste the image patch to that location. So that's how we construct this input. And the whole pipeline is differentiable. So, in our attack, we can directly calculate the image we should have for this successful attack. And the second thing is about the objectives. So, for different attacks, we should define different objective functions. And the first example is the production attack. I just show you as a demo. And there are many ways to design objective function for a specific goal. And, first, we can do it in an easy way. We just want more certain objects on the whole image. So, I'm not going to show you any equations here. I think you have seen a lot these days. And I just show you some pseudocode. So, here, we just wanted one... And the model to predict more car... Okay, great. More car objects from the input. So, we just get the index of the car class. And then, in this white box class probabilities matrix. And we use this lab code to tell the algorithm that we just want to maximize the probability of the car class. For every graded units. And remember that we have the object index output for the Euro V3 prediction. So, we also add that in our loss function. And then, we sum out the two loss. And that's our final loss. And... So, this is very easy to implement. But it could be difficult to optimize. Because if you have so many outputs. And... And the result might not be very good. Because it doesn't look intuitive quite. It predicts two cars from the perturbations. And so, we should refine those objective functions. So, because we have... We know how Euro V3 model calculate the predictions. So, we can just make a reverse. Because we know the exact location. We want the model to predict the object. So, we can just use a calculator to get the prediction vector for the Euro V3 model. And then, we use the mean square error to make the prediction of the input get as close as possible to the calculated results. And in this way, it could produce the result like this. Which we prefer. And in other attacks, for example, object vanish. We also have many different ways to design an objective function. And this is just a very close version. And so, here... You know, somebody wouldn't like others to recognize his car. So, they might exploit their law in California to release the car every six months. And they don't have to put a license plate on it. And if they want to do it more aggressively, they can even put a specialized license plate on it. So that the other self-driving cars wouldn't recognize it as a car at all. And the code is also very simple because this is a close objective function. And we just get the car index. And then, we take out the minus sign from the two logs variables. And then, that's the loss funnel. So, the result would look like this. The model couldn't recognize the object as a car with that license plate. And the other interesting magic trick would be the transformation. So, we can make a certain object class to transform to other classes. For example, we can make a car look like a train to the Yolo V3 model. And we just added different class probabilities to the loss function. And then, we can get a result like this. So, it's a different license plate. And it's like the transformer in the middle stage. Because the object looks like a train and a car to the model with similar probabilities. And, okay. So, we have discussed how we construct the input and how we design the objective function. And the next is about how to get exactly get those inputs. So, we need some optimization techniques. And we have found that these two tricks are very effective in our attack. Which is first introduced by this Oakland paper by Nicholas Coligny. And the first trick is to... Use the change of variable. Because in the pixel space, we have this interval constraint from... We normalize it to 0 and 1. And if your input has to be minus, then it's not going to be an effective pixel in the physical wall. So, you're not going to realize the attack in the physical wall. So, this interval constraint is very important to realize this physical attack. We use the change of variable trick... To convert the input to the 10th entry space. So, then it has... It would encode this interval in our objective function. And then you can use many off-the-shelf optimizers such as ADAM to do this optimization. And the second trick, useful trick, is to optimize the logits instead of the model output. So, in Coligny's paper, they found that if we can skip the functions at the last layer... Like sigmoid or softmax... We can avoid vanishing gradients. And it helps to get better results. Okay, so far, we have the methods to generate a successful digital attack. But image sensing is not an identity function. So, it doesn't mean we could do it in the physical wall. Because you need to print out the image patch... And you need a camera to take a picture of the scene. And then you get an input for the YOLOv3 model. And for printer or cameras, they have several weaknesses. For example, they have very limited resolutions. So, even if you calculate that the specific pixel should be in a specific value... But you may not be able to do that after you print it out and use a camera to take the picture. And the printer and camera could have some... And they both have the render noise. So, we need to consider all these possible factors... To realize the physical attack. And we found that there are several methods and techniques... Firstly, introduced by researchers at CMU. It's very useful in our attack. For example, for the limited resolution... And they introduced a regularization term to smooth the patch... With the total variation regularization. And for the distortions, they have developed a manual color management... And designed a non-printability loss... To encode this color management in the optimization. And in the physical wall... We might not be able to put the image patch to the exact location... To match the pixels in the digital image. So, we use this trick as... In every iteration of this optimization... We make some random transformations. So, the generated patch would be... A robust to some movements of the image patch. Okay, so here comes the conclusion. We have shown that the magicians can fool the object detection models... And so can attackers. So, we should be very cautious with the self-driving cars... That rely on computer vision. And that's it. Okay, thank you for listening to my talk. I can take any questions if you have. The company logo part... Did you add that or was that in your world? Okay, so we were not allowed to show the logo there. If you want... We can show that location for you. You can put your name there. I didn't quite follow how you... So, you divided the image into little subsets... And then you analyzed each little section individually... And then somehow you got a bounding box for the entire stop sign? Okay, sorry. I think that's the part of the Euro V3 model itself. So, it's not about it. It's actually about the attack. It's just a way to interpret the results of the Euro V3 model. And if you want to attack the model... You have to follow the design pipeline for that. Okay. Thank you. Is there any investigation of any single objects in the real world? Or were these all just things? Or you preferred the images? Okay, so... Here, what we show on the screen is... I think it should be called as a semi-physical attack... Because we show these pictures on the screen... But we use the actual camera to take the picture... And we change the viewpoint of the camera... And show you the video. Is it a video-to-video? It's a screen recorded on my iPhone. Yeah, the model is interpreting a screen... Yes. Yeah, so... I run the Euro V3 model on my mobile phone... And I use the camera on my mobile phone to take this video. Hi. So, you used an example of, like, a license plate... As a way to misidentify... Even something as small as a sticker... That's always flat to the back of the bar... It's called an increase... It depends, because this is the proof of concept. I think there are many other factors... That could change the result of this attack. Do you have any idea, like, how big something has to be? Okay. So, good question. I think this depends on the model... Because different models have a different input size. I mean, if the input size is larger... Probably a smaller patch would be effective. Because it would cause more different pixels in your input. Okay. David? In the object vanish attack... Does it work by reducing the objectness output... Or by reducing all... The specific class outputs? You can do both. Do you know which one? It's a design choice. You can try both and just try to find... Which definition is the best for your optimizer. Because for this attack... It is a non-convex function. You don't have a good optimizer... That can always get the best solution. You should just try. This is a great question. So, we just tried white box attack here. But we tried other models on my mobile phone... To test these outputs. And we found that they are still effective. Probably because the model are similar enough... To reproduce the attack. So, I just wanted to ask you a quick question. How robust are the sort of... Pretty first versions of this thing? Do you use different names? It looks like it's kind of... In a particular area... It's not sort of... You put a student name in there? Okay. So, for this specific example... Because we didn't add a large movement steps... In each iteration. So, it might have some limited... Robots. What's next to the... Viewpoint change. But if you really like that feature... You can add more... Add a larger moving distance... In each iteration. And the output should be... More robots to that movement. Okay. That gentleman first. How quickly can you... Recompute... These adversarial images on the fly? I'm thinking of a scenario where... If you had a screen... And you were just... Correcting for the like... App line transforms and stuff. Here we use... Perspective transform. I think it's a... More powerful method... To represent this transformation. And alpha is the subset. Okay. So, this is the offline attack. Actually. That's the answer. We are not... What we are showing here... Is not an online attack. So, the DevCon logo image... That you have there... Doesn't appear to be... It's not a... Optimized for adversarial benefit. You know? It doesn't seem that... That's been the result of optimization. How come it's being reliably detected... When it's not an optimized image? It is optimized to... Make it... Be recognized as car... In our objective function. But we didn't limit the... The amount of pixel values... We can change in our attack. But for this specific example... We just... We just... Run... Ten iterations... On my... On MacBook Pro CPU. So... That's it. Ten iterations of the image... Or ten integrations... Of the... Of the... Of the... So, we attack a... A pre-trained model. And the ten iterations here... Means the... Attack iterations. So, we get the gradients... From the input... For ten times... And update it. Update input. Yes. Image. Yes. Yes. So, you said... This is an offline attack... And you... Put that image... On the... On to another image. Have you tried anything... Where you... Lose a real world image? And... If... If not... Do you think that would work? You've painted that on the screen. Okay. Great question. So, actually... We have... We have tried to print... The image patch... Patch out. And put it on another image. So... I think it... So, in that way... We didn't take... The video... On the screen. And it's an actual paper... We printed out. And... We... We still observe... The similar results. It would be... Sometimes... But it's... The success rate is... It's not... As... As high as this one. Because we... We didn't... For... For that one... We... We didn't use... Use the... Non-print-abraded... Loss... To... To take care of this... Printing distortions. Okay. Do we have more questions? If no... Thanks for attending my talk. And thank you so much for, analysis. Thank you very much. And, uh... And, uh... I'll see you at our next event.