Skip to content

Code for the paper "Specious Examples: Another Intriguing Property of Neural Networks".

License

Notifications You must be signed in to change notification settings

mingcheung/fooling-examples

Repository files navigation

About

PyTorch code for our paper: Fooling Examples: Another Intriguing Property of Neural Networks.
Ming Zhang, Yongkang Chen, Cheng Qian.

Requirements

torch>=1.7.0; torchvision>=0.8.1; tqdm>=4.31.1; pillow>=7.0.0; matplotlib>=3.2.2; numpy>=1.18.1;

Dataset

The 1000 images from the NIPS 2017 ImageNet-Compatible dataset are provided in the folder dataset/images, along with their metadata in dataset/images.csv and dataset/imagenet_class_index.json.

Evaluation

gen_initial_images.py: Generate initial images, including random Gaussian noised, random uniform noised, all-white and all-black images.

eval_single.py: Generate fooling examples on a single model.

eval_ensemble.py: Generate fooling examples on an ensemble of models.

cal_succ_rate: Calculate the accuracy of fooling or normal examples.

plot_figures.py: Plot figures in experiments.

utils.py: Some necessary utility functions.

About

Code for the paper "Specious Examples: Another Intriguing Property of Neural Networks".

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages