Source-linked AI summary
A General Framework for Uncertainty Estimation in Deep Learning
Antonio Loquercio, Mattia Segù, Davide Scaramuzza
TL;DR
Neural-network predictions can fail under distribution shift or noisy inputs, while existing uncertainty methods often require retraining or omit relevant uncertainty sources. The paper combines Bayesian belief networks with Monte-Carlo sampling and prior sensor-noise information, achieving stronger uncertainty estimation across vision and control tasks. Its main practical limitation is the need for multiple forward passes per input.
Problem
Robotics requires reliable prediction uncertainty, but existing methods can require architectural or optimization changes, ignore prior data information, and underestimate uncertainty.
Method
The framework combines Bayesian belief networks, Monte-Carlo sampling, sensor-noise information, and modeling of data and model uncertainty.
Results
The framework outperforms existing uncertainty-estimation methods by up to 23% in prediction accuracy across four vision, prediction, recognition, and control tasks.
Takeaways & Limitations
The architecture-agnostic framework can be applied without changing optimization or retraining already trained networks, supporting integration into robotic perception and control.
Takeaways & Limitations
Generating σtot requires several forward passes per input, creating a bottleneck especially for recurrent models that must unroll each temporal sequence for every sample.
Abstract
from arXiv · showhide
Neural networks predictions are unreliable when the input sample is out of the training distribution or corrupted by noise. Being able to detect such failures automatically is fundamental to integrate deep learning algorithms into robotics. Current approaches for uncertainty estimation of neural networks require changes to the network and optimization process, typically ignore prior knowledge about the data, and tend to make over-simplifying assumptions which underestimate uncertainty. To address these limitations, we propose a novel framework for uncertainty estimation. Based on Bayesian belief networks and Monte-Carlo sampling, our framework not only fully models the different sources of prediction uncertainty, but also incorporates prior data information, e.g. sensor noise. We show theoretically that this gives us the ability to capture uncertainty better than existing methods. In addition, our framework has several desirable properties: (i) it is agnostic to the network architecture and task; (ii) it does not require changes in the optimization process; (iii) it can be applied to already trained architectures. We thoroughly validate the proposed framework through extensive experiments on both computer vision and control tasks, where we outperform previous methods by up to 23% in accuracy.
I. INTRODUCTION
The paper targets unreliable neural-network predictions in robotics by estimating uncertainty from noisy inputs and imperfect training coverage. It proposes a general framework that uses prior data information, preserves existing training procedures, and outperforms prior uncertainty-estimation methods across tasks.
- Motivation: Robotic systems need prediction uncertainty because noisy perceptions and approximated models can make wrong decisions, potentially endangering missions and human lives.Uncertainty estimates also support Bayesian sensor fusion and decision making.
- Motivation: Existing uncertainty methods may be difficult to train, omit data uncertainty, or disregard relationships between data and model uncertainty.These limitations can produce over-confident or underestimated uncertainty estimates.
- Proposed framework: The proposed framework combines Bayesian belief networks with Monte-Carlo sampling, incorporates prior information such as sensor noise, and models relationships between data and model uncertainty.The paper claims theoretical and experimental support for higher-quality uncertainty estimates.
- Proposed framework: The framework is architecture- and task-agnostic, requires no changes to learning or optimization, and applies to already trained neural networks.These properties are intended to support learning-based perception and control in robotics.
- Evaluation: The framework is evaluated on steering, future-motion prediction, object recognition, and quadrotor control, outperforming existing uncertainty-estimation methods by up to 23% in prediction accuracy.The experiments cover both vision and control tasks.
II. RELATED WORK
Prior work estimates neural-network uncertainty with probabilistic approximations or sampling, but important uncertainty sources and practical constraints remain unresolved. The paper positions its framework as a minimally invasive approach for robotics that combines these capabilities across diverse tasks.
- Probabilistic approaches: Existing Bayesian approaches approximate intractable neural-network posteriors with parametric distributions over weights, activations, or network variables.Some approaches reduce computation by keeping weights deterministic, but this can yield over-confident predictions for underrepresented inputs.
- Sampling approaches: Monte-Carlo methods use ensembles or test-time dropout to represent multimodal posteriors, but generally cannot represent data uncertainty such as sensor noise.This leaves a gap when input corruption contributes materially to prediction uncertainty.
- Sampling approaches: Heteroscedastic modeling can estimate both model and data uncertainty, but requires architectural changes and a specialized maximum-likelihood training loss.Those requirements are not always feasible.
- Proposed approach: The proposed approach combines Monte-Carlo model-uncertainty estimation with Gaussian belief networks and assumed density filtering for sensor-noise uncertainty.The paper presents this combination as a way to recover fuller prediction uncertainty.
- Robotics applications: Uncertainty estimation has been used in robotics for perception, sensor-failure handling, drone racing, filtering, manipulation learning efficiency, and manipulator safety.These examples motivate uncertainty estimation as relevant across multiple robotic settings.
- Robotics applications: The framework is described as minimally invasive because it requires neither architectural changes nor retraining of existing models.It is intended for integrating deep learning into robotic systems.
III. METHODOLOGY
The methodology approximates an intractable predictive posterior and decomposes total uncertainty into data and model components. It propagates sensor noise through the network with assumed density filtering and estimates model uncertainty through sampled weight distributions.
- Total uncertainty: Total prediction uncertainty is defined as σtot = Var_p(y|x)(y), combining data and model uncertainty through a tractable approximation of p(y|x).Here, y denotes output predictions and x denotes input samples.
- Data uncertainty: The method assumes known sensor-noise characteristics and treats the network input as z, a noisy version of the real input x.The noise characteristics can come from system identification or hardware specifications.
- Data uncertainty: Assumed Density Filtering propagates input uncertainty through network activations to produce both output predictions µ(l) and data uncertainties v(l).The propagated input uncertainty corresponds to sensor-noise characteristics in robotics.
- Data uncertainty: ADF approximates the joint activation distribution with factorized normal distributions and recursively propagates activation means and uncertainties through network layers.Analytical or approximate propagation is available for common operations including convolution, deconvolution, and ReLU.
- Data uncertainty: ADF selects an approximating distribution by minimizing Kullback-Leibler divergence, with the solution obtained by matching distribution moments under normality assumptions.The first and second moments are represented by expectation and variance.
B. The model uncertainty
Model uncertainty represents uncertainty about network parameters by placing a data-dependent distribution over weights and approximating it with test-time dropout sampling.
- Model uncertainty is represented by placing a distribution p(ω|X, Y) over neural-network weights after training.
- Test-time dropout approximates the intractable weight distribution by collecting Monte-Carlo weight samples.
- The model uncertainty is computed as the variance of T outputs generated from sampled weights ωt ∼q(ω; Φ).
- Dropout produces low model uncertainty for frequent samples with redundant representations and high uncertainty for rare samples.
- The framework uses an ensemble of T Bayesian-network instances with test-time dropout to produce prediction µ and total uncertainty σtot.
C. Model uncertainty of an already trained network
The framework estimates dropout rates after training, avoiding retraining requirements while linking the rates to an optimization criterion based on predicted and ground-truth labels.
- The optimal dropout rates Φ minimize the distance between the real posterior weight distribution and its hypothesis distribution.
- Earlier approaches tied optimal Φ to training dropout rates, preventing model-uncertainty computation for networks trained without dropout.
- The proposed method finds Φ after training by minimizing negative log-likelihood between predictions and ground-truth labels.
- Under a normal-output assumption, the dropout rates minimizing the distributional objective are equivalent to the rates given by the stated lemma.
- In practice, Φ is selected by grid-search over 20 logarithmically spaced rates in [0, 1].
D. The total uncertainty
Total uncertainty combines data and model uncertainty while propagating sensor-noise information through an ADF-transformed network and Monte-Carlo samples.
- The output distribution is approximated by combining p(y|z, ω) with sensor-noise characteristics p(z|x), while model uncertainty is represented through p(ω|X, Y).
- Total uncertainty σtot combines data uncertainty from sensor noise with model uncertainty from the network weights.
- Unlike a standard output ensemble, the model-variance ensemble uses ADF predictions, so model uncertainty also depends on input sensor noise.
- The algorithm transforms a trained network into an ADF version without retraining, collects T forward-pass samples, and computes predictions with total uncertainty.
- A constant data-uncertainty value can miss sample-specific noise variation and is difficult to tune when sensor-noise information is unavailable.
- The approach models dependence between data and model uncertainty, including cases where high sensor noise increases model uncertainty.
IV. EXPERIMENTS
The framework is evaluated across computer-vision and robotic-control tasks, comparing uncertainty estimation against existing methods. Results show accurate predictions alongside improved uncertainty estimates, including gains in closed-loop trajectory tracking.
- Experimental scope: Experiments cover steering-angle prediction, object future-motion prediction, object recognition, and quadrotor model-error compensation.The applications span computer vision and learning-based control, with qualitative and quantitative comparisons against state-of-the-art uncertainty-estimation methods.
- End-to-End Steering Angle Prediction: The steering experiment evaluates prediction with Explained Variance and RMSE, while NLL measures uncertainty-estimation accuracy.All methods use the same architecture; sampling-based methods use T = 20 samples, and the framework assumes input noise variance v = 2 grayscale levels.
- End-to-End Steering Angle Prediction: The framework preserves accurate steering predictions while producing high-quality uncertainty estimates without changing or retraining the network.Compared with prior baselines, competing methods trade prediction quality against variance quality, whereas the proposed framework avoids that compromise.
- Object Future Motion Prediction: For future-motion prediction, FlowNet2S uses current and past frames plus an object mask to predict optical flow to an unobserved future frame.The task is evaluated with pixelwise endpoint error, Gaussian-flow KL distance, and negative log-likelihood; input noise variance is set to 2 pixels.
- Object Future Motion Prediction: 23% better uncertainty estimation than the runner-up is reported, while predictions improve over Gal et al. by 2% in RMSE and 20% on the KL metric.The method outperforms all baselines on every metric in the object future-motion experiment.
- Model-Error Compensation for Quadrotor Flight: 2% and 8% tracking-performance gains on circular and lemniscate trajectories result when nonlinear compensation is applied only under sufficiently low prediction uncertainty.The trajectories were unobserved during training, and uncertainty-aware compensation addresses states where compensation predictions are highly uncertain.
B. Practical Considerations
The practical analysis examines the accuracy–runtime trade-off of Monte-Carlo uncertainty estimation and contrasts feed-forward with recurrent deployment costs.
- Run-time Analysis: Variance-estimation quality plateaus for T ≥ N samples, while increasing Monte-Carlo samples increases inference time.The framework requires multiple forward passes, so sample count controls the trade-off between estimation accuracy and runtime.
- Feed-forward vs Recurrent Models: Recurrent models are supported, but each uncertainty sample requires re-processing the entire temporal sequence, making extraction significantly more expensive.The framework's derivations are architecture-agnostic and therefore apply to both feed-forward and recurrent models.
V. CONCLUSION
The framework provides architecture-, learning-, and task-agnostic uncertainty estimation, combining tightly coupled uncertainty sources with strong performance across control and vision tasks. Its main limitation is computational: estimating total uncertainty requires several forward passes per input.
- The framework is agnostic to network architecture, learning procedure, and training task, while tightly coupling sources of prediction uncertainty.
- It outperforms state-of-the-art uncertainty-estimation methods on each evaluated task without compromising prediction accuracy.
- Several network forward passes are required for each input to generate total uncertainty, creating the framework’s main computational bottleneck.This is particularly problematic for recurrent models because each sample requires unrolling the entire temporal sequence.
A. Proof of Lemma III.2
The proof models Bayesian network weights, stochastic activations, and noisy inputs, then uses Monte Carlo forward passes to recover total predictive variance. Total variance decomposes into model variability and propagated data uncertainty, with the final output comprising a mean prediction and total uncertainty.
- The probabilistic Bayesian ADF network places a posterior over weights and represents layer activations with Bernoulli distributions.
- Monte Carlo dropout supplies multiple stochastic forward passes used to prove recovery of the network’s total predictive variance.
- Total variance equals the sample variance across Monte Carlo predictions plus the average data variance returned by the ADF network.
- The framework outputs [y*, σtot], where y* is the mean of the mean predictions collected over T stochastic forward passes.
A. Implementation
The implementation evaluates the framework across steering, optical-flow prediction, quadrotor control, and sensor-noise sensitivity experiments using established neural architectures and training procedures. Sensor-noise experiments show performance peaks when assumed and actual noise match and degrades gracefully under mismatch.
- A. Implementation: The implementation is provided in PyTorch and uses an NVIDIA RTX 2080 desktop computer for training and testing.The framework was intended for public release with the supplementary material upon acceptance.
- B. End-to-End Steering Angle Prediction: Steering-angle prediction uses a shallow ResNet inspired by DroNet and trained on approximately 70,000 Udacity images.
- C. Object Future Motion Prediction: Object future-motion prediction uses FlowNet2S to predict future optical flow from consecutive frames and a segmentation mask.
- D. Closed-Loop Control of a Quadrotor: Quadrotor closed-loop control uses a 24-feature multilayer perceptron trained with Adam and an L1 loss for model error compensation.
- VIII. SENSITIVITY TO SENSOR NOISE ESTIMATES: Performance peaks when assumed sensor noise matches actual input noise, then drops gracefully as the variance mismatch increases.The approach handles increasing noise magnitudes better than the baselines, attributed to coupling data and model uncertainty.