Out-of-Distribution Detection in Heterogeneous Graphs via Energy Propagation
Tao Yin, Chen Zhao, Xiaoyan Liu, Minglai Shao
TL;DR
This work tackles the challenging problem of detecting out-of-distribution nodes in heterogeneous graphs by introducing OODHG, a framework that combines energy-based OOD scoring with meta-path guided energy propagation. Node representations are learned from multiple meta-paths using SeHGNN, projected into a shared space, and fused via a Transformer to form target-type embeddings; energy scores derived from an MLP logits guide OOD detection, complemented by an energy propagation mechanism across metapaths. The training objective jointly optimizes classification and a margin-based energy loss to sharpen ID–OOD separation, while evaluating with comprehensive metrics on DBLP, ACM, and IMDB datasets. Empirical results show that OODHG outperforms baselines in both OOD detection and ID classification, underscoring the value of meta-path-aware energy propagation for robust OOD handling in heterogeneous graphs, with practical impact for real-world, multi-typed graph data.
Abstract
Graph neural networks (GNNs) are proven effective in extracting complex node and structural information from graph data. While current GNNs perform well in node classification tasks within in-distribution (ID) settings, real-world scenarios often present distribution shifts, leading to the presence of out-of-distribution (OOD) nodes. OOD detection in graphs is a crucial and challenging task. Most existing research focuses on homogeneous graphs, but real-world graphs are often heterogeneous, consisting of diverse node and edge types. This heterogeneity adds complexity and enriches the informational content. To the best of our knowledge, OOD detection in heterogeneous graphs remains an underexplored area. In this context, we propose a novel methodology for OOD detection in heterogeneous graphs (OODHG) that aims to achieve two main objectives: 1) detecting OOD nodes and 2) classifying all ID nodes based on the first task's results. Specifically, we learn representations for each node in the heterogeneous graph, calculate energy values to determine whether nodes are OOD, and then classify ID nodes. To leverage the structural information of heterogeneous graphs, we introduce a meta-path-based energy propagation mechanism and an energy constraint to enhance the distinction between ID and OOD nodes. Extensive experimental findings substantiate the simplicity and effectiveness of OODHG, demonstrating its superiority over baseline models in OOD detection tasks and its accuracy in ID node classification.
