Unlearnable Examples Give a False Sense of Security: Piercing through Unexploitable Data with Learnable Examples
This repo contains the official PyTorch implementation of "Unlearnable Examples Give a False Sense of Security: Piercing through Unexploitable Data with Learnable Examples" (ACM MM 2023), by Wan Jiang*, Yunfeng Diao*, He Wang, Jianxin Sun, Meng Wang and Richang Hong (*co-primary authors).
Below is the key environment under which the code was developed, not necessarily the minimal requirements:
- Python 3.10
- Pytorch 2.0.1
- Cuda 11.8
The code has not been exhaustively tested. You need to run it at your own risk. The author will try to actively maintain it and fix reported bugs but this can be delayed.
We provide an example of JCDP on CIFAR-10 poisons generated by EM.
Prepare poisoned images as .pt
files in folder unlearnable_exs/
.
Here are the download links for our generated the Unlearnable Examples following EM:
We have released checkpoints for the main models in the paper. Here are the download links for each model checkpoint:
Download the relevant model checkpoints into a folder called models/
.
You can train other types of diffusion models as well, which works here as well.
run main_Un.py to generate Learnable Examples in data/
.
python main_Un.py --config cifar10_Un.yml \
--runner Empirical_cond \
--dpm models/xxx.pth \
--perturb_path unlearnable_exs/xxx.pt \
--log data
config
is the path to the config file.eg. cifar10_Un.yml
. Our prescribed config files are provided inconfigs/
.runner
is the path to the runner file.eg. Empirical_cond
.dpm
is the path for dpm model.eg. models/ckpt_10000.pth
.perturb_path
is the path for unlearnable examples.eg. unlearnable_exs/resnet18_perturbation_samplewise.pt
.log
is the ouitput path, including images and logs.eg. data
.
If you find this code to be useful for your research, please consider citing.
@article{jiang2023unlearnable,
title={Unlearnable Examples Give a False Sense of Security: Piercing through Unexploitable Data with Learnable Examples},
author={Jiang, Wan and Diao, Yunfeng and Wang, He and Sun, Jianxin and Wang, Meng and Hong, Richang},
journal={arXiv preprint arXiv:2305.09241},year={2023}
Please email jiangw000@mail.hfut.edu.cn for further questions.
Diffusion Models Beat GANS on Image Synthesis:https://github.com/openai/guided-diffusion