Learning on graphs, where instance nodes are inter-connected, has become one of the central problems for deep learning, as relational structures are pervasive and induce data inter-dependence which hinders trivial adaptation of existing approaches that assume inputs to be i.i.d.~sampled. However, current models mostly focus on improving testing performance of in-distribution data and largely ignore the potential risk w.r.t. out-of-distribution (OOD) testing samples that may cause negative outcome if the prediction is overconfident on them. In this paper, we investigate the under-explored problem, OOD detection on graph-structured data, and identify a provably effective OOD discriminator based on an energy function directly extracted from graph neural networks trained with standard classification loss. This paves a way for a simple, powerful and efficient OOD detection model for GNN-based learning on graphs, which we call GNNSafe. It also has nice theoretical properties that guarantee an overall distinguishable margin between the detection scores for in-distribution and OOD samples, which, more critically, can be further strengthened by a learning-free energy belief propagation scheme. For comprehensive evaluation, we introduce new benchmark settings that evaluate the model for detecting OOD data from both synthetic and real distribution shifts (cross-domain graph shifts and temporal graph shifts). The results show that GNNSafe achieves up to $17.0\%$ AUROC improvement over state-of-the-arts and it could serve as simple yet strong baselines in such an under-developed area.
翻译:在图结构数据上进行学习(其中实例节点相互连接)已成为深度学习的核心问题之一,因为关系结构无处不在且导致数据相互依赖,这阻碍了现有假设输入为独立同分布采样的方法直接适用。然而,当前模型主要关注提升分布内数据的测试性能,而很大程度上忽略了分布外测试样本可能带来的潜在风险——若模型对其预测过于自信,则可能产生负面结果。本文研究了尚未充分探索的图结构数据分布外检测问题,并基于从标准分类损失训练的图神经网络中直接提取的能量函数,识别出一种可证明有效的分布外判别器。这为基于图神经网络的图学习提供了一种简单、强大且高效的分布外检测模型,我们称之为GNNSafe。该模型还具有优良的理论性质,能保证分布内样本与分布外样本的检测得分之间存在显著的可区分间隔,更关键的是,这种间隔可通过无需学习的能量置信传播方案进一步增强。为进行综合评估,我们引入了新的基准测试设置,用于评估模型检测合成及真实分布偏移(跨域图偏移与时序图偏移)下分布外数据的能力。结果表明,GNNSafe相较于现有最优方法实现了高达17.0%的AUROC提升,并且可作为这一尚不成熟领域中的简单而强大的基线方法。