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

Max Constraint Fix implemented by Duligur #96

Merged

Conversation

ShantanuThakoor
Copy link
Collaborator

Just copied correct version of max constraint implemented by @ibeling in his fork.

Copy link
Collaborator

@sparth95 sparth95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ShantanuThakoor ShantanuThakoor merged commit 58c5be7 into NeuralNetworkVerification:master Oct 4, 2018
@ShantanuThakoor ShantanuThakoor deleted the fix-max branch October 4, 2018 02:05
@guykatzz
Copy link
Collaborator

guykatzz commented Oct 4, 2018

Same context as the other pull request...

MaxConstraint.cpp Line 107: if the LB is for f and not for one of the elements, what happens?
can't this also eliminate some of the elements?
Line 238: remove commented-out code

And again, unit tests: this pull request is intended to fix some bugs, right? Please add unit tests describing those bugs, and see that they now pass.

@ShantanuThakoor
Copy link
Collaborator Author

I am actually not sure what error this was supposed to fix; before Duligur left the project he mentioned to us that the existing Max Constraint would sometimes give him an error, and this was his re-implementation that worked. I just copied the files from his fork in this commit.

Hopefully @ibeling can help explain why this was needed.
Otherwise, I am fine with reverting this commit and working with the old implementation until we hit that bug again (I think it wasn't easily reproducible even for him, so I am not sure we would have a simple unit test for this fix).

@guykatzz
Copy link
Collaborator

guykatzz commented Oct 7, 2018

Okay, lets wait to see what Duligur says
(I wasn't aware he'd left the project! :( )

@ibeling
Copy link
Collaborator

ibeling commented Oct 10, 2018

Hey, I just met with Shantanu, Parth, and Clark, just writing down what I mentioned. I don't 100% understand the old code--I wrote this mostly from scratch.

My guess, however, is that at least one bug has something to do with lines 113-114 of MaxConstraint.cpp. If you do not include these lines, it is possible for a variable to eliminate itself if its bounds updates are received out of order; and I don't think the old code had this.

I have also removed the "internal bound propagation" of the old code, and the calling of eliminateVariable outside of preprocessing.

Guy, re: line 107, that is right, a lower bound for f should be able to eliminate those elements that have upper bounds less than the lower bound; I forgot to do these eliminations. I believe that affects performance only, but it would be very important to add this in.

matanost pushed a commit that referenced this pull request Nov 2, 2021
* Copied some files

* Simple check for obsolete if phase is fixed

* Better obsolete()
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

Successfully merging this pull request may close these issues.

4 participants