Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create DirtyFlipping #2376

Open
wants to merge 132 commits into
base: dev_1.18.0
Choose a base branch
from

Conversation

OrsonTyphanel93
Copy link

@OrsonTyphanel93 OrsonTyphanel93 commented Dec 29, 2023

Target Label-Flipping Attack Using Dirty Label-Inversion : Speech Vulnerability !

A dirty label-flipping attack is used in the backdoor approach to produce poisoned data collection. Input consists of clean labels and clean data samples; output is a set of poisoned labels and data. The initial labels and data are kept if the target label is absent from the clean labels. The selected dirty label is applied to the labels of poisoned samples. With a given probability, the label is reversed once the trigger function is applied to the input data. The attack aims to introduce a backdoor for a potential model misclassification by carefully crafting a trigger and injecting it into clean data samples of a certain target class. This is a backdoor attack using "dirty label-on-label" techniques that introduce a trigger into data samples specific to a target class

Testing

ART

fig-2

The full code

notebook Description

Hi guys @beat-buesser !, I just created the first dynamic backdoor attack by dirty label and label inversion, the attack is stealthy and undetectable, I test them on complex databases TIMIT and AudioMnist,

I also added speaker verification tests such as NeMo from Nividia, my attack was 100% deceptive, all HugginFace speaker verification link failed to detect the deception.

Additional work applying 'DirtyFlipping' to HugginFace models

notebook HugginFace Backdoor link HugginFace Backdoor attack

Test Configuration:

  • OS
  • Python version
  • ART version or commit number
  • TensorFlow / Keras / PyTorch / MXNet version

twweeb and others added 30 commits September 15, 2023 04:25
Signed-off-by: Lei Hsiung <leihsiung.ray@gmail.com>
Co-authored-by: Beat Buesser <49047826+beat-buesser@users.noreply.github.com>
Signed-off-by: Lei Hsiung <leihsiung.ray@gmail.com>
Signed-off-by: Lei Hsiung <leihsiung.ray@gmail.com>
Signed-off-by: Lei Hsiung <leihsiung.ray@gmail.com>
…rsarial-robustness-toolbox into composite-adversarial-attack
Signed-off-by: abigailt <abigailt@il.ibm.com>
Signed-off-by: abigailt <abigailt@il.ibm.com>
Signed-off-by: abigailt <abigailt@il.ibm.com>
Signed-off-by: Lei Hsiung <leihsiung.ray@gmail.com>
Signed-off-by: GiulioZizzo <giulio.zizzo@yahoo.co.uk>
Signed-off-by: GiulioZizzo <giulio.zizzo@yahoo.co.uk>
Signed-off-by: GiulioZizzo <giulio.zizzo@yahoo.co.uk>
Signed-off-by: GiulioZizzo <giulio.zizzo@yahoo.co.uk>
Signed-off-by: Lei Hsiung <leihsiung.ray@gmail.com>
Signed-off-by: Lei Hsiung <leihsiung.ray@gmail.com>
Signed-off-by: Lei Hsiung <leihsiung.ray@gmail.com>
Signed-off-by: GiulioZizzo <giulio.zizzo@yahoo.co.uk>
Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com>
Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com>
Signed-off-by: GiulioZizzo <giulio.zizzo@yahoo.co.uk>
Signed-off-by: GiulioZizzo <giulio.zizzo@yahoo.co.uk>
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@0565240...4a13e50)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: GiulioZizzo <giulio.zizzo@yahoo.co.uk>
Signed-off-by: GiulioZizzo <giulio.zizzo@yahoo.co.uk>
…actions/docker/build-push-action-5.1.0

