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 谷歌翻译
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 谷歌翻译
检测分配(OOD)输入对于安全部署现实世界的深度学习模型至关重要。在评估良性分布和OOD样品时,检测OOD示例的现有方法很好。然而,在本文中,我们表明,当在分发的分布和OOD输入时,现有的检测机制可以极其脆弱,其具有最小的对抗扰动,这不会改变其语义。正式地,我们广泛地研究了对共同的检测方法的强大分布检测问题,并表明最先进的OOD探测器可以通过对分布和ood投入增加小扰动来容易地欺骗。为了抵消这些威胁,我们提出了一种称为芦荟的有效算法,它通过将模型暴露于对抗性inlier和异常值示例来执行鲁棒训练。我们的方法可以灵活地结合使用,并使现有方法稳健。在共同的基准数据集上,我们表明芦荟大大提高了最新的ood检测的稳健性,对CiFar-10和46.59%的CiFar-100改善了58.4%的Auroc改善。
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 谷歌翻译
检测到分布输入对于在现实世界中安全部署机器学习模型至关重要。然而,已知神经网络遭受过度自信的问题,在该问题中,它们对分布和分布的输入的信心异常高。在这项工作中,我们表明,可以通过在训练中实施恒定的向量规范来通过logit归一化(logitnorm)(logitnorm)来缓解此问题。我们的方法是通过分析的激励,即logit的规范在训练过程中不断增加,从而导致过度自信的产出。因此,LogitNorm背后的关键思想是将网络优化期间输出规范的影响解散。通过LogitNorm培训,神经网络在分布数据和分布数据之间产生高度可区分的置信度得分。广泛的实验证明了LogitNorm的优势,在公共基准上,平均FPR95最高为42.30%。
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 谷歌翻译
深度神经网络对各种任务取得了出色的性能,但它们具有重要问题:即使对于完全未知的样本,也有过度自信的预测。已经提出了许多研究来成功过滤出这些未知的样本,但它们仅考虑狭窄和特定的任务,称为错误分类检测,开放式识别或分布外检测。在这项工作中,我们认为这些任务应该被视为根本存在相同的问题,因为理想的模型应该具有所有这些任务的检测能力。因此,我们介绍了未知的检测任务,以先前的单独任务的整合,用于严格检查深度神经网络对广谱的广泛未知样品的检测能力。为此,构建了不同尺度上的统一基准数据集,并且存在现有流行方法的未知检测能力进行比较。我们发现深度集合始终如一地优于检测未知的其他方法;但是,所有方法只针对特定类型的未知方式成功。可重复的代码和基准数据集可在https://github.com/daintlab/unknown-detection-benchmarks上获得。
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 谷歌翻译
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 谷歌翻译
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 谷歌翻译
本文重点介绍了用神经网络检测分配(OOD)样本的问题。在图像识别任务,训练过的分类往往给人高置信度的远离中分布(ID)数据输入图像,这大大限制了它在现实世界中的应用。为了减轻这个问题,我们提出了一个基于GaN的边界意识分类器(GBAC),用于生成仅包含大多数ID数据的关闭超空间。我们的方法基于传统的神经网分离特征空间作为几个不适合于ood检测的未闭合区域。与GBAC作为辅助模块,封闭的超空间分布以外的OOD数据将具有低得多的分数被分配,允许更有效的检测OOD同时维持分级性能。此外,我们提出了一种快速采样方法,用于产生躺在预先提及的闭合空间的边界上的硬度陈述。在几个数据集和神经网络架构上采取的实验承诺GBAC的有效性。
translated by 谷歌翻译
机器学习模型通常会遇到与训练分布不同的样本。无法识别分布(OOD)样本,因此将该样本分配给课堂标签会显着损害模​​型的可靠性。由于其对在开放世界中的安全部署模型的重要性,该问题引起了重大关注。由于对所有可能的未知分布进行建模的棘手性,检测OOD样品是具有挑战性的。迄今为止,一些研究领域解决了检测陌生样本的问题,包括异常检测,新颖性检测,一级学习,开放式识别识别和分布外检测。尽管有相似和共同的概念,但分别分布,开放式检测和异常检测已被独立研究。因此,这些研究途径尚未交叉授粉,创造了研究障碍。尽管某些调查打算概述这些方法,但它们似乎仅关注特定领域,而无需检查不同领域之间的关系。这项调查旨在在确定其共同点的同时,对各个领域的众多著名作品进行跨域和全面的审查。研究人员可以从不同领域的研究进展概述中受益,并协同发展未来的方法。此外,据我们所知,虽然进行异常检测或单级学习进行了调查,但没有关于分布外检测的全面或最新的调查,我们的调查可广泛涵盖。最后,有了统一的跨域视角,我们讨论并阐明了未来的研究线,打算将这些领域更加紧密地融为一体。
translated by 谷歌翻译
分销(OOD)检测对于在现实世界中部署机器学习模型是重要的,其中来自移位分布的测试数据可以自然地出现。虽然最近出现了何种算法方法,但何种算法检测,临界差距仍然存在理论上。在这项工作中,我们开发了一个分析框架,其特征,并统一了对OOD检测的理论理解。我们的分析框架激励了一种新颖的电子网络,创业板的检测方法,展示了理论和经验的优势。特别是,在CIFAR-100作为分布数据中,我们的方法优于竞争性基线16.57%(FPR95)。最后,我们正式提供可证明的保证和对我们的方法进行全面分析,支撑数据分布的各种性能如何影响OOD检测的性能。
translated by 谷歌翻译
检测到分布(OOD)数据是一项任务,它正在接受计算机视觉的深度学习领域越来越多的研究注意力。但是,通常在隔离任务上评估检测方法的性能,而不是考虑串联中的潜在下游任务。在这项工作中,我们检查了存在OOD数据(SCOD)的选择性分类。也就是说,检测OOD样本的动机是拒绝它们,以便降低它们对预测质量的影响。我们在此任务规范下表明,与仅在OOD检测时进行评估时,现有的事后方法的性能大不相同。这是因为如果ID数据被错误分类,将分布分配(ID)数据与OOD数据混合在一起的问题不再是一个问题。但是,正确和不正确的预测的ID数据中的汇合变得不受欢迎。我们还提出了一种新颖的SCOD,SoftMax信息保留(SIRC)的方法,该方法通过功能不足信息来增强基于软疗法的置信度得分,以便在不牺牲正确和错误的ID预测之间的分离的情况下,可以提高其识别OOD样品的能力。在各种成像网尺度数据集和卷积神经网络体系结构上进行的实验表明,SIRC能够始终如一地匹配或胜过SCOD的基线,而现有的OOD检测方法则无法做到。
translated by 谷歌翻译
检测分销(OOD)输入是安全部署现实世界中的机器学习模型的中央挑战。以前的方法通常依赖于从过度分辨率的重量空间衍生的评分,同时在很大程度上忽略了稀疏的作用。在本文中,我们揭示了重要的见解,即依赖对不重要的权重和单位可以直接归因于“ood检测的脆性”。为了减轻这个问题,我们提出了一个基于稀疏的oo ood检测框架被称为骰子。我们的关键思想是基于贡献的衡量标准进行排序,并选择性地使用最突出的重量来导出OOD检测的输出。我们提供了实证和理论洞察力,表征和解释了骰子改善的机制。通过修剪嘈杂的信号,骰子可否降低OOD数据的输出方差,从而导致输出分布和更强的ID数据可分离。骰子表现出色,与先前的最佳方法相比,将FPR95减少至多24.69%。
translated by 谷歌翻译
我们考虑使用深度神经网络时检测到(分发外)输入数据的问题,并提出了一种简单但有效的方法来提高几种流行的ood检测方法对标签换档的鲁棒性。我们的作品是通过观察到的,即大多数现有的OOD检测算法考虑整个训练/测试数据,无论每个输入激活哪个类进入(级别差异)。通过广泛的实验,我们发现这种做法导致探测器,其性能敏感,易于标记换档。为了解决这个问题,我们提出了一种类别的阈值方案,可以适用于大多数现有的OOD检测算法,并且即使在测试分布的标签偏移存在下也可以保持相似的OOD检测性能。
translated by 谷歌翻译
由于其实际重要性,在提高神经网络安全部署方面的实际重要性,最近经济分配(OOD)检测最近受到了很大的关注。其中一个主要挑战是模型往往会对OOD数据产生高度自信的预测,这在ood检测中破坏了驾驶原理,即该模型应该仅对分布式样品充满信心。在这项工作中,我们提出了反应 - 一种简单有效的技术,用于减少对数据数据的模型过度限制。我们的方法是通过关于神经网络内部激活的新型分析,其为OOD分布显示出高度独特的签名模式。我们的方法可以有效地拓展到不同的网络架构和不同的OOD检测分数。我们经验证明,反应在全面的基准数据集套件上实现了竞争检测性能,并为我们的方法进行了理论解释。与以前的最佳方法相比,在ImageNet基准测试中,反应将假阳性率(FPR95)降低25.05%。
translated by 谷歌翻译
本文我们的目标是利用异质的温度缩放作为校准策略(OOD)检测。此处的异质性是指每个样品的最佳温度参数可能不同,而不是传统的方法对整个分布使用相同的值。为了实现这一目标,我们提出了一种称为锚定的新培训策略,可以估算每个样品的适当温度值,从而导致几个基准的最新OOD检测性能。使用NTK理论,我们表明该温度函数估计与分类器的认知不确定性紧密相关,这解释了其行为。与某些表现最佳的OOD检测方法相反,我们的方法不需要暴露于其他离群数据集,自定义校准目标或模型结合。通过具有不同OOD检测设置的经验研究 - 远处,OOD附近和语义相干OOD - 我们建立了一种高效的OOD检测方法。可以在此处访问代码和模型-https://github.com/rushilanirudh/amp
translated by 谷歌翻译
We consider the two related problems of detecting if an example is misclassified or out-of-distribution. We present a simple baseline that utilizes probabilities from softmax distributions. Correctly classified examples tend to have greater maximum softmax probabilities than erroneously classified and out-of-distribution examples, allowing for their detection. We assess performance by defining several tasks in computer vision, natural language processing, and automatic speech recognition, showing the effectiveness of this baseline across all. We then show the baseline can sometimes be surpassed, demonstrating the room for future research on these underexplored detection tasks.
translated by 谷歌翻译
已知神经网络在输入图像上产生过度自信的预测,即使这些图像不存在(OOD)样本。这限制了神经网络模型在存在OOD样本的实际场景中的应用。许多现有方法通过利用各种提示来确定OOD实例,例如在特征空间,逻辑空间,梯度空间或图像的原始空间中查找不规则模式。相反,本文提出了一种简单的测试时间线性训练(ETLT)用于OOD检测方法。从经验上讲,我们发现输入图像的概率不存在,与神经网络提取的功能令人惊讶地线性相关。具体来说,许多最先进的OOD算法虽然旨在以不同的方式衡量可靠性,但实际上导致OOD得分主要与其图像特征线性相关。因此,通过简单地学习从配对图像特征训练并在测试时间推断的OOD分数的线性回归模型,我们可以为测试实例做出更精确的OOD预测。我们进一步提出了该方法的在线变体,该变体可以实现有希望的性能,并且在现实世界中更为实用。值得注意的是,我们将FPR95从$ 51.37 \%$提高到CIFAR-10数据集的$ 12.30 \%$,最大的SoftMax概率是基本的OOD检测器。在几个基准数据集上进行的广泛实验显示了ETLT对OOD检测任务的功效。
translated by 谷歌翻译