11 unstable releases (3 breaking)
0.6.1 | Mar 22, 2022 |
---|---|
0.6.0 | Feb 23, 2022 |
0.5.4 | Dec 11, 2021 |
0.5.3 | Nov 18, 2021 |
0.3.0 | Oct 23, 2021 |
#410 in Machine learning
36 downloads per month
1MB
5.5K
SLoC
nnv-rs
Fast reachability analysis and sampling for deep neural networks
Based loosely on the matlab toolbox of a similar name largely developed by Dr. Hoang-Dung Tran. I'm developing this software for my dissertation and I'm happy to support other work using it. If you're using this package or working on similar problems, please let me know by email at equint at cse dot unl dot <educational ending>
(sorry, trying to thwart automated mailers).
Build Python package
- Install Rust with
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
and re-launch your shell. - Create a Python virtualenv and run
pip install -r requirements.txt
to install Python requirements. - Clone the following Rust projects
ndarray-linalg
,numpy
,truncnorm-rs
- Set the
ndarray
version innumpy
to15.2.0
- Ensure
CMake
3.15 or higher is installed as well asclang
- Install OpenBlas (
apt-get install libopenblas-dev
on Ubuntu) - Switch to nightly Rust with
rustup default nightly
- Build and install the Rust-backed Python package with
python ./setup.py install
Benchmarking
When benchmarking, if you want to generate a flamegraph, use the following syntax:
cargo bench --bench my_benchmark -- --profile-time 5
To do
- Implement proper bounds checking with DeepPoly
- Figure out how to run DeepPoly from a star rather than input bounds
- Implement constellation importance sampling
- Implement neural network argmax
Troubleshooting
- Build gives linker error
/usr/bin/ld: cannot find -lCbcSolver
: cbc solver is a default dependency of thegood_lp
package we're using for linear programming. Fix on Ubuntu is to runsudo apt install coinor-libcbc-dev
. - If your issue isn't listed here, open an issue on GitHub and we'll see if we can fix/add it.
Acknowledgements
This work is not supported by anybody.
Dependencies
~77MB
~1M SLoC