start	end	text
0	5100	All right. Awesome. Cool. With that, I'd like to introduce our next speaker, Walter Schreier,
5100	9680	on vectoring convolutional neural nets with targeted weight perturbations.
9680	11460	All right. Everybody, clap.
16830	20210	Thanks. I've always said I should be working on AV technology, not
20210	25590	security or AI. Bigger needs with projectors and stuff these days.
25590	31050	All right. So I'm Walter. I'm going to be talking about backdoors. And I want to acknowledge
31050	35610	my graduate student who did most of this work, Jake Dunford. Jake is not here because he's
35610	39950	taking a hiatus from computer science to train for the Olympics. So look for him
39950	45410	running track next year. All right. So jumping right into this.
46450	53210	When it comes to backdoors, we have some options in the AI world. But those options traditionally
53210	59490	have been fairly limited. If you're familiar with the literature surrounding convolutional
59490	64650	networks and computer vision. And usually when we're talking about security and computer vision,
64650	69550	this reduces to human biometrics because that's where we see these vision systems deployed in
69550	74390	some operational context. There are a number of papers out there that look at this top scenario
74390	81950	here of poisoning the training data. So this assumes the attacker has access to the original
81950	87530	training data which is being used in some legitimate context to train a neural network,
87530	91550	which is basically what we do these days for things like face recognition because we get the
91550	99110	best performance. And there are several ways the attacker can modify this data. Most obviously
99110	104730	they can inject their own face or other faces into the training data set. More interestingly,
104730	110510	they can use more sophisticated adversarial attacks, perturb these images in such a way that
110510	116730	they can be misclassified in some targeted way. And what ends up happening, you know, the training
116730	122670	regime runs, you know, we give the system our images X and our labels Y because it's supervised
122670	127690	learning. And the entire network has then the backdoor built in, right? The function that's
127690	135430	learned from this training data set is poisoned and the whole network is affected. So when we
135430	140810	started to kind of brainstorm about interesting ways to attack deep learning in the lab, I kind
140810	144850	of threw out a challenge to the students. I said, all right, you know, the poisoning stuff is pretty
144850	150290	well known. Is there some other more clever attack we can leverage that's a little bit more
150290	154530	realistic in terms of what an attacker would usually have access to? What we want is
154530	159210	something more like a traditional rootkit. So again, we have our attacker here. She has
159210	165050	compromised a server, right, in operation, which may be again running the face recognition
165050	171010	system in operation. It's highly unlikely that that server is going to have the training data.
171010	175650	It probably was not used, right, to create the biometric authentication system. But what it
175650	181230	does have on it besides the operating system, right, which we've assumed to compromise, the
181230	187110	pre-trained network that is running there. So wouldn't it be interesting, not only can we say
187110	192950	backdoor the operating system after compromise, what if we somehow had a more targeted
192950	199250	rootkit style backdoor built into this network which we've stolen off of the machine? That's
199250	204730	at the heart of this work. So again, I want to acknowledge a lot of the great prior work
204730	209290	that's out there. A lot of good stuff from Don Song's group at Berkeley looking at these
209930	214930	poisoning attacks. There's a really nice paper that came out recently in IEEE Access looking
214930	219090	at a survey of these different techniques and then introducing some variations on them.
219250	225150	Doing a very deep dive in terms of experiments and what you can do in the poisoning realm.
225150	229030	Like all that work is great, but what we're going to talk about here is something quite a
229030	236970	bit different. Alright, so here is my crazy idea. Instead of worrying about the training
236970	242850	data, let's just worry about the trained network. Let's build in our backdoor by
242850	248470	perturbing the weights of the network. So again, recall basic neural network 101 type
248470	254290	stuff. When we learn an approximate function using a neural network, what we're doing is
254290	259670	tuning the weights of that network. So if we think of a network as being a connected
259670	265870	graph of different neurons, those edges in the graph that connect the different vertices
265870	271170	which represent the neurons have a specific weight value attached to them. And when we
271170	275850	train these networks using gradient descent and backpropagation, we're changing those
275850	283530	values. So here's an observation. Given current research in deep learning related to
283530	289770	stochastic networks, the weights of a network can be perturbed to get stochastic output.
289810	294750	That's interesting. This is an old trick that's come back in recent history. Because neural
294750	298770	networks are being deployed in operational settings, we want to know something about the
298770	304230	reliability. And you don't really get a sense of that if the output is deterministic. What
304230	309670	we really want are probabilistic systems where we can assign error bounds. So one well
309670	313970	known trick to do this is simply perturb the weights a little bit. Maybe add a little bit of
313970	319810	additive noise selectively throughout the network or in a particular layer of the network.
319850	324870	And watch the output as it changes. If it doesn't change too much, you have a very, very
324870	329550	reliable network, right? Whatever that approximated function is, is pretty stable. If you
329550	335030	see wild fluctuations in the output, you should probably retrain that network. It's not
335030	340310	that reliable. There's a big problem. So that's typically how we use these perturbations in a
340310	346410	legitimate sense in deep learning. And so thinking about this a little bit deeper, it's
346410	351410	interesting to note that the intended behavior of the learn function is preserved even though
351410	358230	we're changing those weights a posteriori, like after we've trained this network. So then
358330	364650	there's a question. What off-target effects result when we do that? Yes, the learn
364650	370090	function is still there. Yes, the output is changing just a little bit. But we've changed
370090	375030	that function in some sense. And if we think about, again, function approximation, we have
375030	381290	these highly parameterized neural networks. There is this vast sea of approximate functions
381290	385210	that all map to the function we really wanted to learn. But they're all going to be a little
385210	392250	bit different. And some may have properties that are unanticipated, strange, and
392250	397650	potentially exploitable. And so in the lab when we were kicking around these ideas, the
397650	402230	following question came up. Can an attacker steer these off-target effects to their
402230	410070	benefit? And I'll show you in this talk that the answer is yes. So let's look at a scenario
410070	415350	here to describe what this backdoor really is. So imagine we have a face verification
415350	420190	network which does one-to-one face matching, a very common setting in biometric
420190	426330	authentication. Imagine we've trained this particular network to recognize Tom Brady. So
426330	430870	Tom Brady could show up, I don't know, at his gym locker where he has this face recognition
430870	436810	set up. He presents his face, says, I am Tom Brady. If he really is Tom Brady, the output
436810	442470	would be true. You know, the locker would unlock and he can grab his football gear. And for
442470	447970	imposters like Leo up here, when they claim to be Tom Brady, the network should reject
447970	453530	them. And we know face recognition has come quite a long ways in recent history. These
453530	457370	systems are very, very accurate. We see commercial deployments even on consumer facing
457370	462930	devices like the iPhone 10, etc. The technology works, right? It's not perfect, but it's
462930	467250	good enough to be deployed in many security settings. So what we'd like to do in terms of
467250	473490	compromising this network if we've stolen it, if Leo here is our attacker, we'd love to
473490	480270	have this network basically accept him as being Tom Brady. But again, we don't have access
480270	484950	to the training data, so what are we going to do? Here we're going to choose a layer and
484950	488930	we're going to change the weights of the layer just slightly. We may have some additive
488930	494110	noise, we may have some multiplicative noise, and we may just target a fraction of the
494110	500010	particular parameters that are available in this particular layer. And we're going to do
500010	506730	that until we find a useful backdoor. And so we can articulate this as a search problem in
506730	512170	AI. So what's fun about this approach, it doesn't require taking this pre-trained network
512170	517690	and start back propping again. That's really expensive. We don't want to go back through a
517690	521950	training regime. There's a quick and dirty way to make this modification and it's just what
521950	527170	we did to get, again, the stochastic error bounds out of the network. At inference time,
527170	531670	we're just going to jitter the weights a little bit and observe the output. Now, of course, I'd
531670	536690	have to win the lottery to get that lucky where I build in the backdoor on the first shot. So
536690	540670	again, we need to search the space. And what we're going to do is just use a really basic
540670	547370	random search technique and screen many thousands of models quite quickly because we're not
547370	554070	doing any training. And we're going to try to find a model that satisfies some criteria. So
554070	558270	that means we have to formulate a search objective for this random search. And that's going to
558270	563490	take the form of the following. So number one, I need some error bounds so I can empirically
563490	569390	observe what's going on during the search process. So we'll define T sub FP here to be the
569390	573830	false positive rate for select imposters. So in the example I just showed you, the select
573830	579650	imposter would be Leonardo DiCaprio. And then we're going to assume there could be many other
579650	585090	imposters though who are trying to access Tom Brady's locker. But the system should still
585090	590330	reject them. So that means we have to factor in the overall accuracy of this network before and
590330	595930	after the attack. So A sub 0 here is the accuracy score for all the other inputs before we
595930	600610	perturb the network. And then A sub 1 is the accuracy score for all the other inputs after
600610	605730	perturbing the network. So our objective function is really simple. We want to maximize T sub
605730	610150	FP because we want to make sure that the backdoor is reliable for the attacker that put it
610150	617410	there. And we want to minimize the change in accuracy of this network after I've made some
617410	622270	kind of modifications to it. If we change it too drastically, the attack would probably be
622270	627910	pretty predictable. Tom Brady can no longer verify his identity. This is pretty useless.
627910	633170	This is a denial of service on the legitimate user. Similarly, if the system has an overall
633170	637950	false positive rate, which is extremely high and anybody can access the locker, well the
637950	641730	security is gone completely and somebody's going to notice that. So this is again a very,
641730	648610	very targeted objective meant just to improve the false positive rate of the attacker. So a
648610	654650	sketch of the algorithm. We're going to begin by choosing some specific identity. And we're
654650	657990	also going to choose, you know, as our imposter, and then we're going to choose a target
657990	663950	enrolled user. So again, a user that has legitimate access to this particular network. Then
663950	667670	we're going to perform an iterative search process. So I'm going to keep perturbing the
667670	672550	weights, ideally increasing confusion between these two identities. I need them sort of
672550	679490	entangled in some way so the backdoor works. So what we can do then is choose some layer to
679490	685910	perturb, randomly select subsets of those layers' weights, randomly perturb those subsets,
685910	691530	choose the best perturbation for each subset, and do that n number of times until I select the
691530	695790	best overall perturbation. And remember, at each step, right, when I'm doing this evaluation,
695790	700530	I'm trying to match the criteria of that search objective which we've defined. So again,
700590	704610	a priori, going into this, I can select some error bounds in terms of, well, how much
704610	710830	difference in accuracy do I want? You know, how many times do I want the attacker to attempt
710830	714610	to authenticate? Right, that's kind of a systems level question because, right, sometimes you
714610	720050	get locked out after 3 attempts, 5 attempts, etc. The backdoor will be noisy, but you can make
720050	726290	it accurate. So there are a number of things you can tune here to as you're trying to search
726290	731550	for a good backdoor. Which layer to choose, right? Basically you have a choice of any
731550	739790	layer in the network. Which imposter target classes to choose? The attacker need not choose
739790	743830	their own face, for instance. They can go on the internet and find images that are just
743830	748930	really, really good at matching other people out of the box to make the search easier. This is a
748930	755870	well known phenomenon in the biometrics literature. The number and subset of weights. Again,
755870	760210	face recognition networks highly parameterized these days. In some cases we have millions of
760210	765170	parameters. That means we have lots of choices there. The magnitude and type of perturbation.
765170	772330	Empirically we found additive perturbations are the most useful. And in terms of how much we
772330	777050	want to change these weights, well we don't want to go so drastic as to make some of these
777050	781490	weights appear unusually large. The weights are usually floating point numbers that fall
781490	785490	within some range. So we can profile the distribution of these weights and maybe never
785490	793170	exceed the largest value, for instance. And then finally, the objectives metrics. I mentioned
793170	800670	right there are some different error and accuracy calculations that have to be made. We have
800670	806210	some flexibility in terms of how we define what accuracy is. So for instance, here are four
806210	812070	choices we looked at. One thing to note here, I'm calling this accuracy but that's a bit of a
812070	817030	misnomer if you're familiar with machine learning and computer vision, biometrics, any of
817190	823730	these fields. This is really error because what we're looking at, say in equation 1 here, is
823730	829910	how many matching instances did I get wrong over the total. Lower is better here and that's
829910	835510	of course what you'd want when you're factoring error into your objective function. So looking
835510	841430	at different variants of this, in some cases I may want to overemphasize the impact of the
841430	849410	imposter's images. So we have equation 2 here, which increases their importance. Equation
849410	855630	3 kind of just breaks out the imposter's importance and adds that to the initial error
855630	861310	score. And then I could also sort of break three different calculations out, factoring
861310	868030	information from the imposter, the known entities, so that would be the enrolled users
868030	874010	within say the face recognition system. And then other imposters out there in the world who
874010	878510	are not related to the attacker's attack. Okay, so does this work, right? That's the big
878510	883730	question. So we took a look at this first by looking at MNIST of course, these were good
883730	890410	machine learning people. Not really a serious security situation, right? But we just wanted
890410	894370	to see does this work, right? Can we get some kind of reliable backdoor built into a simple
894370	899270	network? MNIST of course is very, very fast in terms of doing experiments. If you're not
899270	905850	familiar with what this data set is, it's just 10 handwritten digits, 0 through 9. We chose a
905850	912350	model, a pre-trained model from Keras, the deep learning framework that's sort of out of the
912350	918970	box ready to work on MNIST. But what we did here is try to make the problem formulation
918970	924310	consistent with what we would find in a real security setting. So we created kind of an open
924310	931230	set recognition problem. And we looked then at the last layer of the classifier outputting 6
931230	937570	classes. So we would have the enrolled digits, quote unquote, 0 through 4 representing valid
937570	943690	inputs. And then digits 5 through 9 are in other category that represent invalid inputs. So
943690	948490	this network has an ability to reject what it does not know explicitly. In terms of the
948490	952270	perturbations, again I mentioned additive perturbations are what we like, so we're going to
952270	956530	use those. And we're only going to perturb between 1 percent and 5 percent of a given layer's
956530	960770	weight. So it's a pretty small number. We're not making drastic changes to the network. We're
960770	965850	just going to perturb it just slightly. The metric we'll choose for our search objective is
965850	972150	overall accuracy. And in terms of how much effort computationally the attacker needs to
972150	977010	spend. In the simple case, it's just several hours of screening. This is MNIST, we can get
977010	984390	through many thousands of potential models quite quickly. Okay, so here's some results. On
984390	989410	the x-axis here, these are just the imposter characters that we're choosing. Remember the
989410	993470	network doesn't explicitly know anything about the digits 5 through 9. So we're going to
993470	1000370	choose those as, um, an imposter digit to impersonate, uh, 0 through 4. On the y-axis then
1000370	1006550	we have the misclassification accuracy. Um, so for the baseline, which is the dark blue bar in
1006550	1012050	each of these, um, increments on the x-axis, the misclassification accuracy should be low,
1012050	1017990	right? Uh, because misclassification is bad, uh, in ordinary circumstances. Uh, for these
1017990	1023450	other bars, convolutional 1, convolutional 2, dense 1, dense 2, those are layers in the
1023450	1028050	network that we're trying to add the backdoor to. Uh, and so, uh, here we can see that the
1028050	1033250	convolutional 1 layer is the best one in terms of, uh, adding this backdoor. Um, and that's
1033250	1037350	kind of interesting because that's kind of the early vision part of the CompNet, uh, where
1037350	1042990	some of the more primitive, uh, edge filters are, uh, in the, uh, visual processing, uh,
1042990	1048570	hierarchy. Um, you can see, right, it's a drastic change in terms of the misclassification
1048570	1054390	inaccuracy for the targeted, uh, digit of interest, um, and so the backdoor works. Uh, and
1054390	1059510	what's really cool is all models are within .5 percent accuracy of the original model's
1059510	1064850	accuracy. Alright, so that's again the toy case. What does, uh, this do in a real sense? Uh,
1064850	1069830	so we looked at ResNet-50, a very, very deep, uh, CompNet architecture, um, and the
1069830	1074650	dataset VGG phase 2. So this is a face recognition experiment. Um, many, many different
1074650	1079170	parameters here to play with. Uh, the problem set up, um, this is, uh, face verification, so
1079170	1083650	one-to-one matching just like the original, um, uh, explanation of the backdoor scenario I
1083650	1088430	had earlier in the talk. Um, we looked at a lot of different images here, 160,000 images of
1088430	1093010	500 distinct subjects for enrollment, then 100 different imposter and target pairs for the
1093010	1097170	perturbed model screening. Uh, again, additive perturbations, 1 percent of the first
1097170	1101590	convolutional layer is perturbed. Uh, the metric is a stronger penalty for attacker related
1101590	1107130	errors. And because this is a very deep architecture, we needed GPUs, uh, and we screened
1107130	1113230	many different models, uh, for several days. And what we found were a number of models with
1113230	1119230	useful backdoors. Um, so on this plot, um, we have, uh, different models that we screened on
1119230	1124570	the x-axis and then again the rate of false positives on the target class on the y-axis. And
1124570	1128450	you can see here there's a handful of models that have very high false positive rates on the
1128450	1133630	target class. Those would be our best candidates for this backdoor. Um, notice that it's not a
1133630	1137830	hundred percent in terms of the false positive rate. Um, so it would probably take the
1137830	1142730	attacker, uh, one or two attempts to get into the system. Uh, but it would still be a lot
1142730	1149370	better than them trying it without, uh, adding a backdoor. Um, overall, um, you know, just
1149370	1153710	looking at, uh, the baseline versus after in terms of targeted false positive rates, uh, we
1153710	1158170	found a lot of viable, uh, backdoor, uh, candidates, uh, even though they had lower false
1158170	1163370	positive rates. If you average all those networks together, um, they're about, uh, 37 percent
1163370	1167110	on the targeted false positive rate. Uh, and then the plot I think is the coolest is the one
1167110	1171510	where the two bars are basically even. Um, that's kind of the before and after, right? Uh,
1171510	1176450	averaging over all of the backdoored models. Um, we, there's virtually no difference in
1176450	1183070	terms of the empirical performance. Okay, so a few parting thoughts here on detectability.
1183070	1187190	Um, many of you, especially if you're coming from a systems perspective, may be thinking,
1187190	1192430	oh, come on, Walter, this is so trivial to detect. You're changing the model, right? Um, why
1192430	1196510	don't you just compute a hash function of the model's file and then, right, just host-based
1196510	1200470	intrusion detection will detect this. You know, no big deal. This attack is not really that
1200470	1206270	realistic. Um, sure, but I mentioned this whole work is motivated, um, on, uh, models with
1206270	1210790	stochastic output. Models that are always changing in operation. Uh, therefore, just
1210790	1213950	computing hashes doesn't really work, right? Because that hash is going to change from run to
1213950	1218210	run. Um, so if you encounter a system that already has this baked in, um, the host-based
1218210	1222350	intrusion detection system is not going to work. Um, plus, uh, number two here, you already
1222350	1228590	have all of the normal rootkit tricks at your disposal, right? I can intercept system calls,
1228590	1234150	right? I can redirect hash functions, uh, to write some pre-stored digest of the original
1234150	1239030	model. No big deal, right? That's easy. Um, if the attacker has compromised the system to
1239030	1243950	steal the face recognition model to begin with, do we even trust that operating system? No.
1244250	1249350	Uh, and then finally, um, the use of weak hash functions is still widespread. Uh, can we
1249350	1253890	really trust AI folks to make the right choice? Um, as it turns out, I think the answer to
1253890	1259090	that is no. Um, so I submitted this paper, the paper version of this talk, uh, to a
1259090	1263210	biometrics conference earlier this year. Um, sadly it was rejected. And, and here's one of
1263210	1268750	the reviews I got. Um, some wisdom from this ICB 2019 review. Um, in the discussion section
1268750	1273810	of this paper, a weak hash function, uh, MD5 SHA-1 is beyond the scope of this vision and
1273810	1277170	machine learning conference. You shouldn't even talk about that, right? It's like biometrics
1277170	1280930	people, vision people, they don't think about hashing functions, right? Get that out of the
1280930	1286570	talk, get that out of the paper. Um, and so, you know, if that's the attitude that, um, uh,
1286570	1291190	the AI community has, we're definitely going to see really weak, bad choices being made in
1291190	1295890	terms of security infrastructure that they bake into applications around, uh, the core AI
1295890	1300210	algorithms. Alright, want to learn more? Check out the paper. It's sitting there on archive
1300210	1305590	and I'm happy to answer any questions if there's any time left. So I can take one. There's a
1305590	1310670	lot of hands going up here. Um, yeah, in the, the way back? I think it's, yeah, yeah, you,
1310670	1347320	you. Okay, so, so the question is related to, um, attacks in the supply chain, the AI supply
1347320	1352400	chain, uh, where an attacker could, um, potentially, uh, distribute a model, uh, with a
1352400	1357100	backdoor baked in and then other people are using this model for their own applications. Um,
1357100	1361860	you could use this backdoor attack in that mode, but if the attacker's doing that, um, I mean,
1361860	1365980	if they train the model, they have access then to all the, like, um, poisoning at training
1365980	1369880	time sort of tricks as well. Um, but you can imagine, again, this, this is certainly
1369880	1373600	applicable in that scenario. I don't see any reason why you couldn't do that. In fact, it
1373600	1377640	would make the attacker's life kind of easy because this is a trivial modification to the
1377640	1381700	network, right? It's basically free, a free operation to jitter the weights and then just
1381700	1385980	keep checking them. All right. Uh, looks like I only got one question, so you can catch me.
1385980	1388220	I'll be around, uh, afterwards. Thank you.
