Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

README.md

MPC-learning

MPC-learning is a Python library for performing multi-party computation on machine learning applications. This library implements the 3-party computation protocol of https://eprint.iacr.org/2016/768.pdf . For now, a "dealer" is required to distribute shares of inputs, and the protocol can only be run locally (does not support networking yet).

Installation

This is a quick guide to getting this repo up and running for development.

  1. Clone the library

    $ git clone https://github.com/trailofbits/mpc-learning
  2. Download virtualenv.

  3. Create and source your virtual environment.

    $ virtualenv -p python3 .venv
    $ source .venv/bin/activate
  4. Install the library:

    a. if you want to use and edit the library:

    $ python setup.py develop

    b. otherwise to just use the library:

    $ python setup.py install

Usage

If everything installed correctly the following examples should work:

  1. raw perceptron algorithm:

    $ python examples/perceptron/alg.py
  2. mpc perceptron (should be same result as raw algorithm, but will take longer):

    $ python examples/perceptron/eval_circuit.py
  3. raw svm algorithm:

    $ python examples/svm/alg.py
  4. mpc svm (should be same result as raw algorithm, but will take longer):

    $ python examples/svm/eval_circuit.py

If you would like to run this library on a different algorithm, you will have to synthesize the corresponding circuit for one iteration of the algorithm. The circuits must be in the correct format. For reference, checkout the perceptron and svm circuits: examples/*/circuit.py

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

Apache 2.0

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.