Coder Social home page Coder Social logo

Comments (10)

ain-soph avatar ain-soph commented on May 24, 2024

Definitely a bug. Let me fix it and retest the performance locally.

from trojanzoo.

ain-soph avatar ain-soph commented on May 24, 2024

Actually I don't see any clear performance difference. Well, it's now fixed.

Command I use:

CUDA_VISIBLE_DEVICES=0 python examples/backdoor_attack.py --color --verbose 1 --pretrained --validate_interval 1 --epochs 10 --lr 0.01 --mark_random_init --attack trojannn --tqdm

Try the new tqdm I implemented yesterday!

image

from trojanzoo.

ain-soph avatar ain-soph commented on May 24, 2024

Just to clarify, in case you didn't notice.
We have docs at https://ain-soph.github.io/trojanzoo/trojanvision/attacks/backdoor.html#trojanvision.attacks.TrojanNN

from trojanzoo.

CHR-ray avatar CHR-ray commented on May 24, 2024

from trojanzoo.

ain-soph avatar ain-soph commented on May 24, 2024
  1. No, we don't implement reverse engineering training data, because we are measuring many attacks using the same BadNet problem setting. (I may implement that in the future.)
  2. That might because we are currently using resnet18, which is different from VGGface that has multiple FC layers.

I've consulted the original author Yingqi Liu days ago to confirm:

  1. During neuron index selection, conv layer weights (*, *, KH, KW) shall be averaged for the last 2 dimensions.
  2. They don't test ResNet architectures.

from trojanzoo.

ain-soph avatar ain-soph commented on May 24, 2024

Reflection Backdoor is implemented by others. I'll check it today, update codes and write docs.

And could you illustrate the problem in more details?

Btw, there is another 3rd party implementation from Tsinghua group:
https://github.com/THUYimingLi/BackdoorBox/blob/main/core/attacks/Refool.py

from trojanzoo.

ain-soph avatar ain-soph commented on May 24, 2024

@CHR-ray I just checked the original Caffe implementation of TrojanNN.

It seems they don't follow Algorithm 1 to generate their triggers:

  1. They don't follow the cost definition to update input trigger. They actually assign one_hot gradient to the intermediate feature map and directly conduct the backward. It's not relevant to target_value (=100) in paper.
  2. There is no denoise in paper algorithm 1, but exists in the code. (there is denoise in paper algorithm 2 though)

from trojanzoo.

CHR-ray avatar CHR-ray commented on May 24, 2024

from trojanzoo.

ain-soph avatar ain-soph commented on May 24, 2024

I will deal with Reflection Backdoor later.

TrojanNN issue should have been solved.
I've followed original author's caffe codes to update the preprocess algorithm. They are now almost equivalent, and I have commented all differences in the code.

You may search Original in the file to see things I've abandoned because there is no performance difference.

https://github.com/ain-soph/trojanzoo/blob/main/trojanvision/attacks/backdoor/trojannn.py

from trojanzoo.

ain-soph avatar ain-soph commented on May 24, 2024

@CHR-ray Just want to tell you that reflection backdoor is already reimplemented and docs are finished as well.

It is tested and the performance is good,

from trojanzoo.

Related Issues (20)

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.