âš–ïžđŸ”đŸ”źđŸ•”ïžâ€â™‚ïžđŸŠčđŸ–Œïž Code for *Measuring the Contribution of Multiple Model Representations in Detecting Adversarial Instances* paper.

Overview

Measuring the Contribution of Multiple Model Representations in Detecting Adversarial Instances

This repository contains the code for Measuring the Contribution of Multiple Model Representations in Detecting Adversarial Instances.

Reported running times are approximate, intended to give a general idea of how long each step will take. Estimates are based on times encountered while developing on Ubuntu 21.04 with hardware that includes an AMD Ryzen 9 3950X CPU, 64GB of memory, and an NVIDIA TITAN RTX GPU with 24GB of memory. The intermediate results utilize about 600 gigabytes of storage.

Requirements

The code was developed using Python 3.9 on Ubuntu 21.04. Other systems and Python versions may work, but have not been tested.

Python library dependencies are specified in requirements.txt. Versions are pinned for reproducibility.

Installation

  • Optionally create and activate a virtual environment.
python3 -m venv env
source env/bin/activate
  • Install Python dependencies, specified in requirements.txt.
    • 2 minutes
pip3 install -r requirements.txt

Running the Code

By default, output is saved to the ./workspace directory, which is created automatically.

  • Train ResNet classification models.
    • 6 weeks
python3 src/train_nets.py
  • Evaluate the models, extracting representations from the corresponding data.
    • 1 hour
python3 src/eval_nets.py
  • Adversarially perturb test images, evaluating and extracting representations from the corresponding data.
    • 21 hours
python3 src/attack.py
  • Train and evaluate model-wise control adversarial instance detectors, varying the number of underlying models used for generating features, where the underlying detectors are trained on representations from a single model.
    • 1 day
OMP_NUM_THREADS=1 python3 src/detect_model_wise_control.py
  • Train and evaluate model-wise treatment adversarial instance detectors, varying the number of underlying models used for generating features, where the underlying detectors are trained on representations from multiple models.
    • 1 day
OMP_NUM_THREADS=1 python3 src/detect_model_wise_treatment.py
  • Train and evaluate unit-wise control adversarial instance detectors, varying the number of units used for generating features, where the units come from a single underlying model.
    • 1 hour
OMP_NUM_THREADS=1 python3 src/detect_unit_wise_control.py
  • Train and evaluate unit-wise treatment adversarial instance detectors, varying the number of units used for generating features, where the units come from multiple underlying models.
    • 2 hours
OMP_NUM_THREADS=1 python3 src/detect_unit_wise_treatment.py
  • Generate plots.
    • 2 seconds
python3 src/plot.py

Citation

@misc{steinberg2021measuring,
      title={Measuring the Contribution of Multiple Model Representations in Detecting Adversarial Instances}, 
      author={Daniel Steinberg and Paul Munro},
      year={2021},
      eprint={2111.07035},
      archivePrefix={arXiv},
      primaryClass={cs.LG}
}
This is a Pytorch implementation of paper: DropEdge: Towards Deep Graph Convolutional Networks on Node Classification

DropEdge: Towards Deep Graph Convolutional Networks on Node Classification This is a Pytorch implementation of paper: DropEdge: Towards Deep Graph Con

401 Dec 16, 2022
Council-GAN - Implementation for our paper Breaking the Cycle - Colleagues are all you need (CVPR 2020)

Council-GAN Implementation of our paper Breaking the Cycle - Colleagues are all you need (CVPR 2020) Paper Ori Nizan , Ayellet Tal, Breaking the Cycle

ori nizan 260 Nov 16, 2022
PerfFuzz: Automatically Generate Pathological Inputs for C/C++ programs

PerfFuzz Performance problems in software can arise unexpectedly when programs are provided with inputs that exhibit pathological behavior. But how ca

Caroline Lemieux 125 Nov 18, 2022
Multi-scale discriminator feature-wise loss function

Multi-Scale Discriminative Feature Loss This repository provides code for Multi-Scale Discriminative Feature (MDF) loss for image reconstruction algor

