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 (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 induced under common architectural choices lead to uncertainties that do not reflect the underlying data generating process and are therefore unsuited for OOD detection. Importantly, we find this OOD behavior to be consistent with the corresponding finite-width networks. Desirable function space properties can be encoded in the prior in weight space, however, this currently only applies 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.
翻译:需要避免对不熟悉的数据作出自信预测,这引起了人们对分配(OOOD)外探测的兴趣。人们普遍认为,贝耶西亚神经网络(BNNS)非常适合这项任务,因为具有分数的不确定性会导致对外部线的预测出现分歧。在本文中,我们质疑这一假设,并表明,由神经网络引致的对功能空间前科的适当贝耶斯推断不一定导致良好的OOOD探测。为避免使用近似推论,我们首先研究无限宽度案例,贝耶西亚神经网络(BNNS)完全适合这项任务,因为与Gaussian过程的通信可以精确地推断出贝耶斯神经网络(BNNS),因为共同建筑选择下产生的内核内核内核导致不确定性不反映基本数据生成过程,因此不适合OOOO的探测。重要的是,我们发现OOOD行为行为行为与相应的有限分界网络不相容。在先前的重量空间中可以对空间功能特性进行编码,然而,目前只适用于与GO进程通信断的一组特定探测方法,因此,我们无法将OO的不必要地将OOOODDD数据用于基本交易。