Bayesian Inference offers principled tools to tackle many critical problems with modern neural networks such as poor calibration and generalization, and data inefficiency. However, scaling Bayesian inference to large architectures is challenging and requires restrictive approximations. Monte Carlo Dropout has been widely used as a relatively cheap way for approximate Inference and to estimate uncertainty with deep neural networks. Traditionally, the dropout mask is sampled independently from a fixed distribution. Recent works show that the dropout mask can be viewed as a latent variable, which can be inferred with variational inference. These methods face two important challenges: (a) the posterior distribution over masks can be highly multi-modal which can be difficult to approximate with standard variational inference and (b) it is not trivial to fully utilize sample-dependent information and correlation among dropout masks to improve posterior estimation. In this work, we propose GFlowOut to address these issues. GFlowOut leverages the recently proposed probabilistic framework of Generative Flow Networks (GFlowNets) to learn the posterior distribution over dropout masks. We empirically demonstrate that GFlowOut results in predictive distributions that generalize better to out-of-distribution data, and provide uncertainty estimates which lead to better performance in downstream tasks.
translated by 谷歌翻译
变形自身偏移(VAES)是具有来自深神经网络架构和贝叶斯方法的丰富代表功能的有影响力的生成模型。然而,VAE模型具有比分布(ID)输入的分配方式分配更高的可能性较高的可能性。为了解决这个问题,认为可靠的不确定性估计是对对OOC投入的深入了解至关重要。在这项研究中,我们提出了一种改进的噪声对比之前(INCP),以便能够集成到VAE的编码器中,称为INCPVAE。INCP是可扩展,可培训和与VAE兼容的,它还采用了来自INCP的优点进行不确定性估计。各种数据集的实验表明,与标准VAE相比,我们的模型在OOD数据的不确定性估计方面是优越的,并且在异常检测任务中是强大的。INCPVAE模型获得了可靠的输入不确定性估算,并解决了VAE模型中的ood问题。
translated by 谷歌翻译
已经提出了神经常规差分方程(节点)作为流行深度学习模型的连续深度概括,例如残留网络(RESNET)。它们提供参数效率并在一定程度上在深度学习模型中自动化模型选择过程。然而,它们缺乏大量的不确定性建模和稳健性能力,这对于他们在几个现实世界应用中的使用至关重要,例如自主驾驶和医疗保健。我们提出了一种新颖的和独特的方法来通过考虑在ode求解器的结束时间$ t $上的分布来模拟节点的不确定性。所提出的方法,潜在的时间节点(LT节点)将$ T $视为潜在变量,并应用贝叶斯学习,以获得超过数据的$ $ $。特别地,我们使用变分推理来学习近似后的后验和模型参数。通过考虑来自后部的不同样本的节点表示来完成预测,并且可以使用单个向前通过有效地完成。由于$ t $隐含地定义节点的深度,超过$ t $的后部分发也会有助于节点的模型选择。我们还提出了一种自适应潜在的时间节点(Alt-Node),其允许每个数据点在终点上具有不同的后分布。 Alt-Node使用摊销变分推理来使用推理网络学习近似后的后验。我们展示了通过合成和几个现实世界图像分类数据的实验来建立不确定性和鲁棒性的提出方法的有效性。
translated by 谷歌翻译
嵌套辍学是辍学操作的变体,能够根据训练期间的预定义重要性订购网络参数或功能。它已被探索:I。构造嵌套网络:嵌套网是神经网络,可以在测试时间(例如基于计算约束)中立即调整架构的架构。嵌套的辍学者隐含地对网络参数进行排名,生成一组子网络,从而使任何较小的子网络构成较大的子网络的基础。 ii。学习排序表示:应用于生成模型的潜在表示(例如自动编码器)对特征进行排名,从而在尺寸上执行密集表示的明确顺序。但是,在整个训练过程中,辍学率是固定为高参数的。对于嵌套网,当删除网络参数时,性能衰减在人类指定的轨迹中而不是从数据中学到的轨迹中。对于生成模型,特征的重要性被指定为恒定向量,从而限制了表示学习的灵活性。为了解决该问题,我们专注于嵌套辍学的概率对应物。我们提出了一个嵌套掉落(VND)操作,该操作以低成本绘制多维有序掩码的样品,为嵌套掉落的参数提供了有用的梯度。基于这种方法,我们设计了一个贝叶斯嵌套的神经网络,以了解参数分布的顺序知识。我们在不同的生成模型下进一步利用VND来学习有序的潜在分布。在实验中,我们表明所提出的方法在分类任务中的准确性,校准和室外检测方面优于嵌套网络。它还在数据生成任务上胜过相关的生成模型。
translated by 谷歌翻译
We introduce ensembles of stochastic neural networks to approximate the Bayesian posterior, combining stochastic methods such as dropout with deep ensembles. The stochastic ensembles are formulated as families of distributions and trained to approximate the Bayesian posterior with variational inference. We implement stochastic ensembles based on Monte Carlo dropout, DropConnect and a novel non-parametric version of dropout and evaluate them on a toy problem and CIFAR image classification. For CIFAR, the stochastic ensembles are quantitatively compared to published Hamiltonian Monte Carlo results for a ResNet-20 architecture. We also test the quality of the posteriors directly against Hamiltonian Monte Carlo simulations in a simplified toy model. Our results show that in a number of settings, stochastic ensembles provide more accurate posterior estimates than regular deep ensembles.
translated by 谷歌翻译
现代深度学习方法构成了令人难以置信的强大工具,以解决无数的挑战问题。然而,由于深度学习方法作为黑匣子运作,因此与其预测相关的不确定性往往是挑战量化。贝叶斯统计数据提供了一种形式主义来理解和量化与深度神经网络预测相关的不确定性。本教程概述了相关文献和完整的工具集,用于设计,实施,列车,使用和评估贝叶斯神经网络,即使用贝叶斯方法培训的随机人工神经网络。
translated by 谷歌翻译
在贝叶斯结构学习中,我们有兴趣从数据中推断出贝叶斯网络的定向无环图(DAG)结构。由于组合较大的样本空间,定义这种分布非常具有挑战性,并且通常需要基于MCMC的近似值。最近,已引入了一种新型的概率模型,称为生成流网络(GFLOWNETS),作为离散和复合对象(例如图形)生成建模的一般框架。在这项工作中,我们建议使用GFLOWNET作为MCMC的替代方案,以近似贝叶斯网络结构的后验分布,给定观测数据集。从该近似分布中生成样本DAG被视为一个顺序决策问题,在该问题中,该图是根据学习的过渡概率一次构造一个边缘的。通过对模拟和真实数据的评估,我们表明我们的方法称为dag-gflownet,可以准确地近似DAG,并且它可以与基于MCMC或变异推断的其他方法进行比较。
translated by 谷歌翻译
变异推理(VI)的核心原理是将计算复杂后概率密度计算的统计推断问题转换为可拖动的优化问题。该属性使VI比几种基于采样的技术更快。但是,传统的VI算法无法扩展到大型数据集,并且无法轻易推断出越野数据点,而无需重新运行优化过程。该领域的最新发展,例如随机,黑框和摊销VI,已帮助解决了这些问题。如今,生成的建模任务广泛利用摊销VI来实现其效率和可扩展性,因为它利用参数化函数来学习近似的后验密度参数。在本文中,我们回顾了各种VI技术的数学基础,以构成理解摊销VI的基础。此外,我们还概述了最近解决摊销VI问题的趋势,例如摊销差距,泛化问题,不一致的表示学习和后验崩溃。最后,我们分析了改善VI优化的替代差异度量。
translated by 谷歌翻译
We propose SWA-Gaussian (SWAG), a simple, scalable, and general purpose approach for uncertainty representation and calibration in deep learning. Stochastic Weight Averaging (SWA), which computes the first moment of stochastic gradient descent (SGD) iterates with a modified learning rate schedule, has recently been shown to improve generalization in deep learning. With SWAG, we fit a Gaussian using the SWA solution as the first moment and a low rank plus diagonal covariance also derived from the SGD iterates, forming an approximate posterior distribution over neural network weights; we then sample from this Gaussian distribution to perform Bayesian model averaging. We empirically find that SWAG approximates the shape of the true posterior, in accordance with results describing the stationary distribution of SGD iterates. Moreover, we demonstrate that SWAG performs well on a wide variety of tasks, including out of sample detection, calibration, and transfer learning, in comparison to many popular alternatives including MC dropout, KFAC Laplace, SGLD, and temperature scaling.
translated by 谷歌翻译
不确定性估计(UE)技术 - 例如高斯过程(GP),贝叶斯神经网络(BNN),蒙特卡罗辍学(MCDropout) - 旨在通过为每个分配估计的不确定性值来提高机器学习模型的可解释性他们的预测输出。然而,由于过高的不确定性估计可以在实践中具有致命的后果,因此本文分析了上述技术。首先,我们表明GP方法始终会产生高不确定性估计(OOD)数据。其次,我们在2D玩具示例中显示了BNN和MCDRopout在OOD样品上没有提供高不确定性估计。最后,我们凭经验展示了这种BNNS和MCDRopout的陷阱也在现实世界数据集中持有。我们的见解(i)提高了对深度学习中目前流行的UE方法更加谨慎使用的认识,(ii)鼓励开发UE方法,这些方法近似于基于GP的方法 - 而不是BNN和MCDROPOUT,以及我们的经验设置可用于验证任何其他UE方法的ood性能。源代码在https://github.com/epfml/unctemationsiapity-娱乐中获得。
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 谷歌翻译
对于神经网络的近似贝叶斯推断被认为是标准培训的强大替代品,通常在分发数据上提供良好的性能。然而,贝叶斯神经网络(BNNS)具有高保真近似推断的全批汉密尔顿蒙特卡罗在协变速下实现了较差的普遍,甚至表现不佳的经典估算。我们解释了这种令人惊讶的结果,展示了贝叶斯模型平均值实际上如何存在于协变量的情况下,特别是在输入特征中的线性依赖性导致缺乏后退的情况下。我们还展示了为什么相同的问题不会影响许多近似推理程序,或古典最大A-Bouthiori(地图)培训。最后,我们提出了改善BNN的鲁棒性的新型前锋,对许多协变量转变来源。
translated by 谷歌翻译
Estimating how uncertain an AI system is in its predictions is important to improve the safety of such systems. Uncertainty in predictive can result from uncertainty in model parameters, irreducible data uncertainty and uncertainty due to distributional mismatch between the test and training data distributions. Different actions might be taken depending on the source of the uncertainty so it is important to be able to distinguish between them. Recently, baseline tasks and metrics have been defined and several practical methods to estimate uncertainty developed. These methods, however, attempt to model uncertainty due to distributional mismatch either implicitly through model uncertainty or as data uncertainty. This work proposes a new framework for modeling predictive uncertainty called Prior Networks (PNs) which explicitly models distributional uncertainty. PNs do this by parameterizing a prior distribution over predictive distributions. This work focuses on uncertainty for classification and evaluates PNs on the tasks of identifying out-of-distribution (OOD) samples and detecting misclassification on the MNIST and CIFAR-10 datasets, where they are found to outperform previous methods. Experiments on synthetic and MNIST data show that unlike previous non-Bayesian methods PNs are able to distinguish between data and distributional uncertainty.
translated by 谷歌翻译
适应数据分布的结构(例如对称性和转型Imarerces)是机器学习中的重要挑战。通过架构设计或通过增强数据集,可以内在学习过程中内置Inhormces。两者都需要先验的了解对称性的确切性质。缺乏这种知识,从业者求助于昂贵且耗时的调整。为了解决这个问题,我们提出了一种新的方法来学习增强变换的分布,以新的\ emph {转换风险最小化}(trm)框架。除了预测模型之外,我们还优化了从假说空间中选择的转换。作为算法框架,我们的TRM方法是(1)有效(共同学习增强和模型,以\ emph {单训练环}),(2)模块化(使用\ emph {任何训练算法),以及(3)一般(处理\ \ ich {离散和连续}增强)。理论上与标准风险最小化的TRM比较,并在其泛化误差上给出PAC-Bayes上限。我们建议通过块组成的新参数化优化富裕的增强空间,导致新的\ EMPH {随机成分增强学习}(SCALE)算法。我们在CIFAR10 / 100,SVHN上使用先前的方法(快速自身自动化和武术器)进行实际比较规模。此外,我们表明规模可以在数据分布中正确地学习某些对称性(恢复旋转Mnist上的旋转),并且还可以改善学习模型的校准。
translated by 谷歌翻译
贝叶斯神经网络(BNNS)通过提供认知不确定性的原则概率表示,有望在协变量转移下改善概括。但是,基于重量的BNN通常会在大规模体系结构和数据集的高计算复杂性上挣扎。基于节点的BNN最近被引入了可扩展的替代方案,该替代方案通过将每个隐藏节点乘以潜在的随机变量来诱导认知不确定性,同时学习权重的点刻度。在本文中,我们将这些潜在的噪声变量解释为训练过程中简单和域 - 不合时宜数据扰动的隐式表示,从而产生了由于输入损坏而导致协变量转移的BNN。我们观察到,隐性腐败的多样性取决于潜在变量的熵,并提出了一种直接的方法来增加训练期间这些变量的熵。我们评估了分布外图像分类基准测试的方法,并显示出由于输入扰动而导致的协变量转移下基于节点的BNN的不确定性估计。作为副作用,该方法还提供了针对嘈杂训练标签的鲁棒性。
translated by 谷歌翻译
We investigate a local reparameterizaton technique for greatly reducing the variance of stochastic gradients for variational Bayesian inference (SGVB) of a posterior over model parameters, while retaining parallelizability. This local reparameterization translates uncertainty about global parameters into local noise that is independent across datapoints in the minibatch. Such parameterizations can be trivially parallelized and have variance that is inversely proportional to the minibatch size, generally leading to much faster convergence. Additionally, we explore a connection with dropout: Gaussian dropout objectives correspond to SGVB with local reparameterization, a scale-invariant prior and proportionally fixed posterior variance. Our method allows inference of more flexibly parameterized posteriors; specifically, we propose variational dropout, a generalization of Gaussian dropout where the dropout rates are learned, often leading to better models. The method is demonstrated through several experiments.
translated by 谷歌翻译
Modern machine learning methods including deep learning have achieved great success in predictive accuracy for supervised learning tasks, but may still fall short in giving useful estimates of their predictive uncertainty. Quantifying uncertainty is especially critical in real-world settings, which often involve input distributions that are shifted from the training distribution due to a variety of factors including sample bias and non-stationarity. In such settings, well calibrated uncertainty estimates convey information about when a model's output should (or should not) be trusted. Many probabilistic deep learning methods, including Bayesian-and non-Bayesian methods, have been proposed in the literature for quantifying predictive uncertainty, but to our knowledge there has not previously been a rigorous largescale empirical comparison of these methods under dataset shift. We present a largescale benchmark of existing state-of-the-art methods on classification problems and investigate the effect of dataset shift on accuracy and calibration. We find that traditional post-hoc calibration does indeed fall short, as do several other previous methods. However, some methods that marginalize over models give surprisingly strong results across a broad spectrum of tasks.
translated by 谷歌翻译
The ability to estimate epistemic uncertainty is often crucial when deploying machine learning in the real world, but modern methods often produce overconfident, uncalibrated uncertainty predictions. A common approach to quantify epistemic uncertainty, usable across a wide class of prediction models, is to train a model ensemble. In a naive implementation, the ensemble approach has high computational cost and high memory demand. This challenges in particular modern deep learning, where even a single deep network is already demanding in terms of compute and memory, and has given rise to a number of attempts to emulate the model ensemble without actually instantiating separate ensemble members. We introduce FiLM-Ensemble, a deep, implicit ensemble method based on the concept of Feature-wise Linear Modulation (FiLM). That technique was originally developed for multi-task learning, with the aim of decoupling different tasks. We show that the idea can be extended to uncertainty quantification: by modulating the network activations of a single deep network with FiLM, one obtains a model ensemble with high diversity, and consequently well-calibrated estimates of epistemic uncertainty, with low computational overhead in comparison. Empirically, FiLM-Ensemble outperforms other implicit ensemble methods, and it and comes very close to the upper bound of an explicit ensemble of networks (sometimes even beating it), at a fraction of the memory cost.
translated by 谷歌翻译
贝叶斯范式有可能解决深度神经网络的核心问题,如校准和数据效率低差。唉,缩放贝叶斯推理到大量的空间通常需要限制近似。在这项工作中,我们表明它足以通过模型权重的小子集进行推动,以便获得准确的预测后断。另一个权重被保存为点估计。该子网推断框架使我们能够在这些子集上使用表现力,否则难以相容的后近近似。特别是,我们将子网线性化LAPLACE作为一种简单,可扩展的贝叶斯深度学习方法:我们首先使用线性化的拉普拉斯近似来获得所有重量的地图估计,然后在子网上推断出全协方差高斯后面。我们提出了一个子网选择策略,旨在最大限度地保护模型的预测性不确定性。经验上,我们的方法对整个网络的集合和较少的表达后近似进行了比较。
translated by 谷歌翻译
随机梯度马尔可夫链蒙特卡洛(SGMCMC)被认为是大型模型(例如贝叶斯神经网络)中贝叶斯推断的金标准。由于从业人员在这些模型中面临速度与准确性权衡,因此变异推理(VI)通常是可取的选择。不幸的是,VI对后部的分解和功能形式做出了有力的假设。在这项工作中,我们提出了一个新的非参数变分近似,该近似没有对后验功能形式进行假设,并允许从业者指定算法应尊重或断裂的确切依赖性。该方法依赖于在修改的能量函数上运行的新的langevin型算法,其中潜在变量的一部分是在马尔可夫链的早期迭代中平均的。这样,统计依赖性可以以受控的方式破裂,从而使链条混合更快。可以以“辍学”方式进一步修改该方案,从而导致更大的可扩展性。我们在CIFAR-10,SVHN和FMNIST上测试RESNET-20的计划。在所有情况下,与SG-MCMC和VI相比,我们都会发现收敛速度和/或最终精度的提高。
translated by 谷歌翻译