Blockchain Based Secure IOT and Federated Learning

Text

Team 12

Aadharsh Aadhithya (CB.EN.U4AIE20001)
Akshaya Jeyaprakash(CB.EN.U4AIE20003)
Abinesh Sivakumar(CB.EN.U4AIE20002)
Jayanth M (CB.EN.U4AIE20024)
Vishnu Radhakrishnan (CB.EN.U4AIE20074)

Team Members

Blockchain Based Secure IOT and Federated Learning

Text

  1. Internet of Things and Need for security
  2. Blockchain and Security for IOT Networks
  3. Implementation of Blockchain over a simple smart-home Application using Rpi's.
  4. IOT and Federated Learning: Need for Federated Learning
  5. What is Federated Learning?
  6. Simple Proof-of-Concept for Federated learning using Rpi's.
  7. Implementation of Federated learning of XOR using Tensorflow

Blockchain Based Secure IOT and Federated Learning

Text

IOT

Blockchain Based Secure IOT and Federated Learning

Text

IOT

IOT over Blockchain network

Blockchain Based Secure IOT and Federated Learning

Text

IOT

IOT over Blockchain network

Federated Learning

Blockchain Based Secure IOT and Federated Learning

Text

  1. Internet of Things and Need for security

Text

Recent research indicates that 90% of consumers lack confidence in IoT device security. A 2019 survey done in

 Australia, Canada, France, Japan, the U.K., and the U.S. revealed that 63% of consumers even find connected devices "creepy."

EASY and SIMPLER WAYS OF SECURING IOT FROM USER’s SIDE

  1. Change default passwords
  2. Make sure the software is protected
  3. Use encrypted protocols

Blockchain Based Secure IOT and Federated Learning

Text

 

2. Blockchain and Security for IOT Networks

Text

2. Blockchain and Security for IOT Networks

For IoT safety, the blockchain is able to monitor the information collected by the sensors, without allowing them to be duplicated by any wrong data. Sensors can also transfer data using Blockchain technology, without the need for a trusted third party.

Every IoT node can be registered in the blockchain and will have a blockchain id which will uniquely identify a device in the universal namespace. For a device to connect another device, one will use the blockchain id as URL and will use its local blockchain wallet to raise an identity request. 

HOW BC-IoT AMALGUM WORKS

THE DISADVANTAGES OF IoT-BC AMALGUM

Getting a block sometimes takes longer. Strong cryptographic processes introduce latency. The latencies are not acceptable in a near-time and real-time service situation. Hence, blockchain is not best suited in a recording of raw data at the source.

 

A slight improvisation may make blockchain adapted to near-time situations. An introduction of aggregation caching nodes at the closest distance of the sources can be used as a broker between source and blockchain services. However, this will be a deviation from the key strength of blockchain and must be used after careful consideration.

Blockchain Based Secure IOT and Federated Learning

Text

 

3. Implementation of Blockchain over a simple smart-home Application using Rpi's.

Blockchain Based Secure IOT and Federated Learning

Text

 

3. Implementation of Blockchain over a simple smart-home Application using Rpi's.

Blockchain Based Secure IOT and Federated Learning

Text

 

3. Implementation of Blockchain over a simple smart-home Application using Rpi's.

Local Network: Ex. Smart Home

IOT Node

Blockchain Based Secure IOT and Federated Learning

Text

 

3. Implementation of Blockchain over a simple smart-home Application using Rpi's.

Local Network: Ex. Smart Home

IOT Node

Ledger

Blockchain Based Secure IOT and Federated Learning

Text

 

3. Implementation of Blockchain over a simple smart-home Application using Rpi's.

Local Network: Ex. Smart Home

IOT Node

Ledger

State of the Network

Observables

Blockchain Based Secure IOT and Federated Learning

Text

 

3. Implementation of Blockchain over a simple smart-home Application using Rpi's.

Local Network: Ex. Smart Home

IOT Node

Ledger

State of the Network

Observables

Eg. Temperature,Humidity,Isdoor Open, etc

Blockchain Based Secure IOT and Federated Learning

Text

 

3. Implementation of Blockchain over a simple smart-home Application using Rpi's.

Local Network: Ex. Smart Home

IOT Node

Ledger

State of the Network

Observables

State of the Network is Saved over the network

Blockchain Based Secure IOT and Federated Learning

Text

 

3. Implementation of Blockchain over a simple smart-home Application using Rpi's.

Local Network: Ex. Smart Home

IOT Node

Ledger

State of the Network is Saved over the network

Immutable

Blockchain Based Secure IOT and Federated Learning

Text

 

3. Implementation of Blockchain over a simple smart-home Application using Rpi's.

Local Network: Ex. Smart Home

IOT Node

Ledger

State of the Network is Saved over the network

Immutable

Shared Across Devices

Blockchain Based Secure IOT and Federated Learning