Bump docker/build-push-action from 5.0.0 to 5.1.0
Bumps [torch](https://github.com/pytorch/pytorch) from 1.13.1 to 2.1.1.
- [Release notes](https://github.com/pytorch/pytorch/releases)
- [Changelog](https://github.com/pytorch/pytorch/blob/main/RELEASE.md)
- [Commits](pytorch/pytorch@v1.13.1...v2.1.1)

---
updated-dependencies:
- dependency-name: torch
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
beat-buesser and others added 19 commits December 21, 2023 00:52
Fix `ActivationDefense` and `SpectralSignatures` expected flattened bug
Updates the requirements on [pytest-cov](https://github.com/pytest-dev/pytest-cov) to permit the latest version.
- [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst)
- [Commits](pytest-dev/pytest-cov@v4.0.0...v4.1.0)

---
updated-dependencies:
- dependency-name: pytest-cov
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
…py-gte-1.18.5-and-lt-1.27

Update numpy requirement from <1.25,>=1.18.5 to >=1.18.5,<1.27
…est-cov-approx-eq-4.1.0

Update pytest-cov requirement from ~=4.0.0 to ~=4.1.0
Bumps [librosa](https://github.com/librosa/librosa) from 0.10.0.post2 to 0.10.1.
- [Release notes](https://github.com/librosa/librosa/releases)
- [Changelog](https://github.com/librosa/librosa/blob/main/docs/changelog.rst)
- [Commits](librosa/librosa@0.10.0.post2...0.10.1)

---
updated-dependencies:
- dependency-name: librosa
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…rosa-0.10.1

Bump librosa from 0.10.0.post2 to 0.10.1
Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com>
Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com>
This reverts commit 4db7626.

Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com>
Signed-off-by: Beat Buesser <beat.buesser@ibm.com>
Signed-off-by: Beat Buesser <beat.buesser@ibm.com>
Signed-off-by: Beat Buesser <beat.buesser@ibm.com>
Signed-off-by: Beat Buesser <beat.buesser@ibm.com>
Target Label-Flipping Attack Using Dirty Label-Inversion 

The attack aims to inject a carefully crafted trigger into clean data samples of a specific target class, introducing a backdoor for potential model misclassification, this is a dirty label-on-label backdoor attack that injects a trigger into clean data samples of a specific target class.
@OrsonTyphanel93
Copy link
Author

extended experience in the SLU case, backdoor still 100% effective
(2)fig_plot_audio_comparison

(1)fig_plot_audio_comparison

Thanks !

@beat-buesser
Copy link
Collaborator

Hi @OrsonTyphanel93 Thank you very much for your pull request! It will be reviewed as soon as possible targeting ART 1.18.

@beat-buesser beat-buesser self-requested a review January 9, 2024 11:35
@beat-buesser beat-buesser self-assigned this Jan 9, 2024
@beat-buesser beat-buesser added the enhancement New feature or request label Jan 9, 2024
@beat-buesser beat-buesser added this to the ART 1.18.0 milestone Jan 9, 2024
@beat-buesser beat-buesser changed the base branch from main to dev_1.18.0 January 9, 2024 12:09
@codecov-commenter
Copy link

codecov-commenter commented Jan 9, 2024

Codecov Report

Attention: 171 lines in your changes are missing coverage. Please review.

Comparison is base (0400813) 85.60% compared to head (2f9d216) 78.07%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff               @@
##           dev_1.18.0    #2376      +/-   ##
==============================================
- Coverage       85.60%   78.07%   -7.53%     
==============================================
  Files             324      327       +3     
  Lines           29326    30205     +879     
  Branches         5407     5589     +182     
==============================================
- Hits            25104    23584    -1520     
- Misses           2840     5215    +2375     
- Partials         1382     1406      +24     
Files Coverage Δ
art/__init__.py 100.00% <100.00%> (ø)
art/attacks/evasion/__init__.py 98.24% <100.00%> (+0.03%) ⬆️
...asion/adversarial_patch/adversarial_patch_numpy.py 74.25% <ø> (ø)
art/attacks/evasion/dpatch.py 91.25% <ø> (ø)
...cks/evasion/imperceptible_asr/imperceptible_asr.py 90.33% <100.00%> (ø)
art/attacks/extraction/knockoff_nets.py 89.93% <ø> (ø)
...ks/inference/membership_inference/shadow_models.py 44.82% <ø> (-49.14%) ⬇️
...cks/poisoning/perturbations/audio_perturbations.py 88.09% <100.00%> (+0.29%) ⬆️
art/defences/detector/poison/activation_defence.py 83.28% <100.00%> (+0.04%) ⬆️
...nces/detector/poison/spectral_signature_defense.py 84.72% <100.00%> (+0.21%) ⬆️
... and 32 more

... and 29 files with indirect coverage changes

@OrsonTyphanel93
Copy link
Author

Hi guys, I'm doing it, but I don't have access to the 1.18 target! Do you have the possibility to change it directly by yourself?
Screen Shot 2024-01-09 at 7 41 55 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
ART 1.18.0
Awaiting triage
Development

Successfully merging this pull request may close these issues.

None yet

7 participants