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
PyTorch implementation of PP-LCNet

PP-LCNet-Pytorch Pre-Trained Models Google Drive p018 Accuracy Models Top1 Top5 PPLCNet_x0_25 0.5186 0.7565 PPLCNet_x0_35 0.5809 0.8083 PPLCNet_x0_5 0

24 Dec 12, 2022
Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently. It can use GPUs and perform efficient symbolic differentiation.

============================================================================================================ `MILA will stop developing Theano https:

9.6k Jan 06, 2023
HybVIO visual-inertial odometry and SLAM system

HybVIO A visual-inertial odometry system with an optional SLAM module. This is a research-oriented codebase, which has been published for the purposes

Spectacular AI 320 Jan 03, 2023
Domain Generalization with MixStyle, ICLR'21.

MixStyle This repo contains the code of our ICLR'21 paper, "Domain Generalization with MixStyle". The OpenReview link is https://openreview.net/forum?

Kaiyang 208 Dec 28, 2022
Deploy optimized transformer based models on Nvidia Triton server

🤗 Hugging Face Transformer submillisecond inference 🤯 and deployment on Nvidia Triton server Yes, you can perfom inference with transformer based mo

Lefebvre Sarrut Services 1.2k Jan 05, 2023
Codebase for "ProtoAttend: Attention-Based Prototypical Learning."

Codebase for "ProtoAttend: Attention-Based Prototypical Learning." Authors: Sercan O. Arik and Tomas Pfister Paper: Sercan O. Arik and Tomas Pfister,

47 2 May 17, 2022
Deep ViT Features as Dense Visual Descriptors

dino-vit-features [paper] [project page] Official implementation of the paper "Deep ViT Features as Dense Visual Descriptors". We demonstrate the effe

Shir Amir 113 Dec 24, 2022
PyTorch implementation of the paper Dynamic Data Augmentation with Gating Networks

Dynamic Data Augmentation with Gating Networks This is an official PyTorch implementation of the paper Dynamic Data Augmentation with Gating Networks

九州大学 ヒューマンインタフェース研究室 3 Oct 26, 2022
Pytorch-diffusion - A basic PyTorch implementation of 'Denoising Diffusion Probabilistic Models'

PyTorch implementation of 'Denoising Diffusion Probabilistic Models' This reposi

Arthur Juliani 76 Jan 07, 2023
This respository includes implementations on Manifoldron: Direct Space Partition via Manifold Discovery

Manifoldron: Direct Space Partition via Manifold Discovery This respository includes implementations on Manifoldron: Direct Space Partition via Manifo

dayang_wang 4 Apr 28, 2022
【Arxiv】Exploring Separable Attention for Multi-Contrast MR Image Super-Resolution

SANet Exploring Separable Attention for Multi-Contrast MR Image Super-Resolution Dependencies numpy==1.18.5 scikit_image==0.16.2 torchvision==0.8.1 to

36 Jan 05, 2023
Doosan robotic arm, simulation, control, visualization in Gazebo and ROS2 for Reinforcement Learning.

Robotic Arm Simulation in ROS2 and Gazebo General Overview This repository includes: First, how to simulate a 6DoF Robotic Arm from scratch using GAZE

David Valencia 12 Jan 02, 2023
Implementation of PersonaGPT Dialog Model

PersonaGPT An open-domain conversational agent with many personalities PersonaGPT is an open-domain conversational agent cpable of decoding personaliz

ILLIDAN Lab 42 Jan 01, 2023
Machine learning Bot detection technique, based on United States election dataset

Machine learning Bot detection technique, based on United States election dataset (2020). Current github repo provides implementation described in pap

Alexander Shevtsov 4 Nov 20, 2022
Multi-objective gym environments for reinforcement learning.

MO-Gym: Multi-Objective Reinforcement Learning Environments Gym environments for multi-objective reinforcement learning (MORL). The environments follo

Lucas Alegre 74 Jan 03, 2023
EfficientNetV2 implementation using PyTorch

EfficientNetV2-S implementation using PyTorch Train Steps Configure imagenet path by changing data_dir in train.py python main.py --benchmark for mode

Jahongir Yunusov 86 Dec 29, 2022
Real-Time High-Resolution Background Matting

Real-Time High-Resolution Background Matting Official repository for the paper Real-Time High-Resolution Background Matting. Our model requires captur

Peter Lin 6.1k Jan 03, 2023
This repository contains the code for "SBEVNet: End-to-End Deep Stereo Layout Estimation" paper by Divam Gupta, Wei Pu, Trenton Tabor, Jeff Schneider

SBEVNet: End-to-End Deep Stereo Layout Estimation This repository contains the code for "SBEVNet: End-to-End Deep Stereo Layout Estimation" paper by D

Divam Gupta 19 Dec 17, 2022
Generative Autoregressive, Normalized Flows, VAEs, Score-based models (GANVAS)

GANVAS-models This is an implementation of various generative models. It contains implementations of the following: Autoregressive Models: PixelCNN, G

MRSAIL (Mini Robotics, Software & AI Lab) 6 Nov 26, 2022
Website for D2C paper

D2C This is the repository that contains source code for the D2C Website. If you find D2C useful for your work please cite: @article{sinha2021d2c au

1 Oct 21, 2021