Giter VIP home page Giter VIP logo

memorization-discrepancy's Introduction

Exploring Model Dynamics for Accumulative Poisoning Discovery

This repo contains the sample code of our proposed Memorization Discrepancy and the corresponding Discrepancy-awared Sample Correction (DSC). The code is developed based on Accuulative Attack.

Environment preliminaries

This project is tested under the following environment settings:

  • GPU: Geforce 3090 or Tesla V100
  • Cuda: 11.4
  • Python: 3.6
  • PyTorch: >= 1.9.1
  • Torchvision: >= 0.10.1

Running commands

Burn-in phase

python train_cifar.py

Accumulative poisoning attacks in online learning cases

Below is the original running commands for accumulative phase + poisoned trigger(controlled by --use_advtrigger) + online poisoned trigger (controlled by --use_online_advtrigger):

python online_accu_train_adv_relate.py \
                  --batch_size 100 --epoch 100 --test_batch_size 500 --log_name log_test_online.txt\
                  --resume checkpoints_base_bn --use_bn --model_name epoch40.pth \
                  --mode 'eval' --onlinemode 'train' --lr 1e-1 --momentum 0.9 \
                  --beta 1. --only_reg --threshold 0.18 --use_advtrigger

ST for Accumulative poisoning attacks

CUDA_VISIBLE_DEVICES='0' python online_accu_train_adv_relate.py \
                  --batch_size 100 --epoch 100 --test_batch_size 500 --log_name log_test_online_adv.txt\
                  --resume checkpoints_base_bn --use_bn --model_name epoch40.pth \
                  --mode 'eval' --onlinemode 'train' --lr 1e-1 --momentum 0.9 \
                  --beta 1. --only_reg --threshold 0.18 --use_advtrigger --med="ST"

AT for Accumulative poisoning attacks

CUDA_VISIBLE_DEVICES='0' python online_accu_train_adv_relate.py \
                  --batch_size 100 --epoch 100 --test_batch_size 500 --log_name log_test_online_adv.txt\
                  --resume checkpoints_base_bn --use_bn --model_name epoch40.pth \
                  --mode 'eval' --onlinemode 'train' --lr 1e-1 --momentum 0.9 \
                  --beta 1. --only_reg --threshold 0.18 --use_advtrigger --med="AT"

DSC for Accumulative poisoning attacks

CUDA_VISIBLE_DEVICES='0' python online_accu_train_adv_relate.py \
                  --batch_size 100 --epoch 100 --test_batch_size 500 --log_name log_test_online_adv.txt\
                  --resume checkpoints_base_bn --use_bn --model_name epoch40.pth \
                  --mode 'eval' --onlinemode 'train' --lr 1e-1 --momentum 0.9 \
                  --beta 1. --only_reg --threshold 0.18 --use_advtrigger --med="OURS"

Reference Code


If you find our paper and repo useful, please cite our paper:

@inproceedings{zhu2023unleashing,
title       ={Exploring Model Dynamics for Accumulative Poisoning Discovery},
author      ={Jianing Zhu and Xiawei Guo and Jiangchao Yao and Chao Du and Li He and Shuai Yuan and Tongliang Liu and Liang Wang and Bo Han},
booktitle   ={International Conference on Machine Learning},
year        ={2023}
}

memorization-discrepancy's People

Contributors

zfancy avatar

Stargazers

 avatar

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.