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模型重训练提供更优的引导。