Monte Carlo 退出 - AWS 方案指引

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

Monte Carlo 退出

估算不確定性的其中一種最熱門方式是使用貝葉斯神經網路推斷預測分佈。若要表示預測分佈,請使用:

預測分佈

目標 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.

Monte Carlo (MC) 退出技術 (Gal 和 Ghahramani 2016) 提供一種可擴展的方式來了解預測分佈。MC 退出的運作方式是隨機關閉神經網路中的神經元,以標準化網路。每個退出組態對應到與近似參數後分佈不同的範例 Mathematical formula showing q(θ|D) representing a probability distribution.

MC 退出

其中 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. 可讓 Monte Carlo 整合模型的可能性,進而發現預測分佈,如下所示:

MC 退出中的預測分佈

為了簡化起見,可能會假設 Gaussian 分佈的可能性:

高斯分佈可能性

使用平均值 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. 指定的高斯函數,這些函數由 Monte Carlo 退出 BNN 的模擬輸出:

MC 退出 BNN

下圖說明 MC 退出。每個退出組態都會隨機切換神經元關閉 (灰色圓圈) 和開啟 (黑色圓圈),並產生不同的輸出。具有不同退出組態的多個向前傳遞會產生平均 p(f(x, ø)) 的預測分佈。

MC 退出

應量化評估通過資料的向前傳遞數量,但 30-100 是需要考慮的適當範圍 (Gal and Ghahramani 2016)。