GOLD: Graph Out-of-Distribution Detection via Implicit Adversarial Latent Generation
Danny Wang, Ruihong Qiu, Guangdong Bai, Zi Huang
TL;DR
The paper tackles graph OOD detection when real OOD data is unavailable by proposing GOLD, an implicit adversarial framework that synthesizes pseudo-OOD embeddings from in-distribution data. A latent generative model imitates ID embeddings to produce pseudo-OOD representations, while an energy-based detector and a GNN encoder are trained adversarially to maximize the energy gap between ID and pseudo-OOD, thereby simulating OOD exposure without external data. GOLD leverages either a latent diffusion model or a VAE for latent generation and introduces an energy-divergence objective combining an uncertainty loss and a divergence regulariser, achieving state-of-the-art performance among non-OOD-exposed methods and competitive results with real OOD-exposed baselines. The approach demonstrates strong OOD detection performance across five datasets, maintains efficient inference, and highlights the importance of adversarial training and a dedicated energy-detector head for robust separation of ID and OOD signals in graph-structured data.
Abstract
Despite graph neural networks' (GNNs) great success in modelling graph-structured data, out-of-distribution (OOD) test instances still pose a great challenge for current GNNs. One of the most effective techniques to detect OOD nodes is to expose the detector model with an additional OOD node-set, yet the extra OOD instances are often difficult to obtain in practice. Recent methods for image data address this problem using OOD data synthesis, typically relying on pre-trained generative models like Stable Diffusion. However, these approaches require vast amounts of additional data, as well as one-for-all pre-trained generative models, which are not available for graph data. Therefore, we propose the GOLD framework for graph OOD detection, an implicit adversarial learning pipeline with synthetic OOD exposure without pre-trained models. The implicit adversarial training process employs a novel alternating optimisation framework by training: (1) a latent generative model to regularly imitate the in-distribution (ID) embeddings from an evolving GNN, and (2) a GNN encoder and an OOD detector to accurately classify ID data while increasing the energy divergence between the ID embeddings and the generative model's synthetic embeddings. This novel approach implicitly transforms the synthetic embeddings into pseudo-OOD instances relative to the ID data, effectively simulating exposure to OOD scenarios without auxiliary data. Extensive OOD detection experiments are conducted on five benchmark graph datasets, verifying the superior performance of GOLD without using real OOD data compared with the state-of-the-art OOD exposure and non-exposure baselines.