Text

 

3. Implementation of Blockchain over a simple smart-home Application using Rpi's.

Local Network: Ex. Smart Home

IOT Node

Ledger

State of the Network is Saved over the network

Immutable

Shared Across Devices

Blockchain Based Secure IOT and Federated Learning

Text

 

3. Implementation of Blockchain over a simple smart-home Application using Rpi's.

Local Network: Ex. Smart Home

IOT Node

Ledger

State of the Network is Saved over the network

Immutable

Shared Across Devices

Requirement of Large

Compute power in edge devices

Blockchain Based Secure IOT and Federated Learning

Text

 

3. Our Implementation

Local Network: Ex. Smart Home

IOT Node

Ledger

Temperature and Humidity

Soil Moisture Sensor

Blockchain Based Secure IOT and Federated Learning

Text

 

3. Our Implementation

Local Network: Ex. Smart Home

IOT Node

Ledger

Temperature and Humidity

Soil Moisture Sensor

Broadcast

Blockchain Based Secure IOT and Federated Learning

Text

 

3. Our Implementation

Local Network: Ex. Smart Home

IOT Node

Ledger

Temperature and Humidity

Soil Moisture Sensor

All Devices Involve in Consensus Algorithm (Proof of Work Here)

Blockchain Based Secure IOT and Federated Learning

Text

 

3. Our Implementation

Local Network: Ex. Smart Home

IOT Node

Ledger

Temperature and Humidity

Soil Moisture Sensor

All Devices Involve in Consensus Algorithm (Proof of Work Here)

Nonce Found! Block is mined and broadcast

Blockchain Based Secure IOT and Federated Learning

Text

 

3. Our Implementation

Disadvantages

time series data is voluminous and will not be viable to have multiple copies across all devices

Blockchain Based Secure IOT and Federated Learning

Text

 

3. Our Implementation

Disadvantages

time series data is voluminous and will not be viable to have multiple copies across all devices

Data is present all over the network. Not secure over a public network.

Proof of work is computationally demanding.

Blockchain Based Secure IOT and Federated Learning

Text

 

3. Our Implementation

Solution

Store data locally. Send only what is required. Use Encryption based Schemes.

Blockchain Based Secure IOT and Federated Learning

Text

 

3. Our Implementation

Solution

Store data locally. Send only what is required. Use Encryption based Schemes.

Or

Involve multiple types of nodes. Few exclusively for Data collection few exclusively for dealing with blockchain architecture

Blockchain Based Secure IOT and Federated Learning

Text

 

3. Our Implementation

Involve multiple types of nodes. Few exclusively for Data collection few exclusively for dealing with blockchain architecture

When Trying to Implement... We came across....

Blockchain Based Secure IOT and Federated Learning

Text

Exciting Research!

TriaBase

Blockchain Based Secure IOT and Federated Learning

Text

Exciting Research!

TriaBase

Blockchain Based Secure IOT and Federated Learning

Text

Exciting Research!

TriaBase

Proof of

Federated Learning

Blockchain Based Secure IOT and Federated Learning

Text

Exciting Research!

TriaBase

Proof of

Federated Learning

Blockchain Based Secure IOT and Federated Learning

Text

Exciting Research!

TriaBase

Designed Exclusively for Federated Learning.

Data is stored Locally and only model weights are shared over network.

Blockchain Based Secure IOT and Federated Learning

Text

4. What is Federated Learning?
 

Text

5. What is Federated Learning?
 

Text

Federated learning is all about decentralized data collection and centralized learning

THE STEPS OF FEDERATED LEARNING

personalization of mobile using local model
Many users’ updates are aggregated.
Change in local 
model using aggregated one

PROPERTIES OF TYPICAL F.L PROBLEMS

Training on real-world data from mobile devices provides a distinct advantage over training on proxy data that’s generally available in the data center.

PROPERTIES OF TYPICAL F.L PROBLEMS

This data is privacy sensitive or large in size (compared to the size of the model), so it is preferable not to log it to the data center purely for the purpose of model training (in service of the focused collection principle).

PROPERTIES OF TYPICAL F.L PROBLEMS

This data is privacy sensitive or large in size (compared to the size of the model), so it is preferable not to log it to the data center purely for the purpose of model training (in service of the focused collection principle).

Typicall Flow of Federated Learning

Shared model is

trained on server-side

Typicall Flow of Federated Learning

Shared model is

trained on server-side

Typicall Flow of Federated Learning

Shared model is

trained on server-side

Select Clients for Training

Typicall Flow of Federated Learning

Shared model is

trained on server-side

Select Clients for Training

Typicall Flow of Federated Learning

Shared model is

trained on server-side

Send model for local training

Typicall Flow of Federated Learning

Shared model is

trained on server-side

Train Locally

Typicall Flow of Federated Learning

Shared model is

trained on server-side

