Roy Ganz • Bahjat Kawar • Michael Elad
[ICML 2023 - Oral] Official Code Repository of Do Perceptually Aligned Gradients Imply Robustness?
First, clone this repository:
git clone https://github.com/royg27/PAG-ROB.git
cd PAG-ROBNext, to install the requirements in a new conda environment, run:
conda env create -f environment.ymlThe Perceptually Aligned Gradients' realization for the Score-Based Gradients for the CIFAR-10 dataset is provided in the following table:
| PAG realization | Data | Labels |
|---|---|---|
| Score-Based Gradients | Download | Download |
The data should be placed in the data folder, forming the following structure:
PAG-ROB
├── configs
│ ├── ......
├── data
│ ├── c10_sbg_data.pt
│ ├── c10_sbg_label.pt
├── models
│ ├── ......
├── TRAIN_CIFAR10.py
python TRAIN_CIFAR10.py --config_path <config>where <config> specifies the desired training configuration (e.g., configs/cifar10_sbg_rn18.yaml)
We provide pretrained checkpoints on the CIFAR-10 dataset in the table below:
| RN18 OI | RN18 CM | RN18 NN | RN18 SBG | ViT SBG |
|---|---|---|---|---|
| Download | Download | Download | Download | Download |
If you find this code or data to be useful for your research, please consider citing it.
@misc{ganz2023perceptually,
title={Do Perceptually Aligned Gradients Imply Adversarial Robustness?},
author={Roy Ganz and Bahjat Kawar and Michael Elad},
year={2023},
eprint={2207.11378},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
