WEBVTT

00:00.000 --> 00:01.440
So, my name is Rich Wrang.

00:01.440 --> 00:04.240
I am a director of data science at Sophos.

00:04.240 --> 00:06.360
This is a joint presentation between myself and Dr.

00:06.360 --> 00:08.280
Ethan Rudd, who's sitting in the back there.

00:08.300 --> 00:11.700
And I'm gonna talk to you a little bit about facial recognition systems.

00:12.220 --> 00:16.600
So, who am I and why am I qualified to stand up here and berate you about this topic?

00:16.600 --> 00:26.080
I have a PhD in statistics from the University of California at Santa Barbara, and I've spent about the past eight years working at the intersection of machine learning, security, and privacy.

00:26.740 --> 00:35.740
Ethan has his PhD in computer science from the University of Colorado, and he has a long list of accomplishments, particularly in the facial recognition field.

00:36.540 --> 00:38.420
This is the Sophos data science team.

00:38.420 --> 00:42.480
If you like security and you like data science, then maybe you should come talk to me after this.

00:42.480 --> 00:44.080
We're always looking for people.

00:44.080 --> 00:45.520
So, let's end up the pitch.

00:46.440 --> 00:48.920
So, this talk, this is sort of the outline.

00:48.920 --> 00:52.640
We're gonna go on a real crash course for image classification.

00:52.640 --> 01:02.840
We're gonna talk about specifically how the facial recognition problem differs from the standard image classification problem, and how that leads into differences in training and processing images.

01:03.320 --> 01:08.240
Brief note about how bad the situation really is as far as facial recognition and privacy.

01:08.240 --> 01:14.800
We're going to do an absolute sprint through some of the attacks that you can launch against facial recognition systems.

01:14.800 --> 01:19.100
And then I'm gonna do sort of an anecdotal look at transferability of those attacks.

01:19.100 --> 01:24.140
So, if you train an attack on one system and you deploy it against another system, what actually happens?

01:24.140 --> 01:26.640
Spoiler, the results are not great.

01:27.540 --> 01:36.280
So, I'm supposed to tell you three things that you should remember so that when you nod off and start thinking about lunch in about 10 minutes, you have some takeaways.

01:36.600 --> 01:42.360
If you remember nothing else, facial recognition systems are different from general image classifiers.

01:42.360 --> 01:44.420
They're solving different kinds of problems.

01:44.420 --> 01:56.460
This means the pipeline is different, the models are structured differently, and you have different opportunities for attacks, but some existing attacks that work really well against image classifier systems are not as feasible.

01:56.760 --> 01:59.640
Building facial recognition systems is really easy.

01:59.640 --> 02:03.820
There are off-the-shelf open-source systems you can grab that are really quite good.

02:04.000 --> 02:10.360
Cloud-based solutions like Amazon has one, they are extremely cheap and very easy to use.

02:10.880 --> 02:16.400
Reliable evasion of facial recognition, particularly in the wild, is still really difficult.

02:16.400 --> 02:18.460
We don't have any good solutions to it.

02:18.460 --> 02:23.680
And a mask is the best solution that I've been able to come up with, unfortunately.

02:26.540 --> 02:28.800
So crash course in image classification.

02:28.800 --> 02:31.660
This is assuming a little bit of background, but hopefully not too much.

02:32.060 --> 02:36.240
So image classifiers, basically you give it a bunch of pictures and you say, hey, what is this?

02:36.240 --> 02:37.860
You get a bunch of training data.

02:37.920 --> 02:45.900
So , you know, hundreds of pictures of airplanes, hundreds of pictures of dogs, frogs, and horses, and you use it to train a classifier.

02:46.200 --> 02:49.020
The basic building block is something called a convolution.

02:49.580 --> 02:57.740
It's a patch that you sort of stride over an image and it learns to pick out different things like edges, corners, curves, and points.

02:58.380 --> 03:03.720
You stack a whole bunch of these convolutional layers together with a bunch of hidden layers.

03:03.720 --> 03:08.020
And then you typically put a standard sort of classification network at the very end.

03:08.020 --> 03:11.160
The very last layer is usually something called a softmax layer.

03:11.160 --> 03:14.260
And that basically just assigns a probability to each class.

03:14.260 --> 03:23.000
So if I put in an image of a car and it's well-trained, it might come out the other end and say, I'm 99.9% certain that this is in fact an image of a car.

03:24.460 --> 03:25.660
How do you train it?

03:25.660 --> 03:31.220
I am going to gloriously skip over a lot of the details because they don't actually matter with modern deep learning frameworks.

03:31.700 --> 03:39.060
Basically, you randomly sample the data, you get some image, you feed it through this randomly initialized network, and you get a classification out.

03:39.060 --> 03:42.280
When you start, that classification is going to be absolutely terrible.

03:42.280 --> 03:44.420
It's not going to have any idea about anything.

03:44.520 --> 03:50.840
And so it's going to, you know, quite happily tell you that a picture of a car is equally likely to be a car, a horse, a dog, a bird, et cetera.

03:51.140 --> 03:56.620
That's fine because what you do is you take that mistake and you basically tell it how to fix that mistake.

03:56.620 --> 03:58.380
You error correct all of the weights.

