Abstract
Graph-level anomaly detection (GAD) describes the problem of detecting graphs that are abnormal in their structure and/or the features of their nodes, as compared to other graphs. One of the challenges in GAD is to devise graph representations that enable the detection of both locally- and globally-anomalous graphs, i.e., graphs that are abnormal in their fine-grained (node-level) or holistic (graph-level) properties, respectively. To tackle this challenge we introduce a novel deep anomaly detection approach for GAD that learns rich global and local normal pattern information by joint random distillation of graph and node representations. The random distillation is achieved by training one GNN to predict another GNN with randomly initialized network weights. Extensive experiments on 16 real-world graph datasets from diverse domains show that our model significantly outperforms seven state-of-the-art models.
Introduction
Graph-level Anomaly Detection (GAD) involves identifying entire graphs within a collection that deviate significantly from the majority. This task is vital in applications such as identifying toxic molecules in chemical databases or detecting fraudulent transaction networks. However, GAD faces several key challenges: the need to capture both local (node-neighborhood) and global (holistic structure) anomalies, the difficulty of reconstructing complex graph topologies using traditional autoencoders, and the inadequacy of simple distribution assumptions (like hyperspheres) for multi-modal graph data.
Methodology
We propose GLocalKD (Global and Local Knowledge Distillation), a framework that utilizes Random Knowledge Distillation to learn normal graph regularities. The approach uses two Graph Neural Networks (GNNs) with identical architectures: a Target Network, which is randomly initialized and frozen to act as a fixed random projection, and a Predictor Network, which is trained to mimic the Target's outputs.
The distillation process is "glocal," occurring at two levels:
- Local Level: The predictor matches individual node representations.
- Global Level: The predictor matches holistic graph representations via a max-pooling readout.
During training on normal data, the predictor learns the underlying patterns required to approximate the random target's output. At inference, anomalous graphs—containing patterns unseen during training—result in a high prediction error (Mean Squared Error), which serves as the anomaly score.
Experiments and Results
GLocalKD was evaluated on 16 real-world datasets across chemistry, medicine, and social networks. It was compared against seven state-of-the-art models, including InfoGraph and OCGCN.
The results demonstrate that GLocalKD significantly outperforms existing methods, with substantial AUC improvements (e.g., 11.9% on the p53 dataset). The model is highly sample-efficient, maintaining performance with only 5% training data, and robust to training set contamination. Ablation studies confirmed that both local and global distillation components are essential for general-purpose detection across diverse datasets.
Conclusion
GLocalKD introduces an effective paradigm for GAD by distilling random projections at both local and global scales. This approach avoids the complexities of graph reconstruction while capturing a wide range of anomalous patterns. Future research will explore the impact of different GNN architectures and more sophisticated readout functions on detection performance.
Summary updated