Skip to content

This repository contains implementations of several popular machine unlearning algorithms in PyTorch.

Notifications You must be signed in to change notification settings

OngWinKent/MachineUnlearning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Machine Unlearning

(Released on March 27, 2025)

Introduction

This repository contains implementations of several popular machine unlearning algorithms in PyTorch, as listed below:

Algorithm Paper Original Github Repository
gradient_ascent Unrolling SGD: Understanding Factors Influencing Machine Unlearning https://github.com/cleverhans-lab/unrolling-sgd
bad_teacher Can Bad Teaching Induce Forgetting? Unlearning in Deep Networks using an Incompetent Teacher https://github.com/vikram2000b/bad-teaching-unlearning
scrub Towards Unbounded Machine Unlearning https://github.com/meghdadk/SCRUB/tree/main
amnesiac Amnesiac Machine Learning https://github.com/lmgraves/AmnesiacML
boundary Boundary Unlearning: Rapid Forgetting of Deep Networks via Shifting the Decision Boundary https://github.com/TY-LEE-KR/Boundary-Unlearning-Code
ntk Forgetting Outside the Box: Scrubbing Deep Networks of Information Accessible from Input-Output Observations https://github.com/AdityaGolatkar/SelectiveForgetting
fisher Eternal Sunshine of the Spotless Net: Selective Forgetting in Deep Networks https://github.com/AdityaGolatkar/SelectiveForgetting
unsir Fast Yet Effective Machine Unlearning https://github.com/vikram2000b/Fast-Machine-Unlearning
ssd Fast Machine Unlearning Without Retraining Through Selective Synaptic Dampening https://github.com/if-loops/selective-synaptic-dampening

Sincere appreciation to the authors of these popular machine unlearning algorithms for open-sourcing their code, greatly contributing to the success of this repository.

Getting started

Preparation

Before executing the project code, please prepare the Python environment according to the requirement.txt file. We set up the environment with python 3.9.12 and torch 2.0.0.

pip install -r requirement.txt

How to run

1. Model Training

python train_main.py -dataset Cifar10 

2. Unlearning

python unlearn_main.py -gpu -dataset Cifar10 -unlearn_class 0 -unlearn_method retrain -model_path 

Feedback

Suggestions and opinions on this work (both positive and negative) are greatly welcomed. Please contact the author by sending an email to winkent.ong at um.edu.my.

License and Copyright

The project is open source under BSD-3 license (see the LICENSE file).

©2024 Universiti Malaya.

About

This repository contains implementations of several popular machine unlearning algorithms in PyTorch.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages