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

የዕለቱ ወንጌል ሐምሌ 5

  05/11/2016 /ጴጥሮስ ወጳውሎስ ብርሃናተ ዓለም 72 አርድእት ወይስሐቅ ሰማእት/                       የዕለቱ የወንጌል ክፍል                          ዮሐንስ 21:15-20      ምሳ ከበሉ በኋላም ኢየሱስ ስምዖን ጴጥሮስን፦ “የዮና ልጅ ስምዖን ሆይ፥ ከእነዚህ ይልቅ ትወደኛለህን?” አለው። “አዎን ጌታ ሆይ፥ እንድወድህ አንተ ታውቃለህ” አለው።“ግልገሎቼን አሰማራ፡” አለው። ደግሞ ሁለተኛ፦ “የዮና ልጅ ስምዖን ሆይ፥ ትወደኛለህን?” አለው። “አዎን ጌታ ሆይ፥ እንድወድህ አንተ ታውቃለህ፡” አለው። “ጠቦቶቼን ጠብቅ፡” አለው። ሦስተኛ ጊዜ፦ “የዮና ልጅ ስምዖን ሆይ፥ ትወደኛለህን?” አለው። ሦስተኛ፦ “ትወደኛለህን?” ስላለው ጴጥሮስ አዘነና፦ “ጌታ ሆይ፥ አንተ ሁሉን ታውቃለህ፤ እንድወድህ አንተ ታውቃለህ፡” አለው። ኢየሱስም አለው፦ “በጎቼን አሰማራ። እውነት እውነት እልሃለሁ፥ አንተ ጐልማሳ ሳለህ ወገብህን በገዛ ራስህ ታጥቀህ ወደምትወደው ትሄድ ነበር፤ ነገር ግን በሸመገልህ ጊዜ እጆችህን ትዘረጋለህ፥ ሌላውም ያስታጥቅሃል ወደማትወደውም ይወስድሃል።” በምን ዓይነት ሞት እግዚአብሔርን ያከብር ዘንድ እንዳለው ሲያመለክት ይህን አለ። ይህንም ብሎ፦ “ተከተለኝ፡” አለው።        ...

ወንጌል ዘሐምሌ 6

 ዕርገቱ ለዕዝራ ነቢይ ወንስተሮኒን ወአልሞድያስ ወሥርቀተ ተሙዝ ወዮልዮህ ወተዝካረ በርተሎሜዎስ ወ፲፻ ሰማዕታት ወከላድያን ሊቀ ጳጳሳት                      06/11/2016                    የዕለቱ የወንጌል ክፍል     “እንግዲህ በነቢዩ በዳንኤል የተባለውን የጥፋትን ርኩሰት በተቀደሰችው ስፍራ ቆሞ ስታዩ፥ አንባቢው ያስተውል፥ በዚያን ጊዜ በይሁዳ ያሉት ወደ ተራራዎች ይሽሹ፥ በሰገነትም ያለ በቤቱ ያለውን ሊወስድ አይውረድ፥ በእርሻም ያለ ልብሱን ይወስድ ዘንድ ወደ ኋላው አይመለስ። በዚያችም ወራት ለርጉዞችና ለሚያጠቡ ወዮላቸው። ነገር ግን ሽሽታችሁ በክረምት ወይም በሰንበት እንዳይሆን ጸልዩ፤ “በዚያን ጊዜ ከዓለም መጀመሪያ ጀምሮ እስከ ዛሬ ድረስ ያልሆነ እንግዲህም ከቶ የማይሆን ታላቅ መከራ ይሆናልና። እነዚያ ቀኖችስ ባያጥሩ ሥጋ የለበሰ ሁሉ ባልዳነም ነበር፤ ነገር ግን እነዚያ ቀኖች ስለ ተመረጡት ሰዎች ያጥራሉ። በዚያን ጊዜ ማንም፦ እነሆ፥ ክርስቶስ ከዚህ አለ፡ ወይም፦ ከዚያ አለ፡ ቢላችሁ አትመኑ፤ ሐሰተኞች ክርስቶሶችና ሐሰተኞች ነቢያት ይነሣሉና፥ ቢቻላቸውስ የተመረጡትን እንኳ እስኪያስቱ ድረስ ታላላቅ ምልክትና ድንቅ ያሳያሉ። እነሆ፥ አስቀድሜ ነገርኋችሁ። እንግዲህ፦ ‘እነሆ፥ በበረሀ ነው’ ቢሉአችሁ፥ አትውጡ፤ ‘እነሆ፥ በእልፍኝ ነው’ ቢሉአችሁ፥ አትመኑ፤ መብረቅ ከምሥራቅ ወጥቶ እስከ ምዕራብ እንደሚታይ፥...

