Since there seems to be a lot of confusion throughout this thread, perhaps I can attempt to clarify what's going on at a very high level. The setting is that the user sends their data to a service and wants the service to do useful work on their data without knowing what their data is. In this case, the work that the service does is apply a pre-trained, non-secret ML vision model to the secret, encrypted data. The re…
Machine Learning on Encrypted Data Without Decrypting It
101–110 of 122 posts
Re: Machine Learning on Encrypted Data Without Decrypting It
#102Re: Machine Learning on Encrypted Data Without Decrypting It
#103Earlier quoted context omitted.
If I don't even know what data type my input is, what meaningful output can the system give? I wouldn't consider that cheating. Also, you can do feature engineering on a training set that you collect, as long as that is similar to the distribution of end user inputs. That's a pretty standard ML workflow.
The entire point of encrypted data is you don't know what's in there. What they're claiming is they've worked around this problem, but they haven't, because they're subtly incorporating outside information: specifically that they know what the data looks like already. From a true third-party looking at encrypted data, you would have no idea. What does your statement about feature engineering have to do with encrypted…
With homomorphic encryption: - I encrypt my data locally - Send the encrypted bits over to the third-party - The third-party uses their ML algorithm to compute a prediction - They send back an encrypted prediction - I decrypt the prediction locally and get my results.
At no point in this process can anyone, aside from me, see either the input data or the output.
Re: Machine Learning on Encrypted Data Without Decrypting It
#104Since there seems to be a lot of confusion throughout this thread, perhaps I can attempt to clarify what's going on at a very high level. The setting is that the user sends their data to a service and wants the service to do useful work on their data without knowing what their data is. In this case, the work that the service does is apply a pre-trained, non-secret ML vision model to the secret, encrypted data. The re…
Sounds strange. Does this mean that the model has to be trained on encrypted data?
It is also possible for the model to be provided by the user and encrypted along with the data rather than being fixed and public. That way the service can apply a model that it doesn't know to data that it also doesn't know. This allows a fairly general service in theory, but it remains a challenge to express more than fairly simple models in a way that can be computed efficiently.
Re: Machine Learning on Encrypted Data Without Decrypting It
#105"True homomorphic encryption isn't possible, and my guess is that it will never be feasible for most applications. But limited application tricks like this have been around for decades, and sometimes they're useful" - Bruce Schneier https://www.schneier.com/blog/archives/2019/07/google_releas...
Re: Machine Learning on Encrypted Data Without Decrypting It
#106Re: Machine Learning on Encrypted Data Without Decrypting It
#107Earlier quoted context omitted.
The software can only do arithmetic in a fixed pattern, no "if" statements or while loops or anything. Any conditionals have to be faked with arithmetic. So, since the arithmetic is secure (otherwise it wouldn't be HE), and the entire runtime pattern is fixed up front and made of nothing but arithmetic, there's no way to leak anything.
This gives a whole new look to lambda calculus and Lisp concepts that promote to represent everything as a (preferably pure) function. If the whole logic can be expressed as a pure function without conditionals then it would fully fit into HE. But what if we want conditionals? Comparison operators like (a b), etc go out of the question immediately as they would allow to guess the values by a simple binary search. Equ…
But instead let's say you have some register which gets rotated/xor'd in some way based on the relationship of a to b.
I don't think you can do branching logic though.
Re: Machine Learning on Encrypted Data Without Decrypting It
#108Re: Machine Learning on Encrypted Data Without Decrypting It
#109Earlier quoted context omitted.
It is really straightforward. The currently top voted comment basically explains it. If you take data x and encrypt it with encryption function C to get C(x), and then apply your machine learning model f to that to get f(C(x)), homomorphism means that f(C(x)) = C(f(x)) (because f and C commute), so the client can then apply the decryption to the result to get C-1(f(C(x)) = C-1(C(f(x)) = f(x).
You might want to clarify that “C-1” is actually C^-1 because otherwise I was wondering where subtraction comes into play.
Re: Machine Learning on Encrypted Data Without Decrypting It
#110Earlier quoted context omitted.
It would be good to see a proof why the homomorphism property is sufficient for doing ML (or a specific type of ML) on encrypted data. Intuitively it may or may not make sense to people, but a proof would also clarify whether there are any caveats, limitations or other particuliarities.
It is really straightforward. The currently top voted comment basically explains it. If you take data x and encrypt it with encryption function C to get C(x), and then apply your machine learning model f to that to get f(C(x)), homomorphism means that f(C(x)) = C(f(x)) (because f and C commute), so the client can then apply the decryption to the result to get C-1(f(C(x)) = C-1(C(f(x)) = f(x).
What is the domain and what is the codomain? If f and C commute, then x in X is just your "data" and both the domain and codomain.
Edit:
> the top voted comment
Ah, I see that the top comment says that you use a pre-trained model. Intuitively that I think makes sense. Bot how about training the model itself?