Inclusion of Nevergrad backend as gradient-free optimization algorithm - #115
Open
zangobot wants to merge 14 commits into
Open
Inclusion of Nevergrad backend as gradient-free optimization algorithm#115zangobot wants to merge 14 commits into
zangobot wants to merge 14 commits into
Conversation
…d or other backend optimization libraries
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Inclusion of Nevergrad
This pull requests changes the inner loop of evasion attacks in order to extend them to gradient-free optimizers as well.
There are few changes that must be viewed before approval:
the inclusion of
budgetparameter: now attacks havenum_stepsbut alsobudget, which can differ. The first is the maximum number of iterations given to the attack, the other is the consumed budget (forward + backward). Now, budget is OPTIONAL, and it is2*num_stepsfor PGD andnum_stepsfor GeneticAlgorithm.Please double check this, and ask for rework in case it does not match the requirements.
Base loop is modified: to use other optimization algorithms, all Pytorch-specific commands are included into methods that can be overwritten.
Trackers are tracking gradient after the processing: to realize point number 2, the tracker takes the gradient after the processing. Please double check this, and ask for rework in case it does not match the requirements.
Nevergrad is not compatible with trackers yet: since it works sample-wise, the default is that nevergrad components have trackers disabled.
📚 Documentation preview 📚: https://secml-torch--115.org.readthedocs.build/en/115/