Giter Club home page Giter Club logo

mu_wdd's Introduction

Machine Unlearning with Weighted Data Distillation (MU-WDD)

The following codebase supplements the paper "Machine Unlearning with Weighted Data Distillation".

MU with WDD Pipeline

We conduct experiments to investigate the following research questions:

  1. Can data distillation be leveraged for machine unlearning?
  2. How does machine unlearning with data distillation compare to standard machine unlearning?

The experiments involve an ablation study on unweighted and weighted data distillation, and on two unlearning techniques using the CIFAR10 and SVHN datasets (see our paper for more).

WDD Output

Get Started with an Example: Commands to take you through the MU-WDD Pipeline

Step 1: Download Pretrained Model

Download a pretrained ResNet18 model on CIFAR10 from HuggingFace here.

Step 2: Weighted Data Distillation

Run the following commands from tesla to get the expert trajectories (first command) and run the distillation process (second command).

python buffer.py --dataset=CIFAR10 --model=ConvNetD3 --train_epochs=50 --num_experts=100 --zca
python distill.py --dataset=CIFAR10 --ipc=1 --syn_steps=50 --expert_epochs=2 --max_start_epoch=45 --lr_img=1000 --lr_lr=1e-07 --lr_teacher=0.01 --lr_weights=0.01 --data_path <PATH> --zca --model=ConvNetD3

Step 3: Unlearning with Fine-tuning and Gradient Ascent

Run the following commands from unlearn for your method of choice (--unlearn FT for fine-tuning or --unlearn GA for gradient ascent)

python main_forget_distill.py --mask resnet18_cifar10.pth --unlearn FT --unlearn_lr 0.01 --unlearn_epochs 10 --class_to_replace <CLASS> --dataset cifar10
python main_forget_distill.py --mask resnet18_cifar10.pth --unlearn GA --unlearn_lr 0.0001 --unlearn_epochs 5 --class_to_replace <CLASS> --dataset cifar10

mu_wdd's People

Contributors

asfandyarazhar13 avatar rschwa6308 avatar jamesemi avatar nidhishs avatar

Watchers

 avatar

Forkers

jamesemi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.