DL中的不确定性估计

What and Why?

Uncertainty analysis does not “build a better model. It indicates how well a given model captures the data.

相关大牛和paper

Yarin Gal

16年剑桥大学ML Group毕业,博士论文是Uncertainty in Deep Learning,现在是Associate Professor of Machine Learning at the Computer Science department, Oxford.

报告视频:Modern Deep Learning through Bayesian Eyes

Alex Kendall

剑桥大学CV和机器人group,18年2月毕业。

Inbar Naor

博客上有很多不确定性相关的博文。

最新paper

DNNs tend to be overconfident in predictions on unseen data and can give unpredictable results for far-from-distribution test data. This paper uses MC-Dropout and Bootstrapping to give computationally tractable and parallelizable uncertainty estimates. The result is a collision avoidance policy that knows what it does not know and cautiously avoids pedestrians that exhibit unseen behavior.

The main contributions of this work are i) an algorithm that identifies novel pedestrian observations and ii) avoids them more cautiously and safer than an uncertainty-unaware baseline, iii) an extension of an existing uncertainty-aware
reinforcement learning framework [29] to more complex dynamic environments with exploration aiding methods, and iv) a demonstration in a simulation environment. This work is another step towards opening up the vast capabilities of deep neural networks for the application in safety-critical tasks.

In this paper, we examine three types of uncertainty: model capacity uncertainty, intrinsic data uncertainty, and open set uncertainty, and review techniques that have been derived to address each one. We then introduce a unified hierarchical model, which combines methods from Bayesian inference, invertible latent density inference, and discriminative classification in a single end-to-end deep neural network topology to yield efficient per-sample uncertainty estimation.

image.png
  • 20181214-Combating Uncertainty with Novel Losses for Automatic Left Atrium Segmentation
    作者:港中文Xin Yang. left atrium avg dice=92.24% on 20 testing volumes.
    组合overlap loss和focal positive loss来对抗classification uncertainty
    扩大前景和背景预测的gap来来抑制边界处的不确定性。Overlap loss来measure这种gap。

    Overlap loss表示前景和背景的重合区域,最优为0

  • Accuracy, Uncertainty, and Adaptability of Automatic Myocardial ASL Segmentation using Deep CNN
    作者:Hung P. Do, Canon Medical Systems USA
    用MC dropout measure U-Net的不确定性,做N=1115次MC采样,引入两个量化指标:

  • Dice uncertainty:N次dice scores的标准差

  • MC uncertainty:summed all pixel values of the uncertainty map and normalized by the area of the predicted mask.

  • 201812-Leveraging (Bayesian) uncertainty information: Opportunities and failure modes, Dr. Christian Leibig, NeurIPS 18 Bayesian DL workshop

    • Bayesian uncertainty is practical in a medical setting

    eg: Uncertainty informed decision referral. If CNN outputs have high uncertainties,, refer data and decision to physician

    • Uncertainty tends to be high for “difficult” samples

    可以用来提升性能;人和ML结合

    • Uncertainty tends to be high in extrapolation directions;eg: 用于active learning
    • Uncertainty based out-of-distribution detection 不一定都work

    OoD样本不确定性不一定很高。

课程&资源

Code

阅读笔记

1. 不确定性的分类

不确定性度量反映the amount of dispersion of a random variable,也即度量随机变量的随机性。有很多不同的方法来表示不确定性,比如方差,熵等。但是要牢记一个单一的标量并不能刻画随机性的整个图景!

1.1 Aleatoric Uncertainty

描述数据产生过程中的随机性,这类随机性通过收集更多的数据并不能消除。考虑一个简单的模型y=5x,x~N(0,1),则y~N(0,5),因此y的aleatoric不确定性可以描述为\sigma=5。输入数据的Aleatoric Uncertainty会传到模型的预测结果。
如何捕捉aleatoric uncertainty?

1.2 Epistemic uncertainty

描述模型认识的不确定性,即模型对其输出有多大的把握。该类不确定性可以通过收集更多的数据来降低(见多识广)。一种不错的估计认知不确定性方法是模型集成。比如boostrap ensemble,从大小为N的训练集中随机抽取M个子训练集,分别训练M个模型,这M个模型的预测结果就形成一个经验的预测分布。
另一种方式是在网络训练的时候加入dropout来近似模型集成,然而这会对单个模型的性能打折。
因此,如果计算资源够的话推荐第一种方案,Deep ensemble中提到,如果通过不同的随机初始化来训练,已经足够引入a diverse set of model,不需要bootstrap ensemble。

1.3 Out of distribution (OoD) errors

确定输入的数据是否valid,这在部署ML模型到实践中非常重要。两种方式处理OoD输入:
1)建立watchdogs,在OoD数据输入到模型前将其捕获,比如建立一个正常数据的density model;
2)如果模型的输出很奇怪,说明对应的输入数据有问题。比如利用epistemic uncertainty。

Who Will Watch the Watchdogs? 第一种方式将OoD问题和不确定性估计问题解耦,从工程的视角来看更为easy。最近的研究表明epistemic uncertainty of likelihood models是一个非常好的OoD detector。By bridging epistemic uncertainty with density estimation, we can use ensembles of likelihood models to protect machine learning models against OoD inputs in a model-agnostic way

Conclusion

  • Bayesian uncertainty is practical in a medical setting

eg: Uncertainty informed decision referral. If CNN outputs have high uncertainties,, refer data and decision to physician

  • Uncertainty tends to be high for “difficult” samples

可以用来提升性能;人和ML结合

  • Uncertainty based out-of-distribution detection 不一定都work

from: leveraging (Bayesian) uncertainty information: opportunities and failure modes, by Dr Christian Leibig

  • Calibration is important,但是还没得到学术界的充分的重视。 Researchers are not performing model selection by deploying the model in repeated identical experiments and measuring calibration error, so unsurprisingly, our models tend to be poorly calibrated [1]. A much more powerful way to prove our models understand the world correctly" (in a statistical sense) is to test them for statistical calibration.

[1] On Calibration of Modern Neural Networks (paper, vedio, code)

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 159,716评论 4 364
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 67,558评论 1 294
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 109,431评论 0 244
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 44,127评论 0 209
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 52,511评论 3 287
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,692评论 1 222
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 31,915评论 2 313
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,664评论 0 202
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,412评论 1 246
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,616评论 2 245
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 32,105评论 1 260
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,424评论 2 254
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 33,098评论 3 238
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,096评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,869评论 0 197
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,748评论 2 276
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,641评论 2 271

推荐阅读更多精彩内容