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 a novel NP-SBFL method that adapts spectrum-based fault localization (SBFL) to locate faulty neural pathways. Our method identifies critical neurons using the layer-wise relevance propagation (LRP) technique and determines which critical neurons are faulty. We propose a multi-stage gradient ascent (MGA), an extension of gradient ascent, to effectively activate a sequence of neurons one at a time while maintaining the activation of previous neurons. We evaluated the effectiveness of our method 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.
翻译:深度学习已彻底改变了诸多实际应用,但深度神经网络的质量仍令人担忧。深度神经网络结构复杂且拥有数百万个参数,导致难以确定其在完成任务中的贡献。此外,深度神经网络的行为高度受训练数据影响,使得收集足够数据以覆盖所有可能场景下的全部潜在行为变得极具挑战性。本文提出一种新颖的NP-SBFL方法,该方法通过调整基于频谱的故障定位技术来定位故障神经通路。我们的方法利用逐层相关性传播技术识别关键神经元,并判定哪些关键神经元存在故障。我们提出多阶段梯度上升算法——即梯度上升的扩展版本,以在保持前序神经元激活状态的同时,有效地逐个激活神经元序列。我们在两个常用数据集MNIST和CIFAR-10上,基于DeepFault和NP-SBFL-GA两个基线方法,以及Tarantula、Ochiai和Barinel三种可疑神经元度量指标,评估了所提方法的有效性。实验结果表明,NP-SBFL-MGA在识别可疑路径和合成对抗性输入方面统计上显著优于基线方法。特别地,基于NP-SBFL-MGA的Tarantula指标在故障检测率上达到96.75%,超越了基于Ochiai的DeepFault(89.90%)和基于Ochiai的NP-SBFL-GA(60.61%)。我们的方法在合成自然性输入方面与基线方法结果相当,并且我们发现深度神经网络故障定位中关键路径覆盖率与失败测试数量之间存在正相关性。