[论文解读] Detecting Anomalous Inputs to DNN Classifiers By Joint Statistical Testing at the Layers.
该论文提出了一种无监督的统计框架,通过联合测试神经网络内部层表示的类别条件分布,检测深度神经网络(DNN)分类器中的对抗性输入和分布外(OOD)输入。通过在各层计算p值,并利用评分函数进行组合,该方法能够以高精度识别异常输入,在基准数据集上的表现优于或匹配五种最先进的检测方法。
Detecting anomalous inputs, such as adversarial and out-of-distribution (OOD) inputs, is critical for classifiers deployed in real-world applications, especially deep neural network (DNN) classifiers that are known to be brittle on such inputs. We propose an unsupervised statistical testing framework for detecting such anomalous inputs to a trained DNN classifier based on its internal layer representations. By calculating test statistics at the input and intermediate-layer representations of the DNN, conditioned individually on the predicted class and on the true class of labeled training data, the method characterizes their class-conditional distributions on natural inputs. Given a test input, its extent of non-conformity with respect to the training distribution is captured using p-values of the class-conditional test statistics across the layers, which are then combined using a scoring function designed to score high on anomalous inputs. We focus on adversarial inputs, which are an important class of anomalous inputs, and also demonstrate the effectiveness of our method on general OOD inputs. The proposed framework also provides an alternative class prediction that can be used to correct the DNNs prediction on (detected) adversarial inputs. Experiments on well-known image classification datasets with strong adversarial attacks, including a custom attack method that uses the internal layer representations of the DNN, demonstrate that our method outperforms or performs comparably with five recently-proposed, competing detection methods.
研究动机与目标
- 解决在实际部署的DNN分类器中检测对抗性输入和分布外(OOD)输入这一关键挑战,因为这些模型在面对此类输入时表现脆弱。
- 开发一种无监督方法,训练过程中无需访问对抗性样本,从而具备广泛适用性。
- 利用标记的训练数据中派生出的类别条件统计量,刻画自然输入在输入层和中间层的分布特性。
- 提供一种可靠的异常检测机制,在异常输入上得分较高,同时在检测到异常时支持生成修正后的预测。
- 在强对抗性攻击下表现出鲁棒性,包括一种新型攻击,该攻击专门针对网络内部层表示。
提出的方法
- 在DNN的输入层和中间层表示上分别计算测试统计量,条件分别基于训练样本的预测类别和真实类别。
- 利用标记的训练数据估计这些测试统计量的类别条件分布,以建模自然输入的预期行为。
- 对于测试输入,计算其在各层上与学习到的类别条件分布的非一致性程度,即p值。
- 使用设计用于增强异常输入得分的评分函数,将各层的p值进行组合,从而实现有效的检测。
- 利用相同的统计框架,在输入被标记为异常时生成替代的、修正后的类别预测。
- 使用一种专门针对内部层表示的自定义对抗性攻击,以严格评估检测框架的鲁棒性。
实验结果
研究问题
- RQ1与单层或非统计方法相比,跨多个DNN层进行联合统计检验是否能提升对对抗性输入和OOD输入的检测能力?
- RQ2该方法在检测由强攻击生成的对抗性样本方面效果如何,包括那些利用内部层表示的攻击?
- RQ3当检测到输入为异常时,该方法是否能提供可靠的替代预测,从而提升分类器的鲁棒性?
- RQ4在各层上使用类别条件测试统计量是否能带来比现有无监督方法更好的泛化能力和检测性能?
- RQ5在分布偏移条件下,以及在对抗性样本之外的多样化OOD输入上,该方法表现如何?
主要发现
- 在强对抗性攻击下,该方法在标准图像分类基准数据集上的表现优于或匹配五种近期提出的检测方法。
- 即使面对一种专门针对内部层表示的自定义对抗性攻击,该框架仍能实现高检测性能,展现出良好的鲁棒性。
- 利用多层类别条件统计检验得到的p值,能够有效检测偏离自然数据分布的输入。
- 该方法能为检测到的对抗性输入提供修正后的预测,为实际部署中提升分类器可靠性提供了实用机制。
- 基于组合各层p值的评分函数能有效放大异常信号,从而在多样化的测试场景中实现强劲的检测性能。
- 该方法为无监督方法,训练过程中无需对抗性样本,因此可广泛应用于现有DNN分类器。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。