arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2110.06020cs.LGcs.AIstat.ML
收藏

基于贝叶斯神经网络的分布外检测

On out-of-distribution detection with Bayesian neural networks

ETH Zürich(苏黎世联邦理工学院)

Francesco D'Angelo, Christian Henning

摘要:

对于神经网络试图解决的问题,输入是否有效的问题引发了对分布外(OOD)检测的兴趣。人们普遍认为贝叶斯神经网络(BNN)非常适合这项任务,因为赋予的认知不确定性会导致对离群值的预测出现分歧。在本文中,我们质疑这一假设,并表明,适当的贝叶斯推理与神经网络引起的函数空间先验并不一定会导致良好的OOD检测。为了避免使用近似推理,我们首先研究无限宽的情况下,贝叶斯推理可以是准确的,由于与高斯过程的对应关系。引人注目的是,从常见的架构选择得到的内核导致函数空间先验,其引起不反映底层输入数据分布的预测不确定性,因此不适合于OOD检测。重要的是,我们发现在这种限制情况下的OOD行为与相应的有限宽度的情况是一致的。为了克服这一限制,有用的函数空间属性也可以在权重空间中的先验中编码,然而,这目前只能应用于域的指定子集,因此不能固有地扩展到OOD数据。最后,我们认为,泛化和OOD能力之间的权衡可能会使BNN的应用程序OOD检测在实践中不可取的。总的来说,我们的研究揭示了天真地使用BNN进行OOD检测时的基本问题,并为未来的研究开辟了有趣的途径。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