AI Cyber Security ICP 6 - Hiresh12/UMKC GitHub Wiki

source code : https://github.com/Hiresh12/UMKC/tree/master/CSEE5590%20-%20AI%20Cyber%20Security/ICP6/Source

Federated Learning:

Federated Learning is a method in deep learning where we will train a model on data, which is not accessible to us.

PySyft:

PySyft is a tool which enables us to used deep learning on remote machine

Code to install PySyft:

Initiating Tensor:

Arithmetic operation on tensor:

Importing Syft and creating instance of a tensor with syft

Creating a remote machine called bob

Sending data to the remote machine bob

Code to get location of pointer created by syft, location of the pointer, owner of the tensor x

Code to get the data from the remote machine bob

Creating another remote machine alice

Sending tensor to multiple remote machine and creating multi-pointers

Code to get data from the machines and doing addition on the results.

Arithmetic operation in remote machine

Sending tensor data to bob and creating two pointers x and y

Adding both the tensors Creating simple linear model on remote machine, For that first we need to send the inputs, weights and outputs to the remote machine

Now we have data in remote machine ‘bob’

Now we need to train a linear model on the remote machine, by calculating the matrix multiplication of inputs and weights and calculating the mean squared loss (Y-y)^2.

Backtrack and update weights with a learning rate of 0.2

Output: