1 00:00:00,000 --> 00:00:01,240 Thank you all for coming. 2 00:00:01,240 --> 00:00:04,660 And thanks in particular to the volunteers who made this happen. 3 00:00:04,660 --> 00:00:07,440 I worked with them a bit, and they do a lot of work for this. 4 00:00:07,440 --> 00:00:09,020 So thanks, everyone. 5 00:00:10,740 --> 00:00:12,540 So I'm Jason Mancuso. 6 00:00:12,620 --> 00:00:15,040 I'm a research scientist at Dropout Labs. 7 00:00:15,040 --> 00:00:23,580 We're a startup focusing on privacy-preserving machine learning, building tools, and doing research to solve that problem, which I'll be talking about today. 8 00:00:24,600 --> 00:00:29,600 I'll mainly be talking about why we should care, what people are doing about it, and what we could be doing better. 9 00:00:30,360 --> 00:00:37,000 And this is going to be a bit more of a technical talk in the sense that it'll introduce you to a lot of topics you might not be familiar with. 10 00:00:37,000 --> 00:00:41,880 And it does, to some extent, assume a basic familiarity with machine learning. 11 00:00:41,880 --> 00:00:45,520 But I'll try to explain as much as possible while going through it. 12 00:00:49,800 --> 00:00:52,540 So first, just some motivations for why we should care. 13 00:00:53,800 --> 00:00:58,040 So this is a paper recently that came out from Google Brains Group, Niccolo Paperno. 14 00:00:58,800 --> 00:01:11,640 He argues that when thinking about security and privacy and machine learning, we should be taking inspiration from traditional computer security and not reinventing the wheel just because we're doing AI. 15 00:01:12,060 --> 00:01:21,640 And so he builds on these principles that were published in the 70s or 80s, the protection of information in computer systems by Salter and Schroeder. 16 00:01:22,020 --> 00:01:33,880 And these security principles, they dictate roughly half of them dictate that in order to make computer systems secure, we need to prevent excessive information flow within these systems. 17 00:01:34,520 --> 00:01:51,980 So then without even accounting for adversarial machine learning and all the attacks that we've probably heard about throughout the conference, I can confidently make the claim that traditional machine learning is not as secure in this way because there is excessive information flow in the form of privacy leakage. 18 00:01:52,820 --> 00:01:56,300 So really, privacy is a security problem. 19 00:01:56,400 --> 00:02:03,260 But not only that, privacy leakage creates bottlenecks in the existing machine learning process. 20 00:02:03,600 --> 00:02:05,680 So here's what I mean by that. 21 00:02:06,500 --> 00:02:20,580 Machine learning is a normal workflow, where on the left, you have some data source, some data generator, whether it's a public data set that's been compiled, or it's a private data set owned by, for example, a hospital or some corporation. 22 00:02:22,160 --> 00:02:28,760 And so traditionally, when we train machine learning models, we have to aggregate this data somehow, in a central place. 23 00:02:29,140 --> 00:02:33,760 We engage in training the model, we apply some learning algorithm to it. 24 00:02:33,800 --> 00:02:36,680 I'm, of course , hand waving away a lot of data science complexity. 25 00:02:36,680 --> 00:02:52,720 But once we're done with that, we produce this model and deploy it and put it into production, whether we're actually serving users who are a separate party or serving some internal internal party within the same organization, there's always going to be some deployment phase where you're running predictions. 26 00:02:53,640 --> 00:03:02,540 I mean, this is this is a kind of this is this doesn't fit every use case for machine learning, but it describes quite a few of them. 27 00:03:03,380 --> 00:03:06,960 And so one thing to notice is that there are multiple parties in the setup. 28 00:03:07,080 --> 00:03:17,780 But there is one point of attack that as an attacker, I only really need to to compromise this middle party, the aggregator, to gain access to every asset in this workflow. 29 00:03:20,680 --> 00:03:30,460 So this is just to say that, you know, we do machine learning on private and sensitive data, where there are concerns and machine learning does quite well. 30 00:03:30,460 --> 00:03:33,040 This is an example of skin cancer classification. 31 00:03:33,160 --> 00:03:44,200 But as a user on the right, of perhaps taking a picture of my mole and uploading it to a cloud somewhere, I might not be incentivized to to do this, right? 32 00:03:44,220 --> 00:03:52,260 Because if I do this, then I'm revealing whether I have cancer or not, to a third party, and I don't know how they're going to use that information. 33 00:03:53,440 --> 00:03:58,600 So this this leads to the concept of bottlenecks coming from privacy leakage in the process. 34 00:03:58,940 --> 00:04:01,920 And there are there are multiple different points where these bottlenecks occur. 35 00:04:02,420 --> 00:04:06,420 So first is actually getting the data for training the machine learning model. 36 00:04:06,780 --> 00:04:13,380 That can, you know, if you're if you're part of a securityware organization, a lot of times, that can be challenging, right? 37 00:04:13,380 --> 00:04:18,340 Going through all these hoops to get access to data is definitely a bottleneck. 38 00:04:18,340 --> 00:04:27,680 And as a result, we can't actually partner with external organizations to pool data that should describe the same phenomenon to train better models. 39 00:04:29,380 --> 00:04:39,880 In addition, the central party who's doing the actual training takes on a lot of risk by aggregating the data in this way, training machine learning model, and then deploying it. 40 00:04:40,080 --> 00:04:45,520 Because, of course, aggregating the data, if you're not careful, can lead to data breaches. 41 00:04:46,220 --> 00:04:52,580 And then once you deploy the system, you can't be sure how that system is going to be used and who's going to query it. 42 00:04:52,580 --> 00:04:59,040 And in which case, there could be attacks that people can do to extract information from that service. 43 00:04:59,440 --> 00:05:15,320 So this could be in the form of model duplication or model theft, where you've spent all this money creating this machine learning model and someone can come along and just through querying it, they can distill the knowledge that's been encoded in that machine learning model. 44 00:05:15,540 --> 00:05:22,460 But, of course, you can also perform attacks on machine learning models to extract the training data. 45 00:05:22,460 --> 00:05:26,460 For example, model inversion does this, where you try to optimize. 46 00:05:26,460 --> 00:05:35,840 Once you have a machine learning model, you can optimize for a specific case and then that will reconstruct the data point that was used in the training set. 47 00:05:36,460 --> 00:05:39,060 And I'll get into this a bit more as well. 48 00:05:39,600 --> 00:05:45,700 And finally, the incentive problem that I mentioned before is a bottleneck as well. 49 00:05:46,400 --> 00:05:52,080 Where if users aren't incentivized to use the service, it's not a good machine learning system. 50 00:05:54,000 --> 00:05:57,020 So, a few possibilities for how we can solve this. 51 00:05:57,020 --> 00:06:00,940 I'll just cover these lightly and then dive into them a little more deeply. 52 00:06:01,740 --> 00:06:20,440 First is this concept of sanitization, where if we could scrub the data at each point whenever it changes hands by adding noise, any single data point in that data set will be obfuscated or masked so that if I want to know something about a specific person, 53 00:06:20,440 --> 00:06:28,240 because of the additional noise, I can never be sure if what I'm seeing is their actual data or some obfuscation of that. 54 00:06:30,920 --> 00:06:34,960 Another possibility is that we can move some of these components to different parties. 55 00:06:35,120 --> 00:06:42,920 So, instead of bringing the data to the model, maybe I can bring the model to the data and train the model locally on device. 56 00:06:45,920 --> 00:06:47,520 Another possibility is encryption. 57 00:06:47,520 --> 00:06:58,320 If we could just encrypt data and process that data while encrypted and still learn from it, then we'd resolve a lot of these privacy problems that we have. 58 00:06:59,880 --> 00:07:09,840 So, I'm now going to go into how these high-level things that I've just mentioned are actually implemented in research and in production. 59 00:07:10,400 --> 00:07:15,380 And I'm going to do so based on these three privacy-preserving primitives. 60 00:07:15,380 --> 00:07:18,840 Differential privacy, federated learning, and secure computation. 61 00:07:19,380 --> 00:07:29,420 So, first, differential privacy is related to this notion of sanitization that I talked about, whereby adding noise, you can obfuscate the actual data. 62 00:07:31,440 --> 00:07:34,720 So, this is actually the definition of differential privacy. 63 00:07:34,800 --> 00:07:37,960 It is somewhat technical, so I'll try to explain it intuitively. 64 00:07:38,940 --> 00:07:48,360 So, assume we have some dataset and we're allowed to interactively run queries on that dataset as long as those queries aren't give me person A's data, right? 65 00:07:49,520 --> 00:07:56,000 So, what I'm going to do is I'm going to query the full dataset, maybe run some statistic over it, and I'll get that. 66 00:07:56,160 --> 00:07:59,500 And that includes this person's data, Alice's data. 67 00:08:00,060 --> 00:08:03,520 And so, then I can query that same database without Alice's data. 68 00:08:03,520 --> 00:08:08,680 And so, what happens when I subtract these two results is that I end up just with Alice's data, right? 69 00:08:08,680 --> 00:08:14,920 So, just preventing someone from accessing the single data point isn't enough to actually guarantee the privacy of that data point. 70 00:08:16,440 --> 00:08:22,940 So, now, with differential privacy, what we would do here is we would obfuscate each query with random noise. 71 00:08:23,280 --> 00:08:30,900 And then we construct that noise such that the expected difference between these two queries is always going to be as little as possible. 72 00:08:30,900 --> 00:08:32,860 So, statistically, zero. 73 00:08:33,520 --> 00:08:35,520 In practice, zero is not actually possible. 74 00:08:35,520 --> 00:08:39,520 So, we use this epsilon number that's slightly greater than zero. 75 00:08:41,340 --> 00:08:46,980 So, this is really cool because it allows us to actually interact with this dataset. 76 00:08:47,300 --> 00:08:58,940 And any time we take subsets of it, we can be sure that that is statistically negligibly different than other subsets, which means that we can protect our user's privacy in this database. 77 00:09:00,240 --> 00:09:12,180 Oh, and that randomized mechanism can also include arbitrary pre and post processing, which means that it could be the forward passive machine learning model or it could be the full learning algorithm that produces weights. 78 00:09:12,840 --> 00:09:17,800 So, this randomized mechanism is essentially just a black box that has some randomness in it. 79 00:09:17,800 --> 00:09:22,920 And as long as we can prove that that preserves privacy in this way, then we're good. 80 00:09:23,720 --> 00:09:26,720 Now, the problem here is that there is a tradeoff between privacy and utility. 81 00:09:27,340 --> 00:09:37,800 Here's a very simple example where I have some set, and every time I query this set, I'm going to add a little bit of noise from a normal distribution. 82 00:09:39,360 --> 00:09:47,600 And then this is the actual expected privacy loss, or this is the privacy loss of doing this, for example, with averaging. 83 00:09:48,800 --> 00:10:10,160 So, what happens as I take this number n to infinity, I make this outlier, or as I turn this last number into an extreme outlier, what happens is that the privacy cost, even after we add this little bit of noise, also goes to infinity, which means that in order to bound this thing, 84 00:10:10,160 --> 00:10:13,560 we need to actually take the noise to infinity as well. 85 00:10:13,700 --> 00:10:26,000 But if we take that noise to infinity, then we're adding arbitrarily more noise, and any statistic that we take from this set is going to be meaningless, because it's just completely noisy now. 86 00:10:27,060 --> 00:10:35,380 So, this is a problem in general for databases, but for machine learning, it's actually quite nice, because in machine learning, we care about general patterns. 87 00:10:35,600 --> 00:10:43,160 We want to pull general patterns from large data sets, and we don't care so much about outliers and unique points. 88 00:10:43,160 --> 00:10:47,980 We usually remove those if possible, at least for many applications. 89 00:10:49,760 --> 00:10:58,720 So, what's nice about this approach is that we have a mathematically rigorous way of proving that our system is private in this way. 90 00:10:58,720 --> 00:11:04,200 And in this way, when I say that, this notion of privacy is actually very strong. 91 00:11:04,420 --> 00:11:13,540 It protects against a broad range of attacks, like membership inference, re-identification attacks, set differencing , model inversion, these types of things that are in the literature. 92 00:11:15,360 --> 00:11:18,840 And it also gives us this intuitive notion of a privacy budget. 93 00:11:18,840 --> 00:11:35,780 This epsilon number that we talked about, how negligible different statistics are or different predictions are, that becomes a privacy budget, because if you query the same query a number of times, the randomness will eventually , because it's zero-centered noise, 94 00:11:35,780 --> 00:11:37,840 will eventually target in on the right value. 95 00:11:37,840 --> 00:11:50,320 So , we can say, as a user, you can only interact with this data set or this model so many times before you've maximized, you've outdone your privacy budget, and you can no longer interact with the system. 96 00:11:52,400 --> 00:11:56,560 So, there's a lot of machine learning research going into this. 97 00:11:57,520 --> 00:12:14,380 Just from Google's group, there's DPSGD, which the idea here is that you can add the noise, instead of adding it to the data, you can add it to the gradients that are produced during stochastic gradient descent while training your model, and then you can prove that this actually produces weights that are differentially private, 98 00:12:14,380 --> 00:12:16,940 that don't leak anything about the underlying data set. 99 00:12:17,860 --> 00:12:18,840 Pate is another one. 100 00:12:18,840 --> 00:12:26,860 This uses model ensembles and distilling information from those ensembles in a way that the final model is differentially private. 101 00:12:28,540 --> 00:12:42,320 There's a lot of research going on into new definitions for this kind of thing, differential privacy, and providing new proof techniques, and then also coming up with new mechanisms, new randomized mechanisms to improve the privacy utility tradeoff that I talked about. 102 00:12:43,540 --> 00:12:44,880 But some open questions. 103 00:12:44,880 --> 00:12:48,220 I mean, differential privacy is a very strong guarantee, but it's not everything. 104 00:12:48,240 --> 00:12:56,700 For example, if other users are contributing data to train a model, I don't need to actually contribute my data to that in order to experience privacy loss. 105 00:12:56,720 --> 00:13:04,500 People can just run that model once it's trained on me, and then I've experienced privacy loss that's contagious through those other people. 106 00:13:05,380 --> 00:13:11,480 We currently really don't have any solutions to this yet, but it is a very big open question. 107 00:13:14,040 --> 00:13:17,500 So differential privacy, it does solve some of these bottlenecks. 108 00:13:18,160 --> 00:13:27,480 So data access, you can scrub data at any point, you can scrub any component of the system with noise, and then prove with differential privacy that it preserves privacy. 109 00:13:28,080 --> 00:13:35,000 But the problem is that if you do this too much, if you add too much noise, the utility of the whole system kind of falls apart. 110 00:13:35,320 --> 00:13:39,800 So maybe the user is no longer incentivized to use your service, and it's pointless, right? 111 00:13:40,280 --> 00:13:43,480 So that moves us towards different primitives. 112 00:13:43,860 --> 00:13:50,000 One that I'll talk about now is federated learning, where we actually just take the model and train it on device. 113 00:13:50,560 --> 00:13:52,000 Google is really well known for this. 114 00:13:52,000 --> 00:13:56,460 They do this on thousands, millions of devices. 115 00:13:57,420 --> 00:14:00,220 And that's a very specific use case. 116 00:14:00,240 --> 00:14:09,000 When you do that, you have low availability data owners or parties with low resources and low bandwidth. 117 00:14:09,520 --> 00:14:13,480 And so this is kind of a very tricky way of doing on-device learning. 118 00:14:13,480 --> 00:14:15,120 But in general, you can do this. 119 00:14:15,120 --> 00:14:25,180 You can imagine doing this between five or 10 hospitals, in which case they can ramp up servers with GPUs and have strong network connections between them and always be available. 120 00:14:25,180 --> 00:14:31,460 So this is actually a viable avenue for training machine learning models in a non-standard way. 121 00:14:33,280 --> 00:14:40,160 So what's nice about this is we don't centralize the raw data, which removes some of the excessive information flow I talked about. 122 00:14:41,660 --> 00:14:46,540 In particular, the data access problem, because you never have to centralize it. 123 00:14:48,580 --> 00:14:57,940 And perhaps users are incentivized to use your service if they know that you're only doing the predictions on device and they're never actually sending their data to you. 124 00:14:58,420 --> 00:15:04,560 But the problem is that our risk management is not actually that strong. 125 00:15:04,700 --> 00:15:13,140 And there's no guarantee that me as the designer of the service isn't actually going to peek at your data when I want to or need to. 126 00:15:13,260 --> 00:15:17,740 So we have no privacy guarantee like we had in differential privacy. 127 00:15:18,820 --> 00:15:22,260 And the other problem is that the model is exposed. 128 00:15:22,260 --> 00:15:34,060 When we send the model to training on these arbitrary data owners, we now have to treat them as adversaries, because they could potentially try to influence that process in a way that's advantageous to them. 129 00:15:36,560 --> 00:15:52,140 Or assuming, you know, if you're training a machine learning model amongst a bunch of parties, at some point, someone, one of those parties is going to end up with a model that is essentially the same as the final model, which means this asset that you've trained is now up for grabs. 130 00:15:53,340 --> 00:16:00,720 So this is not an ideal approach, but it does offer maybe some additional privacy that we don't have in the current paradigm. 131 00:16:02,060 --> 00:16:02,660 Okay. 132 00:16:02,660 --> 00:16:13,640 So what if we could try to accomplish the same thing we're trying to do with federated learning, but add in some kind of privacy guarantee back without maybe adding so much noise that the service doesn't work anymore. 133 00:16:13,640 --> 00:16:16,920 And this is kind of the notion behind secure computation. 134 00:16:17,180 --> 00:16:18,780 This is research from the 80s. 135 00:16:20,800 --> 00:16:29,300 The general idea is how can we compute a publicly known function while the inputs and outputs of that function are kept private? 136 00:16:30,080 --> 00:16:36,400 And private here is usually defined similarly to how it is in standard encryption, like in communication encryption, for example. 137 00:16:38,480 --> 00:16:45,960 So again, just to reiterate that, we have this publicly known function, and we want to evaluate it without knowing the inputs and outputs necessarily. 138 00:16:46,880 --> 00:16:52,620 And this function could be the forward pass of machine learning model, or it could also be the entire learning algorithm, right? 139 00:16:52,620 --> 00:16:56,820 So we can do training or inference in this way, if we can do so. 140 00:16:57,080 --> 00:17:01,740 And how we actually do it is we find some function that is homomorphic through F. 141 00:17:01,740 --> 00:17:10,840 And this just means that you can encrypt the inputs and run the function the same way and end up with an encrypted output that you can then decrypt. 142 00:17:10,840 --> 00:17:12,060 That's this bottom line. 143 00:17:13,060 --> 00:17:15,320 You have this encryptor and this decryptor. 144 00:17:15,320 --> 00:17:17,280 The encryptor is homomorphic through the function. 145 00:17:17,280 --> 00:17:23,680 The decryptor is cryptographically hard to determine unless you have some of the inputs to the function. 146 00:17:25,560 --> 00:17:31,480 And the rest of this talk, I'll refer to this as like the homomorphic paradigm for machine learning, because it's the dominant one. 147 00:17:32,540 --> 00:17:37,840 There are actually a lot of different ways to do this secure computation. 148 00:17:37,840 --> 00:17:40,200 There are a lot of techniques, and they all have different trade-offs. 149 00:17:40,200 --> 00:17:44,480 So the main takeaways of this is just that there are a lot of them. 150 00:17:44,480 --> 00:17:48,520 They're not directly comparable because they all have slightly different threat models. 151 00:17:48,840 --> 00:17:55,880 There is no silver bullet, and actually most state-of-the-art protocols are using some combination of these different approaches. 152 00:17:56,540 --> 00:18:00,700 We'll focus in a bit on secret sharing just to demonstrate how this applies to machine learning. 153 00:18:01,660 --> 00:18:12,780 So for example, if you wanted to run inference on a simple linear model without exposing the data privacy, you could encrypt the inputs to the data. 154 00:18:12,920 --> 00:18:14,080 Here we call it secret sharing. 155 00:18:14,080 --> 00:18:19,400 What we're going to do is we're going to take a little bit of randomness and subtract it from the data point. 156 00:18:19,740 --> 00:18:22,980 That randomness is then... it's called a one-time pad. 157 00:18:22,980 --> 00:18:24,420 It's extremely secure. 158 00:18:24,480 --> 00:18:25,720 Now we have three components. 159 00:18:25,720 --> 00:18:29,080 We have the original data point, and we have these two masked versions of it. 160 00:18:29,260 --> 00:18:35,680 So if I want to compute this forward pass, this linear regression with someone, I send them one of those shares. 161 00:18:35,880 --> 00:18:44,040 We essentially do a public multiplication with the weights, and then a private addition between the components in this vector. 162 00:18:44,040 --> 00:18:46,080 This is just a simple dot product. 163 00:18:47,200 --> 00:18:53,020 And what it ends up doing is we can end up with an encrypted version of the final result. 164 00:18:53,020 --> 00:19:02,360 And so if we reconstruct, if we send the shares of that output back to each other, we can reveal the answer of the machine learning model's inference. 165 00:19:03,400 --> 00:19:05,920 And we can actually do this while securing the weights, too. 166 00:19:05,920 --> 00:19:12,700 We can just treat the weights as another input to this function of a dot product and do it just like that. 167 00:19:12,700 --> 00:19:16,280 It gets a little more complicated, and it gets slower, but it is possible. 168 00:19:17,320 --> 00:19:28,120 And so this matrix math is actually really conducive to secure computation, which is why this is actually a potential approach that we could do to do this and scale this. 169 00:19:29,180 --> 00:19:36,620 So once you move past simple dot products, you can actually scale this up to larger models and then do a lot of interesting things with it. 170 00:19:36,620 --> 00:19:39,380 So past just prediction, you can do training. 171 00:19:39,780 --> 00:19:50,780 This is an example of server-aided training, where all the data sources on the left, instead of aggregating their plain text data, they will encrypt the data and send it to these two servers. 172 00:19:51,380 --> 00:19:55,240 And the two servers now will engage in some computation with each other. 173 00:19:55,240 --> 00:20:03,740 They do a lot of communication back and forth to be able to do this, but in the end result, you end up with a shared machine learning model that is kept private. 174 00:20:03,740 --> 00:20:10,240 That is where the final party who wants to deploy this model never had access to the actual raw data. 175 00:20:10,240 --> 00:20:12,620 They only had access to an encrypted version of it. 176 00:20:14,400 --> 00:20:19,640 So what's nice here is that we're able to run machine learning models on encrypted data. 177 00:20:19,800 --> 00:20:28,620 What's bad about this in particular with secret sharing is that there's the possibility that these two servers will collude with each other to reveal the data and break the privacy guarantee. 178 00:20:29,680 --> 00:20:32,420 So there are secure computation techniques without that. 179 00:20:32,420 --> 00:20:35,780 That's just one particular one that's a problem. 180 00:20:37,800 --> 00:20:51,320 And so instead of centralizing the encrypted data on these two servers, you could think of just doing the multi-party, the secure computation between these parties directly, and then never centralizing any data. 181 00:20:51,320 --> 00:20:52,400 And you can do this just fine. 182 00:20:52,400 --> 00:20:53,220 It just gets slower. 183 00:20:56,000 --> 00:20:59,940 So this research field has a long history. 184 00:21:00,140 --> 00:21:10,760 On the left here, we have mainly research papers that are applying secure computation to machine learning, but secure computation has a long history before machine learning was during the AI winters, right? 185 00:21:11,700 --> 00:21:19,900 And on the right, we have some general secure computation frameworks that people have implemented machine learning algorithms in on top of. 186 00:21:20,000 --> 00:21:27,980 And on the bottom, we have these two specialized projects that are actually, like, kind of academic C++ libraries. 187 00:21:27,980 --> 00:21:34,640 They're trying to build privacy preserving machine learning primitives into the frameworks that people are familiar with. 188 00:21:35,060 --> 00:21:37,980 In particular, TensorFlow and PyTorch. 189 00:21:37,980 --> 00:21:41,140 And I'll talk a little bit about that more later. 190 00:21:42,500 --> 00:21:45,240 So some open questions around secure computation. 191 00:21:45,240 --> 00:21:50,020 As I mentioned a few times, it is extremely slow to do this. 192 00:21:50,020 --> 00:21:56,380 Right now, we can't actually scale this to, for example, 152 layer neural network. 193 00:21:56,820 --> 00:22:01,480 We can do pretty well, but that's currently out of reach. 194 00:22:01,560 --> 00:22:04,360 So the question then becomes, can we ever account for that? 195 00:22:04,360 --> 00:22:12,240 Can we make that cost, that extra performance cost, marginal as opposed to really central? 196 00:22:14,660 --> 00:22:24,520 But if not, I mean, secure computation for machine learning can still enable applications of machine learning that currently aren't possible today. 197 00:22:24,700 --> 00:22:28,200 Just because of privacy concerns. 198 00:22:28,200 --> 00:22:32,160 For example, regulatory, competitive, or sensitivity issues. 199 00:22:32,980 --> 00:22:52,480 And so, but the question to maybe or to answer this question about marginal cost, can we combine MPC with other approaches that are faster to maintain some of its privacy guarantee without totally ruining the speed of machine learning? 200 00:22:53,520 --> 00:23:00,840 And there's a good example that Google put out there called secure aggregation, where they apply this to federated learning to give it some kind of privacy guarantee. 201 00:23:01,480 --> 00:23:25,100 And similar to what people are doing with differential privacy now, can we think of alternative definitions for privacy and security that allow us to perform this in a more performant way or to run machine learning in a more performant way while still preserving that notion of privacy as opposed to the strong information theoretic privacy that we see from secure computation? 202 00:23:25,340 --> 00:23:28,300 And then that's some of what I want to talk about. 203 00:23:28,700 --> 00:23:32,360 That's part of my research as well, is that I'd like to answer this question. 204 00:23:33,260 --> 00:23:36,420 So just to summarize real quickly on secure computation. 205 00:23:37,520 --> 00:23:57,700 So what it does is it gives us very strong guarantees for accessing data and preventing unfettered access to data, which helps with the data access problem, with the risk management problem, and also with the incentive problem, because you can do predictions in this way and have formal guarantees around the user's privacy. 206 00:23:57,740 --> 00:24:03,320 It does not actually prevent these differencing attacks and model inversion attacks that I talked about with differential privacy. 207 00:24:03,480 --> 00:24:21,440 But because differential privacy works, we can combine it with MPC or secure computation to actually get a full privacy preserving workflow with full strong information theoretic guarantees for preserving privacy of the different parts of the system. 208 00:24:23,080 --> 00:24:23,520 Okay. 209 00:24:23,520 --> 00:24:38,960 So now that I've talked about the primitives and what people have been doing for the past 20 years, let's look a bit at current research, what's happening now, and how we should prioritize them. 210 00:24:40,280 --> 00:24:45,100 So big focus right now is on designing systems and tools that make this easier to use. 211 00:24:45,400 --> 00:24:48,360 This is a paper that we produced. 212 00:24:48,580 --> 00:25:02,200 It's doing secure computation in TensorFlow, which is, of course, the dominant deep learning framework, largely swallowing up more and more of the ecosystem as Google marched it out. 213 00:25:02,760 --> 00:25:12,620 And so what we were able to do is use the distributed computation engine in TensorFlow to perform secure computation through secret sharing. 214 00:25:12,620 --> 00:25:24,700 And we found that because they've put so much work into that distributed orchestration, it's actually a very convenient way of expressing these secure computations, and it's extremely efficient. 215 00:25:26,000 --> 00:25:27,540 So this is on GitHub. 216 00:25:27,540 --> 00:25:28,080 It's open source. 217 00:25:28,080 --> 00:25:28,860 You can check it out. 218 00:25:28,860 --> 00:25:35,760 And Google themselves has published a few code libraries around this stuff. 219 00:25:35,840 --> 00:25:42,120 On the left, Google's federated learning team has produced TensorFlow federated, which is all about doing federated learning in TensorFlow. 220 00:25:42,300 --> 00:25:48,000 On the right, TensorFlow privacy, which is more around differential privacy and training differentially private models. 221 00:25:48,240 --> 00:25:52,440 So now these three primitives are each available inside of TensorFlow. 222 00:25:52,440 --> 00:25:55,060 If you're familiar with that, you can play with these. 223 00:25:55,260 --> 00:25:57,800 They're not totally integrated yet, but we're working on it. 224 00:26:01,640 --> 00:26:05,780 Another thing that we just did recently was a different kind of secure computation. 225 00:26:05,780 --> 00:26:14,940 It's called homework encryption, which is much closer to public-private key cryptography, but just designing that crypto system so that you can still do the computations. 226 00:26:15,400 --> 00:26:17,940 Microsoft has a really well-known package called SEAL. 227 00:26:17,940 --> 00:26:19,800 It's highly optimized for doing this. 228 00:26:19,980 --> 00:26:28,000 And we were able to bridge TensorFlow with Microsoft SEAL so you can do homework encryption as well as opposed to just multi-party computation. 229 00:26:28,560 --> 00:26:37,380 And then we've also experimented with deploying TensorFlow models in secure enclaves and trusted execution environments, in particular, Intel SGX. 230 00:26:38,440 --> 00:26:46,820 And so we have a project out that actually won a Google and Intel confidential cloud computing competition. 231 00:26:47,080 --> 00:26:49,480 So that's pretty cool to check out. 232 00:26:49,480 --> 00:26:56,160 And then there's another paper kind of doing a similar thing from a group or community called OpenMind. 233 00:26:56,160 --> 00:27:00,920 It's currently probably the largest community of people interested in privacy preserving machine learning. 234 00:27:01,280 --> 00:27:08,200 It's run by Andrew Trask, who is a research scientist at D-Mind and a student at the University of Oxford. 235 00:27:08,460 --> 00:27:16,960 And this is essentially building these three primitives into a system that's integrated from the beginning. 236 00:27:16,960 --> 00:27:23,420 Whereas these TensorFlow projects have kind of started off in different groups, so they exist. 237 00:27:23,420 --> 00:27:25,780 They're pretty performant, but they're not well integrated. 238 00:27:26,140 --> 00:27:31,500 This project is more around having an ecosystem that's very highly integrated with itself. 239 00:27:32,120 --> 00:27:35,720 And so I was involved in the early days of this one, too. 240 00:27:35,720 --> 00:27:43,460 And it was recently featured as a free course on Udacity, sponsored by Facebook. 241 00:27:44,580 --> 00:27:52,300 And if you're interested in playing around with these primitives in a way that's really accessible, you can take this course for free. 242 00:27:52,300 --> 00:28:00,180 And it'll introduce you to these techniques using PyTorch, which is the system that we built in this paper. 243 00:28:02,120 --> 00:28:06,760 So beyond systems and tools, there are some larger questions that we still have to figure out as a community. 244 00:28:07,140 --> 00:28:11,120 The question of centralization is, of course, a big one. 245 00:28:12,000 --> 00:28:17,420 If we're going to centralize things, how much should we centralize and how should we centralize them? 246 00:28:18,000 --> 00:28:23,120 Unfortunately, this question has become quite heavily skewed with a lot of the blockchain hype train. 247 00:28:24,420 --> 00:28:31,300 So for example, SingularityNet, if you've seen Sophia the Robot, they're all about this, combining blockchain with AI in a decentralized way. 248 00:28:31,300 --> 00:28:34,880 And that can be distracting, for sure. 249 00:28:35,700 --> 00:28:45,440 But one good thing about this is that with the blockchain hype has come this interest in economics and machine learning and their combination. 250 00:28:45,880 --> 00:29:02,060 So if everyone had control over their personal data through privacy-preserving machine learning, it could be possible that data would turn into a liquid asset, which has pretty strong implications for how we do machine learning now and the notion of a data economy or a data marketplace. 251 00:29:04,160 --> 00:29:12,900 This then makes you wonder how you might price a trained machine learning model, or how you might value the underlying training set that was used to produce that model. 252 00:29:13,960 --> 00:29:21,080 So corporations estimate the cost and value of machine learning models all the time, but no one's really pricing data in this context. 253 00:29:21,080 --> 00:29:29,740 So that's kind of a nice open area that was recently brought up in this ICML paper from 2019. 254 00:29:29,740 --> 00:29:31,380 It was from a group at Stanford. 255 00:29:31,440 --> 00:29:36,780 It's called DataShapely, estimating the valuation of data. 256 00:29:37,220 --> 00:29:49,280 And what they found is that it's really interesting that data that's outliers are worth less than data that's representative of the pattern you're trying to learn, which is somewhat not surprising, but it's also really helpful. 257 00:29:49,500 --> 00:29:56,020 Because as I mentioned before, differential privacy is really strong unless you have these outliers. 258 00:29:56,260 --> 00:30:06,660 So what turns out to be valuable data lends itself well to differential privacy and the utility privacy trade-off that I mentioned before. 259 00:30:07,180 --> 00:30:08,460 This is super cool. 260 00:30:08,460 --> 00:30:09,620 I love this paper. 261 00:30:10,080 --> 00:30:19,260 And it's really unfamiliar to me as a machine learning person because it focuses on estimating economic values and stuff, but I will come back to it in a bit. 262 00:30:20,200 --> 00:30:23,400 So moving on to secure computation, this is like... 263 00:30:23,400 --> 00:30:27,160 with differential privacy and secure computation, these are probably the two main 264 00:30:31,000 --> 00:30:38,540 strong guarantee, big primitives that we would really like to see all machine learning done in, if it could be, right? 265 00:30:38,540 --> 00:30:40,080 Because they're very secure. 266 00:30:40,080 --> 00:30:41,140 They're very strong. 267 00:30:41,780 --> 00:30:46,820 And the main problem is just that we can't scale them to all the applications that we see today. 268 00:30:48,380 --> 00:30:53,340 So we do have a kind of slight advantage in machine learning. 269 00:30:54,100 --> 00:31:02,540 I mean, so the timeline here is essentially that, you know, you have these general secure computation techniques and frameworks, and people are just optimizing those for generic computation. 270 00:31:02,600 --> 00:31:10,700 Then when people started applying it to machine learning, they realized that, oh, well, all these optimizations are actually really convenient for matrix math and then the stuff that machine learning uses. 271 00:31:11,540 --> 00:31:20,200 And then now actually it's going... so people were saying, all right, how can we mix and match these different protocols to improve the performance for machine learning models? 272 00:31:20,300 --> 00:31:26,700 But now we're going to the point where we're saying, well, how can we tweak the machine learning models to make it more efficient in this encrypted space? 273 00:31:26,700 --> 00:31:29,280 That's a lot of the work that we've done at Dropup. 274 00:31:30,980 --> 00:31:40,520 So for generic secure computation, it's unacceptable for a function to evaluate differently than it would have in the plain text. 275 00:31:41,000 --> 00:31:47,980 But for machine learning, we don't really care about specific examples because we're already approximating some ideal function. 276 00:31:48,120 --> 00:31:56,600 So if it's better to just find some other approximation that runs more efficiently, we can do that as long as the performance is roughly the same. 277 00:31:57,080 --> 00:32:06,780 So we're seeing quick wins by just adapting machine learning, tweaking, for example, the activation functions we use, going from max pooling to average pooling or something like this in a deep neural network. 278 00:32:06,780 --> 00:32:08,300 And we're seeing big wins there. 279 00:32:09,360 --> 00:32:13,720 So then the question becomes, is there an upper bound on those quick wins? 280 00:32:14,460 --> 00:32:17,000 And so I tried to formalize this question. 281 00:32:18,240 --> 00:32:21,560 I phrased it as this no free lunch hypothesis. 282 00:32:21,560 --> 00:32:34,480 Essentially just given this machine learning algorithm, can you find a roughly equivalent version of it in the sense of runtime, but also in its security? 283 00:32:35,140 --> 00:32:36,020 Sorry. 284 00:32:36,460 --> 00:32:43,320 In terms of runtime and in terms of generalization performance, but with the requirement that it can be computed securely. 285 00:32:43,740 --> 00:32:45,760 And the difference is negligible. 286 00:32:47,060 --> 00:32:50,620 So this is that in pictures. 287 00:32:50,820 --> 00:32:57,860 In theory, anything that you can compute in plain text should be computable in a secure way. 288 00:32:58,100 --> 00:33:03,340 But in practice, efficiency just constrains what we can actually do. 289 00:33:04,020 --> 00:33:08,140 But if this hypothesis were to be true, then that actually wouldn't be the case. 290 00:33:08,140 --> 00:33:09,980 At least for machine learning. 291 00:33:09,980 --> 00:33:16,380 There would always be some slightly different machine learning model that runs as fast, but securely. 292 00:33:17,520 --> 00:33:23,440 So the problem with this is that the way we prove security in MPC does not lend itself well to this. 293 00:33:23,780 --> 00:33:30,520 This is an undecidable statement when you look at how we prove security. 294 00:33:31,520 --> 00:33:34,680 It's called the simulation paradigm, if you're interested in that. 295 00:33:35,520 --> 00:33:41,680 So maybe we need a new concept of security to be able to actually answer this question in a way that's helpful. 296 00:33:42,040 --> 00:33:51,760 So just to reiterate one thing here, with federated learning and secure computation, we have this threat model dilemma where the one that scales doesn't have a strong security guarantee. 297 00:33:51,760 --> 00:33:53,760 The one that doesn't scale does. 298 00:33:53,760 --> 00:33:55,420 And how do we reconcile this? 299 00:33:58,660 --> 00:34:14,200 I would propose, what I am proposing, is to analyze the incentives of everyone in this machine learning game, treat it as an adversarial game where anyone could steal the other person's asset if it's worth their time. 300 00:34:14,960 --> 00:34:28,880 So if you knew the utility function of each party in this private machine learning game, instead of relying on computational hardness and information theory, you can rely on the fact that they're motivated and that you know their motivations. 301 00:34:28,880 --> 00:34:31,660 And then you can use game theory to prove security. 302 00:34:33,480 --> 00:34:45,020 And so because you understand, that's only because you can understand their motivations, and also only because you can price the different components in this system, in particular data and models. 303 00:34:45,020 --> 00:34:47,480 If you can price those, you can do this. 304 00:34:47,640 --> 00:34:51,680 Now, that's where the details lie, and that's where we still need to figure things out. 305 00:34:51,680 --> 00:34:54,060 But this has a long history as well, actually. 306 00:34:54,060 --> 00:34:55,840 It's called rational cryptography. 307 00:34:56,880 --> 00:35:02,300 Now, it failed to take hold because it was trying to solve generic cryptography problems. 308 00:35:02,700 --> 00:35:08,140 And utility functions are extremely hard to estimate in those generic cases. 309 00:35:08,640 --> 00:35:16,880 But as I've been saying, in private machine learning, we only ever need to estimate the utility of those two things, data and models, or pieces of models. 310 00:35:16,940 --> 00:35:20,500 And we already have ways of doing this in both cases. 311 00:35:22,040 --> 00:35:29,300 So if we can do this, it could give us NPC protocols that are faster, but still provably secure. 312 00:35:29,540 --> 00:35:40,620 And we can use this to drive security guarantees for federated learning, in particular to see just how weak that guarantee is for a specific use case. 313 00:35:43,020 --> 00:35:47,500 So, in conclusion, privacy is a security problem. 314 00:35:48,320 --> 00:35:55,040 That security problem creates leakages, or bottlenecks, rather, in the current paradigm of machine learning. 315 00:35:56,060 --> 00:36:04,180 And these techniques that I've been talking about, differential privacy, federated learning, secure computation, can alleviate those bottlenecks, if you allow them to. 316 00:36:05,000 --> 00:36:07,200 The field is really wide open. 317 00:36:07,200 --> 00:36:10,940 There's not many people working on this, but it is a very exciting area to be in. 318 00:36:11,260 --> 00:36:18,860 And there are now packages and tools that you can pull down from GitHub and play around with this stuff on your local computer in a matter of minutes. 319 00:36:19,300 --> 00:36:26,260 To me, that's like a really strong recipe for people in security and machine learning to experiment with and just play with this stuff. 320 00:36:26,260 --> 00:36:28,940 So, thank you for your time. 321 00:36:28,940 --> 00:36:33,040 I've included some resources, and we'll get these slides up so you can play around with it if you want. 322 00:36:33,240 --> 00:36:33,880 Thanks. 323 00:36:42,110 --> 00:36:46,350 So, have you thought about the... could you use any of this to detect data? 324 00:36:47,050 --> 00:36:47,730 Yeah. 325 00:36:51,180 --> 00:36:58,560 So, actually, unfortunately, I would say... I mean, detection is hard. 326 00:36:59,820 --> 00:37:04,000 In particular, for federated learning, this is a huge problem, because you're just sending the out. 327 00:37:04,000 --> 00:37:05,020 They can do whatever they want. 328 00:37:05,020 --> 00:37:07,100 They can optimize it however they want. 329 00:37:07,100 --> 00:37:09,140 They can feed with whatever data they want. 330 00:37:09,580 --> 00:37:10,860 There are defenses. 331 00:37:10,860 --> 00:37:14,180 So, this field is called Byzantine Resilient Machine Learning. 332 00:37:14,220 --> 00:37:15,940 It's still new as well. 333 00:37:16,840 --> 00:37:27,420 What's nice about secure computation, though, is that you can force... you can construct the protocol so it's impossible for people to add computation to the function evaluation. 334 00:37:27,420 --> 00:37:32,160 So, they can only ever follow the protocol in lock step. 335 00:37:32,160 --> 00:37:40,000 And if they deviate at any point and try to modify the result in a way that's unanticipated, the protocol will just break. 336 00:37:40,000 --> 00:37:41,540 It will just not work. 337 00:37:42,640 --> 00:37:47,440 This is the difference between passive security and active security in the field. 338 00:37:47,880 --> 00:37:50,000 So, there are some defenses. 339 00:37:50,060 --> 00:38:00,920 And even in federated learning, for example, at the aggregation step, where you aggregate the different parties' updates, instead of just doing an average, you can do the median of those updates. 340 00:38:00,920 --> 00:38:03,780 And then the median is much more robust to these outliers. 341 00:38:03,780 --> 00:38:05,640 That would much more likely be... 342 00:38:06,680 --> 00:38:07,860 data poisoning. 343 00:38:07,860 --> 00:38:12,600 Poison data would be much more likely to be an outlier relative to the distribution. 344 00:38:13,880 --> 00:38:19,940 So, that's kind of the current trend around that. 345 00:38:23,550 --> 00:38:27,130 Yeah, but to push a median, you have to go really far, right? 346 00:38:27,130 --> 00:38:32,390 You have to actually... you have to control, like, a lot of the data. 347 00:38:32,390 --> 00:38:33,430 You can't just do it with one point. 348 00:38:33,430 --> 00:38:35,870 You have to do it with a large subset. 349 00:38:35,950 --> 00:38:42,590 So, yeah, it's... so, you can get resiliency up to, like, a third or a half of the parties. 350 00:38:43,290 --> 00:38:45,810 But going past that is extremely difficult. 351 00:38:46,110 --> 00:38:48,650 So, secure computation, that's not the case. 352 00:38:48,650 --> 00:38:49,490 You can do... 353 00:38:49,490 --> 00:38:54,270 if there's n parties, n minus one of them can be corrupt, and you still cannot break security. 354 00:38:54,690 --> 00:38:57,530 So, that's kind of another nice feature of it. 355 00:38:57,910 --> 00:38:58,430 Yeah. 356 00:38:59,530 --> 00:39:00,330 Yep. 357 00:39:31,830 --> 00:39:32,430 Yeah. 358 00:39:32,430 --> 00:39:39,130 So, the question was, why are some models more efficient than others in the encrypted space, essentially, right? 359 00:39:40,930 --> 00:39:44,730 Well, the answer... I mean, it depends on which technique you're using. 360 00:39:45,310 --> 00:39:47,910 So, there's this big list of them. 361 00:39:50,090 --> 00:39:51,170 This one. 362 00:39:51,950 --> 00:39:54,910 So, that's actually only true for these three on the right. 363 00:39:54,910 --> 00:40:01,850 Secure enclaves can handle arbitrary computation, and it's roughly as fast as regular. 364 00:40:01,950 --> 00:40:06,290 And the problem there being that there are demonstrated side channel attacks on these enclaves. 365 00:40:06,290 --> 00:40:10,530 So, they're not as secure, potentially, as the ones on the right. 366 00:40:11,630 --> 00:40:15,010 And the ones on the right have different operations that they're optimized for. 367 00:40:15,010 --> 00:40:18,850 So, garbled circuits is really efficient for comparing items. 368 00:40:18,850 --> 00:40:29,030 So, if you essentially build a Boolean circuit, and you scramble it in a way that's privacy preserving, and then you evaluate that circuit, which lends itself really well to taking maximums and stuff like that. 369 00:40:29,030 --> 00:40:35,290 But for like matrix multiplication, for example, it's a lot harder to get down to a binary circuit with that. 370 00:40:36,590 --> 00:40:39,250 But so, and garbled circuits have some other problems. 371 00:40:39,250 --> 00:40:43,950 So, most of the people right now are doing homework encryption or secret sharing. 372 00:40:44,690 --> 00:40:47,070 Those are really optimized for arithmetic. 373 00:40:47,070 --> 00:40:48,710 So, addition, multiplication. 374 00:40:48,950 --> 00:40:59,250 But taking comparisons, for example, just doing a relu is actually really expensive with those because that doesn't fit into, you know, arithmetic. 375 00:41:00,810 --> 00:41:08,430 So, there is like a theoretical understanding of why different things are faster. 376 00:41:08,430 --> 00:41:18,270 It's more just figuring out how you can stay within those confines, but still learn all the same things you can learn with like a normal machine learning model. 377 00:41:18,270 --> 00:41:25,750 For example, if you remove relu and replace it with something that's arithmetic based, can you still get the same learning capacity? 378 00:41:26,690 --> 00:41:29,970 And that's, I mean, one of our interns is actually running some experiments around that. 379 00:41:29,970 --> 00:41:31,910 So, that's yeah. 380 00:41:41,950 --> 00:41:43,310 Can you repeat that? 381 00:41:53,920 --> 00:41:54,540 No. 382 00:41:54,540 --> 00:42:00,100 In general, the function, the protocol of encrypting these things is known ahead of time. 383 00:42:00,100 --> 00:42:04,400 What's not known is that the randomness used in the specific mechanism. 384 00:42:05,440 --> 00:42:08,860 It's kind of the same way that public-private key cryptography works. 385 00:42:09,540 --> 00:42:11,400 Yeah, just a little bit different setup. 386 00:42:12,000 --> 00:42:15,380 If you get the key, however, then yes, you can break. 387 00:42:15,680 --> 00:42:23,180 So, in homework encryption, that is a hardness question, and in MPC, it's a collusion question. 388 00:42:23,520 --> 00:42:25,600 But yeah. 389 00:42:26,340 --> 00:42:27,500 Cool. 390 00:42:27,780 --> 00:42:28,760 Any more? 391 00:42:29,120 --> 00:42:30,580 Cool. 392 00:42:30,580 --> 00:42:31,640 Thanks.