The need to avoid confident predictions on unfamiliar data has sparked interest in out-of-distribution (OOD) detection. It is widely assumed that Bayesian neural networks (BNN) are well suited for this task, as the endowed epistemic uncertainty should lead to disagreement in predictions on outliers. In this paper, we question this assumption and provide empirical evidence that proper Bayesian inference with common neural network architectures does not necessarily lead to good OOD detection. To circumvent the use of approximate inference, we start by studying the infinite-width case, where Bayesian inference can be exact considering the corresponding Gaussian process. Strikingly, the kernels induced under common architectural choices lead to uncertainties that do not reflect the underlying data generating process and are therefore unsuited for OOD detection. Finally, we study finite-width networks using HMC, and observe OOD behavior that is consistent with the infinite-width case. Overall, our study discloses fundamental problems when naively using BNNs for OOD detection and opens interesting avenues for future research.
翻译:需要避免对不熟悉的数据作出自信的预测,这引起了人们对分配(OOD)外探测的兴趣。人们普遍认为,贝叶西亚神经网络(BNN)非常适合这项任务,因为具有特征的表面不确定性应导致对外部线的预测出现分歧。在本文中,我们质疑这一假设,并提供经验证据,证明贝叶西亚与共同神经网络结构的适当推断不一定导致良好的OOD检测。为避免使用近似推理,我们首先研究无限宽的病例,贝伊西亚神经网络可以精确地考虑相应的高斯进程。奇怪的是,在共同建筑选择下产生的内核导致不确定性,不反映基本数据生成过程,因此不适于OOD检测。最后,我们研究使用HMC的定界线网络,并观察与无限宽的病例相一致的OD行为。总体而言,我们的研究揭示了在天真地使用BNS进行OD检测并为未来研究开辟有趣途径时存在的根本问题。