我们可以在单个网络中训练混合歧视生成模型吗?最近在肯定中回答了这个问题,引入了基于联合能量的模型(JEM)的领域,该模型(JEM)同时达到了高分类的精度和图像生成质量。尽管有最近的进步,但仍存在两个性能差距:标准软磁性分类器的准确性差距,以及最先进的生成模型的发电质量差距。在本文中,我们引入了各种培训技术,以弥合JEM的准确性差距和一代质量差距。 1)我们结合了最近提出的清晰度最小化(SAM)框架来训练JEM,从而促进了能量景观的平滑度和JEM的普遍性。 2)我们将数据扩展排除在JEM的最大似然估计管道中,并减轻数据增强对图像生成质量的负面影响。在多个数据集上进行的广泛实验表明,我们的Sada-Jem在图像分类,图像产生,校准,分布外检测和对抗性鲁棒性方面实现了最先进的表现,并优于JEM JEM。
translated by 谷歌翻译
扩散降级概率模型(DDPM)和视觉变压器(VIT)分别在生成任务和判别任务中表现出重大进展,到目前为止,这些模型已在其自身领域中很大程度上开发出来。在本文中,我们通过将VIT结构集成到DDPM之间,建立DDPM和VIT之间的直接联系,并引入一种称为“生成Vit(Genvit)”的新生成模型。VIT的建模灵活性使我们能够将Genvit进一步扩展到混合判别生成建模,并引入混合VIT(HYBVIT)。我们的工作是最早探索单个VIT以共同探索图像生成和分类的人之一。我们进行了一系列实验,以分析提出的模型的性能,并证明它们在生成和判别任务中都超过了先前的最新技术。我们的代码和预培训模型可以在https://github.com/sndnyang/diffusion_vit中找到。
translated by 谷歌翻译
我们研究了一种基于对抗性训练(AT)的学习基于能量的模型(EBM)的新方法。我们表明(二进制)学习一种特殊的能量功能,可以模拟数据分布的支持,并且学习过程与基于MCMC的EBM的最大似然学习密切相关。我们进一步提出了改进的与AT生成建模的技术,并证明这种新方法能够产生多样化和现实的图像。除了具有竞争性的图像生成性能到明确的EBM外,研究的方法还可以稳定训练,非常适合图像翻译任务,并且表现出强大的分布外对抗性鲁棒性。我们的结果证明了AT生成建模方法的生存能力,表明AT是学习EBM的竞争性替代方法。
translated by 谷歌翻译
基于能量的模型(EBMS)最近成功地代表了少量图像的复杂分布。然而,对它们的抽样需要昂贵的马尔可夫链蒙特卡罗(MCMC)迭代在高维像素空间中缓慢混合。与EBMS不同,变形AutoEncoders(VAES)快速生成样本,并配备潜在的空间,使得数据歧管的快速遍历。然而,VAE倾向于将高概率密度分配到实际数据分布之外的数据空间中的区域,并且经常在产生清晰图像时失败。在本文中,我们提出了VAE的一个共生组成和ebm的vaebm,提供了两个世界的eBM。 VAEBM使用最先进的VAE捕获数据分布的整体模式结构,它依赖于其EBM组件,以明确地从模型中排除非数据样区域并优化图像样本。此外,VAEBM中的VAE组件允许我们通过在VAE的潜空间中重新处理它们来加速MCMC更新。我们的实验结果表明,VAEBM在几个基准图像数据集上以大量边距开辟了最先进的VAES和EBMS。它可以产生高于256 $ \倍的高质量图像,使用短MCMC链。我们还证明了VAEBM提供了完整的模式覆盖范围,并在分配外检测中表现良好。源代码可在https://github.com/nvlabs/vaebm上获得
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 谷歌翻译
清洁和不同标记的数据的可用性是培训复杂任务(例如视觉问答(VQA))的培训模型的主要障碍。大型视觉和语言模型的广泛工作表明,自我监督的学习对预处理多模式相互作用有效。在此技术报告中,我们专注于视觉表示。我们审查和评估自我监督的方法,以利用未标记的图像并预处理模型,然后我们对其进行了自定义VQA任务,该任务允许进行控制的评估和诊断。我们将基于能量的模型(EBM)与对比度学习(CL)进行比较。尽管EBM越来越受欢迎,但他们缺乏对下游任务的评估。我们发现,EBM和CL都可以从未标记的图像中学习表示形式,这些图像能够在很少的注释数据上训练VQA模型。在类似于CLEVR的简单设置中,我们发现CL表示还可以改善系统的概括,甚至匹配来自较大,监督,预测模型的表示的性能。但是,我们发现EBM由于不稳定性和结果差异很高而难以训练。尽管EBMS被证明对OOD检测有用,但基于监督的基于能量的训练和不确定性校准的其他结果在很大程度上是负面的。总体而言,CL当前似乎比EBM的选项更为可取。
translated by 谷歌翻译
Training adversarially robust discriminative (i.e., softmax) classifier has been the dominant approach to robust classification. Building on recent work on adversarial training (AT)-based generative models, we investigate using AT to learn unnormalized class-conditional density models and then performing generative robust classification. Our result shows that, under the condition of similar model capacities, the generative robust classifier achieves comparable performance to a baseline softmax robust classifier when the test data is clean or when the test perturbation is of limited size, and much better performance when the test perturbation size exceeds the training perturbation size. The generative classifier is also able to generate samples or counterfactuals that more closely resemble the training data, suggesting that the generative classifier can better capture the class-conditional distributions. In contrast to standard discriminative adversarial training where advanced data augmentation techniques are only effective when combined with weight averaging, we find it straightforward to apply advanced data augmentation to achieve better robustness in our approach. Our result suggests that the generative classifier is a competitive alternative to robust classification, especially for problems with limited number of classes.
translated by 谷歌翻译
Energy based models (EBMs) are appealing due to their generality and simplicity in likelihood modeling, but have been traditionally difficult to train. We present techniques to scale MCMC based EBM training on continuous neural networks, and we show its success on the high-dimensional data domains of ImageNet32x32, ImageNet128x128, CIFAR-10, and robotic hand trajectories, achieving better samples than other likelihood models and nearing the performance of contemporary GAN approaches, while covering all modes of the data. We highlight some unique capabilities of implicit generation such as compositionality and corrupt image reconstruction and inpainting. Finally, we show that EBMs are useful models across a wide variety of tasks, achieving state-of-the-art out-of-distribution classification, adversarially robust classification, state-of-the-art continual online class learning, and coherent long term predicted trajectory rollouts.
translated by 谷歌翻译
检测到分布输入对于在现实世界中安全部署机器学习模型至关重要。然而,已知神经网络遭受过度自信的问题,在该问题中,它们对分布和分布的输入的信心异常高。在这项工作中,我们表明,可以通过在训练中实施恒定的向量规范来通过logit归一化(logitnorm)(logitnorm)来缓解此问题。我们的方法是通过分析的激励,即logit的规范在训练过程中不断增加,从而导致过度自信的产出。因此,LogitNorm背后的关键思想是将网络优化期间输出规范的影响解散。通过LogitNorm培训,神经网络在分布数据和分布数据之间产生高度可区分的置信度得分。广泛的实验证明了LogitNorm的优势,在公共基准上,平均FPR95最高为42.30%。
translated by 谷歌翻译
检测分配(OOD)输入对于安全部署现实世界的深度学习模型至关重要。在评估良性分布和OOD样品时,检测OOD示例的现有方法很好。然而,在本文中,我们表明,当在分发的分布和OOD输入时,现有的检测机制可以极其脆弱,其具有最小的对抗扰动,这不会改变其语义。正式地,我们广泛地研究了对共同的检测方法的强大分布检测问题,并表明最先进的OOD探测器可以通过对分布和ood投入增加小扰动来容易地欺骗。为了抵消这些威胁,我们提出了一种称为芦荟的有效算法,它通过将模型暴露于对抗性inlier和异常值示例来执行鲁棒训练。我们的方法可以灵活地结合使用,并使现有方法稳健。在共同的基准数据集上,我们表明芦荟大大提高了最新的ood检测的稳健性,对CiFar-10和46.59%的CiFar-100改善了58.4%的Auroc改善。
translated by 谷歌翻译
我们提出了使用基于混合能量的模型的生成建模的新型框架。在我们的方法中,我们将可解释的输入梯度和用于采样的Langevin动力学的可解释输入梯度结合在一起。使用对抗性训练,我们不仅改善了训练稳定性,而且改善了基于联合能量的模型的鲁棒性和生成性建模。
translated by 谷歌翻译
基于能量的模型(EBMS)提供灵活的分布参数化。然而,由于难以应变的分隔功能,它们通常通过对比发散培训,以获得最大似然估计。在本文中,我们提出了伪球形对比偏差(PS-CD)来概括eBM的最大似然学习。 PS-CD源自严格适当的同质评分规则系列的最大化,这避免了难以处理分区功能的计算,并提供了包括对比分歧的广义学习目标作为特殊情况。此外,PS-CD允许我们灵活地选择各种学习目标,以便在没有额外的计算成本或变分性最低限度优化的情况下培训EBM。关于合成数据和常用图像数据集的提出方法和广泛实验的理论分析证明了PS-CD的有效性和建模灵活性,以及​​其对数据污染的鲁棒性,从而显示出其最大可能性和$ F $的优势 - ebms。
translated by 谷歌翻译
本文我们的目标是利用异质的温度缩放作为校准策略(OOD)检测。此处的异质性是指每个样品的最佳温度参数可能不同,而不是传统的方法对整个分布使用相同的值。为了实现这一目标,我们提出了一种称为锚定的新培训策略,可以估算每个样品的适当温度值,从而导致几个基准的最新OOD检测性能。使用NTK理论,我们表明该温度函数估计与分类器的认知不确定性紧密相关,这解释了其行为。与某些表现最佳的OOD检测方法相反,我们的方法不需要暴露于其他离群数据集,自定义校准目标或模型结合。通过具有不同OOD检测设置的经验研究 - 远处,OOD附近和语义相干OOD - 我们建立了一种高效的OOD检测方法。可以在此处访问代码和模型-https://github.com/rushilanirudh/amp
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 谷歌翻译
我们表明,著名的混音的有效性[Zhang等,2018],如果而不是将其用作唯一的学习目标,就可以进一步改善它,而是将其用作标准跨侧面损失的附加规则器。这种简单的变化不仅提供了太大的准确性,而且在大多数情况下,在各种形式的协变量转移和分布外检测实验下,在大多数情况下,混合量的预测不确定性估计质量都显着提高了。实际上,我们观察到混合物在检测出分布样本时可能会产生大量退化的性能,因为我们在经验上表现出来,因为它倾向于学习在整个过程中表现出高渗透率的模型。很难区分分布样本与近分离样本。为了显示我们的方法的功效(RegMixup),我们在视觉数据集(Imagenet&Cifar-10/100)上提供了详尽的分析和实验,并将其与最新方法进行比较,以进行可靠的不确定性估计。
translated by 谷歌翻译
当训练数据集患有极端阶级失衡时,深度神经网络通常会表现不佳。最近的研究发现,以半监督的方式直接使用分布外数据(即开放式样本)培训将损害概括性能。在这项工作中,我们从理论上表明,从贝叶斯的角度来看,仍然可以利用分发数据来扩大少数群体。基于这种动机,我们提出了一种称为开放采样的新方法,该方法利用开放式嘈杂标签重新平衡培训数据集的班级先验。对于每个开放式实例,标签是​​从我们的预定义分布中取样的,该分布互补,与原始类先验的分布互补。我们从经验上表明,开放采样不仅可以重新平衡阶级先验,还鼓励神经网络学习可分离的表示。广泛的实验表明,我们提出的方法显着优于现有数据重新平衡方法,并可以提高现有最新方法的性能。
translated by 谷歌翻译
常规监督学习或分类的主要假设是,测试样本是从与训练样本相同的分布中得出的,该样本称为封闭设置学习或分类。在许多实际情况下,事实并非如此,因为测试数据中有未知数或看不见的类样本,这称为“开放式”方案,需要检测到未知数。该问题称为开放式识别问题,在安全至关重要的应用中很重要。我们建议通过学习成对相似性来检测未知数(或看不见的类样本)。提出的方法分为两个步骤。它首先使用培训中出现的所见类学习了一个封闭的集体分类器,然后学习如何将看到的类与伪单人(自动生成的看不见的类样本)进行比较。伪无表情的一代是通过对可见或训练样品进行分配转换增加而进行的。我们称我们的方法OPG(基于伪看不见的数据生成开放式识别)。实验评估表明,基于相似性的功能可以成功区分基准数据集中的未见特征,以进行开放式识别。
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 谷歌翻译
作为研究界,我们仍然缺乏对对抗性稳健性的进展的系统理解,这通常使得难以识别训练强大模型中最有前途的想法。基准稳健性的关键挑战是,其评估往往是出错的导致鲁棒性高估。我们的目标是建立对抗性稳健性的标准化基准,尽可能准确地反映出考虑在合理的计算预算范围内所考虑的模型的稳健性。为此,我们首先考虑图像分类任务并在允许的型号上引入限制(可能在将来宽松)。我们评估了与AutoAtrack的对抗鲁棒性,白和黑箱攻击的集合,最近在大规模研究中显示,与原始出版物相比,改善了几乎所有稳健性评估。为防止对自动攻击进行新防御的过度适应,我们欢迎基于自适应攻击的外部评估,特别是在自动攻击稳健性潜在高估的地方。我们的排行榜,托管在https://robustbench.github.io/,包含120多个模型的评估,并旨在反映在$ \ ell_ \ infty $的一套明确的任务上的图像分类中的当前状态 - 和$ \ ell_2 $ -Threat模型和共同腐败,未来可能的扩展。此外,我们开源源是图书馆https://github.com/robustbench/robustbench,可以提供对80多个强大模型的统一访问,以方便他们的下游应用程序。最后,根据收集的模型,我们分析了稳健性对分布换档,校准,分配检测,公平性,隐私泄漏,平滑度和可转移性的影响。
translated by 谷歌翻译
可靠的评估方法对于构建强大的分布(OOD)检测器至关重要。OOD检测器的当前鲁棒性评估协议依赖于向数据注射扰动。但是,扰动不太可能自然发生或与数据内容无关,从而提供了有限的鲁棒性评估。在本文中,我们提出了对OOD检测器(EVG)的评估-VIA产生,这是一种新的协议,用于研究异常值变化模式下OOD检测器的鲁棒性。EVG利用生成模型合成合理的异常值,并采用MCMC采样来发现探测器最高置信度的分布式分类为分类。我们使用EVG对最先进的OOD检测器的性能进行了全面的基准比较,从而揭示了先前被忽视的弱点。
translated by 谷歌翻译