Deep neural networks (DNNs) are widely used in various application domains such as image processing, speech recognition, and natural language processing. However, testing DNN models may be challenging due to the complexity and size of their input domain. Particularly, testing DNN models often requires generating or exploring large unlabeled datasets. In practice, DNN test oracles, which identify the correct outputs for inputs, often require expensive manual effort to label test data, possibly involving multiple experts to ensure labeling correctness. In this paper, we propose DeepGD, a black-box multi-objective test selection approach for DNN models. It reduces the cost of labeling by prioritizing the selection of test inputs with high fault revealing power from large unlabeled datasets. DeepGD not only selects test inputs with high uncertainty scores to trigger as many mispredicted inputs as possible but also maximizes the probability of revealing distinct faults in the DNN model by selecting diverse mispredicted inputs. The experimental results conducted on four widely used datasets and five DNN models show that in terms of fault-revealing ability: (1) White-box, coverage-based approaches fare poorly, (2) DeepGD outperforms existing black-box test selection approaches in terms of fault detection, and (3) DeepGD also leads to better guidance for DNN model retraining when using selected inputs to augment the training set.
翻译:深度神经网络(DNN)广泛应用于图像处理、语音识别和自然语言处理等各个应用领域。然而,由于输入域的复杂性和规模,测试DNN模型可能具有挑战性。特别是,测试DNN模型通常需要生成或探索大规模未标注数据集。在实践中,识别输入正确输出的DNN测试预言通常需要耗费大量人力来标注测试数据,可能涉及多位专家以确保标注正确性。本文提出DeepGD,一种针对DNN模型的黑盒多目标测试选择方法。该方法通过优先从大规模未标注数据集中选择具有高故障揭示能力的测试输入,从而降低标注成本。DeepGD不仅通过选择高不确定性分数的测试输入来触发尽可能多的错误预测输入,还通过选择多样化的错误预测输入来最大化揭示DNN模型中不同故障的概率。在四个广泛使用的数据集和五个DNN模型上进行的实验结果表明,在故障揭示能力方面:(1)基于白盒覆盖的方法表现较差,(2)DeepGD在故障检测方面优于现有黑盒测试选择方法,(3)当使用所选输入扩充训练集时,DeepGD也为DNN模型重训练提供了更好的指导。