A capstone project at Ashoka University (December 2021), completed by Kuber Shahi under the supervision of Dr. Mahavir Jhawar and Dr. Debayan Gupta.
This repository hosts the final report, presentation, proof-of-concept code, and documentation from that work on privacy-preserving machine learning—including a from-scratch neural network trained on MNIST and cryptographic building blocks from SecureNN and SecureML for neural network training in a three-party secure computation (3PC) setting.
The main outputs of this project are the written report and presentation. The code in this repo supports and demonstrates the work described in those documents.
| Resource | Description |
|---|---|
| 📄 Capstone Report | Full 32-page write-up: ML preliminaries, SecureNN protocol analysis, and the privacy-preserving NN (PPNN) architecture |
| 📊 Capstone Presentation | Slide deck summarizing motivation, methods, and results |
Supporting materials
- Research notes — derivations for ReLU, Softmax, Private Compare, DReLU, Division, and related protocols
- Keras reference notebook — same architecture implemented in Python for validation
Modern ML systems need large datasets, but those datasets are often too sensitive to share directly. This project studies how neural networks can be trained using secure multi-party computation (MPC) so that parties can collaborate without revealing raw data.
The work has two complementary tracks:
- Plain neural network — A C++ baseline (ReLU + Softmax, backprop on MNIST) to understand the math and derive update rules.
- SecureNN building blocks — Implementations of the MPC primitives needed to run the same network in a privacy-preserving way.
This repository contains the C++ code referenced in the capstone report.
- 2-layer fully connected network: 784 → 256 → 10
- ReLU (hidden) and Softmax (output)
- Cross-entropy loss with mini-batch SGD on MNIST (60k train / 10k test)
Interactive CLI demos of individual protocols:
- Fixed-point mapping and reverse mapping (SecureML-style)
- Truncation after ring arithmetic
- Additive secret sharing in ℤL and ℤp
- Secure matrix multiplication via Beaver triples
- Private Compare (unshared and shared settings)
ppnn-capstone/
├── docs/
│ ├── Capstone_Report.pdf # primary deliverable
│ ├── Capstone_Presentation.pdf # primary deliverable
│ ├── assets/ # diagrams for README
│ └── notes/ # protocol derivations
├── src/ # C++ implementation
├── archive/ # early development scratch (not built)
├── notebooks/ # Python/Keras reference
├── datasets/mnist.zip
├── scripts/setup-dataset.sh
├── Makefile
└── README.md
git clone https://github.com/kubershahi/ppnn-capstone.git
cd ppnn-capstone
chmod +x scripts/setup-dataset.sh
./scripts/setup-dataset.sh
make
./build/nn # train plain NN on MNIST
./build/bb # demo SecureNN building blocksRequirements: C++11 compiler, Eigen3, make, unzip
# macOS
brew install eigen
# Ubuntu / Debian
sudo apt-get install libeigen3-devIf the build can't find Eigen, pass the include path explicitly:
make EIGEN_INCLUDE=-I/usr/include/eigen3- Mohassel & Zhang, SecureML
- Wagh et al., SecureNN
- Goodfellow, Bengio & Courville, Deep Learning
This project is licensed under the MIT License.
The capstone report and presentation are academic work from Ashoka University (2021). If you use or build on this project, please cite the report and credit the original authors.