03:58.860 --> 04:02.320
This error correction usually takes the form of something called backpropagation.

04:02.620 --> 04:04.920
And you just do this until it works.

04:05.640 --> 04:09.440
So this is the very 50,000 foot overview of this problem.

04:10.420 --> 04:13.900
Great, so now we're going to go ahead and we're just going to go do it for faces, right?

04:13.900 --> 04:14.780
Easy peasy.

04:15.460 --> 04:18.360
Except there is one small catch to this.

04:18.360 --> 04:22.420
Actually, there's several small catches, but this is the first of many catches that will trip us up along the way.

04:23.040 --> 04:25.720
So we really only care about faces, right?

04:25.720 --> 04:35.100
So what I've got here is I've got, from a facial recognition standpoint, I've got some stuff that's interesting for, you know, a certain narrowly construed definition of interesting, at least.

04:35.100 --> 04:37.260
And then I've got a bunch of stuff that's not interesting.

04:37.260 --> 04:40.420
I don't really care about the context in most cases.

04:40.420 --> 04:42.240
All I want is the face.

04:42.240 --> 04:46.360
So step zero, we do something called a bounding box, a landmark and alignment.

04:46.360 --> 04:47.820
We isolate faces.

04:47.820 --> 04:49.700
So we get a nice little box around them.

04:49.700 --> 04:51.180
We identify key landmarks.

04:51.180 --> 04:55.400
This is in many cases going to be the center of each eye, the tip of the nose, the corners of the mouth.

04:55.560 --> 05:03.300
And those landmarks serve as reference points to a second stage, which is going to tweak the image a little bit so that it's in a standard orientation.

05:03.300 --> 05:14.520
Think of it as sort of setting up an ID photo style tab or an ID style photo, or Christ, an ID photo style tile for each image.

05:14.520 --> 05:20.080
So everything's nice and vertical and it's, you know, aligned and you don't have any, like, Boston Terrier head tilts going on.

05:20.540 --> 05:22.180
There's plenty of tools to do this.

05:22.180 --> 05:23.660
They're all really well-trained.

05:23.660 --> 05:25.560
You can, again, dig them up online.

05:25.560 --> 05:27.740
So I'm not going to go over this too much.

05:27.740 --> 05:30.960
I also should note that alignment is actually not needed for all models.

05:30.960 --> 05:34.420
There are a lot of models that are trained to handle multiple alignments.

05:35.020 --> 05:35.740
Okay.

05:35.860 --> 05:37.740
So now we can get faces out.

05:37.740 --> 05:38.240
That's great.

05:38.240 --> 05:39.980
Now we're going to do it for faces, right?

05:40.280 --> 05:45.500
We actually have a problem and circled in red is the problem right here.

05:45.500 --> 05:53.160
We have built into most of these basic image classification models, two assumptions that do not hold in facial recognition.

05:53.320 --> 05:56.440
So we've got a fixed number of classes that we know about ahead of time.

05:56.580 --> 05:59.100
And we have what you call a closed world.

05:59.100 --> 06:04.840
So no matter what input you feed to this model, it's always going to tell you that it's one of those outputs.

06:05.060 --> 06:20.160
So if I train this recognition system on image tiles, right, with, say, 10 people, I can show it 1,000 different people that it's never seen during training and the model will still try to assign some probability to just the 10 faces it was trained on.

06:20.300 --> 06:30.020
This is obviously not ideal because if we presented a face that's not in the training set, we vastly increased the likelihood of a false positive.

06:30.020 --> 06:40.860
If we only care about identifying, say, two or three people and we only have four or five images of each of those two or three people, we have nowhere near enough training data to actually train a classifier, right?

06:40.860 --> 06:47.400
These image-based classifiers take tens or hundreds of thousands of samples to really learn an effective representation.

06:47.940 --> 06:52.380
So we could maybe fix that by saying, hey, let's throw thousands of people in there because I've got tons of faces.

06:52.380 --> 06:53.320
Thank you, Facebook.

06:53.700 --> 06:59.460
But then we end up with a bunch of classes that we don't care about and we end up with maybe some gradient issues.

07:00.020 --> 07:13.980
Down the road, if we've got our 10 people that we train the model to identify and then we add another 10 people that we wanna find later, suddenly we have to retrain the model, which can be really, really time-consuming and expensive depending on how you do the retraining.

07:14.880 --> 07:16.700
Okay, so that's not gonna work.

07:16.700 --> 07:18.760
So what can we do to fix it?

07:19.480 --> 07:25.640
The first idea for dealing with a large or an unknown number of classes is something called a matching network.

07:25.640 --> 07:33.900
So you feed, instead of one face, you feed two faces into it and the model's only job is to say, are these two faces the same person?

07:34.180 --> 07:38.240
So this is great because now suddenly I can feed all the faces I have into it, right?

07:38.240 --> 07:44.000
I've got 10 faces of this person, so I feed it the, whatever, the 90 different combinations of pairs of faces.

07:44.000 --> 07:50.320
And I say, make sure you classify these as the same person, take all of the different faces and say, make sure you classify these as different people.

07:50.320 --> 07:57.380
And then when I want to actually detect certain people, I get the face tiles of the people I want to identify.

07:57.380 --> 08:03.620
I take the face tiles of the people I'm trying to match up to it, and then I just run it through and I say, hey, are these people the same or different, right?

