Leaky-Reluplex is a research codebase that extends Reluplex to verify deep neural networks with Leaky ReLU activation functions.
This repository contains the code accompanying the paper Reluplex made more practical: Leaky ReLU.
Jin Xu, Zishan Li, Bowen Du, Miaomiao Zhang, and Jing Liu. Reluplex made more practical: Leaky ReLU. 2020 IEEE Symposium on Computers and Communications (ISCC), pp. 1-7, 2020. DOI: https://doi.org/10.1109/ISCC50000.2020.9219587
This repository contains:
- the modified Reluplex solver core,
- bundled GLPK sources used by the project,
- ACAS Xu
.nnetbenchmark files, - property-specific verification binaries and runner scripts.
The original Reluplex paper is available at https://arxiv.org/abs/1702.01135 and the upstream Reluplex implementation is available at https://github.com/guykatzz/ReluplexCav2017.
reluplex/: core Leaky-Reluplex solvercheck_properties/: property-specific verification programsscripts/: batch runners for ACAS Xu properties and adversarial checksnnet/: ACAS Xu neural-network benchmark filesglpk-4.60/: vendored GLPK source tree used for buildsglpk-patch/: patch file documenting GLPK changes used by Reluplexcommon/: shared utility headerslogs/: output directory for experiment summaries and run logs
The original code was tested on Ubuntu 16.04. The documented build flow in this repository uses GNU Make on Linux.
You will typically need:
bashmakegccandg++timeoutfrom GNU coreutils
GLPK is configured to install into the local repository at glpk-4.60/installed, not into a system directory.
For a one-command build, run:
./scripts/build_all.shFor a containerized environment, you can also build and run via Docker:
docker build -t leaky-reluplex .
docker run --rm -it leaky-reluplexThe manual steps are:
- Build GLPK:
cd glpk-4.60
./configure_glpk.sh
make
make install- Build the solver core:
cd ../reluplex
make- Build the property checkers:
cd ../check_properties
makeFrom reluplex/:
./test.shThe script runs reluplex.elf and writes output to reluplex/test.txt.
After building check_properties/, return to the repository root and run the helper scripts in scripts/.
Examples:
./scripts/run_property1.sh
./scripts/run_property6.sh
./scripts/run_adversarial.shLogs and summaries are written under logs/.
The repository includes helper scripts for the property checks used with the bundled ACAS Xu networks.
For the most direct reproduction path, run:
./scripts/reproduce_paper.sh fullThis generates:
logs/repro_environment.txtlogs/reproduction_manifest.txtlogs/reproduction_check.txt
For a shorter selective run, for example:
./scripts/reproduce_paper.sh property1 property6 adversarialTo run the same workflow inside Docker:
./scripts/run_in_docker.sh fullAfter finishing the build steps above, run experiments from the repository root:
./scripts/run_property1.sh
./scripts/run_property2.sh
./scripts/run_property3.sh
./scripts/run_property4.sh
./scripts/run_property5.sh
./scripts/run_property6.sh
./scripts/run_property7.sh
./scripts/run_property8.sh
./scripts/run_property9.sh
./scripts/run_property10.sh
./scripts/run_adversarial.shEach script writes summary and statistics files into logs/. Most property scripts use a 12h timeout per run.
For a step-by-step artifact workflow, see REPRODUCIBILITY.md.
- The primary documented build path is the original Makefile-based workflow.
- The bundled GLPK tree already contains the changes needed by this project;
glpk-patch/glpk.patchis kept as a reference to those modifications. - The included benchmark setup follows the original Reluplex property suite, with the Leaky ReLU slope
k = 0.2in the Leaky-Reluplex test case.
This repository keeps the original Reluplex license text in LICENSE and COPYING.
Notes:
- files under
nnet/keep their original CC BY 4.0 license, - files under
glpk-4.60/keep their original GPL license.
If you use this repository, please cite the accompanying paper:
@inproceedings{xu2020reluplex,
author = {Jin Xu and Zishan Li and Bowen Du and Miaomiao Zhang and Jing Liu},
title = {Reluplex made more practical: Leaky ReLU},
booktitle = {2020 IEEE Symposium on Computers and Communications (ISCC)},
pages = {1--7},
year = {2020},
doi = {10.1109/ISCC50000.2020.9219587}
}Please also acknowledge the original Reluplex work and the upstream implementation by the Reluplex authors and contributors listed in AUTHORS.