Graphics and Displays group - University of Cambridge 76 Dec 12, 2022
Code for: https://berkeleyautomation.github.io/bags/

DeformableRavens Code for the paper Learning to Rearrange Deformable Cables, Fabrics, and Bags with Goal-Conditioned Transporter Networks. Here is the

Daniel Seita 121 Dec 30, 2022
PyTorch implementation of Graph Convolutional Networks in Feature Space for Image Deblurring and Super-resolution, IJCNN 2021.

GCResNet PyTorch implementation of Graph Convolutional Networks in Feature Space for Image Deblurring and Super-resolution, IJCNN 2021. The code will

11 May 19, 2022
Official code for Score-Based Generative Modeling through Stochastic Differential Equations

Score-Based Generative Modeling through Stochastic Differential Equations This repo contains the official implementation for the paper Score-Based Gen

Yang Song 818 Jan 06, 2023
Open-source implementation of Google Vizier for hyper parameters tuning

Advisor Introduction Advisor is the hyper parameters tuning system for black box optimization. It is the open-source implementation of Google Vizier w

tobe 1.5k Jan 04, 2023
A benchmark for the task of translation suggestion

WeTS: A Benchmark for Translation Suggestion Translation Suggestion (TS), which provides alternatives for specific words or phrases given the entire d

zhyang 55 Dec 24, 2022
[ACM MM 2021] TSA-Net: Tube Self-Attention Network for Action Quality Assessment

Tube Self-Attention Network (TSA-Net) This repository contains the PyTorch implementation for paper TSA-Net: Tube Self-Attention Network for Action Qu

ShunliWang 18 Dec 23, 2022
Unofficial PyTorch implementation of SimCLR by Google Brain

Unofficial PyTorch implementation of SimCLR by Google Brain

Rishabh Anand 2 Oct 13, 2021
Deep-learning-roadmap - All You Need to Know About Deep Learning - A kick-starter

Deep Learning - All You Need to Know Sponsorship To support maintaining and upgrading this project, please kindly consider Sponsoring the project deve

Instill AI 4.4k Dec 26, 2022
Implementation for the paper: Invertible Denoising Network: A Light Solution for Real Noise Removal (CVPR2021).

Invertible Image Denoising This is the PyTorch implementation of paper: Invertible Denoising Network: A Light Solution for Real Noise Removal (CVPR 20

157 Dec 25, 2022
All the essential resources and template code needed to understand and practice data structures and algorithms in python with few small projects to demonstrate their practical application.

Data Structures and Algorithms Python INDEX 1. Resources - Books Data Structures - Reema Thareja competitiveCoding Big-O Cheat Sheet DAA Syllabus Inte

Shushrut Kumar 129 Dec 15, 2022
DI-HPC is an acceleration operator component for general algorithm modules in reinforcement learning algorithms

DI-HPC: Decision Intelligence - High Performance Computation DI-HPC is an acceleration operator component for general algorithm modules in reinforceme

OpenDILab 185 Dec 29, 2022
Wordle-solver - Wordle answer generation program in python

🟹 Wordle Solver đŸŸ© Wordle answer generation program in python ✔ Requirements U

Dahyun Kang 4 May 28, 2022
Rethinking the U-Net architecture for multimodal biomedical image segmentation

MultiResUNet Rethinking the U-Net architecture for multimodal biomedical image segmentation This repository contains the original implementation of "M

Nabil Ibtehaz 308 Jan 05, 2023
AgML is a comprehensive library for agricultural machine learning

AgML is a comprehensive library for agricultural machine learning. Currently, AgML provides access to a wealth of public agricultural datasets for common agricultural deep learning tasks.

Plant AI and Biophysics Lab 1 Jul 07, 2022
Transformer Tracking (CVPR2021)

TransT - Transformer Tracking [CVPR2021] Official implementation of the TransT (CVPR2021) , including training code and trained models. We are revisin

chenxin 465 Jan 06, 2023
FocusFace: Multi-task Contrastive Learning for Masked Face Recognition

FocusFace This is the official repository of "FocusFace: Multi-task Contrastive Learning for Masked Face Recognition" accepted at IEEE International C

Pedro Neto 21 Nov 17, 2022