Giter Club home page Giter Club logo

falcon-public's Introduction

Falcon: Honest-Majority Maliciously Secure Framework for Private Deep Learning

A maliciously secure framework for efficient 3-party protocols tailored for neural networks. This work builds off SecureNN, ABY3 and other prior works. This work is published in Privacy Enhancing Technologies Symposium (PETS) 2021. Paper available here.

Table of Contents

Warning


This codebase is released solely as a reference for other developers, as a proof-of-concept, and for benchmarking purposes. In particular, it has not had any security review, has a number of implementational TODOs and should be used at your own risk. You can contribute to this project by creating pull requests and submitting fixes and implementations.

Requirements


  • The code should work on most Linux distributions (It has been developed and tested with Ubuntu 16.04 and 18.04).

  • Required packages for Falcon:

    Install these packages with your favorite package manager, e.g, sudo apt-get install <package-name>.

Source Code


Repository Structure

  • files/ - Shared keys, IP addresses and data files.
  • files/preload - Contains data for pretrained network from SecureML. The other networks can be generated using scripts and functions in secondary.cpp
  • lib_eigen/ - Eigen library for faster matrix multiplication.
  • src/ - Source code.
  • util/ - Dependencies for AES randomness.
  • scripts/ - Contains python code to generate trained models for accuracy testing over a batch.
  • The god script makes remote runs simpler (as well as the makefile)

Building the code

To build Falcon, run the following commands:

git clone https://github.com/snwagh/falcon-public.git Falcon
cd Falcon
make -j

Running the code

To run the code, simply choose one of the following options:

  • make terminal: Runs the 3PC code on localhost with output from $P_0$ printed to standard output.
  • make file: : Runs the 3PC code on localhost with output from $P_0$ printed to a file (in output/3PC.txt)
  • make valg: Useful for debugging the code for set faults. Note that the -03 optimization flag needs to be suppressed (toggle lines 9, 10 in makefile)
  • make command: Enables running a specific network, dataset, adversarial model, and run type (localhost/LAN/WAN) specified through the makefile. This takes precedence over choices in the src/main.cpp file.
  • To run the code over tmux over multiple terminals, make zero, make one, and make two come in handy.

Additional Resources


Comparison with SecureNN

While a bulk of the Falcon code builds on SecureNN, it differs in two important characterastics (1) Building on replicated secret sharing (RSS) (2) Modularity of the design. The latter enables each layer to self contained in forward and backward pass (in contrast to SecureNN where layers are merged for the networks to be tested). The functions are reasonably tested (including ReLU) however they are more tested for 32-bit datatype so the 64-bit might have minor bugs.

Todos

  • Remove size argument from all functions (generate it inside functions)
  • Clean-up tools and functionalities file -- move reconstruction functions to tools
  • Pointers to layer configurations are never deleted --> needs to be fixed
  • Precompute implementation

Citation

You can cite the paper using the following bibtex entry (the paper links to this repo):

@inproceedings{wagh2021falcon,
  title={FALCON: Honest-Majority Maliciously Secure Framework for Private Deep Learning},
  author={Wagh, Sameer and Tople, Shruti and Benhamouda, Fabrice and Kushilevitz, Eyal and Mittal, Prateek and Rabin, Tal},
  journal={Proceedings on Privacy Enhancing Technologies},
  year={2021}
}

For questions, please create git issues; for eventual replies, you can also reach out to [email protected]

falcon-public's People

Contributors

snwagh 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.