08:03.620 --> 08:12.000
So I've essentially separated the data required for training the model from the data required to do the recognition step.

08:13.220 --> 08:14.660
So good news, bad news.

08:14.660 --> 08:21.260
The good news is, again, it's super easy to register new faces, to add them to the list of faces that we want to detect down the road.

08:21.260 --> 08:25.240
You just get the photo and you stick it in a database somewhere so that you can run it through the model later.

08:25.240 --> 08:31.540
The bad news is this means you would have to run this model against every single face in your registered database.

08:31.680 --> 08:35.920
For deep learning models, this can be apocalyptically expensive to do.

08:35.920 --> 08:43.220
If you're trying to identify 1,000 different people, that's 1,000 samples you've got to run through for every face you're trying to identify.

08:43.460 --> 08:45.020
This will not scale.

08:45.020 --> 08:46.700
It works great on toy problems.

08:46.700 --> 08:49.220
You definitely don't want to do it beyond that point.

08:49.920 --> 08:52.120
Okay, so now we're going to do a second fix.

08:52.340 --> 08:59.420
And the second fix is we're going to run the network just once over each face, and we're going to learn what's called an embedding.

08:59.460 --> 09:09.340
So an embedding is basically just a way of taking a face tile and turning it into a list of numbers, the list of numbers you can think of as defining a point in a really high-dimensional space.

09:09.840 --> 09:17.380
The way you're going to train the network is to take two faces from the same person and tell the network you should make similar embeddings for these two people, right?

09:17.380 --> 09:23.160
These two faces should have these lists of numbers that, under some distance metric, are very close to each other.

09:23.160 --> 09:27.180
If I give it two faces from different people, it should separate them by a lot.

09:27.180 --> 09:33.060
It should be able to say the distance between those two vectors should be very dissimilar.

09:33.900 --> 09:41.080
So visually, you might end up with something like this, right, so this is a sort of a made-up two-dimensional embedding.

09:41.080 --> 09:44.260
I have a query face that I have circled in red there.

09:44.260 --> 09:48.020
And basically, I've got clusters, I've got distances.

09:48.580 --> 09:53.540
This face is closest to that cluster, so I say that that face probably belongs to that person.

09:53.760 --> 10:02.140
You can imagine if I had another face that was way off in the middle of nowhere, maybe I would say that's too far from any cluster to actually be classified as my face of interest.

10:03.540 --> 10:15.380
So when you have an embedding in a distance, the good news is, at that point, you can put aside the deep learning sledgehammer and you can just use existing deterministic algorithms for fast nearest neighbor detection.

10:15.380 --> 10:19.260
So you get your embedding, you find nearest neighbors, and you're done, you've got your match.

10:21.380 --> 10:26.960
So there's an important difference on data here, and this is a subtlety that I think needs to be appreciated.

10:26.960 --> 10:31.800
You don't actually need to know who a person is to train on their face or enroll them.

10:31.800 --> 10:38.020
You just need to be able to say, I've got 10 photos of one person and I've got another 10 photos of another person.

10:38.020 --> 10:38.980
They're distinct photos.

10:38.980 --> 10:40.720
I don't have to know who they are, right?

10:40.720 --> 10:47.260
It's not like an image classifier where I have to be able to say, this is definitely a photo of a cat and this is definitely a photo of a dog.

10:47.260 --> 10:54.120
You just say, I've got 10 photos of this one person, subject A, and I've got 10 photos of this other person, subject B, and so on.

10:55.140 --> 10:57.980
Doing this, collecting this data is super easy.

10:57.980 --> 11:07.640
I invite you all to consider all of the photos you have uploaded to Facebook or Twitter or Instagram or TikTok or, yes, FaceApp, if you've done that.

11:07.780 --> 11:11.320
There are ways to essentially sort of say, yeah, these are probably the same people.

11:11.320 --> 11:14.680
You can enroll all that in your training data and you're done.

11:15.060 --> 11:17.540
You can put together a janky homebrew if you like.

11:17.540 --> 11:22.700
People like to carry around phones with their Wi-Fi turned on and you can scrape their Mac address, right?

11:22.700 --> 11:26.180
And say, hey, I've got this photo that correlates to this Mac address.

11:26.180 --> 11:28.080
That's probably the same person.

11:28.080 --> 11:34.560
So collecting the data is actually super, super easy, especially if you are social media.

11:35.680 --> 11:41.160
So we've got a couple of different kind of operational scenarios or modes of operation for this.

11:41.160 --> 11:43.160
In the training, we have the gallery.

11:43.160 --> 11:46.520
So the gallery is gonna be the people that I actually want to recognize.

11:46.520 --> 11:48.820
These are the people that I want to be able to tag.

11:49.180 --> 11:54.660
Then I've got the training data, which can be a whole bunch of other people where I don't necessarily want to identify them later.

11:54.660 --> 11:56.780
I'm just gonna use them to train these models.

11:57.080 --> 11:59.220
And then in probes, I've got subjects.

11:59.300 --> 12:01.860
So the people I'm going to try to match to the gallery.

12:01.860 --> 12:03.540
I've got known faces.

12:03.540 --> 12:10.060
Known faces are ones that the model has been trained on, but may not be people that I actually care about identifying later.

