Uncertainty Estimation
Estimating how confident predictions are: MC dropout, temperature scaling, and more.
Bayes by BackpropBayes by Backprop represents each network weight as a Gaussian with a mean and a width, and learns that distribution by minimizing a variational inference loss with backpropagation. Sampling weights at every prediction reveals the uncertainty of the prediction and also acts as regularization.
Deep EnsemblesDeep ensembles train several networks of the same architecture independently from different random initializations, mix their predictive distributions, and use the mean as the answer and the disagreement among networks as the uncertainty. Without Bayesian inference, they are reported to give better uncertainty estimates than MC dropout.
MC DropoutMC dropout keeps dropout enabled at inference, runs many forward passes on the same input, and uses the mean of the predictions as the answer and their spread as the uncertainty; it can be applied directly to any model trained with dropout.
SWAGSWAG continues SGD from a trained model, builds a Gaussian from the mean and covariance of the weights visited along the way, and averages predictions over many sets of weights sampled from it. Without changing how the model is trained, it represents uncertainty in the weights and improves probability calibration.
Temperature ScalingTemperature scaling divides the logits of a trained classifier by a single temperature T before the softmax, so that the probabilities (confidences) match the actual accuracy. T is chosen once on validation data, and neither the predicted class nor the accuracy changes.
