51 lines
1.8 KiB
Markdown
51 lines
1.8 KiB
Markdown
---
|
||
title: "MC Dropout (Monte Carlo Dropout)"
|
||
created: 2026-06-10
|
||
updated: 2026-06-10
|
||
type: concept
|
||
tags: ["bayesian-deep-learning", "uncertainty-quantification", "dropout"]
|
||
sources: ["[[principled-uncertainty-clinical-ai]]"]
|
||
---
|
||
|
||
# MC Dropout (Monte Carlo Dropout)
|
||
|
||
**MC Dropout**(Gal & Ghahramani, 2016)是实践中最简便的贝叶斯不确定性估计方法:训练时使用 Dropout 正则化,推理时**保持 Dropout 激活**并执行 T 次随机前向传播。
|
||
|
||
## 理论基础
|
||
|
||
训练时使用 Dropout 的神经网络近似于深度高斯过程中的变分贝叶斯推断。推理时保持 Dropout 等价于从近似后验中采样。
|
||
|
||
## 算法
|
||
|
||
```
|
||
for t = 1 to T:
|
||
z_t = f_theta(x) with dropout active
|
||
y_hat = (1/T) * sum z_t # 预测均值
|
||
sigma^2_epistemic = (1/T) * sum (z_t - y_hat)^2 # 认知不确定性
|
||
```
|
||
|
||
## 参数选择
|
||
|
||
- **Dropout 概率 p**:通常 0.3-0.5。在 [[principled-uncertainty-clinical-ai|Principled Uncertainty in Clinical AI]] 中 p = 0.3
|
||
- **采样次数 T**:T 越大估计越稳定,T 越小推理越快,通常 T = 10-50
|
||
- **Dropout 位置**:通常在每一层后应用
|
||
|
||
## 优势与局限
|
||
|
||
| 优点 | 局限 |
|
||
|------|------|
|
||
| 实现极简(无需修改训练代码) | 近似质量受 Dropout 概率影响 |
|
||
| 与现有架构兼容 | 推理时计算量为 T 倍 |
|
||
| 提供认知不确定性估计 | 不能直接估计随机不确定性 |
|
||
|
||
## 与其他方法的比较
|
||
|
||
- **Deep Ensembles**:更准确但计算成本更高(M 个独立网络)
|
||
- **[[bayesian-deep-learning|Bayes by Backprop]]**:更严格但训练不稳定
|
||
- **[[variational-autoencoder|VAE]]**:学习潜分布,适合结构化潜空间
|
||
|
||
## 参考
|
||
- [[principled-uncertainty-clinical-ai|Principled Uncertainty in Clinical AI]]
|
||
- [[epistemic-uncertainty|认知不确定性]]
|
||
- [[bayesian-deep-learning|贝叶斯深度学习]]
|