12:10.140 --> 12:12.000
And then I have unknown faces.

12:12.000 --> 12:16.840
So faces that have never been seen during training and they're not of people that are in the gallery.

12:17.820 --> 12:30.060
This is an important point that I'm not gonna have a huge amount of time to go into detail, but having a training set that's representative of the population you want to be able to identify is actually really important.

12:30.060 --> 12:46.600
If you have a bias in your training data, like in most facial recognition systems that are out there today, and it's biased towards a particular ethnicity, towards gender, towards a particular age group, it's not gonna work very well for people outside of that ethnicity,

12:46.600 --> 12:48.480
gender, or age demographic.

12:48.760 --> 12:53.880
So having a good representative training set is actually really important to make these systems work well.

12:54.460 --> 13:01.840
So this actually, this plot or figure comes from Ethan's paper, which is given at the link down there.

13:02.620 --> 13:04.640
Okay, so recap.

13:04.660 --> 13:06.820
Facial, we've got two models that go into this.

13:06.820 --> 13:11.400
We've got the facial detection model, which is what's gonna draw the box and give you the attribute markers.

13:11.400 --> 13:18.080
And then you've got the face embedding model, which is what's gonna take that face tile and turn it into your embedding vector.

13:18.560 --> 13:25.400
The important thing is this is done separately from actually enrolling the faces that you want to identify later.

13:25.400 --> 13:29.920
So you've separated the training data out from your actual detection data.

13:30.080 --> 13:34.020
Faces you want to detect don't actually have to be available when training the models, right?

13:34.020 --> 13:40.080
I can train a model on photos of people who were born years before anyone I want to identify popped up.

13:40.600 --> 13:47.000
Then when you find people that you want to identify, you enroll them by generating the embedding, and then you're back to the nearest neighbor search.

13:48.780 --> 13:50.700
Okay, so the short version.

13:50.700 --> 13:53.800
You find crop possibly aligned faces with a localization model.

13:53.840 --> 13:57.880
You take those crops, feed them through an embedding model if you're registering them.

13:57.880 --> 14:00.240
So I've got someone that I want to find later.

14:00.300 --> 14:02.880
I'm gonna save that vector along with the label of their name.

14:02.880 --> 14:06.200
Sometimes I'll form templates if I want to sort of like shrink that set again.

14:06.200 --> 14:13.620
So that might be something like finding a convex hole that contains all of the faces or finding a median of all of the embedding vectors.

14:13.760 --> 14:22.320
Then recognition is, you're just gonna find the nearest embedding or the nearest template to the unlabeled embedding that you're trying to say, hey, who is this person that I've got a photo of?

14:22.320 --> 14:24.340
And is that somebody that I want to recognize?

14:25.600 --> 14:28.040
Okay, a brief digression.

14:28.040 --> 14:29.700
Welcome to how I love this GIF.

14:29.700 --> 14:31.600
This is, I'm a sucker for dog GIFs.

14:32.240 --> 14:33.380
Future is already here.

14:33.380 --> 14:34.800
It's just not evenly distributed.

14:34.800 --> 14:41.740
It actually is pretty evenly distributed because if you wanted to build facial recognition models, there are plenty of models that are available online.

14:42.280 --> 14:43.540
I'll be putting these slides up later.

14:43.540 --> 14:46.060
So don't like rush to get a photo of the URLs.

14:46.060 --> 14:47.280
Don't worry about it.

14:47.640 --> 14:51.320
Pre-trained models and model training code is widely available online.

14:51.320 --> 14:53.100
Data is also widely available.

14:53.100 --> 14:55.560
People are starting to get a little bit twitchier about this.

14:55.560 --> 15:07.480
Microsoft recently pulled down its Celebe data, but you still have things like labeled faces in the wild, the Kaisa web face data, and then facereq.org slash datasets hopefully provides you with just about any dataset you might want.

15:07.480 --> 15:13.740
Some of these you will actually have to write to the academics that did the work, but usually they'll be quite happy to just send it off to you.

15:14.460 --> 15:18.800
If you're too lazy to do that, even then Amazon's recognition works really well.

15:18.800 --> 15:30.160
There was a Washington Post article that said that a County in Washington state was actually running its entire facial recognition system off of Amazon's recognition for about seven bucks a month.

15:30.160 --> 15:35.680
So it's fast, it's cheap, and it works reasonably well.

15:37.060 --> 15:42.080
Okay, so now that we're all depressed about how widespread this is, let's talk about how we can evade it, right?

15:42.860 --> 15:44.780
Oh, you sweet summer children.

15:45.340 --> 15:59.320
So the first thing to keep in mind is when you look at the academic literature, a lot of papers that say, hey, we're attacking facial detection models are actually attacking sort of the softmax type model that's closer to an image detection model.

15:59.320 --> 16:10.180
So if you're going to go out and reproduce some academic research, do a quick sanity check, look through the model, make sure that they're using something that's closer to facial recognition as it gets deployed in the wild.

16:11.280 --> 16:13.600
So plan your attack, right?

16:13.600 --> 16:14.780
Think about your capabilities.

16:14.780 --> 16:16.500
Can you attack the model training?

16:16.500 --> 16:20.440
Probably not, but if you can, data poisoning is a great thing to think about here.

