由于其在现实世界应用程序中部署机器学习模型中的重要性,因此无法分布(OOD)检测最近受到了机器学习社区的关注。在本文中,我们通过对特征的分布进行建模,提出了一种不确定性量化方法。我们进一步结合了一种有效的合奏机制,即批处理 - 构造批处理的随机神经网络(BE-SNN)并克服特征崩溃问题。我们将提出的BE-SNN的性能与其他最先进的方法进行了比较,并表明BE-SNN在几个OOD基准上产生了卓越的性能,例如两个漫画数据集,FashionMnist,FashionMnist vs Mnist Dataset,FashionMnistvs notmnist数据集和CIFAR10 vs SVHN数据集。
translated by 谷歌翻译
We propose a method for training a deterministic deep model that can find and reject out of distribution data points at test time with a single forward pass. Our approach, deterministic uncertainty quantification (DUQ), builds upon ideas of RBF networks. We scale training in these with a novel loss function and centroid updating scheme and match the accuracy of softmax models. By enforcing detectability of changes in the input using a gradient penalty, we are able to reliably detect out of distribution data. Our uncertainty quantification scales well to large datasets, and using a single model, we improve upon or match Deep Ensembles in out of distribution detection on notable difficult dataset pairs such as Fashion-MNIST vs. MNIST, and CIFAR-10 vs. SVHN.
translated by 谷歌翻译
检测到分布输入对于在现实世界中安全部署机器学习模型至关重要。然而,已知神经网络遭受过度自信的问题,在该问题中,它们对分布和分布的输入的信心异常高。在这项工作中,我们表明,可以通过在训练中实施恒定的向量规范来通过logit归一化(logitnorm)(logitnorm)来缓解此问题。我们的方法是通过分析的激励,即logit的规范在训练过程中不断增加,从而导致过度自信的产出。因此,LogitNorm背后的关键思想是将网络优化期间输出规范的影响解散。通过LogitNorm培训,神经网络在分布数据和分布数据之间产生高度可区分的置信度得分。广泛的实验证明了LogitNorm的优势,在公共基准上,平均FPR95最高为42.30%。
translated by 谷歌翻译
最近出现了一系列用于估计具有单个正向通行证的深神经网络中的认知不确定性的新方法,最近已成为贝叶斯神经网络的有效替代方法。在信息性表示的前提下,这些确定性不确定性方法(DUM)在检测到分布(OOD)数据的同时在推理时添加可忽略的计算成本时实现了强大的性能。但是,目前尚不清楚dums是否经过校准,可以无缝地扩展到现实世界的应用 - 这都是其实际部署的先决条件。为此,我们首先提供了DUMS的分类法,并在连续分配转移下评估其校准。然后,我们将它们扩展到语义分割。我们发现,尽管DUMS尺度到现实的视觉任务并在OOD检测方面表现良好,但当前方法的实用性受到分配变化下的校准不良而破坏的。
translated by 谷歌翻译
我们提出了对标准重新结构体系结构的简单修改 - 在特征空间上进行L2正则化 - 从前提出的深层确定性不确定性(DDU)基准中,它显着改善了分布外(OOD)的性能。这种变化还引起了早期神经塌陷(NC),我们证明这是一种更有可能的OOD性能的效果。我们的方法在基准的一小部分训练时间中实现了可比或优质的OOD检测分数和分类精度。此外,它基本上改善了多个随机初始化模型的最坏情况。尽管我们不建议NC是深神经网络(DNN)中OOD行为的唯一机制或全面解释,但我们认为NC的简单数学和几何结构可以为对未来工作中这种复杂现象的分析提供一个框架。
translated by 谷歌翻译
We present an approach to quantifying both aleatoric and epistemic uncertainty for deep neural networks in image classification, based on generative adversarial networks (GANs). While most works in the literature that use GANs to generate out-of-distribution (OoD) examples only focus on the evaluation of OoD detection, we present a GAN based approach to learn a classifier that produces proper uncertainties for OoD examples as well as for false positives (FPs). Instead of shielding the entire in-distribution data with GAN generated OoD examples which is state-of-the-art, we shield each class separately with out-of-class examples generated by a conditional GAN and complement this with a one-vs-all image classifier. In our experiments, in particular on CIFAR10, CIFAR100 and Tiny ImageNet, we improve over the OoD detection and FP detection performance of state-of-the-art GAN-training based classifiers. Furthermore, we also find that the generated GAN examples do not significantly affect the calibration error of our classifier and result in a significant gain in model accuracy.
translated by 谷歌翻译
本文我们的目标是利用异质的温度缩放作为校准策略(OOD)检测。此处的异质性是指每个样品的最佳温度参数可能不同,而不是传统的方法对整个分布使用相同的值。为了实现这一目标,我们提出了一种称为锚定的新培训策略,可以估算每个样品的适当温度值,从而导致几个基准的最新OOD检测性能。使用NTK理论,我们表明该温度函数估计与分类器的认知不确定性紧密相关,这解释了其行为。与某些表现最佳的OOD检测方法相反,我们的方法不需要暴露于其他离群数据集,自定义校准目标或模型结合。通过具有不同OOD检测设置的经验研究 - 远处,OOD附近和语义相干OOD - 我们建立了一种高效的OOD检测方法。可以在此处访问代码和模型-https://github.com/rushilanirudh/amp
translated by 谷歌翻译
Discriminative neural networks offer little or no performance guarantees when deployed on data not generated by the same process as the training distribution. On such out-of-distribution (OOD) inputs, the prediction may not only be erroneous, but confidently so, limiting the safe deployment of classifiers in real-world applications. One such challenging application is bacteria identification based on genomic sequences, which holds the promise of early detection of diseases, but requires a model that can output low confidence predictions on OOD genomic sequences from new bacteria that were not present in the training data. We introduce a genomics dataset for OOD detection that allows other researchers to benchmark progress on this important problem. We investigate deep generative model based approaches for OOD detection and observe that the likelihood score is heavily affected by population level background statistics. We propose a likelihood ratio method for deep generative models which effectively corrects for these confounding background statistics. We benchmark the OOD detection performance of the proposed method against existing approaches on the genomics dataset and show that our method achieves state-of-the-art performance. We demonstrate the generality of the proposed method by showing that it significantly improves OOD detection when applied to deep generative models of images.
translated by 谷歌翻译
由于其实际重要性,在提高神经网络安全部署方面的实际重要性,最近经济分配(OOD)检测最近受到了很大的关注。其中一个主要挑战是模型往往会对OOD数据产生高度自信的预测,这在ood检测中破坏了驾驶原理,即该模型应该仅对分布式样品充满信心。在这项工作中,我们提出了反应 - 一种简单有效的技术,用于减少对数据数据的模型过度限制。我们的方法是通过关于神经网络内部激活的新型分析,其为OOD分布显示出高度独特的签名模式。我们的方法可以有效地拓展到不同的网络架构和不同的OOD检测分数。我们经验证明,反应在全面的基准数据集套件上实现了竞争检测性能,并为我们的方法进行了理论解释。与以前的最佳方法相比,在ImageNet基准测试中,反应将假阳性率(FPR95)降低25.05%。
translated by 谷歌翻译
Detecting out-of-distribution (OOD) inputs during the inference stage is crucial for deploying neural networks in the real world. Previous methods commonly relied on the output of a network derived from the highly activated feature map. In this study, we first revealed that a norm of the feature map obtained from the other block than the last block can be a better indicator of OOD detection. Motivated by this, we propose a simple framework consisting of FeatureNorm: a norm of the feature map and NormRatio: a ratio of FeatureNorm for ID and OOD to measure the OOD detection performance of each block. In particular, to select the block that provides the largest difference between FeatureNorm of ID and FeatureNorm of OOD, we create Jigsaw puzzle images as pseudo OOD from ID training samples and calculate NormRatio, and the block with the largest value is selected. After the suitable block is selected, OOD detection with the FeatureNorm outperforms other OOD detection methods by reducing FPR95 by up to 52.77% on CIFAR10 benchmark and by up to 48.53% on ImageNet benchmark. We demonstrate that our framework can generalize to various architectures and the importance of block selection, which can improve previous OOD detection methods as well.
translated by 谷歌翻译
分布(OOD)检测是在开放世界中部署机器学习模型的关键任务。基于距离的方法已经证明了有望,如果测试样品离分布(ID)数据相对遥远,则将测试样品视为OOD。但是,先前的方法对基础特征空间施加了强有力的分布假设,这可能并不总是存在。在本文中,我们探讨了非参数最近邻居距离的疗效,以检测OOD,这在文献中很大程度上被忽略了。与先前的工作不同,我们的方法不会施加任何分布假设,因此提供了更强的灵活性和一般性。我们证明了在几个基准测试中基于邻元的OOD检测的有效性,并建立了卓越的性能。在对Imagenet-1K训练的同一模型下,我们的方法将假阳性率(FPR@tpr95)降低了24.77%,与强大的基线SSD+相比,使用参数方法Mahalanobis在检测中。可用代码:https://github.com/deeplearning-wisc/knn-ood。
translated by 谷歌翻译
Accurate uncertainty quantification is a major challenge in deep learning, as neural networks can make overconfident errors and assign high confidence predictions to out-of-distribution (OOD) inputs. The most popular approaches to estimate predictive uncertainty in deep learning are methods that combine predictions from multiple neural networks, such as Bayesian neural networks (BNNs) and deep ensembles. However their practicality in real-time, industrial-scale applications are limited due to the high memory and computational cost. Furthermore, ensembles and BNNs do not necessarily fix all the issues with the underlying member networks. In this work, we study principled approaches to improve uncertainty property of a single network, based on a single, deterministic representation. By formalizing the uncertainty quantification as a minimax learning problem, we first identify distance awareness, i.e., the model's ability to quantify the distance of a testing example from the training data, as a necessary condition for a DNN to achieve high-quality (i.e., minimax optimal) uncertainty estimation. We then propose Spectral-normalized Neural Gaussian Process (SNGP), a simple method that improves the distance-awareness ability of modern DNNs with two simple changes: (1) applying spectral normalization to hidden weights to enforce bi-Lipschitz smoothness in representations and (2) replacing the last output layer with a Gaussian process layer. On a suite of vision and language understanding benchmarks, SNGP outperforms other single-model approaches in prediction, calibration and out-of-domain detection. Furthermore, SNGP provides complementary benefits to popular techniques such as deep ensembles and data augmentation, making it a simple and scalable building block for probabilistic deep learning. Code is open-sourced at https://github.com/google/uncertainty-baselines
translated by 谷歌翻译
通过增强模型,输入示例,培训集和优化目标,已经提出了各种方法进行分发(OOD)检测。偏离现有工作,我们有一个简单的假设,即标准的离心模型可能已经包含有关训练集分布的足够信息,这可以利用可靠的ood检测。我们对验证这一假设的实证研究,该假设测量了模型激活的模型和分布(ID)迷你批次,发现OOD Mini-Batches的激活手段一直偏离培训数据的培训数据。此外,培训数据的激活装置可以从批量归一化层作为“自由午餐”中有效地计算或从批量归一化层次上检索。基于该观察,我们提出了一种名为神经平均差异(NMD)的新型度量,其比较了输入示例和训练数据的神经手段。利用NMD的简单性,我们提出了一种有效的OOD探测器,通过标准转发通道来计算神经手段,然后是轻量级分类器。广泛的实验表明,在检测精度和计算成本方面,NMD跨越多个数据集和模型架构的最先进的操作。
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实例,例如在特征空间,逻辑空间,梯度空间或图像的原始空间中查找不规则模式。相反,本文提出了一种简单的测试时间线性训练(ETLT)用于OOD检测方法。从经验上讲,我们发现输入图像的概率不存在,与神经网络提取的功能令人惊讶地线性相关。具体来说,许多最先进的OOD算法虽然旨在以不同的方式衡量可靠性,但实际上导致OOD得分主要与其图像特征线性相关。因此,通过简单地学习从配对图像特征训练并在测试时间推断的OOD分数的线性回归模型,我们可以为测试实例做出更精确的OOD预测。我们进一步提出了该方法的在线变体,该变体可以实现有希望的性能,并且在现实世界中更为实用。值得注意的是,我们将FPR95从$ 51.37 \%$提高到CIFAR-10数据集的$ 12.30 \%$,最大的SoftMax概率是基本的OOD检测器。在几个基准数据集上进行的广泛实验显示了ETLT对OOD检测任务的功效。
translated by 谷歌翻译
It is known that neural networks have the problem of being over-confident when directly using the output label distribution to generate uncertainty measures. Existing methods mainly resolve this issue by retraining the entire model to impose the uncertainty quantification capability so that the learned model can achieve desired performance in accuracy and uncertainty prediction simultaneously. However, training the model from scratch is computationally expensive and may not be feasible in many situations. In this work, we consider a more practical post-hoc uncertainty learning setting, where a well-trained base model is given, and we focus on the uncertainty quantification task at the second stage of training. We propose a novel Bayesian meta-model to augment pre-trained models with better uncertainty quantification abilities, which is effective and computationally efficient. Our proposed method requires no additional training data and is flexible enough to quantify different uncertainties and easily adapt to different application settings, including out-of-domain data detection, misclassification detection, and trustworthy transfer learning. We demonstrate our proposed meta-model approach's flexibility and superior empirical performance on these applications over multiple representative image classification benchmarks.
translated by 谷歌翻译
本文重点介绍了用神经网络检测分配(OOD)样本的问题。在图像识别任务,训练过的分类往往给人高置信度的远离中分布(ID)数据输入图像,这大大限制了它在现实世界中的应用。为了减轻这个问题,我们提出了一个基于GaN的边界意识分类器(GBAC),用于生成仅包含大多数ID数据的关闭超空间。我们的方法基于传统的神经网分离特征空间作为几个不适合于ood检测的未闭合区域。与GBAC作为辅助模块,封闭的超空间分布以外的OOD数据将具有低得多的分数被分配,允许更有效的检测OOD同时维持分级性能。此外,我们提出了一种快速采样方法,用于产生躺在预先提及的闭合空间的边界上的硬度陈述。在几个数据集和神经网络架构上采取的实验承诺GBAC的有效性。
translated by 谷歌翻译
在图像分类中,在检测分布(OOD)数据时发生了许多发展。但是,大多数OOD检测方法是在一组标准数据集上评估的,该数据集与培训数据任意不同。没有明确的定义``好的''ood数据集。此外,最先进的OOD检测方法已经在这些标准基准上取得了几乎完美的结果。在本文中,我们定义了2类OOD数据使用与分布(ID)数据的感知/视觉和语义相似性的微妙概念。我们将附近的OOD样本定义为感知上相似但语义上与ID样本的不同,并将样本转移为视觉上不同但在语义上与ID相似的点数据。然后,我们提出了一个基于GAN的框架,用于从这两个类别中生成OOD样品,给定一个ID数据集。通过有关MNIST,CIFAR-10/100和Imagenet的广泛实验,我们表明A)在常规基准上表现出色的ART OOD检测方法对我们提出的基准测试的稳健性明显较小。 N基准测试,反之亦然,因此表明甚至可能不需要单独的OOD集来可靠地评估OOD检测中的性能。
translated by 谷歌翻译
对于在开放世界中部署的机器学习模型是必不可少的。最近,在训练期间(也称为离群暴露)在训练期间使用辅助外离群值数据集已显示出令人鼓舞的性能。由于潜在的OOD数据的样本空间可能是过大的,因此进行抽样信息的异常值至关重要。在这项工作中,我们提出了一种新型的基于后取样的离群矿井诗歌诗,该诗歌有助于有效利用异常数据,并促进了ID和OOD数据之间的紧凑决策边界,以改善检测。我们表明,诗在普通基准上建立了最先进的表现。与当前使用贪婪采样策略的最佳方法相比,诗在CIFAR-10和CIFAR-100上分别提高了相对性能的42.0%和24.2%(FPR95)。我们进一步提供了有关诗歌检测有效性的理论见解。
translated by 谷歌翻译
深度神经网络具有令人印象深刻的性能,但是他们无法可靠地估计其预测信心,从而限制了其在高风险领域中的适用性。我们表明,应用多标签的一VS损失揭示了分类的歧义并降低了模型的过度自信。引入的Slova(单标签One-Vs-All)模型重新定义了单个标签情况的典型单VS-ALL预测概率,其中只有一个类是正确的答案。仅当单个类具有很高的概率并且其他概率可忽略不计时,提议的分类器才有信心。与典型的SoftMax函数不同,如果所有其他类的概率都很小,Slova自然会检测到分布的样本。该模型还通过指数校准进行了微调,这使我们能够与模型精度准确地对齐置信分数。我们在三个任务上验证我们的方法。首先,我们证明了斯洛伐克与最先进的分布校准具有竞争力。其次,在数据集偏移下,斯洛伐克的性能很强。最后,我们的方法在检测到分布样品的检测方面表现出色。因此,斯洛伐克是一种工具,可以在需要不确定性建模的各种应用中使用。
translated by 谷歌翻译