[Paper Review] Depth Uncertainty in Neural Networks
This paper proposes Depth Uncertainty Networks (DUNs), a method that treats neural network depth as a random variable to enable efficient, single-forward-pass uncertainty estimation. By marginalizing over subnetworks of increasing depth—sharing weights—DUNs achieve calibrated uncertainty, robustness to distribution shift, and competitive performance with computationally expensive baselines.
Existing methods for estimating uncertainty in deep learning tend to require multiple forward passes, making them unsuitable for applications where computational resources are limited. To solve this, we perform probabilistic reasoning over the depth of neural networks. Different depths correspond to subnetworks which share weights and whose predictions are combined via marginalisation, yielding model uncertainty. By exploiting the sequential structure of feed-forward networks, we are able to both evaluate our training objective and make predictions with a single forward pass. We validate our approach on real-world regression and image classification tasks. Our approach provides uncertainty calibration, robustness to dataset shift, and accuracies competitive with more computationally expensive baselines.
Motivation & Objective
- To address the lack of efficient, calibrated uncertainty estimation in deep learning for resource-constrained applications.
- To reduce the computational burden of uncertainty estimation, which typically requires multiple forward passes or ensemble training.
- To improve model robustness to out-of-distribution inputs and dataset shift without sacrificing predictive accuracy.
- To provide a simple, plug-and-play extension to existing deep learning frameworks that requires no changes to training hyperparameters or architecture.
Proposed method
- Treats the depth of a feed-forward neural network as a random variable drawn from a categorical distribution over possible depths.
- Constructs subnetworks of increasing depth by sharing weights across layers, with each subnetwork producing a prediction at its depth.
- Uses Bayesian Model Averaging (BMA) over these depth-specific subnetworks to compute predictive uncertainty via marginalization.
- Employs variational inference to train the depth distribution, optimizing a lower bound on the marginal likelihood.
- Enables exact predictive posterior computation with a single forward pass by storing activations at each layer.
- Applies the method to standard architectures like ResNets and fully connected networks with minimal code modifications.
Experimental results
Research questions
- RQ1Can uncertainty estimation in deep learning be achieved with a single forward pass while maintaining calibration and robustness?
- RQ2Does treating depth as a random variable provide a viable alternative to weight-space Bayesian inference or ensemble methods?
- RQ3Can DUNs achieve competitive performance on regression and image classification tasks with minimal computational overhead?
- RQ4How does DUN performance compare to strong baselines like MC Dropout and deep ensembles under distribution shift and data corruption?
- RQ5Can DUNs be effectively applied to standard architectures like ResNets without architectural redesign?
Key findings
- DUNs achieve uncertainty calibration comparable to strong baselines like deep ensembles and MC Dropout, with significantly reduced inference cost.
- On ImageNet, DUNs show robustness to corruptions, outperforming standard SGD and MC Dropout, though performance is limited on ResNet-50 due to insufficient capacity.
- The method achieves competitive accuracy on regression and image classification tasks while providing reliable uncertainty estimates with a single forward pass.
- Training with variational inference prevents the depth posterior from collapsing to a single depth, unlike maximum likelihood training which often fails to converge to diverse depth distributions.
- The approach is simple to implement, requiring only minor modifications to existing PyTorch code, such as replacing Sequential with ModuleList and storing per-layer activations.
- Experiments show that DUNs are robust to dataset shift and provide reliable OOD detection, outperforming methods like MC Dropout in some settings.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.