Verified-Intelligence / auto_LiRPA

auto_LiRPA: An Automatic Linear Relaxation based Perturbation Analysis Library for Neural Networks and General Computational Graphs
https://arxiv.org/pdf/2002.12920
Other
276 stars 68 forks source link

How to read vnnlib file in auto-LiRPA? #78

Open ytsao opened 1 month ago

ytsao commented 1 month ago

Hi,

I am a new user for auto_LiRPA. Recently, I would like to install and test my customized property (.vnnlib) to verify trained neural network (.onnx) by auto-LiRPA. But, I am not sure how to read vnnlib into auto-LiRPA.

Based on the simple example provided by you, it only shows adding perturbation in python code, but not read vnnlib. So, is that possible to read vnnlib in auto-LiRPA framework?

Thanks.

shizhouxing commented 1 month ago

Hi @ytsao, to use vnnlib and onnx, please use alpha-beta-CROWN which consists of auto_LiRPA and complete verification algorithms, as well as a front-end for vnnlib and onnx.

ytsao commented 1 month ago

Hi @shizhouxing , Thanks for the reply.

But for the alpha-beta-CROWN, could I import it from my code? Because in my current understanding, I have to set the configuration file and feed it into alpha-beta-CROWN. If that is possible, where is the example I can refer?

Thanks!

shizhouxing commented 2 days ago

Hi @ytsao , here is an example: https://github.com/Verified-Intelligence/Lyapunov_Stable_NN_Controllers/blob/main/neural_lyapunov_training/levelset.py#L10