16:20.460 --> 16:23.400
If you can get a copy of the models somehow, right?

16:23.400 --> 16:29.480
They stick it on an open share or an unprotected S3 bucket, grab it and do an offline attack, right?

16:29.480 --> 16:31.720
You can do white box attacks on that.

16:31.720 --> 16:36.020
If they offer you an API or an endpoint that you can query, right?

16:36.020 --> 16:40.260
You can send lots of queries to it and you can do what's called a black box or an online attack.

16:41.380 --> 16:47.140
Different in facial recognition, enrollment is sort of like a second mini training step.

16:47.140 --> 16:52.460
If you can enroll new faces, you can think about possibly I could poison it, right?

16:52.460 --> 16:58.980
I enroll new embeddings with the wrong label and that'll confuse it when they go to do this nearest neighbor search.

16:59.580 --> 17:06.460
You can use something like this person does not exist, general adversarial networks and possibly just do a resource exhaustion attack, right?

17:06.460 --> 17:09.820
Cram it full of a whole bunch of faces that don't really exist.

17:10.420 --> 17:18.220
Again, there is a nearest neighbor search in this and even with computational tricks to speed up nearest neighbor search, that is still a somewhat expensive process.

17:18.260 --> 17:23.480
So potentially, if you can actually modify the enrollment step, you could bog it down at that point.

17:23.880 --> 17:33.720
If you can alter data in flight between the localization model and the embedding model, you could actually do a face only attack, right?

17:33.720 --> 17:39.600
Just modify only the face chip and do some sort of attack on that that will cause it to misidentify.

17:39.600 --> 17:45.580
If you can read the data in between the two models, you can try and attack the detection stage, the bounding box.

17:45.620 --> 17:52.360
And if you can, all you can do is give it an image and get a score out, then you're sort of stuck doing an end to end black box attack.

17:54.120 --> 17:56.200
So this is pretty straightforward.

17:56.200 --> 17:59.980
I am already behind where I wanted to be, so I'm not going to talk about it.

18:00.640 --> 18:02.580
This is on easy mode.

18:02.580 --> 18:04.660
I will talk a little bit about this.

18:04.720 --> 18:07.740
This is surprisingly hard, except the field is moving fast.

18:07.740 --> 18:08.980
Life comes at you fast.

18:08.980 --> 18:13.380
Yesterday at the talk, there was a presentation from someone who actually did this.

18:13.380 --> 18:14.500
They broke this.

18:14.600 --> 18:16.660
So the reference is there.

18:16.660 --> 18:19.140
Again, I'll post these slides online later.

18:19.140 --> 18:22.900
They have actually broken the bounding box and detection attack.

18:22.940 --> 18:25.260
Pretty, it's a nice hack.

18:25.260 --> 18:28.440
You should definitely check out this paper if you're interested in that.

18:28.880 --> 18:30.840
And then finally, there's the black box attack.

18:30.840 --> 18:34.740
This is perhaps unsurprisingly a pretty tricky to do.

18:37.180 --> 18:39.600
Realistically, you're not going to know, right?

18:39.600 --> 18:41.880
You don't know if your photo is being taken and analyzed.

18:41.880 --> 18:45.180
You don't have any detail about how that system actually works.

18:45.200 --> 18:49.600
And even if you try to dodge it or evade it, you're not going to be able to get feedback, right?

18:49.600 --> 18:55.720
I suppose you could go down to the casino floor and ask them really nicely if like they recognized you when you had the funny glasses on.

18:55.720 --> 18:59.040
I wouldn't put good odds on them actually letting you get away with that.

19:01.260 --> 19:04.540
So white box attack, really high-level outline.

19:04.540 --> 19:08.620
These are usually done with what's called gradient-based methods for these deep learning models.

19:08.620 --> 19:11.000
There is the fast gradient sign method.

19:11.360 --> 19:13.080
I believe that's Goodfellows.

19:13.080 --> 19:13.980
There's Saliency.

19:13.980 --> 19:15.360
I believe that's Papernose.

19:15.420 --> 19:16.780
Links are both there.

19:16.780 --> 19:22.660
The idea is basically you're using gradients produced by the model to find the most sensitive input features.

19:22.660 --> 19:24.900
So you're going to have individual pixels within the face tile.

19:24.900 --> 19:31.940
And then you're going to figure out how I can modify those pixels in a way that it will drive the model towards a poor classification.

19:32.340 --> 19:35.340
So I did a really lazy implementation of this.

19:35.340 --> 19:38.840
I basically just treated the perturbation as a PyTorch variable.

19:38.840 --> 19:41.040
I made up an L1, L2 penalty.

19:41.040 --> 19:42.740
I sort of set a prediction gap.

19:42.740 --> 19:50.240
So I said evade it by this much, but no more so that it doesn't go off and find the most bizarre facial deformation it can do.

19:50.240 --> 19:52.960
And then I just back-propped my way to glory.

19:53.260 --> 19:58.840
So, you know, use your built-in optimization toolkit within using a built-in optimizer within PyTorch.

19:59.680 --> 20:05.660
So if you do a gradient-based white box attack on only the face chip, you end up with these results.

20:05.700 --> 20:08.240
So walking you through this, it's kind of busy.

