-
Notifications
You must be signed in to change notification settings - Fork 94
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
Implement BaBSR Branching Heuristic as a new Branching Strategy #851
base: master
Are you sure you want to change the base?
Implement BaBSR Branching Heuristic as a new Branching Strategy #851
Conversation
…ad of the other way around
I think the new option should be documented in the CHANGELOG.md file? |
Fixed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall it looks good. I just have some comments regarding efficiency and style.
…ated related unit tests and references
I made the requested changes, and ended up switching to saving bias as a double instead of a Map, updating the unit tests and other references as needed. |
I made an optimization to getPreviousBias() where all the NLR iterates over all the constraints the first time getPreviousBias() is called and stores all the previous biases in a map in the NLR. Then whenever getPreviousBias() it pulls the previous bias from the map instead of iterating over all the constraints again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one additional minor comment. Otherwise, LGTM!
src/configuration/OptionParser.cpp
Outdated
@@ -152,7 +152,7 @@ void OptionParser::initialize() | |||
&( ( *_stringOptions )[Options::SPLITTING_STRATEGY] ) ) | |||
->default_value( ( *_stringOptions )[Options::SPLITTING_STRATEGY] ), | |||
"The branching strategy " | |||
"(earliest-relu/pseudo-impact/largest-interval/relu-violation/polarity)." | |||
"(earliest-relu/pseudo-impact/largest-interval/relu-violation/polarity/babsr-heuristic)." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to babsr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!
This pull request introduces a new branching strategy, the BaBSR branching heuristic. The new change for this new heuristic includes additions to the configuration, option parsing, and engine components.
Key changes include:
Branching Strategy Implementation:
pickSplitPLConstraintBasedOnBaBsrHeuristic
method in theEngine
class to split on the ReLUs with the highest BaBSR score. [1] [2] [3]ReluConstraint
class, including methods to compute the BaBSR score. [1] [2] [3] [4] [5] [6] [7] [8] [9]Option Parsing:
OptionParser
to includebabsr
as a valid branching strategy.Options::getDivideStrategy()
to handle the newbabsr-heuristic
strategy.Testing: