[论文解读] Energy-based Out-of-Distribution Detection for Graph Neural Networks
该论文提出 GNNSafe,一种基于能量的 OOD 探测器,利用来自 GNN logits 的能量分数,并结合能量传播机制及可选的带 OOD 暴露的能量正则化。GNNSafe 在图 OOD 基准上相对于现有方法实现了显著的 AUROC 提升,同时保持高效且与模型无关。
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.
研究动机与目标
- 解决在存在节点相互依赖的图结构数据中缺乏可靠的 OOD 检测的问题。
- 提出一个简单、与架构无关的基于 GNN logits 提取的能量分数的 OOD 探测器(GNNSafe)。
- 利用图结构提升的基于能量的信念传播方案来增强检测。
- 探索带有可选的 OOD 暴露的训练,以在保持分布内性能的同时收紧能量差距。
提出的方法
- 用基于 GCN 的编码器对每个节点产生 logits 以进行模型化分类。
- 定义能量函数 E(x, Gx, y; h) = -h_theta(x, Gx)[y] 且自由能 E(x, Gx) = -log sum_y exp(h_theta(x, Gx)[y])。
- 以标准监督损失进行训练,确保在分布内数据上能量下降(引理 1/命题 1)。
- 应用基于能量的信念传播:E^(k) = alpha E^(k-1) + (1 - alpha) D^{-1} A E^(k-1),在自我图上传播能量(式 7)。
- 判定规则:若传播后的能量 tilde{E} <= tau 则为 OOD;否则为分布内(式 8)。
- 可选地,添加带 OOD 暴露的能量正则化以将能量约束在 [t_in, t_out],在保持监督学习的同时实现正则化(式 9 与 命题 3)。

实验结果
研究问题
- RQ1能否从 GNN logits 导出的基于能量的分数有效区分图上的分布内样本和 OOD 样本?
- RQ2是否通过对图拓扑传播能量可以在不重新训练密度模型的情况下提升 OOD 检测?
- RQ3将带 OOD 暴露的能量正则化目标引入,是否在不损害分布内准确度的前提下进一步强化 OOD 区分?
- RQ4GNNSafe 是否对 GNN 架构无关,并在多种图数据集和 OOD 类型下有效?
主要发现
- GNNSafe 在 OOD 检测基准上相对于现有方法平均 AUROC 提升最多达到 17.0%。
- 能量传播在大多数设置下持续优于仅使用能量的 OOD 检测。
- GNNSafe++(含能量正则化)在很多场景中进一步拉大分布内与 OOD 数据之间的能量差距。
- GNNSafe 在提升 OOD 可靠性和效率的同时,保持了具有竞争力的分布内准确度。
- 该方法架构无关,适用于现成的 GNN 和图形 Transformer。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。