Home

Awesome

GeoCert

Geometric-inspired algorithm for solving the general problem of finding the largest l_p ball centered at a point x for a union of polytopes which form a polyhedral complex. This algorithm is provably correct for p equal or larger than 1. Primary application found in certifying the adversarial robustness of multilayer ReLu networks. Created by Matt Jordan and Justin Lewis.

Check out our paper on arXiv: Provable Certificates for Adversarial Examples: Fitting a Ball in the Union of Polytopes.

Some example results:

Maximal l_2 projectionsNetwork Input Partioning
<img src="https://github.com/revbucket/geometric-certificates/blob/master/assets/non_robust_projections_l2.svg" alt="example" width="400"><img src="https://github.com/revbucket/geometric-certificates/blob/master/assets/locus_PG_plot_non_robust.svg" alt="mnist_reconstr" width="400">

News

Primary Contents

Functions:

Examples:


Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Dependencies

Requisite python packages are contained within the file requirements.txt. The mister_ed adversarial example toolbox is used to compute upper bounds. This is maintained as a subrepository within this one.

GeoCert makes many many calls to linear program solvers (in the $\ell_\infty$ case) or LCQP solvers (in the $\ell_2$) case. We use the Gurobi Optimizer for this. Visit their homepage to acquire a free academic license.

Installing

  1. Clone the repository:
    $ git clone https://github.com/revbucket/geometric-certificates
    $ cd geometric-certificates
    
  2. Install requirements:
    $ pip install -r requirements.txt
    

Running the tests

With the codebase installed, run the ipython notebooks provided to get your hands on the algorithm and visualize its behaviour. As an example:

$ cd examples 
$ jupyter notebook 2D_example.ipynb

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details