20:08.240 --> 20:12.760
In the upper left is the perturbed version and the original version of my face.

20:12.760 --> 20:19.340
So if you stare at it there, if you look at it really closely, you can see some minor differences between the two.

20:19.340 --> 20:27.020
But if I only showed you the one on the left, the perturbed one, you know, you'd probably say, yeah, that's actually a pretty clear, pretty clean photo of your face.

20:27.500 --> 20:35.660
Below it, the three panels below it are the red, blue, and green channels showing what the white box attack actually modified, which pixels and which channels.

20:35.840 --> 20:43.120
And then on the right-hand half, the test image is the one that is sort of, hey, can we identify this person?

20:43.120 --> 20:51.780
And then the next three photos, left to right, top to bottom, are the images in the registration set and the scores.

20:51.780 --> 20:56.640
So in this case, it said, yeah, I definitely look like Alvaro Nobola.

20:56.640 --> 21:00.660
I've got a sort of a similarity score of 0.65.

21:00.760 --> 21:10.060
The second highest similarity score was to my own face with glasses instead of without glasses and a similar similarity score of 0.45, right?

21:10.060 --> 21:14.760
So basically the short version of this is the white box attack worked.

21:14.760 --> 21:22.780
I was able to modify that specific image, those specific pixels, to actually give me an effective evasion.

21:23.920 --> 21:26.220
So outline of a black box attack.

21:26.220 --> 21:27.620
You can try proxy models.

21:27.620 --> 21:31.640
This essentially means you feed a whole bunch of data to the model that you're trying to attack.

21:31.640 --> 21:35.460
You get the outputs from that and you train a model to reproduce it.

21:35.560 --> 21:43.260
For reasons that I'll talk about in a few minutes, I'm skeptical that these will work terribly well against facial recognition systems.

21:43.260 --> 21:46.440
But if somebody knows differently, I welcome your input on that front.

21:49.220 --> 21:54.420
So in a lot of cases, we might not know which data we need to train which proxy model, right?

21:54.420 --> 22:00.440
We've got two models in that pipeline that we're trying to match up and it might not be obvious how to do it.

22:00.720 --> 22:06.320
So black box optimization, I just use a genetic algorithm because everyone loves a good genetic algorithm.

22:06.540 --> 22:10.360
I treated the perturbation as an Numpy array and then I GA'd my way to glory, right?

22:10.360 --> 22:15.700
So if you're interested and you care about it, I use the mu plus one where basically I just permute a single...

22:15.700 --> 22:21.920
I make a new population number each time, score it and it kicks out the worst one if it beats the worst member of the population.

22:23.000 --> 22:26.060
So again, same results, same ordering of things.

22:26.060 --> 22:29.580
The main difference here, as you can see, the perturbation is in fact a little bit noisier.

22:29.580 --> 22:30.920
It still looks pretty good, right?

22:31.200 --> 22:32.640
But it's not perfect.

22:32.700 --> 22:37.760
And you can see the channel differences down beneath have been impacted much more severely.

22:38.060 --> 22:42.340
These are all on the same scale as the previous image.

22:42.340 --> 22:45.200
But again, it actually has successfully managed to evade.

22:45.200 --> 22:52.060
So against the face chips only, white box and black box attacks are pretty direct, pretty straightforward to do.

22:53.580 --> 22:58.820
If you do a genetic algorithm, the results are definitely much more of a mixed bag.

22:59.120 --> 23:00.880
So this is end to end.

23:00.880 --> 23:09.940
And instead of doing just the face chip and running it just through the embedding, I take the full photo, I run it through the entire system and I look at the difference.

23:09.940 --> 23:16.620
And in this case, you can see that my implementation, at least, I don't claim that it's necessarily the greatest one out there.

23:16.620 --> 23:19.060
It actually does introduce a lot of noise.

23:19.060 --> 23:20.900
So it is recognizable, right?

23:20.900 --> 23:28.300
The photo on the left is still recognizably me, but it definitely clearly has been tampered with in some form.

23:28.300 --> 23:30.320
But again, it does successfully evade.

23:32.140 --> 23:37.800
So points to consider if you are launching these kinds of attacks, white box is the gold standard.

23:37.800 --> 23:39.660
This is the easiest way to do it.

23:39.660 --> 23:42.840
If you can do a white box attack, you should definitely do that.

23:43.460 --> 23:47.860
Black box attacks also work, but you're gonna be hammering that model API.

23:47.860 --> 23:56.600
And eventually someone's gonna be like, hey, this dude has uploaded over a thousand almost identical images to my API and keeps getting like different results out of them.

23:56.600 --> 23:58.000
What the hell's going on, right?

23:58.000 --> 24:00.300
So it's not exactly subtle.

24:01.760 --> 24:03.320
So what about transferability?

24:03.320 --> 24:05.660
This gets back to the proxy model attacks, right?

24:05.660 --> 24:11.400
So if I train a model on one system and I learned to evade one system, does it actually work on a different one?

24:12.340 --> 24:16.700
So I'm using this paper accessorized to a crime.

24:16.700 --> 24:18.260
I do not mean to pick on them.

24:18.260 --> 24:25.160
They did a very good job, wrote an excellent paper on using real world adversarial evasions against the VGG face model.

