Skip to main content

Federated learning

 If your data are used to train a Machine Learning model, chances are that a Data Scientist, a Data Engineer, or an ML engineer is going to stumble upon it! I know, for example, that Walmart categorically refuses to use AWS as Amazon is their direct competitor and doesn't want to risk having their data fall into the wrong hands.


One solution to that data privacy problem could be to encrypt the data, but for typical encryption, that would mean that the whole training data needs to be encrypted. But if the Data Engineers own the key that encrypts the data, what would stop them from decrypting it when they receive new customer data? One way to go about it is to use Full Homomorphic Encryption (FHE).


FHE means that when you encrypt data, it preserves addition and multiplication operations. For example, if E is the encryption function, we have:


E(a + b) = E(a) + E(b) and E(a x b) = E(a) x E(b)


In practice, it means that FHE preserves any polynomial transformation of the data. If a computation involves a polynomial, computing and then encrypting gives the exact same result as encrypting and then computing. If we have a polynomial transformation P then


P(E( a )) = E(P( a ))


If D is the decryption function, we have D( E( a ) ) = a (the data is preserved after decryption). This means that


D(P( E( a ))) = D(E(P( a ))) = P(a)


That means that we can have computations with fully encrypted data completely equivalent to no encryption at all! If P is an ML model, that means that we can train a model with non-encrypted data, and infer on encrypted data. The model output will be encrypted as well and can be decrypted by the party that encrypted the data in the first place. This means that the model server host will never see raw customer data.


That is great, but that means that our ML model needs to be a polynomial transformation. Operations in neural networks like ReLU or Softmax contain MAX and EXP functions that are not polynomial. So, we need to modify the basic components of ML models if we want to use FHE. For example, this paper proposes precise polynomial approximations of NN components: https://arxiv.org/pdf/2105.10879.


Another application for FHE is federated learning. Multiple models are learning on local machines with private data and are aggregated on a remote server. The remote server and the local machines can then sync their models after the aggregation. One problem with that is that we can always reverse engineer information about the private data from the trained model. Because the model aggregation on the remote server is typically a simple average, we can send the encrypted models to the aggregation server instead and decrypt the synched model locally. Unfortunately, that means that each client needs to share the same encryption and decryption keys, which are prone to attacks.



Comments

Popular posts from this blog

Python Road map

 

Job site

 1. FlexJobs https://www.flexjobs.com 2. We Work Remotely https://weworkremotely.com 3. Remote.co https://remote.co 4. Remotive https://remotive.io 5. Indeed Remote Jobs https://www.indeed.com/q-Remote-jobs.html 6. LinkedIn Jobs https://www.linkedin.com/jobs 7. Glassdoor https://www.glassdoor.com/ 8. AngelList https://angel.co/jobs 9. Virtual Vocations https://www.virtualvocations.com 10. SkipTheDrive https://www.skipthedrive.com 11. Remote OK https://remoteok.io 12. Working Nomads https://www.workingnomads.co/jobs 13. Jobspresso https://jobspresso.co 14. Upwork https://www.upwork.com 15. Freelancer https://www.freelancer.com 16. Guru https://www.guru.com 17. PeoplePerHour https://www.peopleperhour.com 18. Fiverr https://www.fiverr.com 19. Toptal https://www.toptal.com 20. Dribbble Jobs https://dribbble.com/jobs 21. Behance Jobs https://www.behance.net/joblist 22. Stack Overflow Jobs https://stackoverflow.com/jobs 23. CyberCoders https://www.cybercoders.com 26. ZipRecruiter https:/...

Freelancing site

 Stop believing you can't land a remote job because you are not a U.S. citizen  Here are 30 sites to land a remote job that pays in USD worldwide: People Are Getting Paid in Dollars.Tap into 30 remote job websites and start cashing in. 1. Upwork – A massive freelance marketplace for writers, designers, developers, marketers, and more. https://www.upwork.com 2. Fiverr – Sell microservices starting at $5. Great for creatives, voiceovers, writing, and marketing. https://www.fiverr.com 3. Toptal – Premium platform for top freelancers in tech, design, and finance. Rigorously vetted. https://www.toptal.com 4. FlexJobs – Curated, scam-free listings of remote and flexible jobs across all industries. https://www.flexjobs.com 5. We Work Remotely – High-quality remote job board for devs, marketers, writers, and customer support. https://weworkremotely.com 6. Remote OK – Remote job listings for tech, design, marketing, and customer success. https://remoteok.com 7. PeoplePerHour – Connects...