通常假设基于深神经网络的分类器的培训和测试数据是从相同的分布采样的。当从远离训练样品的分布中抽出部分测试样品时(AKA分配(OOD)样本),培训的神经网络具有对这些ood的高信任预测的趋势样品。当培训用于图像分类的神经网络,对象检测等的神经网络时,检测是至关重要的。它可以提高分类器对无关投入的鲁棒性,并在不同形式的攻击下提高系统恢复力和安全性。检测OOD样品有三个主要挑战:(i)建议的OOD检测方法应与各种分类器的各种架构(例如,DENSENET,RESET)兼容,而不会显着提高模型复杂性和对计算资源的要求; (ii)ood样本可能来自多个分布,其类标签通常不可用; (iii)需要定义得分函数以有效地分离来自分布(IND)样本的OOD样本。为了克服这些挑战,我们提出了一种基于Wasserstein的分布式检测(木材)方法。基本思想是定义基于Wassersein-距离的评分,评估测试样品与IND样品的分布之间的异化。然后基于所提出的得分函数制定和解决优化问题。研究了所提出的方法的统计学习,以保证经验优化器实现的损耗值近似于全局最优。比较研究结果表明,所提出的木材始终如一地优于其他现有的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)数据完全可分离。在本文中,我们提出了一个利用野生混合数据的新型框架,该框架自然由ID和OOD样品组成。这样的野生数据很丰富,并且在将机器学习分类器部署在自然栖息地中时自由出现。我们的关键思想是制定一个约束的优化问题,并展示如何批准解决问题。我们的学习目标使OOD检测率最大化,但要受到ID数据的分类错误和ID示例的OOD错误率的限制。我们广泛评估了我们对常见的OOD检测任务的方法,并证明了卓越的性能。
translated by 谷歌翻译
Supervised learning aims to train a classifier under the assumption that training and test data are from the same distribution. To ease the above assumption, researchers have studied a more realistic setting: out-of-distribution (OOD) detection, where test data may come from classes that are unknown during training (i.e., OOD data). Due to the unavailability and diversity of OOD data, good generalization ability is crucial for effective OOD detection algorithms. To study the generalization of OOD detection, in this paper, we investigate the probably approximately correct (PAC) learning theory of OOD detection, which is proposed by researchers as an open problem. First, we find a necessary condition for the learnability of OOD detection. Then, using this condition, we prove several impossibility theorems for the learnability of OOD detection under some scenarios. Although the impossibility theorems are frustrating, we find that some conditions of these impossibility theorems may not hold in some practical scenarios. Based on this observation, we next give several necessary and sufficient conditions to characterize the learnability of OOD detection in some practical scenarios. Lastly, we also offer theoretical supports for several representative OOD detection works based on our OOD theory.
translated by 谷歌翻译
机器学习模型通常会遇到与训练分布不同的样本。无法识别分布(OOD)样本,因此将该样本分配给课堂标签会显着损害模​​型的可靠性。由于其对在开放世界中的安全部署模型的重要性,该问题引起了重大关注。由于对所有可能的未知分布进行建模的棘手性,检测OOD样品是具有挑战性的。迄今为止,一些研究领域解决了检测陌生样本的问题,包括异常检测,新颖性检测,一级学习,开放式识别识别和分布外检测。尽管有相似和共同的概念,但分别分布,开放式检测和异常检测已被独立研究。因此,这些研究途径尚未交叉授粉,创造了研究障碍。尽管某些调查打算概述这些方法,但它们似乎仅关注特定领域,而无需检查不同领域之间的关系。这项调查旨在在确定其共同点的同时,对各个领域的众多著名作品进行跨域和全面的审查。研究人员可以从不同领域的研究进展概述中受益,并协同发展未来的方法。此外,据我们所知,虽然进行异常检测或单级学习进行了调查,但没有关于分布外检测的全面或最新的调查,我们的调查可广泛涵盖。最后,有了统一的跨域视角,我们讨论并阐明了未来的研究线,打算将这些领域更加紧密地融为一体。
translated by 谷歌翻译
分销(OOD)检测对于在现实世界中部署机器学习模型是重要的,其中来自移位分布的测试数据可以自然地出现。虽然最近出现了何种算法方法,但何种算法检测,临界差距仍然存在理论上。在这项工作中,我们开发了一个分析框架,其特征,并统一了对OOD检测的理论理解。我们的分析框架激励了一种新颖的电子网络,创业板的检测方法,展示了理论和经验的优势。特别是,在CIFAR-100作为分布数据中,我们的方法优于竞争性基线16.57%(FPR95)。最后,我们正式提供可证明的保证和对我们的方法进行全面分析,支撑数据分布的各种性能如何影响OOD检测的性能。
translated by 谷歌翻译
Continual learning (CL) learns a sequence of tasks incrementally. There are two popular CL settings, class incremental learning (CIL) and task incremental learning (TIL). A major challenge of CL is catastrophic forgetting (CF). While a number of techniques are already available to effectively overcome CF for TIL, CIL remains to be highly challenging. So far, little theoretical study has been done to provide a principled guidance on how to solve the CIL problem. This paper performs such a study. It first shows that probabilistically, the CIL problem can be decomposed into two sub-problems: Within-task Prediction (WP) and Task-id Prediction (TP). It further proves that TP is correlated with out-of-distribution (OOD) detection, which connects CIL and OOD detection. The key conclusion of this study is that regardless of whether WP and TP or OOD detection are defined explicitly or implicitly by a CIL algorithm, good WP and good TP or OOD detection are necessary and sufficient for good CIL performances. Additionally, TIL is simply WP. Based on the theoretical result, new CIL methods are also designed, which outperform strong baselines in both CIL and TIL settings by a large margin.
translated by 谷歌翻译
We study distributionally robust optimization (DRO) with Sinkhorn distance -- a variant of Wasserstein distance based on entropic regularization. We provide convex programming dual reformulation for a general nominal distribution. Compared with Wasserstein DRO, it is computationally tractable for a larger class of loss functions, and its worst-case distribution is more reasonable. We propose an efficient first-order algorithm with bisection search to solve the dual reformulation. We demonstrate that our proposed algorithm finds $\delta$-optimal solution of the new DRO formulation with computation cost $\tilde{O}(\delta^{-3})$ and memory cost $\tilde{O}(\delta^{-2})$, and the computation cost further improves to $\tilde{O}(\delta^{-2})$ when the loss function is smooth. Finally, we provide various numerical examples using both synthetic and real data to demonstrate its competitive performance and light computational speed.
translated by 谷歌翻译
异常检测任务在AI安全中起着至关重要的作用。处理这项任务存在巨大的挑战。观察结果表明,深度神经网络分类器通常倾向于以高信心将分布(OOD)输入分为分配类别。现有的工作试图通过在培训期间向分类器暴露于分类器时明确对分类器施加不确定性来解决问题。在本文中,我们提出了一种替代概率范式,该范式实际上对OOD检测任务既有用,又可行。特别是,我们在培训过程中施加了近距离和离群数据之间的统计独立性,以确保inlier数据在培训期间向深度估计器显示有关OOD数据的信息很少。具体而言,我们通过Hilbert-Schmidt独立标准(HSIC)估算了Inlier和离群数据之间的统计依赖性,并在培训期间对此类度量进行了惩罚。我们还将方法与推理期间的新型统计测试相关联,加上我们的原则动机。经验结果表明,我们的方法对各种基准测试的OOD检测是有效且可靠的。与SOTA模型相比,我们的方法在FPR95,AUROC和AUPR指标方面取得了重大改进。代码可用:\ url {https://github.com/jylins/hone}。
translated by 谷歌翻译
在编程中,学习代码表示有各种应用程序,包括代码分类,代码搜索,注释生成,错误预测等。已经提出了在令牌,语法树,依赖图,代码导航路径或其变体组合方面的各种代码表示,但是,现有的vanilla学习技术具有鲁棒性的主要限制,即,型号很容易当输入以微妙的方式改变输入时,要进行错误的预测。为了增强稳健性,现有方法专注于识别对抗性样本,而不是在落在给定分布之外的有效样品上,我们将其称为分配(OOD)样本。识别出这样的ood样本是本文研究的新问题。为此,我们建议首先使用分发的样本进行in =分发数据集,使得当培训在一起时,它们将增强模型的鲁棒性。我们建议使用能量有界学习的目标函数来将更高的分数分配给分布式样本和较低的分数,以便将这种分布式样品纳入源的培训过程中代码模型。在检测和逆势样本检测方面,我们的评估结果表明,现有源代码模型的稳健性更加准确,在识别ood数据时,同时在同时对对抗性攻击更具抵抗力。此外,所提出的能量有限评分优于大幅的余量,包括Softmax置信度评分,Mahalanobis评分和Odin。
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 谷歌翻译
检测到分布输入对于在现实世界中安全部署机器学习模型至关重要。然而,已知神经网络遭受过度自信的问题,在该问题中,它们对分布和分布的输入的信心异常高。在这项工作中,我们表明,可以通过在训练中实施恒定的向量规范来通过logit归一化(logitnorm)(logitnorm)来缓解此问题。我们的方法是通过分析的激励,即logit的规范在训练过程中不断增加,从而导致过度自信的产出。因此,LogitNorm背后的关键思想是将网络优化期间输出规范的影响解散。通过LogitNorm培训,神经网络在分布数据和分布数据之间产生高度可区分的置信度得分。广泛的实验证明了LogitNorm的优势,在公共基准上,平均FPR95最高为42.30%。
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 谷歌翻译
新颖性检测旨在自动识别分销(OOD)数据,而无需任何先验知识。它是数据监视,行为分析和其他应用程序中的关键步骤,帮助在现场中保持不断学习。常规的OOD检测方法对数据或特征的集合进行多变化分析,通常诉诸于数据的监督,以提高准确性。实际上,这种监督是不切实际的,因为人们不能预料到异常数据。在本文中,我们提出了一种小说,自我监督的方法,不依赖于任何预定义的OOD数据:(1)新方法评估梯度之间的分布和OOD数据之间的Mahalanobis距离。 (2)通过自我监督的二进制分类器辅助,以指导标签选择以生成梯度,并最大化Mahalanobis距离。在具有多个数据集的评估中,例如CiFar-10,CiFar-100,SVHN和TINIMAGENET,所提出的方法始终如一地优于接收器操作特征(AUROC)和区域下的区域内的最先进的监督和无监督的方法在精密召回曲线(AUPR)度量下。我们进一步证明,该探测器能够在持续学习中准确地学习一个OOD类。
translated by 谷歌翻译
在值得信赖的机器学习中,这是一个重要的问题,可以识别与分配任务无关的输入的分布(OOD)输入。近年来,已经提出了许多分布式检测方法。本文的目的是识别共同的目标以及确定不同OOD检测方法的隐式评分函数。我们专注于在培训期间使用替代OOD数据的方法,以学习在测试时概括为新的未见外部分布的OOD检测分数。我们表明,内部和(不同)外部分布之间的二元歧视等同于OOD检测问题的几种不同的公式。当与标准分类器以共同的方式接受培训时,该二进制判别器达到了类似于离群暴露的OOD检测性能。此外,我们表明,异常暴露所使用的置信损失具有隐式评分函数,在训练和测试外部分配相同的情况下,以非平凡的方式与理论上最佳评分功能有所不同,这又是类似于训练基于能量的OOD检测器或添加背景类时使用的一种。在实践中,当以完全相同的方式培训时,所有这些方法的性能类似。
translated by 谷歌翻译
In deep neural learning, a discriminator trained on in-distribution (ID) samples may make high-confidence predictions on out-of-distribution (OOD) samples. This triggers a significant matter for robust, trustworthy and safe deep learning. The issue is primarily caused by the limited ID samples observable in training the discriminator when OOD samples are unavailable. We propose a general approach for \textit{fine-tuning discriminators by implicit generators} (FIG). FIG is grounded on information theory and applicable to standard discriminators without retraining. It improves the ability of a standard discriminator in distinguishing ID and OOD samples by generating and penalizing its specific OOD samples. According to the Shannon entropy, an energy-based implicit generator is inferred from a discriminator without extra training costs. Then, a Langevin dynamic sampler draws specific OOD samples for the implicit generator. Lastly, we design a regularizer fitting the design principle of the implicit generator to induce high entropy on those generated OOD samples. The experiments on different networks and datasets demonstrate that FIG achieves the state-of-the-art OOD detection performance.
translated by 谷歌翻译
开放式识别使深度神经网络(DNN)能够识别未知类别的样本,同时在已知类别的样本上保持高分类精度。基于自动编码器(AE)和原型学习的现有方法在处理这项具有挑战性的任务方面具有巨大的潜力。在这项研究中,我们提出了一种新的方法,称为类别特定的语义重建(CSSR),该方法整合了AE和原型学习的力量。具体而言,CSSR用特定于类的AE表示的歧管替代了原型点。与传统的基于原型的方法不同,CSSR在单个AE歧管上的每个已知类模型,并通过AE的重建误差来测量类归属感。特定于类的AE被插入DNN主链的顶部,并重建DNN而不是原始图像所学的语义表示。通过端到端的学习,DNN和AES互相促进,以学习歧视性和代表性信息。在多个数据集上进行的实验结果表明,所提出的方法在封闭式和开放式识别中都达到了出色的性能,并且非常简单且灵活地将其纳入现有框架中。
translated by 谷歌翻译
当分布(ID)样品与分布外(OOD)样本之间存在差异时,对ID样品进行训练的深神经网络遭受了OOD样品的高信心预测。这主要是由无法使用的OOD样品引起的,以限制培训过程中的网络。为了提高深网的OOD敏感性,几种最先进的方法将其他现实世界数据集的样本作为OOD样本引入训练过程,并将手动确定的标签分配给这些OOD样本。但是,他们牺牲了分类准确性,因为OOD样品的不可靠标记会破坏ID分类。为了平衡ID的概括和OOD检测,要解决的主要挑战是使OOD样本与ID兼容,这在本文中由我们提议的\ textit {监督适应}方法解决,以定义OOD样本的适应性监督信息。首先,通过通过共同信息来测量ID样本及其标签之间的依赖关系,我们根据所有类别的负概率揭示了监督信息的形式。其次,在通过解决多个二进制回归问题来探索ID和OOD样本之间的数据相关性之后,我们估算了监督信息以使ID类更可分离。我们使用两个ID数据集和11个OOD数据集对四个高级网络体系结构进行实验,以证明我们的监督适应方法在实现ID分类能力和OOD检测能力方面的平衡效果。
translated by 谷歌翻译
我们考虑使用深度神经网络时检测到(分发外)输入数据的问题,并提出了一种简单但有效的方法来提高几种流行的ood检测方法对标签换档的鲁棒性。我们的作品是通过观察到的,即大多数现有的OOD检测算法考虑整个训练/测试数据,无论每个输入激活哪个类进入(级别差异)。通过广泛的实验,我们发现这种做法导致探测器,其性能敏感,易于标记换档。为了解决这个问题,我们提出了一种类别的阈值方案,可以适用于大多数现有的OOD检测算法,并且即使在测试分布的标签偏移存在下也可以保持相似的OOD检测性能。
translated by 谷歌翻译
适应数据分布的结构(例如对称性和转型Imarerces)是机器学习中的重要挑战。通过架构设计或通过增强数据集,可以内在学习过程中内置Inhormces。两者都需要先验的了解对称性的确切性质。缺乏这种知识,从业者求助于昂贵且耗时的调整。为了解决这个问题,我们提出了一种新的方法来学习增强变换的分布,以新的\ emph {转换风险最小化}(trm)框架。除了预测模型之外,我们还优化了从假说空间中选择的转换。作为算法框架,我们的TRM方法是(1)有效(共同学习增强和模型,以\ emph {单训练环}),(2)模块化(使用\ emph {任何训练算法),以及(3)一般(处理\ \ ich {离散和连续}增强)。理论上与标准风险最小化的TRM比较,并在其泛化误差上给出PAC-Bayes上限。我们建议通过块组成的新参数化优化富裕的增强空间,导致新的\ EMPH {随机成分增强学习}(SCALE)算法。我们在CIFAR10 / 100,SVHN上使用先前的方法(快速自身自动化和武术器)进行实际比较规模。此外,我们表明规模可以在数据分布中正确地学习某些对称性(恢复旋转Mnist上的旋转),并且还可以改善学习模型的校准。
translated by 谷歌翻译