Deep Ensembles
Description
Deep ensembles estimate how uncertain a neural network's predictions are by training several copies of the same network independently and comparing what they predict. Each copy starts from different random initial weights, sees the training data in a different random order, and is trained to output a full predictive distribution, such as a probability for each class or a predicted value with its spread, rather than a single answer. The ensemble's prediction is the average of its members. Where members agree the prediction is usually more reliable, though agreement alone is no guarantee, and where they disagree the model is showing uncertainty about which answer is right, known as epistemic or model uncertainty. In the original study, ensembles of about five networks were better calibrated than single networks, meaning their stated confidence matched how often they were right, and expressed higher uncertainty on inputs from classes absent from the training data.
Example Use Cases
Reliability
An autonomous vehicle team runs five independently trained obstacle-detection networks on each camera frame. When the members' outputs disagree beyond a set level, the vehicle slows and requests remote assistance instead of acting on the averaged detection.
A research team estimating body composition from MRI scans trains an ensemble of regression networks that each predict a measurement and its uncertainty, and flags scans where the ensemble is highly uncertain for manual checking before the values enter a population study.
Transparency
A bank's underwriters see the spread of an ensemble's predicted default probabilities alongside each credit score. Scores with a wide spread are labelled low-confidence and sent for manual review, so staff can see where the model is unsure.
Limitations
- Training and running M networks multiplies compute, memory and latency by roughly M. A five-member ensemble costs about five times a single model, which can rule it out for very large models or for real-time and edge deployment.
- Members trained on the same data share its blind spots. On inputs far from the training data they can agree on a confident wrong answer, so low disagreement is not evidence that an input is familiar.
- Applies only where the networks can be trained from scratch, with access to the training data and the compute for several full training runs. It cannot be added to an existing pretrained or third-party model.
- Disagreement among a small number of members is a noisy estimate, and members that end up too alike understate uncertainty. Calibration has to be checked on held-out data, not assumed from the ensemble.
- Uncertainty depends on the training objective and what each member predicts. In regression, variance across member means alone omits the within-member variability included in the original probabilistic method.
Resources
Research Papers
Simple and Scalable Predictive Uncertainty Estimation using Deep Ensembles
Deep neural networks (NNs) are powerful black box predictors that have recently achieved impressive performance on a wide spectrum of tasks. Quantifying predictive uncertainty in NNs is a challenging and yet unsolved problem. Bayesian NNs, which learn a distribution over weights, are currently the state-of-the-art for estimating predictive uncertainty; however these require significant modifications to the training procedure and are computationally expensive compared to standard (non-Bayesian) NNs. We propose an alternative to Bayesian NNs that is simple to implement, readily parallelizable, requires very little hyperparameter tuning, and yields high quality predictive uncertainty estimates. Through a series of experiments on classification and regression benchmarks, we demonstrate that our method produces well-calibrated uncertainty estimates which are as good or better than approximate Bayesian NNs. To assess robustness to dataset shift, we evaluate the predictive uncertainty on test examples from known and unknown distributions, and show that our method is able to express higher uncertainty on out-of-distribution examples. We demonstrate the scalability of our method by evaluating predictive uncertainty estimates on ImageNet.