蒙特卡洛辍学 - AWS 规范性指导

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

蒙特卡洛辍学

估计不确定性的最常用方法之一是使用贝叶斯神经网络推断预测分布。欲表示预测分布,请使用:

预测分布

包括目标 AWS logo with "Amazon Web Services" text on a white background. 、输入 X icon, typically used to represent closing or canceling an action. Lambda function icon with a stylized λ (lambda) symbol in orange. 许多训练示例 Mathematical formula showing D as a set of pairs (x_i, y_i) from i=1 to n. 。获得预测分布后,您可以检查方差并发现不确定性。学习预测分布的一种方法是学习函数上的分布,或者等效地,学习参数上的分布(即参数后验分布) Mathematical formula showing p(Θ|D) with vertical bar between Θ and D.

蒙特卡洛(MC)辍学技术(Gal and Ghahramani 2016)为学习预测分布提供了一种可扩展的方法。MC dropout 的工作原理是随机关闭神经网络中的神经元,从而对网络进行正则化。每种 dropout 配置对应于与近似参数化后验分布不同的样本: Mathematical formula showing q(θ|D) representing a probability distribution.

MC dropout

其中, Greek letter theta subscript i, representing a mathematical variable or symbol. 对应于从近似参数化后验中抽样的掉线配置,或者等效地对应于模拟 Mathematical formula showing q(θ|D) representing a probability distribution. ,如下图所示。从近似后验中抽样 Mathematical formula showing q(θ|D) representing a probability distribution. 可以对模型的似然进行蒙特卡洛积分,从而揭示预测分布,如下所示:

MC dropout 的预测分布

为简单起见,可以假设似然为高斯分布:

高斯分布似然

使用由均值 Mathematical function f(x, θ) with x and θ as variables. 和方差 Mathematical formula showing s prime as a function of x and theta. 参数指定的高斯函数 Mathematical equation showing N subscript V, representing a variable in a formula. ,这些参数由蒙特卡洛辍学 BNN 的模拟输出:

MC dropout BNN

下图展示了MC dropout情况。每种 dropout 配置通过在每次向前传播时随机关闭神经元(灰色圆圈)和开启(黑色圆圈)来产生不同的输出。具有不同 dropout 配置的多次前向传递会产生平均值 p(f(x, ø)) 的预测分布。

MC dropout

应定量评估通过数据的向前传递次数,但30-100是需要考虑的适当范围(Gal 和 Ghahramani, 2016年)。