የዕለቱ ወንጌል ሐምሌ 7:

 አባ ሲኖዳ ወአግናጥዮስ ሊቀ ጳጳሳት አባ ጊዮርጊስ ወመቃቢስ ወአግራጥስ ወቦኡ ሥሉስ ቅዱስ ቤተ አብርሃም የዕለቱ ወንጌል ሐምሌ 7: ዮሐ  8:51-59 ፶፩እውነት እውነት እላችኋለሁ፥ ቃሌን የሚጠብቅ ቢኖር ለዘላለም ሞትን አያይም።፶፪አይሁድ። ጋኔን እንዳለብህ አሁን አወቅን። አብርሃም ስንኳ ሞተ ነቢያትም፤ አንተም። ቃሌን የሚጠብቅ ቢኖር ለዘላለም ሞትን አይቀምስም ትላለህ።፶፫በእውኑ አንተ ከሞተው ከአባታችን ከአብርሃም ትበልጣለህን? ነቢያትም ሞቱ፤ ራስህን ማንን ታደርጋለህ? አሉት።፶፬ኢየሱስም መለሰ አለም። እኔ ራሴን ባከብር ክብሬ ከንቱ ነው፤ የሚያከብረኝ እናንተ አምላካችን የምትሉት አባቴ ነው፤፶፭አላወቃችሁትምም፥ እኔ ግን አውቀዋለሁ። አላውቀውም ብል እንደ እናንተ ሐሰተኛ በሆንሁ፤ ዳሩ ግን አውቀዋለሁ ቃሉንም እጠብቃለሁ።፶፮አባታችሁ አብርሃም ቀኔን ያይ ዘንድ ሐሤት አደረገ፥ አየም ደስም አለው።፶፯አይሁድም። ገና አምሳ ዓመት ያልሆነህ አብርሃምን አይተሃልን? አሉት።፶፰ኢየሱስም። እውነት እውነት እላችኋለሁ፥ አብርሃም ሳይወለድ እኔ አለሁ አላቸው።፶፱ስለዚህ ሊወግሩት ድንጋይ አነሡ፤ ኢየሱስ ግን ተሰወራቸው ከመቅደስም ወጥቶ በመካከላቸው አልፎ ሄደ ።"" ሮሜ9:1-17 ፩-፪ብዙ ኀዘን የማያቋርጥም ጭንቀት በልቤ አለብኝ ስል በክርስቶስ ሆኜ እውነትን እናገራለሁ፤ አልዋሽምም፤ ሕሊናዬም በመንፈስ ቅዱስ ይመሰክርልኛል።፫በሥጋ ዘመዶቼ ስለ ሆኑ ስለ ወንድሞቼ ከክርስቶስ ተለይቼ እኔ ራሴ የተረገምሁ እንድሆን እጸልይ ነበርና ..."" 1ኛዮሐ 4:11-21 የሐዋ 11:11-19 ምስባክ መዝ 27:8-9 ወሐሠሥኩ ገጽከ ገጸ ዚአከ አሐሥሥ እግዚኦ ወኢትሚጥ ገጸከ እምኔየ ፰አንተ ፊቴን እሹት ባልህ ጊዜ። አቤቱ፥ ፊትህን እሻለሁ ልቤ አንተን አለ።፱ፊትህ...