A small CNN trained on MNIST and executed over encrypted data using the FHE16 homomorphic encryption scheme.
- Dataset: MNIST (handwritten digits)
- Architecture: Conv(3×3, stride=3) → ReLU → SumPool(3×3) → FC(27→10)
python train_mnist_fhe_cnn.py --epochs 15sudo apt install libjemalloc2
sudo apt install libnuma-devpython export_mnist_samples.pymkdir build
mv run_all.sh build/
cd build
cmake ..
makeecho 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../FHE_TEST/lib' >> ~/.bashrc
source ~/.bashrc./test # Inference for a single MNIST sample
./run_all.sh # Run inference for 1000 MNIST samples (divided into 10 batches)
# Results will be saved to accuracy_log.txtClick below to view each version of the report: