Abstract
Deep Neural Networks (DNNs) are notoriously overconfident, often failing to signal uncertainty in high-stakes applications. While Bayesian inference provides a principled solution via posterior distributions over model parameters, its computational cost—requiring multiple model samples for a single prediction—is prohibitive for real-time deployment. This paper introduces Distilled SGLD, a method that "distills" the predictive power and uncertainty estimates of a complex Bayesian ensemble into a single, efficient student network. By matching the teacher's predictive distribution, the student inherits robust uncertainty calibration while maintaining the test-time efficiency of a standard DNN.
Introduction: The Bayesian Efficiency Gap
The primary hurdle for Bayesian deep learning is the trade-off between predictive quality and computational overhead. Standard methods like MCMC require storing numerous model samples and performing multiple forward passes at test time. Approximations like Variational Inference (VI) often simplify the posterior too much, losing the multi-modal richness of the true distribution. The authors address this by using model distillation to bridge the gap, allowing a single network to emulate the behavior of a full Bayesian ensemble.
Methodology: Distilled SGLD
The framework employs a teacher-student paradigm:
- The Teacher (SGLD): Stochastic Gradient Langevin Dynamics (SGLD) is used to sample from the posterior. By adding Gaussian noise to the gradients, SGLD allows the optimizer to explore the parameter space rather than settling into a single local minimum.
- The Student: A standard neural network architecture.
- The Distillation Process: Instead of training on hard labels, the student is trained to minimize the Kullback-Leibler (KL) divergence between its output and the teacher's average predictive distribution.
- Online Learning: The teacher and student are trained simultaneously. As the teacher explores the posterior, the student continuously "absorbs" the teacher's collective wisdom—a concept known as "dark knowledge."
Key Insights: Capturing Honest Uncertainty
A core benefit of this approach is the quality of the resulting uncertainty estimates. Standard SGD models typically produce "sigmoidal ramps" of confidence that remain high even in regions far from the training data. In contrast, Distilled SGLD produces more "honest" uncertainty, exhibiting high variance in data-sparse regions.
As seen in the 2D classification visualizations, the distilled models (d, e, f) successfully capture the complex, multi-modal uncertainty boundaries of the HMC and SGLD teachers, whereas standard SGD (a) provides a simplistic linear boundary.
Experimental Results
The authors evaluated Distilled SGLD on several benchmarks to test both classification and regression performance.
MNIST Classification
On the MNIST handwritten digit task, the distilled model significantly outperformed standard SGD and remained competitive with the full SGLD ensemble.
As shown in the table, Distilled SGLD achieved a 1.307% error rate, a notable improvement over the 1.536% error rate of standard SGD.
Regression and Efficiency
In the Boston Housing regression task, the distilled model achieved a log-likelihood of -2.350, outperforming popular alternatives like Probabilistic Backpropagation (-2.574) and Variational Inference (-2.903). Crucially, the distilled student is approximately 10,000 times faster at test time than the full SGLD ensemble, as it requires only a single forward pass.
Conclusion
Distilled SGLD offers a practical solution for deploying Bayesian-quality uncertainty in resource-constrained environments. By combining the sampling capabilities of SGLD with the efficiency of model distillation, the authors demonstrate that robust predictive distributions can be compressed into single networks without sacrificing accuracy or speed. Future research may focus on more sophisticated data generation techniques to further enhance the student's robustness in out-of-distribution scenarios.
Summary updated