Code repository accompanying the paper "On Adversarial Robustness: A Neural Architecture Search perspective"

Overview

Python 3.6

On Adversarial Robustness: A Neural Architecture Search perspective

Preparation:

Clone the repository:

https://github.com/tdchaitanya/nas-robustness.git

prerequisites

  • Python 3.6
  • Pytorch 1.2.0
  • CUDA 10.1

For a hassle-free environment setup, use the environment.yml file included in the repository.

Pre-trained models:

For easy reproduction of the result shown in the paper, this repository is organized dataset-wise, and all the pre-trained models can be downloaded from here

CIFAR-10/100

All the commands in this section should be executed in the cifar directory.

Hand-crafted models on CIFAR-10

All the files corresponding to this dataset are included in cifar-10/100 directories. Download cifar weigths from the shared drive link and place them in nas-robustness/cifar-10/cifar10_models/state_dicts directory.

For running all the four attacks on Resnet-50 (shown in Table 1) run the following command.

python handcrafted.py --arch resnet50

Change the architecture parameter to run attacks on other models. Only resnet-18, resnet-50, densenet-121, densenet-169, vgg-16 are supported for now. For other models, you may have to train them from scratch before running these attacks.

Hand-crafted models on CIFAR-100

For training the models on CIFAR-100 we have used fastai library. Download cifar-100 weigths from the shared drive link and place them in nas-robustness/cifar/c100-weights directory.

Additionally, you'll also have to download the CIFAR-100 dataset from here and place it in the data directory (we'll not be using this anywhere, this is just needed to initialize the fastai model).

python handcrafted_c100.py --arch resnet50
DARTS

Download DARTS CIFAR-10/100 weights from the drive and place it nas-robustness/darts/pretrained

For running all the four attacks on DARTS run the following command:

python darts-nas.py

Add --cifar100 to run the experiments on cifar-100

P-DARTS

Download P-DARTS CIFAR-10/100 weights from the drive and place it nas-robustness/pdarts/pretrained

For running all the four attacks on P-DARTS run the following command:

python pdarts-nas.py

Add --cifar100 to run the experiments on CIFAR-100

NSGA-Net

Download NSGA-Net CIFAR-10/100 weights from the drive and place it nas-robustness/nsga_net/pretrained

For running all the four attacks on P-DARTS run the following command:

python nsganet-nas.py

Add --cifar100 to run the experiments on CIFAR-100

PC-DARTS

Download PC-DARTS CIFAR-10/100 weights from the drive and place it nas-robustness/pcdarts/pretrained

For running all the four attacks on PC-DARTS run the following command:

python pcdarts-nas.py

Add --cifar100 to run the experiments on CIFAR-100

ImageNet

All the commands in this section should be executed in ImageNet directory.

Hand-crafted models

All the files corresponding to this dataset are included in imagenet directory. We use the default pre-trained weights provided by PyTorch for all attacks.

For running all the four attacks on Resnet-50 run the following command:

python handcrafted.py --arch resnet50

For DARTS, P-DARTS, PC-DARTS follow the same instructions as mentioned above for CIFAR-10/100, just change the working directory to ImageNet

DenseNAS

Download DenseNAS ImageNet weights from the drive (these are same as the weights provided in thier official repo) and place it nas-robustness/densenas/pretrained

For running all the four attacks on DenseNAS-R3 run the following command:

python dense-nas.py --model DenseNAS-R3

Citation

@InProceedings{Devaguptapu_2021_ICCV,
    author    = {Devaguptapu, Chaitanya and Agarwal, Devansh and Mittal, Gaurav and Gopalani, Pulkit and Balasubramanian, Vineeth N},
    title     = {On Adversarial Robustness: A Neural Architecture Search Perspective},
    booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) Workshops},
    month     = {October},
    year      = {2021},
    pages     = {152-161}
}

Acknowledgements

Some of the code and weights provided in this library are borrowed from the libraries mentioned below:

Owner
Chaitanya Devaguptapu
Masters by Research (M.Tech-RA), IIT Hyderabad
Chaitanya Devaguptapu
Hydra: an Extensible Fuzzing Framework for Finding Semantic Bugs in File Systems

Hydra: An Extensible Fuzzing Framework for Finding Semantic Bugs in File Systems Paper Finding Semantic Bugs in File Systems with an Extensible Fuzzin

gts3.org (<a href=[email protected])"> 129 Dec 15, 2022
"Inductive Entity Representations from Text via Link Prediction" @ The Web Conference 2021

Inductive entity representations from text via link prediction This repository contains the code used for the experiments in the paper "Inductive enti

Daniel Daza 45 Jan 09, 2023
GLODISMO: Gradient-Based Learning of Discrete Structured Measurement Operators for Signal Recovery

