-
Notifications
You must be signed in to change notification settings - Fork 156
Conversation
Useful as a method for assessing model uncertainty https://arxiv.org/abs/1506.02142 Using the strategy suggested by fchollet keras-team/keras#9412
Nice addition! @WardLT |
@WardLT how does one use this to get UQ for model predictions? |
The idea's to keep performing dropout during inference by setting Just realized now I forgot to add information about this to the documentation. Sorry about that. |
Gotcha, so train multiple times and take the standard deviation of the multiple predictions, for example, if I'm understanding correctly. Thanks! |
Almost: you only need to train a single model as long as that model is
trained with many dropout layers. If it helps, picture it as a single model
that captures a larger ensemble
…On Mon, Jan 31, 2022, 7:13 PM Sterling Baird ***@***.***> wrote:
Gotcha, so train multiple times and take the standard deviation of the
multiple predictions, for example, if I'm understanding correctly. Thanks!
—
Reply to this email directly, view it on GitHub
<#8 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABVNYDOKP2S6U4GBNTABF7TUY4QUHANCNFSM4HZNHDOQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@WardLT, ah, OK. Maybe what I'm still missing is how to go from the changes in this PR to standard deviations on the model predictions. |
Sure, I'll step through the procedure with more detail to see what I'm mistakenly skipping over (pardon if I'm hitting things you already know):
Does this clear things up? |
Perfect! I think that cleared things up. Fit once, predict multiple times, and treat each prediction as a sample from the posterior distribution. Thank you! |
@WardLT I've been looking into this a bit more and wonder if you could shed some additional light. This approach seems to work well in the case where the distribution of the new test data is similar to the training data, but provides overconfident uncertainties if the distributions are distinct (the latter of which is usually the case in materials discovery campaigns). In other words, there seems to be some agreement in the literature (see below) that bootstrapped ensembles and Monte-Carlo dropout methods are often overconfident for out-of-domain predictions. What are your thoughts on the strengths and weaknesses of the dropout approach in a materials science context? Does the dropout uncertainty that you described fall into this category, or this there something distinct?
and
Note: sum of distance-weighted contributions == SDC, standard deviation == STD Btw, I think this PR is a good contribution. Just getting curious in the context of https://github.com/ml-evs/modnet-matbench/issues/18 and a few other projects and want to get out of my echo chamber. Also relevant to MEGNet uncertainty quantification is the unlockNN repository mentioned in #338. Thanks also for the patience with me opening discussion back up on a PR from several years ago. |
Adds option to maintain use of dropout during predictions.
Useful as a method for assessing model uncertainty (https://arxiv.org/abs/1506.02142)