Skip to content

Demostration for handwritting digit recognition using FHE

Notifications You must be signed in to change notification settings

Privasea/dinn_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Handwritting Digit Recognition Demo

Table of Contents

Introduction

This is a demonstration for secure handwritting digit recognition using HESEA library. We use the scheme describe on the paper Fast Homomorphic Evaluation of Deep Discretized Neural Networks. It presents an approach for privacy-preserving deep learning using the TFHE encryption scheme. The main advantage of DINN is that it achieves competitive accuracy while maintaining normal operational efficiency thanks to its innovative use of Discretized Neural Networks. These networks quantize the weights and biases, reducing the complexity of the underlying computations and simplifying the TFHE bootstrapping procedure. As a result, the homomorphic evaluation is further improved, leading to enhanced efficiency.

In this demo, the client first homomorphically encrypt a handwritten digital image locally and then transmit the encrypted data to the server. Upon receiving the ciphertext, the server runs the neural network recognition algorithm in the ciphertext domain, obtains the encrypted recognition result, and returns it to the client. The client can then decrypt the encrypted recognition result to obtain the correct output.

Running

Dependencies:

HESEA

after installed the HESEA lib, run with the command:

gcc -xc++ -lstdc++ -shared-libgcc dinn_demo.cpp -o nn_multi_pke -I /usr/local/include/hesea  -L /usr/local/lib -libHESEApke.so

./nn_multi_pke

or you can build this demo by camke as follow

mkdir build
cd build
cmake ..
make
./dinn_demo

Remark

This is only a demostration for handwritting digit recognition and please do not use it in any mature product.

About

Demostration for handwritting digit recognition using FHE

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published