A General Framework for Uncertainty Estimation in Deep Learning

Antonio Loquercio, Mattia Segù, Davide Scaramuzza

TL;DR

This paper introduces a "minimally invasive" framework for estimating uncertainty in deep learning models without requiring them to be retrained. By combining Assumed Density Filtering (ADF) to propagate sensor noise with Monte-Carlo dropout to capture model gaps, the authors create a system that outperforms state-of-the-art methods by up to 23% across vision and robotics tasks.

What Problem Does This Paper Address?

Deep neural networks are notorious for being "overconfident" even when they are wrong. In robotics, this is a safety hazard—an autonomous car needs to know when its perception is failing due to heavy rain (sensor noise) or when it encounters a road layout it has never seen before (out-of-distribution data).

Existing solutions for Uncertainty Estimation (UE) usually fall into two camps:

  1. Data (Aleatoric) Uncertainty: Modeling noise inherent in the sensors.
  2. Model (Epistemic) Uncertainty: Modeling the gaps in the network’s knowledge.

The gap the authors identify is twofold: first, most methods require changing the network architecture or the training process, making them hard to apply to existing "black-box" models. Second, existing methods often treat these two types of uncertainty as independent, whereas in reality, a noisy input should naturally make the model less certain about its own internal logic.

Methods

The authors propose a general framework that can be applied to already trained networks. It consists of three main components:

  • Assumed Density Filtering (ADF): Instead of passing a single value through the network, the framework treats the input as a distribution (e.g., an image plus known sensor noise). It then propagates the mean and variance through each layer. This effectively transforms a standard deterministic network into a Bayesian belief network.
  • Monte-Carlo (MC) Dropout: To capture model uncertainty, the framework uses "dropout" at test time—randomly disabling parts of the network across multiple forward passes to see how much the output fluctuates.
  • The "Post-hoc" Optimization: For models not trained with dropout, the authors provide a mathematical justification (Lemma III.1) for finding the optimal dropout rate after training by minimizing the negative log-likelihood on a small validation set.
  • Coupled Uncertainty: Crucially, the authors prove (Lemma III.2) that the total uncertainty is the sum of the propagated data noise and the variance of the model's predictions. This ensures that if an input is very noisy, the model uncertainty increases accordingly.

Datasets

The framework was validated across four diverse tasks:

  1. End-to-End Steering Angle Prediction: Evaluated on the Udacity dataset (70,000 car images).
  2. Object Future Motion Prediction: Evaluated on the DAVIS 2016 dataset (high-quality videos with moving objects).
  3. Object Recognition: Evaluated on the classic CIFAR-10 benchmark.
  4. Closed-Loop Quadrotor Control: Evaluated using a custom dataset of ~1 million datapoints collected in a Gazebo/RotorS simulator.

Key Insights and Ideas

  • Uncertainty is a Relationship: The most significant "aha" moment is the realization that data and model uncertainty are coupled. A sample might be "familiar" to the network, but if it's corrupted by noise, the network's internal representations become less reliable.
  • No Retraining Required: Most Bayesian neural networks are a nightmare to train. By using ADF to approximate the propagation of distributions, the authors allow engineers to add uncertainty estimation to a model that is already performing well, without risking a drop in accuracy during a "probabilistic" retraining phase.
  • Prior Knowledge Matters: Unlike many "black-box" UE methods, this framework allows researchers to plug in known hardware specs (like the specific noise variance of a camera sensor) directly into the math.

Key Results

  • Superior Accuracy: The framework outperformed previous state-of-the-art methods (like those by Gal et al. and Kendall et al.) by up to 23% in terms of Negative Log-Likelihood (NLL) and prediction accuracy.
  • Robotic Safety: In the quadrotor experiments, the framework allowed the drone to detect when the neural network's "compensation terms" were unreliable. By ignoring the network when uncertainty was high, the drone avoided instabilities and tracked trajectories more accurately (improving performance by 2-8%).
  • Real-time Performance: Using $T=20$ Monte-Carlo samples, the framework achieves an inference rate of approximately 10Hz, making it practical for real-world robotic control.

Limitations and Future Work

The primary bottleneck is computational. Because the framework requires multiple forward passes (Monte-Carlo sampling) to estimate model uncertainty, it is significantly slower than a standard deterministic pass. This is particularly problematic for Recurrent Neural Networks (RNNs), where the entire temporal sequence must be re-processed for every sample.

The authors suggest that future work should explore alternative ways to compute model uncertainty—perhaps using information theory—to avoid the need for multiple forward passes while maintaining the "minimally invasive" benefits of this framework.

Summary updated

BibTeX
@article{loquercio2020general,
  author = {Antonio Loquercio and Mattia Segù and Davide Scaramuzza},
  title = {{A General Framework for Uncertainty Estimation in Deep Learning}},
  journal = {IEEE Robotics Autom. Lett.},
  year = {2020},
  url = {https://openreview.net/forum?id=FCWQRtdWSW},
}

Loading related content...

Figure