To install requirements:
pip install -r requirements.txt
To craft UEs through backdoor triggers, run this command:
python main.py
This command will render the CIFAR10 dataset unlearnable under default settings. If you wish to adjust the parameters, please refer to the parse_option() function in main.py, where you can configure model architecture, training parameters, dataset, and parameters related to adversarial perturbations and triggers.
For instance, if you want to change the number of iterations for adversarial perturbations to 30 and switch the dataset to CIFAR100, you can enter the following command:
python main.py --dataset cifar100 --steps 30
If you want to save the generated unlearnable dataset, please add the --save parameter.
Once executed, the test accuracy will be printed at the end of each epoch. You can also visualize the data generated during the training process by configuring wandb and adding the --wandb and --run_name {specific_name_to_this_run} parameters.
The table below shows the training results of ResNet-18 on clean data and UEs crafted using different baselines. For more information, please refer to the experimental section of the original paper.
| SVHN | CIFAR-10 | CIFAR-100 | ImageNet | |
|---|---|---|---|---|
| Clean | 95.94 | 95.1 | 75.51 | 53.15 |
| TAP | 65.21 | 17.07 | 12.76 | 27.59 |
| EM | 10.32 | 12.31 | 7.2 | 4.78 |
| REM | 13.34 | 14.29 | 3.43 | 7.23 |
| EntF | 82.27 | 84.85 | 50.06 | 34.22 |
| LSP | 8.23 | 14.75 | 8.78 | 3.44 |
| OPS | 9.44 | 13.56 | 11.69 | 6.54 |
| AR | 6.742 | 12.54 | 5.12 | 1.45 |
| TriggerUE | 6.108 | 9.46 | 2.21 | 0.78 |
Our code is licensed under the MIT License.