Git Product home page Git Product logo

cdluminate / robrank Goto Github PK

View Code? Open in Web Editor NEW
20.0 20.0 2.0 445 KB

Adversarial Attack and Defense in Deep Ranking, T-PAMI, 2024

Home Page: https://arxiv.org/abs/2106.03614

License: Apache License 2.0

Makefile 1.05% Python 95.95% Shell 3.00%
adversarial-attacks adversarial-defense adversarial-machine-learning adversarial-robustness adversarial-training deep-metric-learning dml metric-learning ranking

robrank's Introduction

软件自由是我的起源。(Software freedom is my origin.)

robrank's People

Contributors

cdluminate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

robrank's Issues

Training deep metric learning model

Hi, Thanks for your great work!

When I run the command 'python3 bin/train.py -C mnist:rc2f2:ptripletN --do_test', I got the output log as follows:
image
I don't make any change of the original code. Could you give me some advice about it?

My mainly environment:
Python: 3.8.5 (anaconda)
PyTorch: 1.8.1+cu111
GPU: Nvidia RTX3090 (24GB)

Thanks

model.config.maxepoch

After running "python3 bin/train.py -C mnist:rc2f2:ptripletN", I find model.config.maxepoch is 8. It's different from the experiment in the paper. It was written that the C2F2 model is trained with the Adam optimizer for 16 epochs. Then I notice the code "self.maxepoch //= 2" of rc2f2 function in configs_rank.py. I try to change the code as follows. It doesn't work, and model.config.maxepoch = 8 . How can I change the epoch into 16?
屏幕截图 2021-10-14 125610

Hope you can help me.
Thanks and Regards.

Name 'os' is not defined.

Hi, I'm trying to do a defensive training on resnet18 without SPC2 term so that I can futher alter the loss function.
However, I'm constantly encountering with the following problem, but I have no clue about where could possbily be wrong.
image

Thanks!

[act] reduce memory footprint

currently it takes 2x video memory for act training compared to standard training process. Can we reduce the memory requirement so that the code can be run on more budget GPUs?

Code for "Enhancing Adversarial Robustness for Deep Metric Learning"

Hi Mo,

I am reading your new paper "Enhancing Adversarial Robustness for Deep Metric Learning". It is quite interesting and the performance is good! May I ask is there any code for it? Or do you prepare to update the code for the new method HM? :)
Thanks.

Best regards,
Cosmo

Validating saving checkpoints (peculiar issue with reloading)

Hi Mo,

What command do you use to obtain the metrics (R@1, mAP, NMI) on benign examples?

I've used your code to train a robust retrieval model (cub-rres18ghmetsm-ptripletN) for the CUB dataset, and at the end I get validation accuracy similar to the one you reported in your CVPR '22 paper (taken from logs):

Validation │ r@M= 18.3 r@1= 0.376 r@2= 0.485 mAP= 0.172 mAP@R = 0.222 NMI= 0.485

The problem arises, when I try to reload the checkpoint through either validate or continue training, I get very different results:

Validation │ r@M= 6.8 r@1= 0.450 r@2= 0.584 mAP= 0.164 mAP@R = 0.239 NMI= 0.546

The problem is that I get very similar "weird" results no matter what checkpoint I pass into the Train / Validate Class in cmdline.py.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.