Accelerating Monte Carlo Bayesian Prediction via Approximating Predictive Uncertainty Over the Simplex

Yufei Cui, Wuguannan Yao, Qiao Li, Antoni B. Chan, Chun Jason Xue

Introduction

Bayesian deep learning (BDL) provides a robust framework for quantifying predictive uncertainty, which is critical for safety-sensitive applications like autonomous driving and medical diagnosis. Unlike standard neural networks that provide point estimates, BDL models offer a distribution over possible outcomes. However, the non-conjugate nature of deep neural networks necessitates the use of Monte Carlo (MC) integration. This requires hundreds of forward passes to obtain a reliable predictive distribution, making BDL computationally prohibitive for real-time systems.

The Challenge of Monte Carlo Integration

To estimate predictive uncertainty, one typically samples model parameters $\theta$ from a posterior $p(\theta|\mathcal{D})$ and averages the resulting softmax outputs. This process, while theoretically sound, introduces a significant latency bottleneck. Previous attempts at "Bayesian Knowledge Distillation" sought to train a smaller "student" model to mimic the mean output of a "teacher" BDL model. However, simple mean-matching often discards the rich uncertainty information contained in the full distribution of samples, leading to poor performance in out-of-distribution (OOD) detection.

The One-Pass Uncertainty (OPU) Framework

The authors propose One-Pass Uncertainty (OPU), a framework designed to replace slow MC sampling with a single forward pass. OPU treats the BDL model as a "Teacher" and trains a "Student" model to approximate the induced distribution of class probabilities over the probability simplex.

Figure 3: Overview of the OPU framework showing the Teacher-Student architecture and empirical examples of induced distributions over the simplex for various inputs.

Dirichlet Student and Disentangled Architecture

The student model is parameterized to output a Dirichlet distribution, the natural conjugate prior for categorical outcomes. This choice allows the model to express varying levels of confidence through the concentration parameters of the Dirichlet. To optimize this, the student architecture is split into two components:

  1. Prediction Model (PM): Responsible for predicting the mean class probabilities.
  2. Concentration Model (CM): Responsible for predicting the "sharpness" or total concentration, which serves as a direct proxy for confidence.

Optimization via Maximum Mean Discrepancy (MMD)

A key contribution of the paper is the use of Maximum Mean Discrepancy (MMD) as the loss function. While KL divergence is a common choice for distillation, it often struggles with multi-modal distributions, leading to "over-flattened" and uninformative student models. MMD, a kernel-based statistical metric, better captures the geometry of the teacher's sample cloud on the simplex, ensuring the student accurately reflects the teacher's uncertainty.

Experimental Evaluation

The OPU framework was evaluated across diverse datasets, including MNIST, EMNIST, and OOD tasks using Omniglot and SEMEION. The results demonstrate that OPU can achieve near-perfect OOD detection while maintaining the classification accuracy of the teacher model.

Figure 5: Performance comparison of OPU against baseline models across multiple datasets, highlighting the ~500x speedup in test time and superior OOD detection metrics.

As shown in the results table, OPU-MMD achieves a test time of approximately 0.443 seconds, compared to over 210 seconds for standard Monte Carlo Dropout (MCDP). This represents a ~500x speedup. Furthermore, on the SEMEION OOD detection task, OPU-MMD reached an AUROC of 99.8%, significantly outperforming traditional distillation methods like BDK.

Conclusion and Limitations

The One-Pass Uncertainty framework successfully bridges the gap between the theoretical benefits of Bayesian uncertainty and the practical requirements of real-time inference. However, the student is constrained by the expressive power of the Dirichlet distribution; if the teacher's output distribution is extremely complex or non-convex, a single Dirichlet may be insufficient. Additionally, while Earth Mover's Distance (EMD) is theoretically powerful, it proved difficult to train due to the need for minimax optimization. Future research could extend this "randomness transfer" approach to structured problems like object segmentation.

Summary updated

BibTeX
@article{cui2022accelerating,
  author = {Yufei Cui and Wuguannan Yao and Qiao Li and Antoni B. Chan and Chun Jason Xue},
  title = {{Accelerating Monte Carlo Bayesian Prediction via Approximating Predictive Uncertainty Over the Simplex}},
  journal = {IEEE Trans. Neural Networks Learn. Syst.},
  year = {2022},
  doi = {10.1109/tnnls.2020.3042525},
}
Figure