You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code first pretrains a model if one with the specified parameters is not alredy available. Otherwise it uses the stored model. It then performs the specified unlearning procedure.
The above script trains a Resnet9 model on CIFAR10 with 500 samples manipulated using Interclass Confusion. It then picks 250 samples known to the unlearning procedure, here retraining the whole model from scratch without the deletion data.
Arguments you can freely tweak given a dataset and model:
Pretrain Iterations (--pretrain_iters)
Manipulation Type (--dataset_method)
No. of Manipulated Samples (--forget_set_size)
No. of unlearning samples known to developers (--deletion_size)
Unlearning method (--unlearn_method)
Method specific hyperparameters, which can be inferred from src/opts.py
Adding functionality can be done as follows:
To add new evaluations, modify src/datasets.py, specifically the manip_dataset function and DatasetWrapper class.
To add new unlearning methods, modify src/methods.py
To add new datasets, modify the load_dataset function in src/datasets.py
In general, any of these changes would require updates to src/main.py, src/opts.py and src/visualize.py
Additional details and default hyperparameters can be found in src/opts.py
To replicate the complete set of experiments, run scripts/CIFAR10_poisoning.sh and similar for other datasets and manipulations.
If you discover any bugs in the code please contact me, I will cross-check them with my nightmares.
Citation
We hope you are excited by the potential for corrective unlearning! To cite our work:
@article{goel2024corrective,
title={Corrective Machine Unlearning},
author={Shashwat Goel and Ameya Prabhu and Philip Torr and Ponnurangam Kumaraguru and Amartya Sanyal},
journal={Transactions on Machine Learning Research},
year={2024},
url={https://openreview.net/forum?id=v8enu4jP9B}
}