implementing Carlini-Wagner attack

239 views
Skip to first unread message

ephi...@yahoo.com

unread,
Dec 26, 2018, 6:25:40 PM12/26/18
to cleverhans dev
I would like to know if implementing a Carlini-Wagner attack can be patterned (in the mnist_tutorial_picklable.py code) similar to an implementation of a PGD attack, i.e.,

    #Carlini-Wagner attack
    cwl2
= CarliniWagnerL2(model, sess=sess)
    adv_x
= cwl2.generate(x, **cwl2_params)
    preds_adv
= model.get_logits(adv_x)


However, I am not sure what form "cwl2_params" would take. An example of pgd_params that appeared to be successful was:

 

  pgd_params = {'eps':0.1,
               
'eps_iter': 0.01,
               
'nb_iter': 10.,
               
'clip_min': 0.,
               
'clip_max': 1.}


And the function "parse_params" (Line 1189 in attacks.py) lists a number of input parameters, e.g.,


  def parse_params(self,
                   y
=None,
                   y_target
=None,
                   batch_size
=1,
                   confidence
=0,
                   learning_rate
=5e-3,
                   binary_search_steps
=5,
                   max_iterations
=1000,
                   abort_early
=True,
                   initial_const
=1e-2,
                   clip_min
=0,
                   clip_max
=1):


Please advise.

Thank you. AT

Nicholas Carlini

unread,
Dec 26, 2018, 6:54:18 PM12/26/18
to ephi...@yahoo.com, cleverhans dev
I'm not quite sure what you're asking, but you can look at sample
parameters for the attack here

https://github.com/tensorflow/cleverhans/blob/master/cleverhans_tutorials/mnist_tutorial_cw.py#L182

Does that help?

If you have any further questions on this, feel free to reply
directly to me---the cleverhans-dev mailinglist is meant for
discussing the development of the cleverhans library, and
not primarily as a forum for questions about using it.


Nicholas
> --
> You received this message because you are subscribed to the Google Groups "cleverhans dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cleverhans-de...@googlegroups.com.
> To post to this group, send email to cleverh...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/cleverhans-dev/f8274ff2-4b4d-4b74-814f-c9913f28ecbf%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

ephi...@yahoo.com

unread,
Dec 26, 2018, 7:30:02 PM12/26/18
to cleverhans dev
Yes. Thank you. Your reply is very helpful. And I apologize that I misunderstood and have been using the cleverhans-dev mailinglist as a users group forum mainly for implementation questions. Thank you for your kind offer to help offline.
Best, AT 


On Wednesday, December 26, 2018 at 6:54:18 PM UTC-5, Nicholas Carlini wrote:
I'm not quite sure what you're asking, but you can look at sample
parameters for the attack here

https://github.com/tensorflow/cleverhans/blob/master/cleverhans_tutorials/mnist_tutorial_cw.py#L182

Does that help?

If you have any further questions on this, feel free to reply
directly to me---the cleverhans-dev mailinglist is meant for
discussing the development of the cleverhans library, and
not primarily as a forum for questions about using it.


Nicholas

> To unsubscribe from this group and stop receiving emails from it, send an email to cleverhans-dev+unsubscribe@googlegroups.com.
> To post to this group, send email to cleverhans-dev@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages