Deep learning has revolutionized various real-world applications, but the quality of Deep Neural Networks (DNNs) remains a concern. DNNs are complex and have millions of parameters, making it difficult to determine their contributions to fulfilling a task. Moreover, the behavior of a DNN is highly influenced by the data used during training, making it challenging to collect enough data to exercise all potential DNN behavior under all possible scenarios. This paper proposes NP SBFL method to locate faulty neural pathways (NP) using spectrum-based fault localization (SBFL). Our method identifies critical neurons using the layer-wise relevance propagation (LRP) technique and determines which critical neurons are faulty. Moreover, we propose a multi-stage gradient ascent (MGA), an extension of gradient ascent (GA), to effectively activate a sequence of neurons one at a time while maintaining the activation of previous neurons, so we are able to test the reported faulty pathways. We evaluated the effectiveness of our method, i.e. NP-SBFL-MGA, on two commonly used datasets, MNIST and CIFAR-10, two baselines DeepFault and NP-SBFL-GA, and three suspicious neuron measures, Tarantula, Ochiai, and Barinel. The empirical results showed that NP-SBFL-MGA is statistically more effective than the baselines at identifying suspicious paths and synthesizing adversarial inputs. Particularly, Tarantula on NP-SBFL-MGA had the highest fault detection rate at 96.75%, surpassing DeepFault on Ochiai (89.90%) and NP-SBFL-GA on Ochiai (60.61%). Our approach also yielded comparable results to the baselines in synthesizing naturalness inputs, and we found a positive correlation between the coverage of critical paths and the number of failed tests in DNN fault localization.
翻译:深度学习已革新了众多实际应用,但深度神经网络(DNN)的质量问题仍备受关注。DNN结构复杂且拥有数百万参数,难以确定每个参数对任务完成的贡献。此外,DNN的行为高度受训练数据影响,导致难以收集足够数据以覆盖所有可能场景下的潜在行为。本文提出NP-SBFL方法,利用频谱故障定位(SBFL)技术定位故障神经通路(NP)。该方法通过层次相关性传播(LRP)技术识别关键神经元,并判定哪些关键神经元存在故障。同时,我们提出多阶段梯度上升(MGA)——梯度上升(GA)的扩展方法,能够依次激活单个神经元并保持先前神经元的激活状态,从而有效测试已报告的故障通路。我们在MNIST和CIFAR-10两个常用数据集上,以DeepFault和NP-SBFL-GA为基线方法,采用Tarantula、Ochiai和Barinel三种可疑神经元度量标准,评估了所提方法NP-SBFL-MGA的有效性。实验结果表明,在识别可疑路径和生成对抗性输入方面,NP-SBFL-MGA的统计效能显著优于基线方法。特别地,基于Tarantula度量的NP-SBFL-MGA方法故障检测率达到96.75%,超越了基于Ochiai的DeepFault(89.90%)和基于Ochiai的NP-SBFL-GA方法(60.61%)。在生成自然性输入方面,该方法与基线方法性能相当,且我们发现在DNN故障定位中,关键路径覆盖率与失败测试数量呈正相关关系。