论文标题
深层神经网络的动态切片
Dynamic Slicing for Deep Neural Networks
论文作者
论文摘要
程序切片已被广泛应用于各种软件工程任务。但是,现有程序切片技术仅处理由指令和变量构建的传统程序,而不是由神经元和突触组成的神经网络。在本文中,我们提出了NNSlicer,这是基于数据流量分析切片的深层神经网络的第一种方法。我们的方法根据输入激活的行为与整个数据集的平均行为激活的行为之间的差异了解每个神经元对输入的反应。然后,我们通过从输出神经元中递归回溯来量化对切片标准的神经元贡献,并将切片计算为具有较大贡献的神经元和突触。我们证明了NNSlicer对三种应用的有用性和有效性,包括对抗输入检测,模型修剪和选择性模型保护。在所有应用中,NNSlicer都显着优于其他不依赖数据流分析的基线。
Program slicing has been widely applied in a variety of software engineering tasks. However, existing program slicing techniques only deal with traditional programs that are constructed with instructions and variables, rather than neural networks that are composed of neurons and synapses. In this paper, we propose NNSlicer, the first approach for slicing deep neural networks based on data flow analysis. Our method understands the reaction of each neuron to an input based on the difference between its behavior activated by the input and the average behavior over the whole dataset. Then we quantify the neuron contributions to the slicing criterion by recursively backtracking from the output neurons, and calculate the slice as the neurons and the synapses with larger contributions. We demonstrate the usefulness and effectiveness of NNSlicer with three applications, including adversarial input detection, model pruning, and selective model protection. In all applications, NNSlicer significantly outperforms other baselines that do not rely on data flow analysis.