Source code for FedTopK Baseline experiments
In this evaluation, we showcase the performance of baselines in handling top-k queries within datasets of varying sizes and variable counts across multiple parties, all while trying best to maintain privacy requirements.
The table below summarizes key details about the FedTopK and other baselines we used in baseline
folder for comparison.
Protocol | Security Model | # parties | # workers |
---|---|---|---|
FedTopK | semi-honest | 3 or more | 3 (recommend) or more |
MP-SPDZ | semi-honest | 3 or more | NA |
SECYAN | semi-honest | 2 | NA |
SEAL-e and SEAL-p | semi-honest | 2 or more | NA |
- build-essential (gcc >= 8)
- cmake >= 3.12
- python3
- python3-dev
- libssl-dev
- libgmp-dev
- libboost-all-dev (Boost >= 1.66)
- seal (installation tutorial)
We assumed you have installed all the dependencies, then you can follow the commands below to reproduce experiments
git clone --recurse-submodules https://github.com/golden-eggs-lab/fedtopk.git
cd fedtopk
cd baseline
# MP-SPDZ working example
cd MP-SPDZ
./compile.py fedtopk <dataset_index>
Scripts/setup-ssl.sh <nparties>
Scripts/setup-clients.sh <nparties>
# if n_parties is 3
PLAYERS=3 Scripts/<protocol>.sh fedtopk-<dataset_index> &
python3 ./ExternalIO/fedtopk-client.py 0 <hostname_ip> 3 0 &
python3 ./ExternalIO/fedtopk-client.py 1 <hostname_ip> 3 0 &
python3 ./ExternalIO/fedtopk-client.py 2 <hostname_ip> 3 1
# SEAL working example
cd SEAL/test
cmake -S . -B build
cd build
./sealtest <ip_address> <role> <port_num> <baseline_mode_flag>
# SECYAN working example
cd SECYAN
mkdir data
cd data
mkdir shards
cd ../../scripts
./setup_baseline.sh
./benchmark.sh <server_address> <client_address> <data_nums> <data_server_known> <data_client_known>
To support SECYAN protocol, the data must preprocess to comply with .dat file format.
cd rawdata
# Convert raw data to SECYAN compatible .tbl format
python3 csv2tbl.py
‘Microsoft SEAL (release 4.1)’, Jan-2023. [Online]. Available: https://github.com/Microsoft/SEAL.
Y. Wang and K. Yi, ‘Secure Yannakakis: Join-Aggregate Queries over Private Data’, in Proceedings of the 2021 International Conference on Management of Data, Virtual Event, China, 2021, pp. 1969–1981.
M. Keller, ‘MP-SPDZ: A Versatile Framework for Multi-Party Computation’, in Proceedings of the 2020 ACM SIGSAC Conference on Computer and Communications Security, 2020.