RED Server Software Copyright (C) 2022 Cognizant Digital Business, Evolutionary AI. All Rights Reserved.
Code and supporting materials for the AAAI 2022 RED paper
This repository contains all the source codes to reproduce the experimental results reported in paper "Detecting Misclassification Errors in Neural Networks with a Gaussian Process Model", which is published in AAAI 2022. (Arxiv Link: https://arxiv.org/abs/2010.02065)
- Before running the source code, download the 121 UCI datasets from https://github.com/bioinf-jku/SNNs, and the 4 newly added datasets from UCI Machine Learning Repository, namely, "Phishing","messidor","Bioconcentration", and "Climate".
- Put the 121 UCI datasets into a folder named
UCI121_data, and the 4 newly added dataset into a folder namedDatasets. - Create a folder named
Resultsto store all the experimental results. - Create a folder named
Statisticsto store all the analysis results. - pip install the packages in
requirements.txt. - Run
main_experiments_UCI.pyto generate all the experimental results. - Run
analysis_results_UCI.pyto analyze the stored experimental results.
Note: the packages used in calculating Trust Score can be git cloned from https://github.com/google/TrustScore.
- For results of "SVGP" variant, run
experiments_SVGP.pyafter obtaining the main results inResultsfolder. - For results of "DNGO" variant, run
experiments_DNGO.pyafter obtaining the main results inResultsfolder. The source codes of DNGO can be git cloned from https://github.com/automl/pybnn/blob/master/pybnn/dngo.py. - For results of "Entropy" variant, it can be directly calculated from the outputs of original NN classifier using
entropyfunction fromscipy.stats. - For results regarding Bayesian Neural Networks, run
experiments_BNN.pyto generate the results of base BNN classifier, then runexperiments_BNN+RED.pyto get the results of applying RED on top of BNN classifiers. - For results regarding MC-dropout, run
experiments_dropout.pyto generate the results of base NN classifier with MC-dropout, then runexperiments_dropout+RED.pyto get the results of applying RED on top of NN classifiers with MC-dropout. - For results regarding VGG16/VGG19 on CIFAR-10/CIFAR-100, train the base VGG16/VGG19 classifiers using code from https://github.com/geifmany/cifar-vgg, then run the included codes that generate results on UCI datasets on CIFAR-10/CIFAR-100 results.
- For results regarding OOD and adversarial samples, run
experiments_OOD_adversarial.py. - For results regarding OOD detection in CIFAR-10 vs. SVHN, directly apply the trained VGG16 and RED models in step 6 to SVHN data downloaded from http://ufldl.stanford.edu/housenumbers/.
- For results of BLR-residual, run
experiments_BLR-residual.pyafter runningmain_experiments_UCI.py.
If you use RED in your research, please cite it using the following BibTeX entry
@article{qiu:aaai22,
title={Detecting Misclassification Errors in Neural Networks with a Gaussian Process Model},
volume={36},
url={https://ojs.aaai.org/index.php/AAAI/article/view/20773},
DOI={10.1609/aaai.v36i7.20773},
number={7},
journal={Proceedings of the AAAI Conference on Artificial Intelligence},
author={Qiu, Xin and Miikkulainen, Risto},
year={2022},
month={Jun.},
pages={8017-8027} }