This is the implementation repository of paper : Distance-Aware Test Input Selection for Deep Neural Networks
We propose a novel test input selection approach for DNNs, which is called DATIS.
The key design idea of DATIS is two-fold:
- Derive improved uncertainty scores for test inputs by leveraging the training data of DNNs, thus achieving better test input selection.
- Eliminate the redundancies among the selected test input sets based on the distances among the selected test inputs to further enhance the effectiveness of test input selection.
tensorflow==2.12.0
tensorflow-estimator==2.12.0
Keras==2.12.0
numpy==1.22.0
scikit-learn==1.2.2
tqdm==4.65.0
datasets=2.12.0
├── cluster_data/ "the results of fault estimation in DNNs"
├── compared approach/ "code of compared test select approaches"
├── corrupted_data/ "corrupted candidate dataset"
├── DATIS/ "implementation of DATIS"
├── model/ "DNNs in our experiments"
├── results/ "pictures and tables of experimental results"
├── mnist_test_selection.py "a demo of test selection in mnist"
├── mnist_dnn_enhancement.py "a demo of dnn enhancement in mnist"
We prepared a demo for DATIS
python mnist_test_selection.py
python mnist_dnn_enhancement.py
If you want to run our demo:
- download the
corrupted_data
andmodel
files by following this link:
link: https://1drv.ms/f/s!Are_aZdXk1FyhiQMV7rgp3O-6H7Q
-
experiment
python mnist_test_selection.py
a demo for test selection in mnist dataset with LeNet5 model
-
python mnist_dnn_enhancement.py
a demo for dnn enhancement in mnist dataset with LeNet5 model
2 image datasets
- CIFAR-100 (a 100-class ubiquitous object dataset) [1]
- MNIST (a handwritten digit dataset) [2]
2 text datasets
- TREC (a question classification dataset) [3]
- IMDB (a large movie review dataset for binary sentiment classification) [4]
[1] CIFAR http://www.cs.toronto.edu/~kriz/cifar.html
[2] MNIST http://yann.lecun.com/exdb/mnist/