Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

This document explains the instructions to run the DeepDIG project

DeepDIG

Initialization

  1. Download the zip file of the code from this repository. Unzip it and rename the directory to DeepDIGCode. Let's assume this directory in /home/user/Downloads/
  2. In config.py change the variable PATH to /home/user/Downloads/DeepDIGCode/
  3. Data for MNIST and FASHIONMNIST are already uploaded. For CIFAR10, download the data from here, unzip it and copy the files into /home/user/Downloads/DeepDIGCode/Data/CIFAR10

Training the base model

  1. Open a terminal and go to the upper-level directory containing the DeepDIG code where you cloned the code e.g., /home/user/Downloads/

  2. run python -m DeepDIGCode.PreTrainedModels.{DATASET}.{MODEL}.train --dataset {DATASET} --pre-trained-model {MODEL} where DATASET is the name of the dataset and MODEL is the name of the model

    Example: python -m DeepDIGCode.PreTrainedModels.FASHIONMNIST.CNN.train --dataset FASHIONMNIST --pre-trained-model CNN this will train the CNN model for FASHIONMNIST and then saves it.

Please refer to here to see how you can run DeepDIG against your new dataset/model.

Running the DeepDIG framework (Figure 2)

  1. Open a terminal and go to the upper-level directory containing DeepDIG code where you cloned the code e.g., /home/user/Downloads/
  2. Run python -m DeepDIGCode.main --dataset {DATASET} --pre-trained-model {MODEL} --classes {s};{t} where DATASET is the name of the dataset, MODEL is the name of the model, and s and t are two classes in the dataset for which you intend to DeepDIG

Example : python -m DeepDIGCode.main --dataset FASHIONMNIST --pre-trained-model CNN --classes "1;2"

this will run DeepDIG against the trained CNN on FASHIONMNIST to characterize the decision boundary of classes 1 and 2 (i.e., Trouser and Pullover)

Note 1. See here for the explantion of DeepDIG's arguments.

Note 2. Classes are referred numerically from 0 to n-1 where n is the number of classes. For instance, you can find the classes of CIFAR10 here. See the following examples

Example : python -m DeepDIGCode.main --dataset CIFAR10 --pre-trained-model GoogleNet --classes "1;2" (automobile, bird)

Example : python -m DeepDIGCode.main --dataset CIFAR10 --pre-trained-model ResNet --classes "4;8" (deer, ship)

  1. All results including visualizations will be saved in the /home/user/Downloads/DeepDIGCode/PreTrainedModels/{DATASET}/{MODEL}/{(s,t)} where DATASET is the input dataset, MODEL is the base model, and s and t are input classes for which you intend to genderate the borderline examples

e.g. /home/user/Downloads/DeepDIGCode/PreTrainedModels/FASHIONMNIST/CNN/(1,2)

Citations

If you use the code in this repository, please cite the following papers

@article{karimi2019characterizing, title={Characterizing the Decision Boundary of Deep Neural Networks}, author={Karimi, Hamid and Derr, Tyler and Tang, Jiliang}, journal={arXiv preprint arXiv:1912.11460}, year={2019} }

@inproceedings{karimi2020decision, title={Decision Boundary of Deep Neural Networks: Challenges and Opportunities}, author={Karimi, Hamid and Tang, Jiliang}, booktitle={Proceedings of the 13th International Conference on Web Search and Data Mining}, pages={919--920}, year={2020} }

Contact

Web page: http://cse.msu.edu/~karimiha/ Email: karimiha@msu.edu

About

This repository contains the code for Characterizing the Decision Boundary of Deep Neural Networks

Resources

Releases

No releases published

Packages

No packages published

Languages