XinFinOrg / Open-Hackathon

Live Hackathon on XinFin Network. Start Contribution and Get Free XDC
https://xinfinorg.github.io/Open-Hackathon/
16 stars 44 forks source link

Team Noice : Federated Machine Learning on Blockchain #10

Open shreyasnbhat opened 5 years ago

shreyasnbhat commented 5 years ago

Hackathon Name*

Hackference.


Project Title*

Federated Machine Learning on Blockchain

Project Description*

A use case we were interested in building in the hackathon was a Federated Machine Learning Model on the Blockchain. What if we wanted to learn about user behaviour in applications? What if you want to know whether or not the user is interested in the product you suggest him/her? Some of the current machine learning models collect event history logs and send it to a central server, where the model is trained on the data collected. Such an action requires the company to make sure it maintains a certain degree of consumer anonymity amongst dealing with many other privacy issues. Also, data centralization has a high computational cost associated with it.

What if we could learn some trends locally on a device and send an updated model to the central server. Say that we have n clients and each of these clients has their own local model. We use an algorithm titled FederatedAveraging to average out these models and help improve the existing base model, which is then sent back to the users and the whole process repeats. The solution thus allows the base model to learn from user data without it ever residing on a central server thus preserving privacy. The idea proposed has been termed as Federated Learning by Google. But, this algorithm has an issue of its own.

When training models again on new data, deep neural networks quickly tend to forget what they have learned before and morph into a network that learns only the new data. This characteristic of Deep networks is called Catastrophic forgetting and dealing with this issue is very important for Federated learning algorithms to achieve success. We address this issue using a methodology called Elastic Weight Consolidation. This method makes sure the network doesn't morph drastically when its trained on new data.

_Considering the above problems, we have spent a great deal of time in writing our Machine Learning Model Processor. Our hack mainly has 3 major components i.e. Client Side Interface , Organization Side Interface and a Machine Learning Model Processor. One could consider that our system proceeds in a round by round fashion. In a round, the organization publishes a base_model to IPFS which the client uses to learn trends locally. The client then publishes an incremental model update to IPFS. The organization then uses the FederatedAveraging mechanism to merge all these incremental models into one model and sets it as the new base_model. The process repeats and over time the base_model learns from trends generated on all devices._

_Project Presentation : https://docs.google.com/presentation/d/1fOxf26iJTorxh0n80_qSuWDD_yyVtIhmJeZ_IvT3WlA/edit?usp=sharing_

Project Limitations*

In the future, we could also incentivize people for contributing to the system. A reputation system could be put in place that rewards users in tokens based on the time the device spends on computing. As the topic we worked on is a research topic, there is immense potential to discover better averaging schemes than the one we have used currently.

Project Repository*

https://github.com/shreyasnbhat/federated-learning

Tech Stack*

Solidity, Truffle, Ganache, web3py, flask, IPFS, tensorflow

Team Members and Contact info*

Shreyas Bhat @shreyasnbhat Sudeep Katakol @sudeepkatakol