Giter VIP home page Giter VIP logo

s5's Introduction

S5

This repository contains the code for generating the data, running the experiments and producing the plots of the paper "Secure Summation via Subset Sums: A New Primitive for Privacy-Preserving Distributed Machine Learning". All scripts obtain their parameters from experiment_params.py, so you only need to specify them once there.

Start by installing the packages from requirements.txt.

Generating the data

Simply run data_generator.py, which will produce a folder data.

Running the experiments

  • Adjust the variable GUNICORN_PATH in run_experiments.py to point to your Gunicorn installation.
  • If you don't want to measure traffic but only runtime, simply run run_experiments.py. It will create a folder results with the runtimes.

Measuring traffic

  • Install tcpdump: sudo apt-get install tcpdump

  • Set the variable TRAFFIC_CAPTURE_BREAKS in run_experiments.py to True. This will introduce 30 s breaks between the different experiments so that we can see in the traffic logs when one experiment ended and the next one started.

  • Start tcpdump and then run the experiments by running run_experiments.py. To capture the data sent by the server:

    tcpdump -e -i lo 'src localhost && dst localhost && src port 5000 && tcp' > sent.txt

    To capture the data received by the server:

    tcpdump -e -i lo 'src localhost && dst localhost && dst port 5000 && tcp' > received.txt

    You might need to change lo to the name of your loopback interface (e.g., lo0 on Mac).

  • Extract the time and the packet size column of tcpdump's output:

    cut -d ' ' -f 1,13 <tcpdump file> > <output file>

  • Run the cells in the Jupyter notebook traffic_log_analysis.ipynb to sum up the sizes of the packets belonging to the same experiment.

Producing the plots

Run plots.py.

s5's People

Contributors

valentin-hartmann-research avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.