Federated Learning
Yesterday, a friend of mine and I planned a trip to Munnar while in each other’s company. The plan was shelved early on due to some financial difficulties. The irony was evident when I returned home in the evening, opened Instagram, and was bombarded with ads and suggestions for resorts to stay in Munnar.
I skipped Instagram and opened Chrome to see a news feed filled with ads and recommendations; Ten must-visit places in Munnar, how to visit Munnar cheaply, food items to explore in Munnar, and the complete history of Munnar. Facebook wasn’t any different.
His situation wasn’t any different when I told my friend about these things. Quite a while back, on the day he talked about “mukhakuru” (pimples), his feed was flooded with piles of “mulakuru” (piles) treatments and hospital information, mistaking it all for piles!
How on earth will you survive, my dear ones, if you start off like this? Does our privacy have no value?
We might as well broadcast our lives on a reality TV show!
When we contemplate, it’s as if Google comprehends our thoughts, doesn’t it
Google started thinking about user privacy and security in data training models in 2016. A consequence of this is federated learning introduced by Google in 2017
What is Federated Learning?
————————————————
Before telling what is federated learning, it is necessary to tell what is traditional data learning and how it works.
In traditional data learning models, all the data required for an ML model is collected from IoT devices and stored in a centralized data storage.
Models are trained and developed according to the algorithms used.
pic 1:Centralized data learning model
These types of training models have many limitations in which the first data source (iot device/smartphone) is the privacy of users. Two models being trained in this way will be a common model (not custom),
Storing three large amounts of data is also difficult to handle
A federated learning model overcomes the shortcomings of such traditional learning models
Federated Learning
_______________
Collaborative ML with decentralized training data (FL) is Google’s revolutionary idea from traditional learning models that work with centralized data storage. Federated learning is a method of training a centralized machine learning model using the output (not row data) of training models collected collaboratively from devices in an edge computing environment. Here an edge computing device trains a local learning model using its own data. The output of this local learning model is given as input to the centralized model.
How it works
—————–
Suppose we have version zero (v 0) of a centralized machine model trained with minimal data available. Also, assume that many IoT devices are connected to this centralized model. Look at the below The v0 version of this ML model inbuild to all iot devices in the network
Each iot device internally trains the v0 version of the ML model using the local data of these iot devices.
Thus the outputs of the v0 model (v0d0,v0d1….v0dn) from which the iot device is trained are given as input to the centralized data model.
The combined form of these outputs is provided as the next input to the centralized data model
The result of the centralized data model is the new model version we call version 1 (v1) .
Data training is continued by replacing the existing model version (vo) of the iot device with new model version(v1)
pic6
Thus obtained v1d0 and v1d1 are combined and again given as input to the centralized machine learning model. Then the centralized model provides a slightly improved model version (v2).
As a result of these continuous training processes, we get an optimal model. This model considers the end-user experience while maintaining data privacy.
Advantages:
End user privacy: Federated Learning Ensure privacy by training the machine learning model without transferring row data
Decentralized Training: Federated Learning reduces the dependency on large centralized data data set
Disadvantages:
Communication Overhead: multiple IOT device’s training outputs are transferred to a centralized model which causes a communication overhead and latency
Some example Applications:
Personalized news feeds: this scenario we discussed at the beginning of the article. That is using a federated learning application to create a personalized news feed without sharing data
Auto-correct and predictive keyboards: modern mobile devices provide auto-correct text prediction keyboards using the help of federated learning
Frameworks & library:
TensorFlow federated: google introduced open source framework for federated learning
Pysyft: it is the Python library for federated learning
Conclusion
In this article, we discussed federated learning compared with traditional model training, federated data learning is concerned about end-user privacy and it is a decentralized data training model