Code of FedRain and Frog for VLDB 2022
For the paper with secure CG protocol, please take a look at the technical report
Run cd FedRain && poetry install to install the python dependencies.
Goto FedRain/scripts, run call_slave.py in one docker container and start_slave.py in another
container. Make sure to:
- change the slave address in the
call_slave.pyaccordingly. - Set
enabled=Truefor the LogFile class in bothcall_slave.pyandstart_slave.py. - Start a postgres server in docker and set the corresponding address when initializing the
LogFileclass incall_slave.pyandstart_slave.py.
Then run call_slave.py and the log will be populated to the database.
Run FedRain/analysis.ipynb to compute the time cost from the log.
Similar to Table 3, but make sure to disable the log by setting enabled=False for the LogFile class in both call_slave.pyand start_slave.py. This is due to logging will take a significant amount of time.
The end to end running time will be printed out once call_slave.py finished.
Run RecallK.ipynb to reproduce the data for Figure 4.
Run cd Frog && pip install -r requirements.txt to install the python dependencies.
Goto Experiments/processors/diabetes, run train_debug_master.py in one docker container and train_debug_slave.py in another
container. The computation and encryption time would be printed out.
Run Experiments/com_time.py to compute the time cost for communication.
For Figure 3, we duplicate the data points and features (e.g. x = np.tile(x,(50, 1))) in Experiments/processors/diabetes/__init__.py to get the scalability performance of Frog.
Run Experiments/adhoc/LinearComb_Diabetes.ipynb and Experiments/adhoc/LinearComb_BreastCancer.ipynb to reproduce the data for Figure 4. The Recall@k plots are summarized in Experiments/adhoc/LC_Corruption_Plot.ipynb.
Run Experiments/adhoc/LinearComb_Adults_DisparateImpact.ipynb.