Resilience from Diversity: Population-based approach to harden models against adversarial attacks

Overview

Resilience from Diversity: Population-based approach to harden models against adversarial attacks

Requirements

To install requirements:

pip install -r requirements.txt

Training

To train the model(s) in the paper, run the following commands depending on the experiment:

For the MNIST experiment:
python ./mnist/clm_train.py --folder 
   
     --nmodel 
    
      --alpha 
     
       --delta 
      
        --pre 
       
         --pref 
        
          --epochs 
         
           --prse 
          
            --lr 
           
             --adv 
             For the CIFAR-10 experiment: python ./cifar-10/clm_train.py --folder 
             
               --nmodel 
              
                --alpha 
               
                 --delta 
                
                  --pre 
                 
                   --pref 
                  
                    --epochs 
                   
                     --prse 
                    
                      --lr 
                     
                       --adv 
                     
                    
                   
                  
                 
                
               
              
             
             
           
          
         
        
       
      
     
    
   

Evaluation

To evaluate the models against adversarial attacks, run the following commands depending on the experiment:

For the MNIST experiment:
python ./mnist/mra.py --attack 
   
     --folder 
    
      --nmodel 
     
       --epsilon 
      
        --testid 
       
         --batch 
        
          For the CIFAR-10 experiment: python ./cifar-10/attack.py --attack 
         
           --folder 
          
            --nmodel 
           
             --epsilon 
            
              --testid 
             
               --batch 
              
                The following is the list of attacks you can test against: - fgsm: Fast Gradient Sign Method attack - pgd: Projected Gradient Descent attack - Linf - auto: AutoAttack - mifgsm: MI-FGSM attack. 
              
             
            
           
          
         
        
       
      
     
    
   

Pre-trained Models

Pretrained models are included in the folders of mnist and cifar-10.

Since GitHub has a limit of the size of uploaded files, you can download the pretrained models through this link: https://drive.google.com/drive/folders/1Dkupi4bObIKofjKZOwOG0owsBFwfwo_5?usp=sharing

├── LICENSE
├── README.md
├── __init__.py
├── cifar-10
│   ├── clm10-a0.5d0.1-epochs150-prse10 
   
    
│   ├── clm_adv4-a0.1d0.05-epochs150-prse10 
    
     
│   ├── clm_train.py
│   ├── mra.py
│   ├── ulm10 
     
      
│   └── ulm_adv4 
      
       
├── mnist
│   ├── clm10-a0.1d0.1-epochs5-prse10 
       
         │   ├── clm_adv4-a0.01d0.005-epochs5-prse1 
        
          │   ├── clm_train.py │   ├── mra.py │   ├── ulm10 
         
           │   └── ulm_adv4 
          
            ├── models │   ├── lenet5.py │   └── resnet.py └── requirements.txt 
          
         
        
       
      
     
    
   

Contributing

MIT License

Code repo for "FASA: Feature Augmentation and Sampling Adaptation for Long-Tailed Instance Segmentation" (ICCV 2021)

FASA: Feature Augmentation and Sampling Adaptation for Long-Tailed Instance Segmentation (ICCV 2021) This repository contains the implementation of th

Yuhang Zang 21 Dec 17, 2022
git git《Transformer Meets Tracker: Exploiting Temporal Context for Robust Visual Tracking》(CVPR 2021) GitHub:git2] 《Masksembles for Uncertainty Estimation》(CVPR 2021) GitHub:git3]

Transformer Meets Tracker: Exploiting Temporal Context for Robust Visual Tracking Ning Wang, Wengang Zhou, Jie Wang, and Houqiang Li Accepted by CVPR

NingWang 236 Dec 22, 2022
Making Structure-from-Motion (COLMAP) more robust to symmetries and duplicated structures

SfM disambiguation with COLMAP About Structure-from-Motion generally fails when the scene exhibits symmetries and duplicated structures. In this repos

Computer Vision and Geometry Lab 193 Dec 26, 2022
Discord bot-CTFD-Thread-Parser - Discord bot CTFD-Thread-Parser

Discord bot CTFD-Thread-Parser Description: This tools is used to create automat

15 Mar 22, 2022
Official PyTorch implementation of "Adversarial Reciprocal Points Learning for Open Set Recognition"

