Skip to content

Conversation

prachi0606
Copy link

Overview

I am a Master of Science student in Data Science at the University of Edinburgh, focusing on advanced analytics, machine learning, and data-driven insights.

Description

This PR adds a new poisoning attack to ART: DynamicBackdoorGAN, which generates dynamic, input-specific backdoor triggers using a lightweight CNN generator. Unlike static patch-based attacks, this approach produces adaptive perturbations tailored to each input, making the attack more stealthy and powerful.

Motivation:
To introduce a more realistic and effective backdoor attack strategy aligned with recent research into dynamic triggers using GAN-like architectures.

Fixes: N/A (New feature, no associated GitHub issue)

Type of change

Please check all relevant options.

  • New feature (non-breaking)

Testing

The implementation was verified locally by training multiple model (ResNet18, ResNet50, MobileNetV2, DenseNet121) classifiers on CIFAR-10 and MNIST datasets using:

  • Clean training accuracy
  • Poisoned training accuracy
  • Attack Success Rate (ASR)

A minimal unit test was added under tests/attacks/poisoning/backdoor/ to validate:

  • Poisoning logic
  • Trigger application
  • Input-output shape consistency

Test Configuration:

  • OS: Ubuntu 22.04 (Colab environment)
  • Python version: 3.10
  • ART version: Latest (cloned from GitHub)
  • PyTorch version: 2.1.0

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code
  • I have made corresponding changes to the documentation (inline docstrings)
  • My changes generate no new warnings
  • I have added tests that prove my feature works
  • New and existing unit tests pass locally with my changes
  • My changes have been tested using both CPU and GPU devices

@prachi0606 prachi0606 force-pushed the feature/dynamic-backdoor-gan branch from c804ecf to 513e5a6 Compare August 12, 2025 10:31
@beat-buesser
Copy link
Collaborator

Hi @prachi0606, Thank you for your pull request. Could you please reset your branch to only contain your original commits (I think up to commit 8adcb60)? Your recent force-push seemed to have signed more recent commits from branch main.

@prachi0606
Copy link
Author

Hi @prachi0606, Thank you for your pull request. Could you please reset your branch to only contain your original commits (I think up to commit 8adcb60)? Your recent force-push seemed to have signed more recent commits from branch main.

Thanks for the pointer , I’ve reset the branch to 8adcb60 so it only includes my original commits.

@beat-buesser
Copy link
Collaborator

beat-buesser commented Aug 12, 2025

Great. Did you also push the resetting to your remote branch? I'm asking because the commits are still there. (You can see them above as the commits that have two user icons as owners) The reason why I'm asking is that it is easier to fix it before your are adding more of your own commits after the doubly signed commits.

@beat-buesser beat-buesser self-requested a review August 12, 2025 11:24
@beat-buesser beat-buesser self-assigned this Aug 12, 2025
@prachi0606 prachi0606 force-pushed the feature/dynamic-backdoor-gan branch from 580ba9b to 5e59085 Compare August 12, 2025 11:46
@prachi0606
Copy link
Author

Great. Did you also push the resetting to your remote branch? I'm asking because the commits are still there. (You can see them above as the commits that have two user icons as owners) The reason why I'm asking is that it is easier to fix it before your are adding more of your own commits after the doubly signed commits.

Thanks! I rebuilt the branch from upstream/main and cherry-picked only my three commits (cf7a6bb ,e9560bb , 8adcb60). The extra “bump/upgrade” commits are gone, and all commits are DCO-signed.

@prachi0606 prachi0606 force-pushed the feature/dynamic-backdoor-gan branch 2 times, most recently from e31fec3 to d3cdf1a Compare August 12, 2025 12:30
@beat-buesser
Copy link
Collaborator

@prachi0606 Perfect!

https://colab.research.google.com/drive/1aMV5GZ7Z0cwuUl36NxFUsBU5RoJunCGA
"""

pip install adversarial-robustness-toolbox

Check failure

Code scanning / CodeQL

Syntax error

Syntax Error (in Python 3).
@beat-buesser beat-buesser added the enhancement New feature or request label Aug 13, 2025
@beat-buesser beat-buesser added this to the ART 1.21.0 milestone Aug 13, 2025
@beat-buesser beat-buesser moved this to In Progress in ART 1.21.0 Aug 13, 2025
@beat-buesser beat-buesser changed the base branch from main to dev_1.21.0 August 13, 2025 08:57
@@ -0,0 +1,77 @@

# Imports
!pip install adversarial-robustness-toolbox

Check failure

Code scanning / CodeQL

Syntax error

Syntax Error (in Python 3).
@beat-buesser
Copy link
Collaborator

@prachi0606 You can remove the line !pip install adversarial-robustness-toolbox, it should not be necessary.

@prachi0606 prachi0606 force-pushed the feature/dynamic-backdoor-gan branch 2 times, most recently from de191be to 75fee5a Compare August 18, 2025 23:47
@prachi0606 prachi0606 closed this Aug 18, 2025
@prachi0606 prachi0606 force-pushed the feature/dynamic-backdoor-gan branch from 6cf65aa to 261b541 Compare August 18, 2025 23:51
@github-project-automation github-project-automation bot moved this from In Progress to Done in ART 1.21.0 Aug 18, 2025
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
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants