-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-Authored-By: Kaidi Xu <[email protected]> Co-Authored-By: Huan Zhang <[email protected]> Co-Authored-By: Shiqi Wang <[email protected]> Co-Authored-By: Yihan Wang <[email protected]>
- Loading branch information
1 parent
2c68627
commit 10a9b30
Showing
63 changed files
with
5,937 additions
and
6,270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: auto_LiRPA CI | ||
on: [push] | ||
jobs: | ||
Tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Create swap | ||
run: | | ||
sudo fallocate -l 16G /swapfile | ||
sudo chmod 600 /swapfile | ||
sudo mkswap /swapfile | ||
sudo swapon /swapfile | ||
free -h | ||
- name: Setup Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: 3.8 | ||
architecture: x64 | ||
- name: Check out repository code | ||
uses: actions/checkout@v2 | ||
- name: Install auto_LiRPA | ||
run: python setup.py install | ||
- name: Install dependencies for examples | ||
run: | | ||
cd examples | ||
pip install -r requirements.txt | ||
cd .. | ||
- name: Run tests | ||
run: | | ||
cd tests | ||
python utils/download_models.py | ||
pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,7 +91,9 @@ user-defined ranges. We get guaranteed output ranges (bounds): | |
## Installation | ||
|
||
Python 3.7+ is required. Pytorch 1.8 (LTS) is recommended, although a newer | ||
version might also work. You can install `auto_LiRPA` via: | ||
version might also work. It is highly recommended to have a pre-installed PyTorch | ||
that matches your system and our version requirement. See [PyTorch Get Started](https://pytorch.org/get-started). | ||
Then you can install `auto_LiRPA` via: | ||
|
||
```bash | ||
git clone https://github.com/KaidiXu/auto_LiRPA | ||
|
@@ -139,7 +141,6 @@ bounds for a 18-layer ResNet model on CIFAR-10 dataset. Once the ResNet model | |
is defined as usual in Pytorch, obtaining provable output bounds is as easy as | ||
obtaining gradients through autodiff. Bounds are efficiently computed on GPUs. | ||
|
||
|
||
## More Working Examples | ||
|
||
We provide a wide range of examples of using `auto_LiRPA`: | ||
|
@@ -151,7 +152,17 @@ We provide a wide range of examples of using `auto_LiRPA`: | |
* [Certifiably Robust Language Classifier using **Transformers**](doc/examples.md#certifiably-robust-language-classifier-with-transformer-and-lstm) | ||
* [Certified Robustness against **Model Weight Perturbations**](doc/examples.md#certified-robustness-against-model-weight-perturbations-and-certified-defense) | ||
|
||
See also the [full documentation](https://auto-lirpa.readthedocs.io) with [API documentation](https://auto-lirpa.readthedocs.io/en/latest/api.html) for important functions and interfaces in `auto_LiRPA`. For reproducing [our NeurIPS 2020 paper](https://arxiv.org/abs/2002.12920) result see this [guide](doc/paper.md). | ||
## Full Documentations | ||
|
||
For more documentations, please refer to: | ||
|
||
* [Documentation homepage](https://auto-lirpa.readthedocs.io) | ||
|
||
* [API documentation](https://auto-lirpa.readthedocs.io/en/latest/api.html) | ||
|
||
* [Adding custom operators](doc/custom_op.md) | ||
|
||
* [Guide](doc/paper.md) for reproducing [our NeurIPS 2020 paper](https://arxiv.org/abs/2002.12920) | ||
|
||
## Publications | ||
|
||
|
@@ -170,20 +181,22 @@ ICLR 2021 | |
Kaidi Xu\*, Huan Zhang\*, Shiqi Wang, Yihan Wang, Suman Jana, Xue Lin and Cho-Jui Hsieh (\* Equal contribution) | ||
|
||
* [Beta-CROWN: Efficient Bound Propagation with Per-neuron Split Constraints for Complete and Incomplete Neural Network Verification](https://arxiv.org/pdf/2103.06624.pdf). | ||
Shiqi Wang\*, Huan Zhang\*, Kaidi Xu\*, Suman Jana, Xue Lin and Cho-Jui Hsieh (\* Equal contribution) | ||
|
||
NeurIPS 2021 | ||
Shiqi Wang\*, Huan Zhang\*, Kaidi Xu\*, Suman Jana, Xue Lin, Cho-Jui Hsieh and Zico Kolter (\* Equal contribution) | ||
|
||
|
||
## Developers and Copyright | ||
|
||
| [Kaidi Xu](https://kaidixu.com/) | [Zhouxing Shi](https://shizhouxing.github.io/) | [Huan Zhang](https://huan-zhang.com/) | [Yihan Wang](mailto:[email protected]) | [Shiqi Wang](https://www.cs.columbia.edu/~tcwangshiqi/) | | ||
| [Kaidi Xu](https://kaidixu.com/) | [Zhouxing Shi](https://shizhouxing.github.io/) | [Huan Zhang](https://huan-zhang.com/) | [Yihan Wang](https://yihanwang617.github.io/) | [Shiqi Wang](https://www.cs.columbia.edu/~tcwangshiqi/) | | ||
|:--:|:--:| :--:| :--:| :--:| | ||
| <img src="https://kaidixu.files.wordpress.com/2020/07/profile2-1.jpg" width="125" /> | <img src="https://shizhouxing.github.io/photo.jpg" width="125" height="125" /> | <img src="https://huan-zhang.appspot.com/images/Huan_Zhang_photo.jpg" width="125" /> | <img src="https://upload.wikimedia.org/wikipedia/commons/8/89/Portrait_Placeholder.png" width="125" height="125" /> | <img src="https://www.cs.columbia.edu/~tcwangshiqi/images/shiqiwang.jpg" width="125" /> | | ||
| <img src="https://kaidixu.files.wordpress.com/2020/07/profile2-1.jpg" width="125" /> | <img src="https://shizhouxing.github.io/photo.jpg" width="115" /> | <img src="https://huan-zhang.appspot.com/images/Huan_Zhang_photo.jpg" width="125" /> | <img src="https://upload.wikimedia.org/wikipedia/commons/8/89/Portrait_Placeholder.png" width="125" height="125" /> | <img src="https://www.cs.columbia.edu/~tcwangshiqi/images/shiqiwang.jpg" width="125" /> | | ||
|
||
* Kaidi Xu ([email protected]): main developer | ||
* Zhouxing Shi ([email protected]): main developer | ||
* Huan Zhang ([email protected]): team lead | ||
* Yihan Wang ([email protected]) | ||
* Shiqi Wang ([email protected]): contact for beta-CROWN | ||
|
||
We thank [commits](https://github.com/KaidiXu/auto_LiRPA/commits) and [pull requests](https://github.com/KaidiXu/auto_LiRPA/pulls) from community contributors. | ||
|
||
Our library is released under the BSD 3-Clause license. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
from auto_LiRPA.bound_general import BoundedModule, BoundDataParallel | ||
from auto_LiRPA.bounded_tensor import BoundedTensor, BoundedParameter | ||
from auto_LiRPA.perturbations import PerturbationLpNorm, PerturbationSynonym | ||
from auto_LiRPA.wrapper import CrossEntropyWrapper, CrossEntropyWrapperMultiInput | ||
from .bound_general import BoundedModule, BoundDataParallel | ||
from .bounded_tensor import BoundedTensor, BoundedParameter | ||
from .perturbations import PerturbationLpNorm, PerturbationSynonym | ||
from .wrapper import CrossEntropyWrapper, CrossEntropyWrapperMultiInput | ||
|
||
__version__ = '0.2' |
Oops, something went wrong.