Learning about federated learning.

Anuptha
5 min readJun 8, 2020

Well, I’m unsure of how to put things simple but I will try my best to put things as simple as possible. I took 2 rounds of an hour discussion each and multiple blog reads to try and understand a very basic knowledge of what federated learning is all about. I never worked in AI, ML, and anything related to data science and its analysis.

It stuck to me that, When I wanted to understand the basics of this, I took 2 days even after being a technical person that I am. Then how about a beginner? My motto is to simplify as much as I can that I have learned in 2 days so that it reaches more people and scares them less. Let me help you with a storyline.

We have all heard this term at least once in our lifetime called “privacy breach”. Maybe we often failed to overlook again as to what exactly is happening?, who is selling our data?, why are they doing it?, Does that cause any harm to us?, Are we under a threat?

Uff! so many questions pop isn’t it? Let me ask you this.

Would you like to give away your information to anybody? Do you think it is a bad thing?

If yes, Think again!!

“Have you ever read the terms and condition of any app completely so far?
Are you sure you have not given away the contact details of your friends for 50 Rs?
Have you not given out your information for a slice of pizza thinking well that can be known by company. It is ok”

Well relax! Data collected from us can be used for both good and bad. We have heard of data mining. The process of extracting specific data from a large pool of data is nothing but data mining. Google uses us as data. Our data is used for monetizing. Now, do you understand why is career in data mining is paying plenty of money? The data that is used will have contracts where privacy cannot be breached. But It cannot be the same with every application we use. Companies using our data is both beneficial and harmful depending on what information is being shared. Do you think Google should pay us money?

Let’s break from the topic and understand different learning models.

It is very important that we know the right model to choose at the early stages of product innovation. In this blog, we will concentrate on 3 types of models.

  1. Centralized model
  2. Decentralized model
  3. Federated learning

Centralized model

“ Adjacent and transformational innovation responsibilities are centralized in, and owned by, a dedicated group within an organization. This central team is responsible for vetting the ideas, the creation of service line concepts, the development of the new service lines, and the launch — while the business units (BU) own commercialization of those ideas.”

Decentralized model

“Innovation responsibilities are fully distributed. BUs own end-to-end innovation responsibilities, both evolutionary and breakthrough, from ideas through commercialization.”

Federated model

“It is a pattern in an enterprise architecture that allows interoperability and information sharing between semi-autonomous de-centrally organized lines of business (LOBs), information technology systems, and applications.”

Keep reading….

Centralized model — Assume you cook really well and share the food with others. Basically you are putting the food on the table for anybody to consume. You have one central server where the data is stored and it violated the user privacy. Would you feel great about privacy being violated and do not have a clue about it.

A better example would be “Big fast-food brands which give franchise also gives local stores control over hiring, but a centralized headquarters makes decisions about things such as menu and marketing based on the location of the store.”

To give a real-time example, Google Maps suggests alternate routes at just about the right moment? It is based on real-time computation. And how is it made possible?
Google collects data on its server from hundreds of vehicles that have already passed through the same route that you are going by, computes the best route chosen by most, and passes on this information to you making life much easier.
This best explains the central system.

It is your data and you manage and process it

Decentralized model — Assume you cook really well and would like to share the food with others as well. You are so excited that you would want to share the recipe with other people at the table as well. You may refer this to a decentralized model.
In this case, the food is not just consumed but the recipe is altered as well. Since others have access to the recipe as well.

On a realtime example, Bitcoin uses a decentralized model.

learning and evolution is not restricted to a single central team

Federated learning — Assume you cook really well and would like to share the food with family and others as well. But you would want to keep the method of preparation for yourself.
Or a better example I may give could be, Assume you are a youtube channel where you put new cooking videos. You have a friend who is a guitarist. You would want to collab with them. Doing this you gained a few subscribers from your friend and your friend gain a few subscribers. Here both are benefitted. Also, the viewers get new content.

Your privacy is given more importance here. While protecting the privacy the machine is made to learn and the process is made better and better with utilization.

In a way, it is a collaborative learning process. Collaboration may happen with similar industry between different organizations or different industries for better learning.

Learning happens collaboratively

“I call the recipe as a learning model/process. Data as food.”
Learning with different industries can happen for good without breaching privacy.

Now roll back to the definition and read it again. It will make more sense now.

Let us learn a bit more about it with an example

Federated learning model

It works like this: your device downloads the current model, improves it by learning from data on your phone, and then summarizes the changes as a small focused update. Only this update to the model is sent to the cloud, using encrypted communication, where it is immediately averaged with other user updates to improve the shared model. All the training data remains on your device, and no individual updates are stored in the cloud.

Still confused?
Here is a wonderful comic representation of how federated learning work. Best explained.

Keep learning on how beautifully machine learns.

--

--

Anuptha

Product thinker | Poet | Writer | Painter | life enthusiast.