In BPFL, the valid check part is coded by C++ with libsnark, and the FL part is coded by Python, so you should first deploy libsnark and pybind11, which is a lightweight header-only library that mainly to create Python bindings of existing C++ code, to your machine before running. For deployment details, please refer to libsnark and pybind11.
- pytorch
- CUDA
- numpy
- torchvision
- phe
- You need to first compile the main.cpp file in the ZKP directory to obtain a dynamic link library named xxx.so and rename it as ZKP.so. Then move ZKP.so to the root directory.
- Run the script like this
python bpfl.py -data_name mnist -client_all 50 -mali_num 10 -attack_type add_noise -global_epoch 300