Federated Averaging by server

Blockchain Based Secure IOT and Federated Learning

Text

5. IOT and Federated Learning: Need for Federated Learning

 

Text

4. IOT and Federated Learning: Need for Federated Learning

 

THE FL-IoT ARCHITECHTURE

COMMUNICATION IN FL-IoT

TYPES OF FL-IoT NETWORKING STRUCTURE

CHALLANGES IN FEDERATED LEARNING - IoT

data privacy

Heterogeneity in PC

Bottleneck in communication

Blockchain Based Secure IOT and Federated Learning

Text

 

6. Simple Proof-of-Concept for Federated learning using Rpi's.

Blockchain Based Secure IOT and Federated Learning

Text

 

6. Simple Proof-of-Concept for Federated learning using Rpi's.

Consider Plant Monitoring and water irrigation application

Blockchain Based Secure IOT and Federated Learning

Text

 

6. Simple Proof-of-Concept for Federated learning using Rpi's.

Consider Plant Monitoring and water irrigation application

Moderate Wheather Conditions

Extreme Weather Conditions

Blockchain Based Secure IOT and Federated Learning

Text

 

6. Simple Proof-of-Concept for Federated learning using Rpi's.

These Are Non- I.I.D data

Moderate Wheather Conditions

Extreme Weather Conditions

Blockchain Based Secure IOT and Federated Learning

Text

 

6. Simple Proof-of-Concept for Federated learning using Rpi's.

These Are Non- I.I.D data

Moderate Wheather Conditions

Extreme Weather Conditions

Blockchain Based Secure IOT and Federated Learning

Text

 

6. Simple Proof-of-Concept for Federated learning using Rpi's.

Person 1 waters the plant if temperature is above 26C and humidity is less than 44

Moderate Wheather Conditions

Extreme Weather Conditions

Blockchain Based Secure IOT and Federated Learning

Text

 

6. Simple Proof-of-Concept for Federated learning using Rpi's.

Person 1 waters the plant if temperature is above 26C and humidity is less than 44

Moderate Wheather Conditions

Extreme Weather Conditions

Person 2 waters the plant, if temperature is above 25C and humidity, is less than 50

Blockchain Based Secure IOT and Federated Learning

Text

 

6. Simple Proof-of-Concept for Federated learning using Rpi's.

How Are their data distributed?

Watering

Blockchain Based Secure IOT and Federated Learning

Text

 

6. Simple Proof-of-Concept for Federated learning using Rpi's.

How Are their data distributed?

Watering

Clearly, the Data is non identically distributed.

Blockchain Based Secure IOT and Federated Learning

Text

 

6. Simple Proof-of-Concept for Federated learning using Rpi's.

Watering

Clearly, the Data is non identically distributed.

Blockchain Based Secure IOT and Federated Learning

Text

 

6. Simple Proof-of-Concept for Federated learning using Rpi's.

Server

Blockchain Based Secure IOT and Federated Learning

Text

 

6. Simple Proof-of-Concept for Federated learning using Rpi's.

Server

/start-federation

/start-federation

Blockchain Based Secure IOT and Federated Learning

Text

 

6. Simple Proof-of-Concept for Federated learning using Rpi's.

Server

/start-federation

/start-federation

Train Logistic Regression

Train Logistic Regression

Blockchain Based Secure IOT and Federated Learning

Text

 

6. Simple Proof-of-Concept for Federated learning using Rpi's.

Server

/start-federation

/start-federation

Blockchain Based Secure IOT and Federated Learning

Text

 

6. Simple Proof-of-Concept for Federated learning using Rpi's.

Take Average 

Server

/completed

/completed

Blockchain Based Secure IOT and Federated Learning

Text

 

7. Implementation of Federated learning of XOR using PyGAD

Outline

A Simple Implementation to

  • Apply the concepts of Federated Learning In Python .
  • Using Socket Programing for communication between Clients and Server.
  • The ML model is created using PyGAD which trains ML models using the genetic algorithm (GA)

Client Server Connection

A Secure TCP connection is established between multiple Clients and Server 

Client 

Client 

Server

 XOR Problem

The XOr problem is that we need to build a Neural Network to produce the truth table related to the XOr logical operator. This is a binary classification problem. Supervised learning is a better way to solve it.

 XOR Function

Non-Linearly Separable Data Points

Client-Server

Server.py

The server app. It creates a model that is trained on the clients' devices using FL.

Client1.py

A client app which trains the model sent by the server using just 2 samples of the XOR problem.

Client2.py

A client app which trains the model sent by the server using the other 2 samples of the XOR problem.

Output

Inference

  • Federated Learning depends on the aggregated updates of many users.
  • As an when a new client joins we could see that the model is learning based on the spike in the model fitness score
  • A change to the shared model is made according to the aggregated updates, after which the procedure is repeated.
Made with Slides.com