TL;DR
This paper introduces Compound Density Networks (CDNs), a novel framework that unifies mixture models and Bayesian neural networks for more robust uncertainty quantification. CDNs offer improved performance on out-of-distribution data and enhanced robustness against adversarial attacks compared to existing methods.
What Problem Does This Paper Address?
Deep neural networks (NNs) have achieved remarkable success in various tasks, but they often struggle to provide reliable estimates of their prediction uncertainty. This lack of uncertainty quantification is a critical issue in safety-critical applications like medical diagnostics and autonomous driving, where mispredictions with high confidence can have severe consequences. While Bayesian Neural Networks (BNNs) and ensembles of NNs offer solutions, this paper aims to bridge the gap by developing a more flexible and powerful model that combines the strengths of both approaches. Specifically, it addresses the limitations of existing mixture models by allowing for an infinite number of mixture components and input-dependent mixing weights, leading to a more nuanced representation of uncertainty.
Methods
The core innovation is the Compound Density Network (CDN). CDNs extend Mixture Density Networks (MDNs) by replacing a finite number of mixture components with an uncountable set, effectively creating a continuous mixture. This is achieved by:
- Stochastic Neural Networks: The parameters of the component distributions are themselves generated by a stochastic neural network, allowing for input-dependent parameterization.
- Probabilistic Hypernetworks: These networks map the input to the distribution of the parameters of the main neural network. This allows for modeling the mixing distribution of the compound distribution.
- Two Training Paradigms:
- Maximum Likelihood (ML): CDNs can be trained using regularized maximum likelihood, incorporating a KL-divergence term to encourage the mixing distribution to stay close to a prior.
- Variational Bayes (VB): Alternatively, CDNs can be framed as Bayesian models and trained using variational inference, optimizing the Evidence Lower Bound (ELBO).
The paper also explores using Matrix Variate Normal (MVN) distributions for the probabilistic hypernetworks, which offers a more parameter-efficient way to model distributions over weight matrices compared to standard multivariate Gaussians.
Datasets
The paper uses the following datasets for training and evaluation:
- Toy Regression Datasets: Two synthetic datasets are used to evaluate the models' ability to capture epistemic and aleatoric uncertainty.
- MNIST: A standard dataset for image classification.
- notMNIST: An out-of-distribution (OOD) dataset for classification, containing images of letters instead of digits.
- Fashion-MNIST: Another OOD dataset used for classification.
- CIFAR-10: A dataset for image classification, used to evaluate performance against other state-of-the-art models.
Key Insights and Ideas
- Bridging BNNs and Ensembles: CDNs offer a principled way to combine the strengths of Bayesian inference (capturing epistemic uncertainty) and mixture models (capturing aleatoric uncertainty).
- Infinite Mixture Components: By moving from finite mixtures (like MDNs) to continuous, uncountable mixtures, CDNs can represent more complex and nuanced probability distributions.
- Hypernetworks for Parameter Distributions: The use of probabilistic hypernetworks is key to learning input-dependent distributions over the parameters of the main network, which is crucial for modeling uncertainty.
- Robustness to Adversarial Attacks: CDNs demonstrate a significant improvement in robustness against adversarial examples, maintaining higher accuracy and exhibiting increased uncertainty when attacked.
- Out-of-Distribution Detection: CDNs excel at identifying out-of-distribution data by exhibiting higher predictive entropy (uncertainty) on such samples compared to in-distribution data.
Key Results
- Toy Regression: VB-CDNs successfully capture both epistemic and aleatoric uncertainty, outperforming baselines in distinguishing between these two types of uncertainty.
- Out-of-Distribution Classification: CDNs (especially VB-CDNs) show significantly higher uncertainty on the notMNIST dataset compared to baselines, indicating better OOD detection. ML-CDNs are more confident on in-distribution data but less so on OOD data.
- Adversarial Robustness: CDNs achieve higher accuracy and more appropriate uncertainty estimates under FGSM attacks on MNIST, Fashion-MNIST, and CIFAR-10 compared to baselines. The robustness is particularly pronounced for ML-CDNs.
- Quantitative Metrics: CDNs achieve the highest Mean Maximal Confidence (MMC-in) and AUROC on MNIST, while showing competitive performance on other tasks.
Limitations and Future Work
- Computational Cost: While CDNs offer improved performance, they can be computationally more expensive than simpler models due to the use of hypernetworks and sampling.
- Hyperparameter Tuning: The performance of CDNs can be sensitive to hyperparameter choices, particularly the regularization strength (λ) for ML-CDNs.
- Future Work: The authors suggest investigating other implementations of CDNs, adapting them to recurrent and convolutional neural networks, and exploring their use in other domains. They also mention that using more samples of $\theta$ during training can further improve robustness.
Summary updated