Adversarial Reciprocal Points Learning for Open Set Recognition Official PyTorch implementation of "Adversarial Reciprocal Points Learning for Open Se

Guangyao Chen 78 Dec 28, 2022
Official code for 'Pixel-wise Energy-biased Abstention Learning for Anomaly Segmentationon Complex Urban Driving Scenes'

PEBAL This repo contains the Pytorch implementation of our paper: Pixel-wise Energy-biased Abstention Learning for Anomaly Segmentation on Complex Urb

Yu Tian 117 Jan 03, 2023
7th place solution of Human Protein Atlas - Single Cell Classification on Kaggle

kaggle-hpa-2021-7th-place-solution Code for 7th place solution of Human Protein Atlas - Single Cell Classification on Kaggle. A description of the met

8 Jul 09, 2021
TilinGNN: Learning to Tile with Self-Supervised Graph Neural Network (SIGGRAPH 2020)

TilinGNN: Learning to Tile with Self-Supervised Graph Neural Network (SIGGRAPH 2020) About The goal of our research problem is illustrated below: give

59 Dec 09, 2022
Test-Time Personalization with a Transformer for Human Pose Estimation, NeurIPS 2021

Transforming Self-Supervision in Test Time for Personalizing Human Pose Estimation This is an official implementation of the NeurIPS 2021 paper: Trans

41 Nov 28, 2022
PyZebrascope - an open-source Python platform for brain-wide neural activity imaging in behaving zebrafish

PyZebrascope - an open-source Python platform for brain-wide neural activity imaging in behaving zebrafish

1 May 31, 2022
A python interface for training Reinforcement Learning bots to battle on pokemon showdown

The pokemon showdown Python environment A Python interface to create battling pokemon agents. poke-env offers an easy-to-use interface for creating ru

Haris Sahovic 184 Dec 30, 2022
pip install python-office

🍬 python for office 👉 http://www.python4office.cn/ 👈 🌎 English Documentation 📚 简介 Python-office 是一个 Python 自动化办公第三方库,能解决大部分自动化办公的问题。而且每个功能只需一行代码,

程序员晚枫 272 Dec 29, 2022
ATAC: Adversarially Trained Actor Critic

ATAC: Adversarially Trained Actor Critic Adversarially Trained Actor Critic for Offline Reinforcement Learning by Ching-An Cheng*, Tengyang Xie*, Nan

Microsoft 41 Dec 08, 2022
Meandering In Networks of Entities to Reach Verisimilar Answers

MINERVA Meandering In Networks of Entities to Reach Verisimilar Answers Code and models for the paper Go for a Walk and Arrive at the Answer - Reasoni

Shehzaad Dhuliawala 271 Dec 13, 2022
vit for few-shot classification

Few-Shot ViT Requirements PyTorch (= 1.9) TorchVision timm (latest) einops tqdm numpy scikit-learn scipy argparse tensorboardx Pretrained Checkpoints

Martin Dong 26 Nov 30, 2022
Vision-Language Transformer and Query Generation for Referring Segmentation (ICCV 2021)

Vision-Language Transformer and Query Generation for Referring Segmentation Please consider citing our paper in your publications if the project helps

Henghui Ding 143 Dec 23, 2022
How to Train a GAN? Tips and tricks to make GANs work

(this list is no longer maintained, and I am not sure how relevant it is in 2020) How to Train a GAN? Tips and tricks to make GANs work While research

Soumith Chintala 10.8k Dec 31, 2022
AugLy is a data augmentations library that currently supports four modalities (audio, image, text & video) and over 100 augmentations

AugLy is a data augmentations library that currently supports four modalities (audio, image, text & video) and over 100 augmentations. Each modality’s augmentations are contained within its own sub-l

Facebook Research 4.6k Jan 09, 2023
Code for Generating Disentangled Arguments with Prompts: A Simple Event Extraction Framework that Works

GDAP Code for Generating Disentangled Arguments with Prompts: A Simple Event Extraction Framework that Works Environment Python (verified: v3.8) CUDA

45 Oct 29, 2022
[BMVC'21] Official PyTorch Implementation of Grounded Situation Recognition with Transformers

Grounded Situation Recognition with Transformers Paper | Model Checkpoint This is the official PyTorch implementation of Grounded Situation Recognitio

Junhyeong Cho 18 Jul 19, 2022