本文确定了贝叶斯深度学习中近似MCMC的几个特征。它提出了针对神经网络的近似采样算法。通过类似于从大数据集中采样数据批次,提出了从高维的神经网络参数空间中采样参数子组。尽管在文献中已经讨论了Minibatch MCMC的优势,但阻止的Gibbs抽样在贝叶斯深度学习中受到了研究的关注。
translated by 谷歌翻译
现代深度学习方法构成了令人难以置信的强大工具,以解决无数的挑战问题。然而,由于深度学习方法作为黑匣子运作,因此与其预测相关的不确定性往往是挑战量化。贝叶斯统计数据提供了一种形式主义来理解和量化与深度神经网络预测相关的不确定性。本教程概述了相关文献和完整的工具集,用于设计,实施,列车,使用和评估贝叶斯神经网络,即使用贝叶斯方法培训的随机人工神经网络。
translated by 谷歌翻译
随机梯度马尔可夫链蒙特卡洛(SGMCMC)被认为是大型模型(例如贝叶斯神经网络)中贝叶斯推断的金标准。由于从业人员在这些模型中面临速度与准确性权衡,因此变异推理(VI)通常是可取的选择。不幸的是,VI对后部的分解和功能形式做出了有力的假设。在这项工作中,我们提出了一个新的非参数变分近似,该近似没有对后验功能形式进行假设,并允许从业者指定算法应尊重或断裂的确切依赖性。该方法依赖于在修改的能量函数上运行的新的langevin型算法,其中潜在变量的一部分是在马尔可夫链的早期迭代中平均的。这样,统计依赖性可以以受控的方式破裂,从而使链条混合更快。可以以“辍学”方式进一步修改该方案,从而导致更大的可扩展性。我们在CIFAR-10,SVHN和FMNIST上测试RESNET-20的计划。在所有情况下,与SG-MCMC和VI相比,我们都会发现收敛速度和/或最终精度的提高。
translated by 谷歌翻译
We investigate the efficacy of treating all the parameters in a Bayesian neural network stochastically and find compelling theoretical and empirical evidence that this standard construction may be unnecessary. To this end, we prove that expressive predictive distributions require only small amounts of stochasticity. In particular, partially stochastic networks with only $n$ stochastic biases are universal probabilistic predictors for $n$-dimensional predictive problems. In empirical investigations, we find no systematic benefit of full stochasticity across four different inference modalities and eight datasets; partially stochastic networks can match and sometimes even outperform fully stochastic networks, despite their reduced memory costs.
translated by 谷歌翻译
Compared to point estimates calculated by standard neural networks, Bayesian neural networks (BNN) provide probability distributions over the output predictions and model parameters, i.e., the weights. Training the weight distribution of a BNN, however, is more involved due to the intractability of the underlying Bayesian inference problem and thus, requires efficient approximations. In this paper, we propose a novel approach for BNN learning via closed-form Bayesian inference. For this purpose, the calculation of the predictive distribution of the output and the update of the weight distribution are treated as Bayesian filtering and smoothing problems, where the weights are modeled as Gaussian random variables. This allows closed-form expressions for training the network's parameters in a sequential/online fashion without gradient descent. We demonstrate our method on several UCI datasets and compare it to the state of the art.
translated by 谷歌翻译
潜在位置网络模型是网络科学的多功能工具;应用程序包括集群实体,控制因果混淆,并在未观察的图形上定义前提。估计每个节点的潜在位置通常是贝叶斯推理问题的群体,吉布斯内的大都市是最流行的近似后分布的工具。然而,众所周知,GIBBS内的大都市对于大型网络而言是低效;接受比计算成本昂贵,并且所得到的后绘高度相关。在本文中,我们提出了一个替代的马尔可夫链蒙特卡罗战略 - 使用分裂哈密顿蒙特卡罗和萤火虫蒙特卡罗的组合定义 - 利用后部分布的功能形式进行更有效的后退计算。我们展示了这些战略在吉布斯和综合网络上的其他算法中优于大都市,以及学区的教师和工作人员的真正信息共享网络。
translated by 谷歌翻译
统计模型是机器学习的核心,具有广泛适用性,跨各种下游任务。模型通常由通过最大似然估计从数据估计的自由参数控制。但是,当面对现实世界数据集时,许多模型运行到一个关键问题:它们是在完全观察到的数据方面配制的,而在实践中,数据集会困扰缺失数据。来自不完整数据的统计模型估计理论在概念上类似于潜在变量模型的估计,其中存在强大的工具,例如变分推理(VI)。然而,与标准潜在变量模型相比,具有不完整数据的参数估计通常需要估计缺失变量的指数 - 许多条件分布,因此使标准的VI方法是棘手的。通过引入变分Gibbs推理(VGI),是一种新的通用方法来解决这个差距,以估计来自不完整数据的统计模型参数。我们在一组合成和实际估算任务上验证VGI,从不完整的数据中估算重要的机器学习模型,VAE和标准化流程。拟议的方法,同时通用,实现比现有的特定模型特定估计方法竞争或更好的性能。
translated by 谷歌翻译
在使用多模式贝叶斯后部分布时,马尔可夫链蒙特卡罗(MCMC)算法难以在模式之间移动,并且默认变分或基于模式的近似推动将低估后不确定性。并且,即使找到最重要的模式,难以评估后部的相对重量。在这里,我们提出了一种使用MCMC,变分或基于模式的模式的并行运行的方法,以便尽可能多地击中多种模式或分离的区域,然后使用贝叶斯堆叠来组合这些用于构建分布的加权平均值的可扩展方法。通过堆叠从多模式后分布的堆叠,最小化交叉验证预测误差的结果,并且代表了比变分推断更好的不确定度,但它不一定是相当于渐近的,以完全贝叶斯推断。我们呈现理论一致性,其中堆叠推断逼近来自未衰退的模型和非混合采样器的真实数据生成过程,预测性能优于完全贝叶斯推断,因此可以被视为祝福而不是模型拼写下的诅咒。我们展示了几个模型家庭的实际实施:潜在的Dirichlet分配,高斯过程回归,分层回归,马蹄素变量选择和神经网络。
translated by 谷歌翻译
我们提出了一种使用边缘似然的分布式贝叶斯模型选择的一般方法,其中数据集被分开在非重叠子集中。这些子集仅由个别工人本地访问,工人之间没有共享数据。我们近似通过在每个子集的每个子集上从后部采样通过Monte Carlo采样的完整数据的模型证据。结果使用一种新的方法来组合,该方法校正使用所产生的样本的汇总统计分裂。我们的鸿沟和征服方法使贝叶斯模型在大型数据设置中选择,利用所有可用信息,而是限制工人之间的沟通。我们派生了理论误差界限,这些错误界限量化了计算增益与精度损失之间的结果。当我们的真实世界实验所示,令人尴尬的平行性质在大规模数据集时产生了重要的速度。此外,我们展示了如何在可逆跳转设置中扩展建议的方法以在可逆跳转设置中进行模型选择,该跳转设置在一个运行中探讨多个特征组合。
translated by 谷歌翻译
We present the GPry algorithm for fast Bayesian inference of general (non-Gaussian) posteriors with a moderate number of parameters. GPry does not need any pre-training, special hardware such as GPUs, and is intended as a drop-in replacement for traditional Monte Carlo methods for Bayesian inference. Our algorithm is based on generating a Gaussian Process surrogate model of the log-posterior, aided by a Support Vector Machine classifier that excludes extreme or non-finite values. An active learning scheme allows us to reduce the number of required posterior evaluations by two orders of magnitude compared to traditional Monte Carlo inference. Our algorithm allows for parallel evaluations of the posterior at optimal locations, further reducing wall-clock times. We significantly improve performance using properties of the posterior in our active learning scheme and for the definition of the GP prior. In particular we account for the expected dynamical range of the posterior in different dimensionalities. We test our model against a number of synthetic and cosmological examples. GPry outperforms traditional Monte Carlo methods when the evaluation time of the likelihood (or the calculation of theoretical observables) is of the order of seconds; for evaluation times of over a minute it can perform inference in days that would take months using traditional methods. GPry is distributed as an open source Python package (pip install gpry) and can also be found at https://github.com/jonaselgammal/GPry.
translated by 谷歌翻译
用于估计模型不确定性的线性拉普拉斯方法在贝叶斯深度学习社区中引起了人们的重新关注。该方法提供了可靠的误差线,并接受模型证据的封闭式表达式,从而可以选择模型超参数。在这项工作中,我们检查了这种方法背后的假设,尤其是与模型选择结合在一起。我们表明,这些与一些深度学习的标准工具(构成近似方法和归一化层)相互作用,并为如何更好地适应这种经典方法对现代环境提出建议。我们为我们的建议提供理论支持,并在MLP,经典CNN,具有正常化层,生成性自动编码器和变压器的剩余网络上进行经验验证它们。
translated by 谷歌翻译
无似然推理涉及在给定的数据和模拟器模型的情况下推断参数值。模拟器是计算机代码,它采用参数,执行随机计算并输出模拟数据。在这项工作中,我们将模拟器视为一个函数,其输入为(1)参数和(2)伪随机绘制的向量。我们试图推断出以观察结果为条件的所有这些输入。这是具有挑战性的,因为最终的后验可能是高维且涉及强大的依赖性。我们使用归一化流量(柔性参数密度族)近似后验。训练数据是通过具有较大带宽值Epsilon的非似然重要性采样来生成的,这使得目标与先验相似。培训数据通过使用它来训练更新的归一流流程来“蒸馏”。该过程是迭代的,使用更新的流程作为重要性采样建议,并慢慢降低epsilon,从而使目标变得更接近后部。与大多数其他无似然的方法不同,我们避免将数据减少到低维汇总统计数据,因此可以实现更准确的结果。我们在两个充满挑战的排队和流行病学示例中说明了我们的方法。
translated by 谷歌翻译
Helmholtz机器(HMS)是由两个Sigmoid信念网络(SBN)组成的一类生成模型,分别用作编码器和解码器。这些模型通常是使用称为唤醒 - 睡眠(WS)的两步优化算法对这些模型进行的,并且最近通过改进版本(例如重新恢复的尾流(RWS)和双向Helmholtz Machines(BIHM))进行了改进版本。 SBN中连接的局部性在与概率模型相关的Fisher信息矩阵中诱导稀疏性,并以细粒粒度的块状结构的形式引起。在本文中,我们利用自然梯度利用该特性来有效地训练SBN和HMS。我们提出了一种新颖的算法,称为“自然重新唤醒”(NRWS),该算法与其标准版本的几何适应相对应。以类似的方式,我们还引入了天然双向Helmholtz机器(NBIHM)。与以前的工作不同,我们将展示如何有效地计算自然梯度,而无需引入Fisher信息矩阵结构的任何近似值。在文献中进行的标准数据集进行的实验表明,NRW和NBIHM不仅在其非几何基准方面,而且在HMS的最先进培训算法方面都具有一致的改善。在训练后,汇聚速度以及对数可能达到的对数似然的值量化了改进。
translated by 谷歌翻译
当采样贝叶斯推断时,一种流行的方法是使用汉密尔顿蒙特卡洛(HMC),特别是No-U-Turn采样器(NUTS),该采样器(NUTS)自动决定汉密尔顿轨迹的结束时间。但是,HMC和螺母可能需要众多目标密度的数值梯度,并且在实践中可能会缓慢。我们建议使用HMC和坚果解决贝叶斯推理问题的汉密尔顿神经网络(HNNS)。一旦训练,HNN不需要在采样过程中的目标密度的数值梯度。此外,它们满足了重要的特性,例如完美的时间可逆性和哈密顿保护性,使其非常适合在HMC和坚果中使用,因为可以显示平稳性。我们还提出了一个称为潜在HNN(L-HNN)的HNN扩展,该扩展能够预测潜在的可变输出。与HNN相比,L-HNN提供了提高表达性和减少的集成误差。最后,我们在具有在线错误监测方案的螺母中使用L-HNN,以防止低概率密度区域的样本退化。我们证明了在螺母中的L-HNN,并在线错误监视了一些涉及复杂,重尾和高本地狂热概率密度的示例。总体而言,具有在线错误监控的坚果中的L-HNN令人满意地推断了这些概率密度。与传统的螺母相比,在线错误监控的螺母中,L-HNN需要1--2个目标密度的数值梯度,并通过数量级提高了每个梯度的有效样本量(ESS)。
translated by 谷歌翻译
Leveraging well-established MCMC strategies, we propose MCMC-interactive variational inference (MIVI) to not only estimate the posterior in a time constrained manner, but also facilitate the design of MCMC transitions. Constructing a variational distribution followed by a short Markov chain that has parameters to learn, MIVI takes advantage of the complementary properties of variational inference and MCMC to encourage mutual improvement. On one hand, with the variational distribution locating high posterior density regions, the Markov chain is optimized within the variational inference framework to efficiently target the posterior despite a small number of transitions. On the other hand, the optimized Markov chain with considerable flexibility guides the variational distribution towards the posterior and alleviates its underestimation of uncertainty. Furthermore, we prove the optimized Markov chain in MIVI admits extrapolation, which means its marginal distribution gets closer to the true posterior as the chain grows. Therefore, the Markov chain can be used separately as an efficient MCMC scheme. Experiments show that MIVI not only accurately and efficiently approximates the posteriors but also facilitates designs of stochastic gradient MCMC and Gibbs sampling transitions.
translated by 谷歌翻译
Tensorbnn是一个基于TensorFlow的新软件包,可实现现代神经网络模型的贝叶斯推断。神经网络模型参数的后密度表示为使用哈密顿蒙特卡洛采样的点云。Tensorbnn软件包利用Tensorflow的架构和培训功能以及在培训和预测阶段使用现代图形处理单元(GPU)的能力。
translated by 谷歌翻译
Hamiltonian Monte Carlo (HMC) is a Markov chain Monte Carlo (MCMC) algorithm that avoids the random walk behavior and sensitivity to correlated parameters that plague many MCMC methods by taking a series of steps informed by first-order gradient information. These features allow it to converge to high-dimensional target distributions much more quickly than simpler methods such as random walk Metropolis or Gibbs sampling. However, HMC's performance is highly sensitive to two user-specified parameters: a step size and a desired number of steps L. In particular, if L is too small then the algorithm exhibits undesirable random walk behavior, while if L is too large the algorithm wastes computation. We introduce the No-U-Turn Sampler (NUTS), an extension to HMC that eliminates the need to set a number of steps L. NUTS uses a recursive algorithm to build a set of likely candidate points that spans a wide swath of the target distribution, stopping automatically when it starts to double back and retrace its steps. Empirically, NUTS perform at least as efficiently as and sometimes more efficiently than a well tuned standard HMC method, without requiring user intervention or costly tuning runs. We also derive a method for adapting the step size parameter on the fly based on primal-dual averaging. NUTS can thus be used with no hand-tuning at all. NUTS is also suitable for applications such as BUGS-style automatic inference engines that require efficient "turnkey" sampling algorithms.
translated by 谷歌翻译
我们提出了一种新的方法,可以在复杂模型(例如贝叶斯神经网络)中执行近似贝叶斯推断。该方法比马尔可夫链蒙特卡洛更可扩展到大数据,它具有比变异推断更具表现力的模型,并且不依赖于对抗训练(或密度比估计)。我们采用了构建两个模型的最新方法:(1)一个主要模型,负责执行回归或分类; (2)一个辅助,表达的(例如隐式)模型,该模型定义了主模型参数上的近似后验分布。但是,我们根据后验预测分布的蒙特卡洛估计值通过梯度下降来优化后验模型的参数 - 这是我们唯一的近似值(除后模型除外)。只需要指定一个可能性,可以采用各种形式,例如损失功能和合成可能性,从而提供无可能的方法的形式。此外,我们制定了该方法,使后样品可以独立于或有条件地取决于主要模型的输入。后一种方法被证明能够增加主要模型的明显复杂性。我们认为这在诸如替代和基于物理的模型之类的应用中很有用。为了促进贝叶斯范式如何提供不仅仅是不确定性量化的方式,我们证明了:不确定性量化,多模式以及具有最新预测的神经网络体系结构的应用。
translated by 谷歌翻译
我们引入了重新定性,这是一种数据依赖性的重新聚集化,将贝叶斯神经网络(BNN)转化为后部的分布,其KL对BNN对BNN的差异随着层宽度的增长而消失。重新定义图直接作用于参数,其分析简单性补充了宽BNN在功能空间中宽BNN的已知神经网络过程(NNGP)行为。利用重新定性,我们开发了马尔可夫链蒙特卡洛(MCMC)后采样算法,该算法将BNN更快地混合在一起。这与MCMC在高维度上的表现差异很差。对于完全连接和残留网络,我们观察到有效样本量高达50倍。在各个宽度上都取得了改进,并在层宽度的重新培训和标准BNN之间的边缘。
translated by 谷歌翻译
本文介绍了一个新的神经网络,在$ \ mathbb r ^ d $的真实值函数之前,通过施工更容易和便宜地缩放到域维数$ d $与通常的karhunen-lo \`eve相比功能空间之前。新的先前是高斯神经网络,其中每个重量和偏差都有一个独立的高斯的先前,但是差异的关键差异是,差异在网络的宽度下减小,使得所得到的函数几乎肯定地定义了很多无限宽度网络的极限。我们表明,在推断未知功能的贝叶斯治疗中,使用希尔伯特Space Markov链蒙特卡罗(MCMC)方法,诱导的后续功能均可用于蒙特卡罗采样。这种类型的MCMC很受欢迎,例如,在贝叶斯逆问题文献中,因为它在网眼细化下稳定,即接受概率不会缩小到0美元,因为函数之前的更多参数甚至是AD Infinitum。在数值例子中,我们展示了其他功能空间前沿的这些竞争优势。我们还在贝叶斯加固学习中实施示例以自动化数据的任务,并首次演示MCMC的稳定性以对这些类型的问题进行网格细化。
translated by 谷歌翻译