alessandro-nori / crypto_nn

Proof of concept for CryptoDL made for BigSec course @ EURECOM
18 stars 3 forks source link
homomorphic-encryption machine-learning neural-network

Crypto Neural Network

Crypto_nn is a very simple example of neural network that can perform classification over encrypted data using homomorphic encryption. The idea is taken from CryptoDL: Deep Neural Networks over Encrypted Data by Ehsan Hesamifard, Hassan Takabi, Mehdi Ghasemi where you can find all the details.

Activation function

To use activation functions within HE schemes, they should be approximated in a form which is implemented using only addition and multiplication (e.g. polynomial).

In this example I simulated the ReLU function as presented in the paper and I obtained the following approximation:

0.0012x2 + 0.5x + 52

alt text