Our supplementary materials submission contains the following:
- Paper with Appendix
- Data for all experiments in the results folder
- Code to reproduce figures that appear in the paper in the experiments_and_figures folder
- Source code in the [src] folder
- Intructions to reproduce results, below:
- Install Python 3.8 on Linux. We have not tested BlockFLow on other platforms.
- Run
pip install -r src/requirements.txt
- Run all cells in src/examples/logistic_regression/adult/generate_datasets.ipynb, specifying paths as appropriate
- Run all cells in src/examples/logistic_regression/kdd99/generate_datasets.ipynb, specifying paths as appropriate
- Install Docker
- Results in experiments 1-4 can be reprocduced through off-chain simulation of BlockFLow. To do so,
- Run all cells in experiments_and_figures/exp1_thru_4.ipynb, specifying paths as appropriate
- For experiments 1, 2, or 4:
- Run all cells in
experiments_and_figures/exp{NUMBER}.ipynb
, where NUMBER is 1, 2, or 4. Specify paths as appropriate
- Run all cells in
- For experiment 3:
- Run all cells in experiments_and_figures/score_exp3.ipynb, specifying paths as appropriate
- Run all cells in experiments_and_figures/exp3.ipynb, specifying paths as appropriate
- Results in experiment 5 can only be reporduced through an on-chain simulation of BlockFLow. To do so,
- Install Docker Compose
- Copy src/examples/example.config.py to
src/examples/config.py
. SetRESULTS_FOLDER_PATH
to some empty folder - Run all cells in src/infra/geth/generate_gensis.ipynb
- Copy the JSON-stringification of
genesis
to src/infra/geth/genesis.json - Copy the value of the
private_keys
variable to the value ofPRIVATE_KEYS
insrc/examples/config.py
- From
src/infra/local
, rundocker-compose up --build
- From
src
, runpython3 -m examples.logistic_regression.run_multi_clients --exp_name adult --dataset_folder /path/to/data/root/adult/split_sym_eq_1_validation_fraction_0.2 --ground_truth_dataset /path/to/data/root/adult/test.dat
- From
src
, runpython3 -m examples.logistic_regression.run_multi_clients --exp_name adult --dataset_folder /path/to/data/root/adult/split_sym_eq_3_validation_fraction_0.2 --ground_truth_dataset /path/to/data/root/adult/test.dat
- From
src
, runpython3 -m examples.logistic_regression.run_multi_clients --exp_name adult --dataset_folder /path/to/data/root/adult/split_sym_eq_5_validation_fraction_0.2 --ground_truth_dataset /path/to/data/root/adult/test.dat
- Inside
RESULTS_FOLDER_PATH/tensorboard
, runtensorboard --logdir .
- Tensorboard visualizes the gas consumption by federated learning round and provides links to export such data into CSV or JSON format. Copy data into statistical software to perform linear regressions.