24:25.280 --> 24:32.960
Because they did such a good job and they provided such good information about how the model and attack was constructed, it made it easier for me to look at transferability.

24:32.960 --> 24:34.920
So this paper is excellent.

24:34.920 --> 24:37.700
If it seems like I'm being critical of it, I'm not.

24:37.700 --> 24:41.080
I'm doing something that they did not consider in their paper.

24:41.080 --> 24:45.840
But basically what they've got here is they've got these fancy little glasses frames.

24:45.840 --> 24:51.240
And you can see that basically the model does not identify the correct person.

24:51.240 --> 25:00.820
And I've identified the gentleman on the top row as being Carson Daly and the woman in the bottom row as being Russell Crowe on the basis of these funky glasses frames.

25:01.400 --> 25:02.740
Okay, so who would win?

25:02.740 --> 25:07.660
Some super smart academics or me just putting shit together that I found on GitHub.

25:08.700 --> 25:19.940
And basically this is, again, not that what their paper did is bad or doesn't work, but that transferability is a real headache with these kinds of evasions and these models.

25:20.720 --> 25:22.800
Basically the short version is no.

25:23.200 --> 25:26.480
So I've got six panels on the left, six panels on the right.

25:26.540 --> 25:29.360
The upper left panel is the perturbed panel.

25:29.360 --> 25:31.020
So that's what the evasion put on it.

25:31.020 --> 25:35.000
The panel below is the target who this evasion was supposed to be attacking.

25:35.180 --> 25:41.300
And then I've got the top four face chips from a registered training set that I made up.

25:41.300 --> 25:49.260
This is me using MTCNN and SphereFace, which was a couple of slides back to actually do this evasion.

25:49.260 --> 25:53.240
So what they did worked really great on the VGG face model.

25:53.320 --> 25:58.900
What I yellowed together from pre-trained models on GitHub, it actually did not successfully evade.

25:59.500 --> 26:07.320
If you throw it into Amazon's recognition demo, take the same photos, again, it does not give you a successful evasion.

26:09.300 --> 26:13.340
Finally, I got the glasses, the goggles, they do nothing.

26:13.340 --> 26:17.920
I got the glasses and I printed them out myself and I tried them and it actually worked, right?

26:17.920 --> 26:21.000
On my kind of bad pre-trained model.

26:21.220 --> 26:30.780
So it reclassified me as the gentleman in the upper right of the four plot image with a very slight edge over the target image.

26:30.780 --> 26:35.080
But again, I put it up through Amazon's recognition demo and it did essentially nothing.

26:35.860 --> 26:37.180
Okay, so wrap up.

26:37.180 --> 26:38.000
I'm a little over time.

26:38.000 --> 26:38.700
I apologize.

26:38.700 --> 26:40.940
I do know that I'm standing between you and lunch.

26:40.940 --> 26:44.200
Facial recognition is not normal image classification.

26:44.960 --> 26:47.900
Facial classification and recognition tools are out there.

26:47.900 --> 26:49.060
They're publicly available.

26:49.060 --> 26:51.340
You have pre-trained models available on GitHub.

26:53.400 --> 26:58.220
These differences make a lot of these attacks harder, but there are also new potential attack surfaces.

26:58.220 --> 27:01.920
So again, gradient-based attacks are your gold standard.

27:01.920 --> 27:04.880
They're gonna be pretty hard to deploy in practice.

27:05.020 --> 27:08.900
Exhaustion attacks are something I don't think I've seen anyone contemplate before.

27:08.900 --> 27:11.820
But again, if you know of research on that front, please let me know.

27:11.820 --> 27:13.120
I'd love to hear about it.

27:13.120 --> 27:21.040
And if you can tamper directly with embeddings, so screw around with the registration step, this is probably your best bet on an attack surface, right?

27:21.060 --> 27:27.280
Map the wrong embedding to the wrong label and have it identify the incorrect person.

27:27.880 --> 27:30.360
So finally, if you want to take a screen...

27:30.360 --> 27:34.400
This you might actually want to take a screenshot of if you don't want to wait for me to put the slides up.

27:34.400 --> 27:36.720
I have a Ready to Rock pre-trained system.

27:36.720 --> 27:39.220
This is MTCNN and SphereFace.

27:39.220 --> 27:41.720
It is available on Google Colab.

27:41.720 --> 27:48.680
There is a preview tiny URL that you can look there so you can see that I am indeed sending you to Google Colab and not somewhere else.

27:49.800 --> 27:52.760
The QR code should send you to the same place.

27:53.020 --> 28:02.560
This should work if someone wanted to try it during lunch and come back and yell to me if the permissions on the notebook are not set right, please do so, that would be awesome.

28:02.980 --> 28:04.900
I've tried it myself, it seems to work.

28:05.100 --> 28:06.460
I may have screwed something up.

28:06.460 --> 28:13.120
You open the link, you do file, open in playground mode, then it'll tell you that it won't save any changes unless you save a copy to your own account.

28:13.120 --> 28:16.000
It will take up a few megabytes in your Google Drive account.

28:16.000 --> 28:19.860
So if you're up against the wall on space, maybe don't do that.

28:20.860 --> 28:25.540
Anyway, I am contractually obligated to make you stare at this slide for exactly three seconds.

