The question whether inputs are valid for the problem a neural network is trying to solve has sparked interest in out-of-distribution (OOD) detection. It is widely assumed that Bayesian neural networks (BNNs) 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 show that proper Bayesian inference with function space priors induced by neural networks 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 due to the correspondence with Gaussian processes. Strikingly, the kernels derived from common architectural choices lead to function space priors which induce predictive uncertainties that do not reflect the underlying input data distribution and are therefore unsuited for OOD detection. Importantly, we find the OOD behavior in this limiting case to be consistent with the corresponding finite-width case. To overcome this limitation, useful function space properties can also be encoded in the prior in weight space, however, this can currently only be applied to a specified subset of the domain and thus does not inherently extend to OOD data. Finally, we argue that a trade-off between generalization and OOD capabilities might render the application of BNNs for OOD detection undesirable in practice. Overall, our study discloses fundamental problems when naively using BNNs for OOD detection and opens interesting avenues for future research.
翻译:神经网络正在试图解决的投入是否对问题有效这一问题的问题,已经引发了对分配范围外探测的兴趣。人们普遍认为,贝叶西亚神经网络(BNNs)非常适合这项任务,因为具有的隐性不确定性会导致对外部线的预测出现分歧。在本文中,我们质疑这一假设,并表明由于神经网络对功能空间前由神经网络引发的适当贝叶斯推论不一定导致良好的 OOOD探测。为避免使用近似途径的推断,我们开始研究无限宽度案例,因为Bayesian神经网络(BNNS)完全适合这项任务,因为与Gaussian进程通信。 Strigally,源于共同建筑选择的内核圈导致对外部空间的预测产生分歧,从而导致预测性不确定性,不反映基本输入数据分布,因此不适合OOD的探测。重要的是,我们发现这一限制性案例的OD行为与相应的有限程度案例一致。为了克服这一局限性,Beres基本应用的空间特性可以精确度的功能特性,因为与与Gaus之间的通信应用,我们目前对O的探测能力进行不必要应用,因此,在前的域域内核数据中,我们只能将OD值进行内部的计算。