GLODISMO: Gradient-Based Learning of Discrete Structured Measurement Operators for Signal Recovery This is the code to the paper: Gradient-Based Learn

3 Feb 15, 2022
Ansible Automation Example: JSNAPY PRE/POST Upgrade Validation

Ansible Automation Example: JSNAPY PRE/POST Upgrade Validation Overview This example will show how to validate the status of our firewall before and a

Calvin Remsburg 1 Jan 07, 2022
DGL-TreeSearch and the Gurobi-MWIS interface

Independent Set Benchmarking Suite This repository contains the code for our maximum independent set benchmarking suite as well as our implementations

Maximilian BΓΆther 19 Nov 22, 2022
A tool to estimate time varying instantaneous reproduction number during epidemics

EpiEstim A tool to estimate time varying instantaneous reproduction number during epidemics. It is described in the following paper: @article{Cori2013

MRC Centre for Global Infectious Disease Analysis 78 Dec 19, 2022
RRL: Resnet as representation for Reinforcement Learning

Resnet as representation for Reinforcement Learning (RRL) is a simple yet effective approach for training behaviors directly from visual inputs. We demonstrate that features learned by standard image

Meta Research 21 Dec 07, 2022
Leaderboard, taxonomy, and curated list of few-shot object detection papers.

Leaderboard, taxonomy, and curated list of few-shot object detection papers.

Gabriel Huang 70 Jan 07, 2023
Pyeventbus: a publish/subscribe event bus

pyeventbus pyeventbus is a publish/subscribe event bus for Python 2.7. simplifies the communication between python classes decouples event senders and

15 Apr 21, 2022
Experiments on continual learning from a stream of pretrained models.

Ex-model CL Ex-model continual learning is a setting where a stream of experts (i.e. model's parameters) is available and a CL model learns from them

Antonio Carta 6 Dec 04, 2022
RGB-stacking πŸ›‘ 🟩 πŸ”· for robotic manipulation

RGB-stacking πŸ›‘ 🟩 πŸ”· for robotic manipulation BLOG | PAPER | VIDEO Beyond Pick-and-Place: Tackling Robotic Stacking of Diverse Shapes, Alex X. Lee*,

DeepMind 95 Dec 23, 2022
Repository for tackling Kaggle Ultrasound Nerve Segmentation challenge using Torchnet.

Ultrasound Nerve Segmentation Challenge using Torchnet This repository acts as a starting point for someone who wants to start with the kaggle ultraso

Qure.ai 46 Jul 18, 2022
Official repository for "PAIR: Planning and Iterative Refinement in Pre-trained Transformers for Long Text Generation"

pair-emnlp2020 Official repository for the paper: Xinyu Hua and Lu Wang: PAIR: Planning and Iterative Refinement in Pre-trained Transformers for Long

Xinyu Hua 31 Oct 13, 2022
Baseline inference Algorithm for the STOIC2021 challenge.

STOIC2021 Baseline Algorithm This codebase contains an example submission for the STOIC2021 COVID-19 AI Challenge. As a baseline algorithm, it impleme

Luuk Boulogne 10 Aug 08, 2022
Expressive Body Capture: 3D Hands, Face, and Body from a Single Image

Expressive Body Capture: 3D Hands, Face, and Body from a Single Image [Project Page] [Paper] [Supp. Mat.] Table of Contents License Description Fittin

Vassilis Choutas 1.3k Jan 07, 2023
A curated list of awesome projects and resources related fastai

A curated list of awesome projects and resources related fastai

Tanishq Abraham 138 Dec 22, 2022
This repo is about implementing different approaches of pose estimation and also is a sub-task of the smart hospital bed project :smile:

Pose-Estimation This repo is a sub-task of the smart hospital bed project which is about implementing the task of pose estimation πŸ˜„ Many thanks to th

Max 11 Oct 17, 2022
Official Code For TDEER: An Efficient Translating Decoding Schema for Joint Extraction of Entities and Relations (EMNLP2021)

TDEER 🦌 πŸ¦’ Official Code For TDEER: An Efficient Translating Decoding Schema for Joint Extraction of Entities and Relations (EMNLP2021) Overview TDEE

33 Dec 23, 2022
This git repo contains the implementation of my ML project on Heart Disease Prediction

Introduction This git repo contains the implementation of my ML project on Heart Disease Prediction. This is a real-world machine learning model/proje

Aryan Dutta 1 Feb 02, 2022
CycleTransGAN-EVC: A CycleGAN-based Emotional Voice Conversion Model with Transformer

CycleTransGAN-EVC CycleTransGAN-EVC: A CycleGAN-based Emotional Voice Conversion Model with Transformer Demo emotion CycleTransGAN CycleTransGAN Cycle

24 Dec 15, 2022