Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input linear constraint #29

Open
cong-liu-2000 opened this issue Aug 24, 2023 · 4 comments
Open

Input linear constraint #29

cong-liu-2000 opened this issue Aug 24, 2023 · 4 comments

Comments

@cong-liu-2000
Copy link

It seems that input linear constraint (e.g., x_1 > x_2) is not supported. I got the following error message.

File "alpha-beta-CROWN/complete_verifier/read_vnnlib.py", line 80, in update_rv_tuple
f"input constraints must be box ({op} {first} {second})"
AssertionError: input constraints must be box

Is there a plan to support input linear constraint in the near future?

@huanzhang12
Copy link
Member

Thank you for reaching out to us! Currently, it is not supported. If you have a good use case for this, we can consider adding this feature in the near future. Can you provide a bit more details on the application case? Feel free to send me an email and we can find some time to chat.

Thanks,
Huan

@cong-liu-2000
Copy link
Author

We want to check if a NN function is monotonic. The idea is to concat two side-by-side copies of the NN, and check if x(i) > x'(i) => y(i) > y'(i) while other x(j)= x'(j), j != i.

@huanzhang12
Copy link
Member

@cong-liu-2000 Thanks for providing the details! In this case, you can use the technique based on Jacobian to provide verification on monotonicity. You can check out the description in section 5.3 in this paper (Efficiently Computing Local Lipschitz Constants of Neural Networks via Bound Propagation, NeurIPS 2022): https://arxiv.org/pdf/2210.07394.pdf

The current version of the autoLiRPA library does support Jacobian bounds and monotonicity analysis, and you can use this file as an example. https://github.com/Verified-Intelligence/auto_LiRPA/blob/master/examples/vision/jacobian.py

In addition, we will release the next version of autoLiRPA very soon and it will include a better API for Jacobian analysis.

@cong-liu-2000
Copy link
Author

What you refer to seems to check "local" monotonicity. But I am interested in "global" monotonicity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants