Abstract
Modern deep ensembles techniques achieve strong uncertainty estimation performance by utilizing multiple forward passes across different models. However, this comes at the cost of high storage requirements and slow inference speeds. To address these challenges, we propose Density-Regression, a framework that leverages a feature-space density function to provide high-quality uncertainty estimates with a single forward pass. We provide theoretical proof that our method is "distance-aware" in the feature space—a critical requirement for reliable uncertainty estimation under distribution shifts. Our empirical results across the cubic toy dataset, UCI benchmarks, weather forecasting, and monocular depth estimation demonstrate that Density-Regression offers competitive performance with significantly lower model size and faster inference speeds compared to state-of-the-art ensembles.
1. Introduction
Deep Neural Networks (DNNs) often exhibit overconfidence, providing high-certainty predictions even when faced with Out-of-Distribution (OOD) data. In safety-critical applications like autonomous driving or medical diagnostics, this lack of reliable uncertainty is a significant risk. While Deep Ensembles are currently the standard for uncertainty estimation, their computational overhead—requiring $M$ forward passes and $M$ times the storage—limits their deployment in resource-constrained environments.
Existing sampling-free alternatives often struggle with "distance awareness," failing to increase uncertainty as test inputs drift further from the training distribution. Density-Regression addresses this by integrating a density function directly into the predictive distribution, ensuring that uncertainty naturally scales with the distance from known data in the feature space.
2. Proposed Method
The Density-Regression framework consists of three integrated components: a feature encoder, a density estimator, and a regressor. Unlike standard regression heads that output a point estimate or a fixed-variance distribution, our approach utilizes an Exponential Family Distribution where the predictive variance is explicitly modulated by the feature density.
- Feature Density Estimation: We employ a lightweight density estimator, such as Normalizing Flows, to map the distribution of training data within the latent feature space.
- Modulated Uncertainty: The model is mathematically structured such that the predictive variance $\sigma^2$ is inversely proportional to the feature density $p(z)$. As $p(z) \to 0$ (indicating OOD data), $\sigma^2 \to \infty$, providing a natural mechanism for distance awareness.
- Three-Stage Training: The model is trained sequentially: first, standard pre-training of the encoder and regressor; second, training the density estimator on the learned features; and third, a refinement stage to align the regressor weights with the density-aware likelihood.
3. Experimental Evaluation
We evaluated Density-Regression against several baselines, including MC Dropout, Bayesian Neural Networks (BNN), Evidential Deep Learning (EDL), and Deep Ensembles.
3.1 Toy Dataset Visualization
On the 1D Cubic Toy Dataset, we visualize how uncertainty grows as data moves away from the training range (indicated by dashed lines). As shown in Figure 1, Density-Regression exhibits superior distance awareness, with uncertainty bands widening significantly and smoothly in OOD regions compared to deterministic or ensemble methods.
3.2 Benchmark Results
- UCI Benchmarks: Across 9 standard regression tasks, Density-Regression achieved competitive calibration and error rates.
- Weather Forecasting: Using time-series data from the Max Planck Institute, the model maintained reliable uncertainty even when tested on data from different weather stations (distribution shift).
- Monocular Depth Estimation: Tested on NYU Depth v2 (indoor) and ApolloScape (outdoor), Density-Regression effectively flagged unfamiliar outdoor scenes by producing high-uncertainty maps, outperforming methods like NatPN.
4. Key Insights and Efficiency
Density-Regression provides a rigorous theoretical guarantee of distance awareness, ensuring uncertainty is a monotonic function of the distance to the training set. Crucially, it achieves this with $O(1)$ inference complexity, making it approximately 5x faster and 4x smaller than Deep Ensembles. Unlike Bayesian approaches, it requires no manually tuned priors, simplifying real-world application.
5. Conclusion and Future Work
Density-Regression offers a scalable, efficient solution for uncertainty estimation. While the three-stage training process adds complexity, the gains in inference speed and distance awareness are substantial. Future research will explore more complex density estimators and further optimizations for ultra-low-power edge devices.
Summary updated