-
Notifications
You must be signed in to change notification settings - Fork 105
Backward Analysis using Preimage Approximation #861
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
Open
ido-shm-uel
wants to merge
80
commits into
NeuralNetworkVerification:master
Choose a base branch
from
ido-shm-uel:Preimage-Approximation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 66 commits
Commits
Show all changes
80 commits
Select commit
Hold shift + click to select a range
e00d517
Add files via upload
ido-shm-uel 04cc0b1
Revert last change.
ido-shm-uel 80be6dc
Added assginment, store-into-other NLR tests for every activation fun…
ido-shm-uel 9fbca7b
Add files via upload
ido-shm-uel f7aee6d
Add files via upload
ido-shm-uel 33f5d5f
Add files via upload
ido-shm-uel 6d1c898
Add files via upload
ido-shm-uel ee5dd00
0-4-0: Implementing symbolic bound tightening for every activation fu…
ido-shm-uel 85fe8f3
0-4-1: Adding symbolic bound tightening tests for all activation func…
ido-shm-uel 32d7c52
0-5-0: Adding rounding constant for LP relaxation propagation.
ido-shm-uel 5a7c5d8
0-5-1: Implementing forward-backward LP propagation algorithm for all…
ido-shm-uel 79f7a84
0-5-2: Adding forward-backward LP propagation tests for all activatio…
ido-shm-uel 9ee7609
0-6-0: Adding MILP bound types for two backpropagation of bounds algo…
ido-shm-uel 2d9b85a
0-6-1: Adjusting in Options for two new MILP Bound types.
ido-shm-uel f5c7d1c
0-6-2: Introducing Polygonal Tightenings (output type of two new algo…
ido-shm-uel b363d05
0-6-3: Adjusting in NLR, LayerOwner for Polygonal Tightenings.
ido-shm-uel 7993b1e
0-6-4: Introducing parameterised bounds in LPFormulator (two new algo…
ido-shm-uel c888160
0-6-5: Current state of PreimageApproximation + cleanup + corrections.
ido-shm-uel cd5f2de
0-6-6: New constants for PreimageApproximation (random seeds).
ido-shm-uel d86c0a3
0-6-7: TEMPORARY CHANGE - use boost v1.85 for Differential Evolution …
ido-shm-uel 4467e09
0-6-8: Revert last change.
ido-shm-uel 88e339a
0-6-9: Adapt DifferentialEvolution from Boost v1.85.
ido-shm-uel 8031a41
0-6-10: Current state of PreimageApproximation (EstimateVolume implem…
ido-shm-uel dd584e7
0-6-11: Add constants for PreimageApproximation.
ido-shm-uel cd52524
0-6-12: Current state of PreimageApproximation (implement coordinate …
ido-shm-uel b719359
0-6-13: Timing PreimageApproximation with coordinate descent (very sl…
ido-shm-uel f29ccf0
0-6-14: Small Fix (same as 0-5---4).
ido-shm-uel 3ee6903
Merge pull request #1 from NeuralNetworkVerification/master
ido-shm-uel 0069af2
0-6--14: Current progress in PreimageApproximation (0-5--6 fixes, opt…
ido-shm-uel 22f0eaa
Delete src/nlr/PolygonalTightening.h
ido-shm-uel 24f2be1
Delete src/nlr/Test_NetworkLevelReasoner.h
ido-shm-uel 8d0bf19
Delete src/nlr/GlobalConfiguration.h
ido-shm-uel 81e28b7
Delete src/nlr/GlobalConfiguration.cpp
ido-shm-uel dea156a
Delete src/nlr/Engine.cpp
ido-shm-uel 0d51b8a
Add files via upload
ido-shm-uel 32474bc
Add files via upload
ido-shm-uel 625a5b8
Add files via upload
ido-shm-uel 745cc95
Add files via upload
ido-shm-uel 2d77fb9
Delete src/nlr/GlobalConfiguration.cpp
ido-shm-uel 304efac
Delete src/nlr/GlobalConfiguration.h
ido-shm-uel 35cbdf5
Add files via upload
ido-shm-uel 927302e
Add files via upload
ido-shm-uel 73ce343
Add files via upload
ido-shm-uel 714b4e4
Add files via upload
ido-shm-uel 061bb57
Add files via upload
ido-shm-uel 7d4a5a4
Add files via upload
ido-shm-uel 9dd56fd
Merge pull request #2 from NeuralNetworkVerification/master
ido-shm-uel 03a74a7
Delete src/nlr/AdamOptimizer.h
ido-shm-uel 6ac31b9
Delete src/nlr/CoordinateDescent.h
ido-shm-uel 756ca41
Delete src/nlr/DifferentialEvolution.h
ido-shm-uel 5a3a72a
Delete src/nlr/GradientDescent.h
ido-shm-uel b093dac
Delete src/nlr/MILPSolverBoundTighteningType.h
ido-shm-uel bf8513b
Add files via upload
ido-shm-uel 3b2fe08
Add files via upload
ido-shm-uel 20c3577
Add files via upload
ido-shm-uel 570eae8
Add files via upload
ido-shm-uel 7696156
Update GlobalConfiguration.cpp
ido-shm-uel 2c6aba8
Update CHANGELOG.md
ido-shm-uel 2894e4f
Update OptionParser.cpp
ido-shm-uel 5f7a24f
smal fix for bug in SumOfInfeasibilitiesManager::proposePhasePatternU…
idan0610 e7618fb
Sync Fork.
ido-shm-uel 0884a78
Add files via upload
ido-shm-uel 40f2fe2
Add files via upload
ido-shm-uel a95e3a1
Add files via upload
ido-shm-uel f7adf2b
Add files via upload
ido-shm-uel 6e34c3f
Merge pull request #7 from idan0610/fix_soi_proposal_bug
ido-shm-uel c74870e
Vector<double> &coeffs passed by refrence, removed PolygonalTightening.
ido-shm-uel a226133
Sync Fork.
ido-shm-uel eb0e58f
.
ido-shm-uel 2df9d58
.
ido-shm-uel eafa24c
Corrections to PreimageApproximation, parameterizes SBT.
ido-shm-uel b1711aa
Remove redundant setAlpha in ReLU NLR unit tests.
ido-shm-uel 9304f52
Merge pull request #14 from NeuralNetworkVerification/master
ido-shm-uel f48b050
Correcting SBT, LP for Sigmoid, Bilinear, Softmax.
ido-shm-uel 96dd1e9
Corrected Test_NLR.h, Test_LPRelaxation.h.
ido-shm-uel c98a278
Further fixing for Max, Softmax, Bilinear IA/SBT
ido-shm-uel 29bfda9
Clang-Format
ido-shm-uel 8fcd8b0
Manually Sync Fork: Towards Proof Minimization (#889).
ido-shm-uel ad41336
Fix merge conflict.
ido-shm-uel d150c12
Merge pull request #17 from ido-shm-uel/Preimage-Approximation-SBT-LP…
ido-shm-uel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| /********************* */ | ||
| /*! \file PolygonalTightening.h | ||
| ** \verbatim | ||
| ** Top contributors (to current version): | ||
| ** Duligur Ibeling, Guy Katz, Ido Shmuel | ||
| ** This file is part of the Marabou project. | ||
| ** Copyright (c) 2017-2024 by the authors listed in the file AUTHORS | ||
| ** in the top-level source directory) and their institutional affiliations. | ||
| ** All rights reserved. See the file COPYING in the top-level source | ||
| ** directory for licensing information.\endverbatim | ||
| ** | ||
| ** [[ Add lengthier description here ]] | ||
|
|
||
| **/ | ||
|
|
||
| #ifndef __PolygonalTightening_h__ | ||
| #define __PolygonalTightening_h__ | ||
|
|
||
| #include "Map.h" | ||
| #include "NeuronIndex.h" | ||
|
|
||
| #include <cstdio> | ||
|
|
||
| class PolygonalTightening | ||
| { | ||
| public: | ||
| enum PolygonalBoundType { | ||
| LB = 0, | ||
| UB = 1, | ||
| }; | ||
|
|
||
| PolygonalTightening( Map<NLR::NeuronIndex, double> neuronToCoefficient, | ||
| double value, | ||
| PolygonalBoundType type ) | ||
| : _neuronToCoefficient( neuronToCoefficient ) | ||
| , _value( value ) | ||
| , _type( type ) | ||
| { | ||
| } | ||
|
|
||
| /* | ||
| The coefficient of each neuron. | ||
| */ | ||
| Map<NLR::NeuronIndex, double> _neuronToCoefficient; | ||
|
|
||
| /* | ||
| Its new value. | ||
| */ | ||
| double _value; | ||
|
|
||
| /* | ||
| Whether the tightening tightens the | ||
| lower bound or the upper bound. | ||
| */ | ||
| PolygonalBoundType _type; | ||
|
|
||
| /* | ||
| Equality operator. | ||
| */ | ||
| bool operator==( const PolygonalTightening &other ) const | ||
|
||
| { | ||
| bool allFound = true; | ||
| for ( const auto &pair : _neuronToCoefficient ) | ||
| { | ||
| bool currentFound = false; | ||
| for ( const auto &otherPair : other._neuronToCoefficient ) | ||
| { | ||
| currentFound |= ( pair.first._layer == otherPair.first._layer && | ||
| pair.first._neuron == otherPair.first._neuron && | ||
| pair.second == otherPair.second ); | ||
| } | ||
| allFound &= currentFound; | ||
| } | ||
| bool result = allFound && _value == other._value && _type == other._type && | ||
| _neuronToCoefficient.size() == other._neuronToCoefficient.size(); | ||
| return result; | ||
| } | ||
|
|
||
| void dump() const | ||
| { | ||
| printf( "PolygonalTightening: x %s %.2lf\n", _type == LB ? ">=" : "<=", _value ); | ||
|
|
||
| for ( const auto &pair : _neuronToCoefficient ) | ||
| { | ||
| printf( "NeuronIndex: (layer %u, neuron %u), Coefficient: %.2lf )\n", | ||
| pair.first._layer, | ||
| pair.first._neuron, | ||
| pair.second ); | ||
| } | ||
| } | ||
| }; | ||
|
|
||
| #endif // __PolygonalTightening_h__ | ||
|
|
||
| // | ||
|
||
| // Local Variables: | ||
| // compile-command: "make -C ../.. " | ||
| // tags-file-name: "../../TAGS" | ||
| // c-basic-offset: 4 | ||
| // End: | ||
| // s | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Could you add a description of what this class is supposed to represent? Does this represent a linear symbolic bound in terms of neurons? Also, this file should probably be in
src/nlr/since it's very NLR specific.