HESplitNet
Two-party Privacy-preserving Neural Network Training using Split Learning and Homomorphic Encryption (CKKS Scheme)
Install / Use
/learn @khoaguin/HESplitNetREADME
HESplitNet
Two-party Privacy-preserving Neural Network Training using Split Learning and Homomorphic Encryption in CKKS Scheme.
Source code of the paper Split Without a Leak: Reducing Privacy Leakage in Split Learning (accepted at the 19th EAI International Conference on Security and Privacy in Communication Networks (SecureComm’23)).
Requirements
python==3.9.7
tenseal==0.3.10
torch==1.8.1+cu102
icecream==2.1.2
h5py==3.7.0
hydra-core==1.1.1
pandas==1.5.2
Repository Structure
├── conf
│ ├── config.yaml # hold the configurations (dataset to use, hyperparameters)
├── data
│ ├── ptbxl_processing.ipynb # code to process the PTB-XL dataset
├── images # images to be used in notebooks and README.md
├── notebooks # contains jupyter notebooks
├── outputs # will be automatically created after running the protocols
├── hesplitnet # contains the code
| ├── multi-clients # code for multi clients protocol (experimental)
| ├── single-client # code for the single client protocol
└── weights # contains the initial and trained weights
Data
The processed MIT-BIH dataset for the one-client protocol (mitbih_train.hdf5 and mitbih_test.hdf5) and multi-client protocol (multiclient_mitbih_train.hdf5 and multiclient_mitbih_test.hdf5) are in the data/ folder.
For the PTB-XL dataset, you can run the file data/ptbxl_processing.ipynb to produce the .hdf5 files, but it is recommended that you just download them here and put the .hdf5 files in the data folder.
Running
- Create a new conda environment, for example
conda create -n hesplitnet python=3.9.7and activate it usingconda activate hesplitnet - Install the required packages in the
requirements.txt, e.g.pip install -r requirements.txt - Install
hesplitnetas a package usingpip install -e . - Specify the hyperparamters for your protocol in
conf/config.yaml - Running the protocol:
- In the terminal, run
python hesplitnet/single-client/server.py. The server will be started and waiting for the client. - Open a new tab in the terminal and run
python hesplitnet/single-client/client.py. The training process will start. - After the training is done, the logs and output files will be saved in the directory
outputs/<year_month_day>/<output_dir>whereoutput_diris defined inconf/config.yaml. - After training, go to
notebooks/test_mitbih.ipynbornotebooks/test_ptbxl.ipynbto run and inspect the testing procedure for the MIT-BIH or PTB-XL dataset respectively.
- In the terminal, run
Related Skills
YC-Killer
2.7kA library of enterprise-grade AI agents designed to democratize artificial intelligence and provide free, open-source alternatives to overvalued Y Combinator startups. If you are excited about democratizing AI access & AI agents, please star ⭐️ this repository and use the link in the readme to join our open source AI research team.
best-practices-researcher
The most comprehensive Claude Code skills registry | Web Search: https://skills-registry-web.vercel.app
research_rules
Research & Verification Rules Quote Verification Protocol Primary Task "Make sure that the quote is relevant to the chapter and so you we want to make sure that we want to have it identifie
groundhog
398Groundhog's primary purpose is to teach people how Cursor and all these other coding agents work under the hood. If you understand how these coding assistants work from first principles, then you can drive these tools harder (or perhaps make your own!).