28:25.780 --> 28:28.440
And I will now be happy to take any questions.

28:52.500 --> 28:54.060
I have seen, so I have seen more.

28:54.060 --> 29:06.060
So the question was, there are some, there is some work that uses IR light to essentially do real world, real time adversarial perturbations on faces to try to mess up recognition.

29:06.060 --> 29:08.060
I know there's a lot of proof of concepts.

29:08.060 --> 29:11.120
I think Naomi Wu actually did one.

29:11.120 --> 29:15.020
She had a hat that shined light on her face that would screw up facial recognition systems.

29:15.400 --> 29:16.800
That was awesome.

29:16.840 --> 29:19.980
So there is work in that vein that's been done.

29:20.060 --> 29:27.160
I did not look at it specifically for this because I was focusing, trying to focus on stuff that was a little lighter lift.

29:27.900 --> 29:28.680
Please.

29:29.640 --> 29:30.800
I'm sorry.

29:32.060 --> 29:33.340
What about the juggalos?

29:33.340 --> 29:33.680
Yes.

29:33.680 --> 29:39.380
So one of the things that these models do tend to look at is sort of like light and dark patches and reflections.

29:39.380 --> 29:45.080
So yeah, juggalo makeup does indeed evade a lot of facial recognition systems.

29:45.760 --> 29:47.840
I am not part of that culture.

29:47.840 --> 29:50.080
So I don't really know like what makes a good juggalo face.

29:50.080 --> 29:52.220
So I didn't want to sort of step on anyone's toes.

29:52.400 --> 29:54.680
But yeah, look up juggalos and facial recognition.

29:54.680 --> 29:55.960
You'll find some good articles.

29:55.960 --> 29:56.920
I'm completely serious.

29:56.920 --> 30:02.560
Like it's exactly the kinds of perturbations that will screw up a good facial recognition system.

30:02.560 --> 30:05.380
So it's worth checking out if you're into this stuff.

30:14.000 --> 30:16.340
I literally have no idea what they have trained on.

30:16.340 --> 30:19.700
I wish I did, but I don't.

30:19.900 --> 30:29.140
I'm sure Amazon has access to a substantial corpus of high quality, relatively unbiased training data though.

30:29.140 --> 30:31.440
Yeah, it would shock me if they didn't.

30:33.080 --> 30:36.700
You mentioned you used a genetic algorithm to make a proxy attack.

30:37.040 --> 30:38.960
So what does that mean exactly?

30:39.100 --> 30:41.300
Oh yeah, so super high level.

30:41.300 --> 30:43.440
The question was, what does a genetic algorithm mean?

30:43.440 --> 30:47.180
So a genetic algorithm is sort of a bio-inspired type thing.

30:47.180 --> 31:04.380
The idea is basically you have a population of solutions and then you do, you generate a new solution by combining elements from a couple of high performing solutions, maybe making a couple of random tweaks and rescoring it to see if it actually improves on anything.

31:05.160 --> 31:09.660
So I think, I hate to, this isn't being condescending.

31:09.660 --> 31:12.420
The Wikipedia page is actually really good on it.

31:12.420 --> 31:15.100
It's got a good description of how they work and a couple.

31:15.100 --> 31:24.480
So it does, I think, have a section on the mu plus one approach that I used, which is nice because the mu plus one approach actually lets you put really tight controls over your query budget.

31:39.760 --> 31:51.160
So the question is, can you detect whether or not a general adversarial network face is a general adversarial network face or a real live human face?

31:51.180 --> 31:54.700
The answer to that is yes, probably.

31:54.700 --> 31:57.720
I know that there's been a lot of work on detecting that sort of stuff.

31:57.720 --> 32:01.800
It's not something that's really in scope for this facial recognition thing.

32:01.800 --> 32:10.760
One thing that is promising is using those generative models to try and poison your training data, or perhaps that's the resource exhaustion attack I was mentioning before.

32:10.760 --> 32:20.960
If you can generate millions of faces that don't exist and get your system to register them all, then suddenly you're bogging it down with trying to sort out the real faces from the bullshit.

32:27.410 --> 32:32.530
The countermeasure to perturbation attacks is use an unpredictable model at this point.

32:32.730 --> 32:34.670
Yeah, no, it's an excellent question.

32:34.670 --> 32:50.390
Like being able to think of this defensively in terms of what if people are using facial recognition as like a backstop biometric, for instance, and then perturbation attacks are essentially like a way to evade this biometric identification.

32:51.010 --> 32:55.430
Again, I know that there is academic work that's going on in this area.

32:55.430 --> 33:00.090
I am less familiar with it, so I don't want to give you an answer because I'm probably going to get it wrong.

33:00.370 --> 33:09.110
But yeah, people have actually looked at like ways to make image classification models more robust to adversarial perturbations.

33:09.850 --> 33:17.390
You can probably transfer a lot of that to this setting, but I don't know offhand of work that specifically addressed that.

33:19.450 --> 33:26.110
So I don't think we have any talks in here, so I'm happy to stay in chat if people want to, but we are definitely over time.

33:26.110 --> 33:28.330
And if y'all want to grab some lunch, go for it.

33:28.510 --> 33:29.430
Thanks again.

33:29.450 --> 33:31.310
Thank you.

