Skip to content

ChaoningZhang/DeACL

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Decoupled Adversarial Contrastive Learning for Self-supervised Adversarial Robustness (Accepted by ECCV2022 oral presentation)

Chaoning Zhang, Kang Zhang, Chenshuang Zhang, Axi Niu, Jiu Feng, Chang D. Yoo, In So Kweon

Overall framework of DeACL. It consists of two stages. At stage 1, DeACL performs a standard SSL to obtain a non-robust encoder. At stage 2, the pretrained encoder act as a teacher model to generate pseudo-targets for guiding a supervised AT on a student model. After two stages of training, the student model is the model of our interest.


See also our other works:

Dual Temperature Helps Contrastive Learning Without Many Negative Samples: Towards Understanding and Simplifying MoCo (Accepted by CVPR2022) code paper


🔧 Enviroment

Please refer solo-learn to install the enviroment for detail.

First clone the repo.

Then, to install solo-learn with Dali and/or UMAP support, use:

pip3 install .[dali,umap,h5] --extra-index-url https://developer.download.nvidia.com/compute/redist

⚡ Training

1. prepare the pretrained self-supervised model

You can download pretrained checkpoint from solo-learn or train by yourself.

2. Train DeACL with ResNet18 on CIFAR10 dataset

Using the file bash_files/pretrain/DeACL/deacl.sh.

3. Test the robustness of PGD and AutoAttack with full precision

python adv_slf.py --ckpt CKPT_PATH

This code is developed based on solo-learn for training and AdvCL for testing.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 97.9%
  • Shell 2.1%