Detecting test samples drawn sufficiently far away from the training distribution statistically or adversarially is a fundamental requirement for deploying a good classifier in many real-world machine learning applications. However, deep neural networks with the softmax classifier are known to produce highly overconfident posterior distributions even for such abnormal samples. In this paper, we propose a simple yet effective method for detecting any abnormal samples, which is applicable to any pre-trained softmax neural classifier. We obtain the class conditional Gaussian distributions with respect to (low-and upper-level) features of the deep models under Gaussian discriminant analysis, which result in a confidence score based on the Mahalanobis distance. While most prior methods have been evaluated for detecting either out-of-distribution or adversarial samples, but not both, the proposed method achieves the state-of-the-art performances for both cases in our experiments. Moreover, we found that our proposed method is more robust in harsh cases, e.g., when the training dataset has noisy labels or small number of samples. Finally, we show that the proposed method enjoys broader usage by applying it to class-incremental learning: whenever out-of-distribution samples are detected, our classification rule can incorporate new classes well without further training deep models.
translated by 谷歌翻译
The problem of detecting whether a test sample is from in-distribution (i.e., training distribution by a classifier) or out-of-distribution sufficiently different from it arises in many real-world machine learning applications. However, the state-of-art deep neural networks are known to be highly overconfident in their predictions, i.e., do not distinguish in-and out-of-distributions. Recently, to handle this issue, several threshold-based detectors have been proposed given pre-trained neural classifiers. However, the performance of prior works highly depends on how to train the classifiers since they only focus on improving inference procedures. In this paper, we develop a novel training method for classifiers so that such inference algorithms can work better. In particular, we suggest two additional terms added to the original loss (e.g., cross entropy). The first one forces samples from out-of-distribution less confident by the classifier and the second one is for (implicitly) generating most effective training samples for the first one. In essence, our method jointly trains both classification and generative neural networks for out-of-distribution. We demonstrate its effectiveness using deep convolutional neural networks on various popular image datasets.
translated by 谷歌翻译
深度学习中的关键挑战之一是检测对抗例的有效策略的定义。为此,我们提出了一种名为Ensemble对抗探测器(EAD)的新型方法,用于识别对抗性示例,在标准的多字节分类场景中。 EAD结合了多个检测器,该检测器利用了预先训练的深神经网络(DNN)内部表示中的输入实例的不同属性。具体而言,EAD基于Mahalanobis距离和局部内在的维度(盖子)与基于单级支持向量机(OSVM)的新引进的方法集成了最先进的探测器。尽管所有构成方法都假定测试实例从一组正确分类的训练实例的距离越大,但概率越高,其是对手示例的概率越高,它们在计算距离的方式中不同。为了利用不同方法的有效性在捕获数据分布的不同特性,因此,有效地解决泛化和过度装备之间的权衡,EAD采用探测器特定的距离分数作为逻辑回归分类器的特征,独立的超公数后优化。我们在不同的数据集(CIFAR-10,CiFar-100和SVHN)和模型(Reset和Densenet)上评估了EAD方法,以及通过与竞争方法进行比较,关于四个对抗性攻击(FGSM,BIM,DeepFool和CW)。总的来说,我们表明EAD达到了最大的Auroc和Aupr在大多数设置和其他方面的表现。对现有技术的改进以及容易延伸EAD以包括任何任意探测器的可能性,铺平了在普遍示例性检测的广场上广泛采用的集合方法。
translated by 谷歌翻译
We consider the problem of detecting out-of-distribution images in neural networks. We propose ODIN, a simple and effective method that does not require any change to a pre-trained neural network. Our method is based on the observation that using temperature scaling and adding small perturbations to the input can separate the softmax score distributions between in-and out-of-distribution images, allowing for more effective detection. We show in a series of experiments that ODIN is compatible with diverse network architectures and datasets. It consistently outperforms the baseline approach (Hendrycks & Gimpel, 2017) by a large margin, establishing a new state-of-the-art performance on this task. For example, ODIN reduces the false positive rate from the baseline 34.7% to 4.3% on the DenseNet (applied to CIFAR-10 and Tiny-ImageNet) when the true positive rate is 95%.
translated by 谷歌翻译
已知现代深度神经网络模型将错误地将分布式(OOD)测试数据分类为具有很高信心的分数(ID)培训课程之一。这可能会对关键安全应用产生灾难性的后果。一种流行的缓解策略是训练单独的分类器,该分类器可以在测试时间检测此类OOD样本。在大多数实际设置中,在火车时间尚不清楚OOD的示例,因此,一个关键问题是:如何使用合成OOD样品来增加ID数据以训练这样的OOD检测器?在本文中,我们为称为CNC的OOD数据增强提出了一种新颖的复合腐败技术。 CNC的主要优点之一是,除了培训集外,它不需要任何固定数据。此外,与当前的最新技术(SOTA)技术不同,CNC不需要在测试时间进行反向传播或结合,从而使我们的方法在推断时更快。我们与过去4年中主要会议的20种方法进行了广泛的比较,表明,在OOD检测准确性和推理时间方面,使用基于CNC的数据增强训练的模型都胜过SOTA。我们包括详细的事后分析,以研究我们方法成功的原因,并确定CNC样本的较高相对熵和多样性是可能的原因。我们还通过对二维数据集进行零件分解分析提供理论见解,以揭示(视觉和定量),我们的方法导致ID类别周围的边界更紧密,从而更好地检测了OOD样品。源代码链接:https://github.com/cnc-ood
translated by 谷歌翻译
检测分配(OOD)输入对于安全部署现实世界的深度学习模型至关重要。在评估良性分布和OOD样品时,检测OOD示例的现有方法很好。然而,在本文中,我们表明,当在分发的分布和OOD输入时,现有的检测机制可以极其脆弱,其具有最小的对抗扰动,这不会改变其语义。正式地,我们广泛地研究了对共同的检测方法的强大分布检测问题,并表明最先进的OOD探测器可以通过对分布和ood投入增加小扰动来容易地欺骗。为了抵消这些威胁,我们提出了一种称为芦荟的有效算法,它通过将模型暴露于对抗性inlier和异常值示例来执行鲁棒训练。我们的方法可以灵活地结合使用,并使现有方法稳健。在共同的基准数据集上,我们表明芦荟大大提高了最新的ood检测的稳健性,对CiFar-10和46.59%的CiFar-100改善了58.4%的Auroc改善。
translated by 谷歌翻译
机器学习模型通常会遇到与训练分布不同的样本。无法识别分布(OOD)样本,因此将该样本分配给课堂标签会显着损害模​​型的可靠性。由于其对在开放世界中的安全部署模型的重要性,该问题引起了重大关注。由于对所有可能的未知分布进行建模的棘手性,检测OOD样品是具有挑战性的。迄今为止,一些研究领域解决了检测陌生样本的问题,包括异常检测,新颖性检测,一级学习,开放式识别识别和分布外检测。尽管有相似和共同的概念,但分别分布,开放式检测和异常检测已被独立研究。因此,这些研究途径尚未交叉授粉,创造了研究障碍。尽管某些调查打算概述这些方法,但它们似乎仅关注特定领域,而无需检查不同领域之间的关系。这项调查旨在在确定其共同点的同时,对各个领域的众多著名作品进行跨域和全面的审查。研究人员可以从不同领域的研究进展概述中受益,并协同发展未来的方法。此外,据我们所知,虽然进行异常检测或单级学习进行了调查,但没有关于分布外检测的全面或最新的调查,我们的调查可广泛涵盖。最后,有了统一的跨域视角,我们讨论并阐明了未来的研究线,打算将这些领域更加紧密地融为一体。
translated by 谷歌翻译
Deep neural networks have attained remarkable performance when applied to data that comes from the same distribution as that of the training set, but can significantly degrade otherwise. Therefore, detecting whether an example is out-of-distribution (OoD) is crucial to enable a system that can reject such samples or alert users. Recent works have made significant progress on OoD benchmarks consisting of small image datasets. However, many recent methods based on neural networks rely on training or tuning with both in-distribution and out-of-distribution data. The latter is generally hard to define a-priori, and its selection can easily bias the learning. We base our work on a popular method ODIN 1 [21], proposing two strategies for freeing it from the needs of tuning with OoD data, while improving its OoD detection performance. We specifically propose to decompose confidence scoring as well as a modified input pre-processing method. We show that both of these significantly help in detection performance. Our further analysis on a larger scale image dataset shows that the two types of distribution shifts, specifically semantic shift and non-semantic shift, present a significant difference in the difficulty of the problem, providing an analysis of when ODIN-like strategies do or do not work.
translated by 谷歌翻译
Novelty detection, i.e., identifying whether a given sample is drawn from outside the training distribution, is essential for reliable machine learning. To this end, there have been many attempts at learning a representation well-suited for novelty detection and designing a score based on such representation. In this paper, we propose a simple, yet effective method named contrasting shifted instances (CSI), inspired by the recent success on contrastive learning of visual representations. Specifically, in addition to contrasting a given sample with other instances as in conventional contrastive learning methods, our training scheme contrasts the sample with distributionally-shifted augmentations of itself. Based on this, we propose a new detection score that is specific to the proposed training scheme. Our experiments demonstrate the superiority of our method under various novelty detection scenarios, including unlabeled one-class, unlabeled multi-class and labeled multi-class settings, with various image benchmark datasets. Code and pre-trained models are available at https://github.com/alinlab/CSI.
translated by 谷歌翻译
背景。通常,深度神经网络(DNN)概括了从类似于训练集的分布的样本概括。然而,当测试样本从不同的分布中抽出时,DNNS的预测是脆性和不可靠的。这是在现实世界应用中部署的主要关注点,这种行为可能以相当大的成本,例如工业生产线,自治车辆或医疗保健应用。贡献。我们将DNN中的分布(OOD)检测出来作为统计假设检测问题。在我们所提出的框架内产生的测试将证据组合来自整个网络。与以前的检测启发式不同,此框架返回每个测试样本的$ p $ -value。有保证维护I型错误(T1E - 错误地识别OOD样本为ID)进行测试数据。此外,这允许在保持T1E的同时组合多个检测器。在此框架上建立,我们建议一种基于低阶统计数据的新型程序。我们的方法在不接受的EOD基准上的最新方法实现了比较或更好的结果,而无需再培训网络参数或假设测试分配的现有知识 - 并且以计算成本的一小部分。
translated by 谷歌翻译
诸如深神经网络(DNN)之类的机器学习方法,尽管他们在不同域中取得了成功,但是众所周知,通常在训练分布之外的输入上具有高信心产生不正确的预测。在安全关键域中的DNN部署需要检测分配超出(OOD)数据,以便DNN可以避免对那些人进行预测。最近已经开发了许多方法,以便检测,但仍有改进余地。我们提出了新的方法IdeCode,利用了用于共形OOD检测的分销标准。它依赖于在电感共形异常检测框架中使用的新基础非符合性测量和新的聚合方法,从而保证了有界误报率。我们通过在图像和音频数据集上的实验中展示了IDecode的功效,获得了最先进的结果。我们还表明Idecode可以检测对抗性示例。
translated by 谷歌翻译
本文重点介绍了用神经网络检测分配(OOD)样本的问题。在图像识别任务,训练过的分类往往给人高置信度的远离中分布(ID)数据输入图像,这大大限制了它在现实世界中的应用。为了减轻这个问题,我们提出了一个基于GaN的边界意识分类器(GBAC),用于生成仅包含大多数ID数据的关闭超空间。我们的方法基于传统的神经网分离特征空间作为几个不适合于ood检测的未闭合区域。与GBAC作为辅助模块,封闭的超空间分布以外的OOD数据将具有低得多的分数被分配,允许更有效的检测OOD同时维持分级性能。此外,我们提出了一种快速采样方法,用于产生躺在预先提及的闭合空间的边界上的硬度陈述。在几个数据集和神经网络架构上采取的实验承诺GBAC的有效性。
translated by 谷歌翻译
深度神经网络针对对抗性例子的脆弱性已成为将这些模型部署在敏感领域中的重要问题。事实证明,针对这种攻击的明确防御是具有挑战性的,依赖于检测对抗样本的方法只有在攻击者忽略检测机制时才有效。在本文中,我们提出了一种原则性的对抗示例检测方法,该方法可以承受规范受限的白色框攻击。受K类分类问题的启发,我们训练K二进制分类器,其中I-th二进制分类器用于区分I类的清洁数据和其他类的对抗性样本。在测试时,我们首先使用训练有素的分类器获取输入的预测标签(例如k),然后使用k-th二进制分类器来确定输入是否为干净的样本(k类)或对抗的扰动示例(其他类)。我们进一步设计了一种生成方法来通过将每个二进制分类器解释为类别条件数据的无标准密度模型来检测/分类对抗示例。我们提供上述对抗性示例检测/分类方法的全面评估,并证明其竞争性能和引人注目的特性。
translated by 谷歌翻译
尽管机器学习系统的效率和可扩展性,但最近的研究表明,许多分类方法,尤其是深神经网络(DNN),易受对抗的例子;即,仔细制作欺骗训练有素的分类模型的例子,同时无法区分从自然数据到人类。这使得在安全关键区域中应用DNN或相关方法可能不安全。由于这个问题是由Biggio等人确定的。 (2013)和Szegedy等人。(2014年),在这一领域已经完成了很多工作,包括开发攻击方法,以产生对抗的例子和防御技术的构建防范这些例子。本文旨在向统计界介绍这一主题及其最新发展,主要关注对抗性示例的产生和保护。在数值实验中使用的计算代码(在Python和R)公开可用于读者探讨调查的方法。本文希望提交人们将鼓励更多统计学人员在这种重要的令人兴奋的领域的产生和捍卫对抗的例子。
translated by 谷歌翻译
我们建议利用梯度检测对抗和分布样品。我们介绍了混杂标签(与训练过程中的正常标签不同),以探测神经网络的有效表达性。梯度描述了模型正确表示给定输入所需的变化量,从而洞悉了网络体系结构属性建立的模型的代表力以及培训数据。通过引入不同设计的标签,我们消除了对推理期间梯度生成的地面真相标签的依赖。我们表明,我们的基于梯度的方法可以根据模型的有效表达性捕获异常,而没有超参数调整或其他处理,并且优于对抗和分布检测的最先进方法。
translated by 谷歌翻译
深度神经网络对各种任务取得了出色的性能,但它们具有重要问题:即使对于完全未知的样本,也有过度自信的预测。已经提出了许多研究来成功过滤出这些未知的样本,但它们仅考虑狭窄和特定的任务,称为错误分类检测,开放式识别或分布外检测。在这项工作中,我们认为这些任务应该被视为根本存在相同的问题,因为理想的模型应该具有所有这些任务的检测能力。因此,我们介绍了未知的检测任务,以先前的单独任务的整合,用于严格检查深度神经网络对广谱的广泛未知样品的检测能力。为此,构建了不同尺度上的统一基准数据集,并且存在现有流行方法的未知检测能力进行比较。我们发现深度集合始终如一地优于检测未知的其他方法;但是,所有方法只针对特定类型的未知方式成功。可重复的代码和基准数据集可在https://github.com/daintlab/unknown-detection-benchmarks上获得。
translated by 谷歌翻译
It is important to detect anomalous inputs when deploying machine learning systems. The use of larger and more complex inputs in deep learning magnifies the difficulty of distinguishing between anomalous and in-distribution examples. At the same time, diverse image and text data are available in enormous quantities. We propose leveraging these data to improve deep anomaly detection by training anomaly detectors against an auxiliary dataset of outliers, an approach we call Outlier Exposure (OE). This enables anomaly detectors to generalize and detect unseen anomalies. In extensive experiments on natural language processing and small-and large-scale vision tasks, we find that Outlier Exposure significantly improves detection performance. We also observe that cutting-edge generative models trained on CIFAR-10 may assign higher likelihoods to SVHN images than to CIFAR-10 images; we use OE to mitigate this issue. We also analyze the flexibility and robustness of Outlier Exposure, and identify characteristics of the auxiliary dataset that improve performance.
translated by 谷歌翻译
深度学习(DL)在许多与人类相关的任务中表现出巨大的成功,这导致其在许多计算机视觉的基础应用中采用,例如安全监控系统,自治车辆和医疗保健。一旦他们拥有能力克服安全关键挑战,这种安全关键型应用程序必须绘制他们的成功部署之路。在这些挑战中,防止或/和检测对抗性实例(AES)。对手可以仔细制作小型,通常是难以察觉的,称为扰动的噪声被添加到清洁图像中以产生AE。 AE的目的是愚弄DL模型,使其成为DL应用的潜在风险。在文献中提出了许多测试时间逃避攻击和对策,即防御或检测方法。此外,还发布了很少的评论和调查,理论上展示了威胁的分类和对策方法,几乎​​没有焦点检测方法。在本文中,我们专注于图像分类任务,并试图为神经网络分类器进行测试时间逃避攻击检测方法的调查。对此类方法的详细讨论提供了在四个数据集的不同场景下的八个最先进的探测器的实验结果。我们还为这一研究方向提供了潜在的挑战和未来的观点。
translated by 谷歌翻译
Determining whether inputs are out-of-distribution (OOD) is an essential building block for safely deploying machine learning models in the open world. However, previous methods relying on the softmax confidence score suffer from overconfident posterior distributions for OOD data. We propose a unified framework for OOD detection that uses an energy score. We show that energy scores better distinguish in-and out-of-distribution samples than the traditional approach using the softmax scores. Unlike softmax confidence scores, energy scores are theoretically aligned with the probability density of the inputs and are less susceptible to the overconfidence issue. Within this framework, energy can be flexibly used as a scoring function for any pre-trained neural classifier as well as a trainable cost function to shape the energy surface explicitly for OOD detection. On a CIFAR-10 pre-trained WideResNet, using the energy score reduces the average FPR (at TPR 95%) by 18.03% compared to the softmax confidence score. With energy-based training, our method outperforms the state-of-the-art on common benchmarks.
translated by 谷歌翻译
随着神经网络分类器部署在现实世界应用中,它们可以可靠地检测到它们的故障至关重要。一个实际解决方案是为每个预测分配置信度分数,然后使用这些分数来过滤可能的错误分类。然而,现有的置信度量尚未充分可靠地对此作用。本文介绍了一种新的框架,可以产生用于检测错误分类错误的定量度量。此框架红色在基本分类器的顶部构建错误检测器,并估计使用高斯过程的检测分数的不确定性。在125 UCI数据集上具有其他错误检测方法的实验比较证明了这种方法是有效的。在两个概率基础分类器上进一步实现以及视觉任务中的两个大型深度学习架构进一步证实了该方法是坚固且可扩展的。第三,用分布外和对抗样本的红色的实证分析表明,该方法不仅可以检测错误,还可以使用,而且可以了解它们来自哪里。因此,红色可以使用未来更广泛地提高神经网络分类器的可信度。
translated by 谷歌翻译