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

Add SoIManager class #505

Merged

Conversation

wu-haoze
Copy link
Collaborator

@wu-haoze wu-haoze commented Jan 25, 2022

This PR adds a new class SumOfInfeasibilitiesManager which maintains the current SoI phase pattern to guide the search, proposes updates to the SoI phase pattern, and decides whether to accept the proposal.

  1. The bulk of this PR is this new SoIManager class, I highly recommend starting the PR review from the header file of the class, which explains what each method does.
  2. One additional helper method "getPhasePatternInAssignment" is added to PLConstraint.
  3. A concretizeInputAssignment() method is added to the NetworkLevelReasoner.
  4. Adding some new options and statistics.
  5. Unit tests for all non-trivial methods.

@wu-haoze wu-haoze requested a review from guykatzz January 25, 2022 06:34
Copy link
Collaborator

@guykatzz guykatzz left a comment

Choose a reason for hiding this comment

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

The code looks really great. Well done. I read it thoroughly and only had trivial comments.

src/engine/SumOfInfeasibilitiesManager.h Outdated Show resolved Hide resolved
src/engine/SumOfInfeasibilitiesManager.h Outdated Show resolved Hide resolved
src/engine/SumOfInfeasibilitiesManager.h Show resolved Hide resolved
src/engine/MaxConstraint.cpp Outdated Show resolved Hide resolved
src/configuration/Options.cpp Show resolved Hide resolved
@wu-haoze wu-haoze merged commit 6995b64 into NeuralNetworkVerification:master Feb 1, 2022
@wu-haoze wu-haoze deleted the heuristic-cost-manager branch February 1, 2022 21:39
omriisack pushed a commit to omriisack/Marabou that referenced this pull request Feb 6, 2022
* change tableau for optimization

* optimize a cost function

* minor

* Cost function manager unit test

* Add unit test

* make optimization code public

* fix numerical issue

* add unit tests for tableau

* Changed {is/not}Optimizing to toggleOptimization.
Moved computeHeuristicCost from Engine to CostFunctionManager

* extend relu constraints with soi

* add unit test

* Update PiecewiseLinearConstraint.h

* change add/removeCostTerm to getCostTerm

* add SoI for Max

* add linear expression struct

* add two more unit tests

* change from HeuristicCost to LinearExpression

* make linear expression a class

* minor

* soi manager

* minor

* minor

* progress

* add cpp and test

* progress

* get soi phase pattern

* change initializer

* progress

* add test

* concretize input assignment

* progress

* get phase status in assignment

* passed unit test!

* SoI manager

* add another unit test

* progress

* progress in soi manager

* add more tests

* walksat

* documentation

* rename

* sum of infeasibilities manager

* Update Engine.h

* Update Test_LinearExpression.h

* Update Options.h

* Update PiecewiseLinearConstraint.h

* Update NetworkLevelReasoner.cpp

* minor

* Update MarabouCore.cpp

* Update SoIInitializationStrategy.h

* Update SoIInitializationStrategy.h

* Update SoISearchStrategy.h

* Update SumOfInfeasibilitiesManager.cpp

* Update GlobalConfiguration.cpp

* minor

* clean up a bit

* remove print statement

* minor

* update statistics

* Update ReluConstraint.cpp

* Update MaxConstraint.cpp

* Update SumOfInfeasibilitiesManager.h

* rename reduced cost to cost reduction
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.

2 participants