Skip to content

Inclusion of Nevergrad backend as gradient-free optimization algorithm - #115

Open
zangobot wants to merge 14 commits into
pralab:mainfrom
zangobot:main
Open

Inclusion of Nevergrad backend as gradient-free optimization algorithm#115
zangobot wants to merge 14 commits into
pralab:mainfrom
zangobot:main

Conversation

@zangobot

@zangobot zangobot commented Mar 14, 2025

Copy link
Copy Markdown
Contributor

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:

  1. the inclusion of budget parameter: now attacks have num_steps but also budget, 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 is 2*num_steps for PGD and num_steps for GeneticAlgorithm.
    Please double check this, and ask for rework in case it does not match the requirements.

  2. Base loop is modified: to use other optimization algorithms, all Pytorch-specific commands are included into methods that can be overwritten.

  3. 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.

  4. 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/

@zangobot
zangobot requested a review from maurapintor March 14, 2025 14:10
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.

1 participant