Table of Contents
Fetching ...

MetaGAD: Meta Representation Adaptation for Few-Shot Graph Anomaly Detection

Xiongxiao Xu, Kaize Ding, Canyu Chen, Kai Shu

TL;DR

MetaGAD addresses the practical problem of detecting anomalies in graphs with very few labeled examples by learning to adapt node representations from self-supervised learning to a few-shot supervised task. It introduces Representation Adaptation Network (RAN) as a meta-learner that updates representations based on validation loss, coupled with an anomaly detector trained on labeled data, all under a bi-level optimization framework. The approach is reinforced by a cost-sensitive loss to handle class imbalance and an efficient one-step SGD approximation to the bi-level objective, yielding strong performance on six real-world datasets with synthetic and organic anomalies and demonstrating robustness to overfitting, imbalance, and contamination. These results suggest MetaGAD provides a practical and scalable solution for few-shot graph anomaly detection with significant implications for security and integrity in real networks.

Abstract

Graph anomaly detection has long been an important problem in various domains pertaining to information security such as financial fraud, social spam and network intrusion. The majority of existing methods are performed in an unsupervised manner, as labeled anomalies in a large scale are often too expensive to acquire. However, the identified anomalies may turn out to be uninteresting data instances due to the lack of prior knowledge. In real-world scenarios, it is often feasible to obtain limited labeled anomalies, which have great potential to advance graph anomaly detection. However, the work exploring limited labeled anomalies and a large amount of unlabeled nodes in graphs to detect anomalies is relatively limited. Therefore, in this paper, we study an important problem of few-shot graph anomaly detection. Nonetheless, it is challenging to fully leverage the information of few-shot anomalous nodes due to the irregularity of anomalies and the overfitting issue in the few-shot learning. To tackle the above challenges, we propose a novel meta-learning based framework, MetaGAD, that learns to adapt the knowledge from self-supervised learning to few-shot supervised learning for graph anomaly detection. In specific, we formulate the problem as a bi-level optimization, ensuring MetaGAD converging to minimizing the validation loss, thus enhancing the generalization capacity. The comprehensive experiments on six real-world datasets with synthetic anomalies and "organic" anomalies (available in the datasets) demonstrate the effectiveness of MetaGAD in detecting anomalies with few-shot anomalies. The code is available at https://github.com/XiongxiaoXu/MetaGAD.

MetaGAD: Meta Representation Adaptation for Few-Shot Graph Anomaly Detection

TL;DR

MetaGAD addresses the practical problem of detecting anomalies in graphs with very few labeled examples by learning to adapt node representations from self-supervised learning to a few-shot supervised task. It introduces Representation Adaptation Network (RAN) as a meta-learner that updates representations based on validation loss, coupled with an anomaly detector trained on labeled data, all under a bi-level optimization framework. The approach is reinforced by a cost-sensitive loss to handle class imbalance and an efficient one-step SGD approximation to the bi-level objective, yielding strong performance on six real-world datasets with synthetic and organic anomalies and demonstrating robustness to overfitting, imbalance, and contamination. These results suggest MetaGAD provides a practical and scalable solution for few-shot graph anomaly detection with significant implications for security and integrity in real networks.

Abstract

Graph anomaly detection has long been an important problem in various domains pertaining to information security such as financial fraud, social spam and network intrusion. The majority of existing methods are performed in an unsupervised manner, as labeled anomalies in a large scale are often too expensive to acquire. However, the identified anomalies may turn out to be uninteresting data instances due to the lack of prior knowledge. In real-world scenarios, it is often feasible to obtain limited labeled anomalies, which have great potential to advance graph anomaly detection. However, the work exploring limited labeled anomalies and a large amount of unlabeled nodes in graphs to detect anomalies is relatively limited. Therefore, in this paper, we study an important problem of few-shot graph anomaly detection. Nonetheless, it is challenging to fully leverage the information of few-shot anomalous nodes due to the irregularity of anomalies and the overfitting issue in the few-shot learning. To tackle the above challenges, we propose a novel meta-learning based framework, MetaGAD, that learns to adapt the knowledge from self-supervised learning to few-shot supervised learning for graph anomaly detection. In specific, we formulate the problem as a bi-level optimization, ensuring MetaGAD converging to minimizing the validation loss, thus enhancing the generalization capacity. The comprehensive experiments on six real-world datasets with synthetic anomalies and "organic" anomalies (available in the datasets) demonstrate the effectiveness of MetaGAD in detecting anomalies with few-shot anomalies. The code is available at https://github.com/XiongxiaoXu/MetaGAD.
Paper Structure (17 sections, 9 equations, 6 figures, 5 tables, 1 algorithm)

This paper contains 17 sections, 9 equations, 6 figures, 5 tables, 1 algorithm.

Figures (6)

  • Figure 1: An illustration of the representation gap: (a) the raw representation from a graph encoder, where the anomaly detector is limited in classifying anomalies; (b) while an adapted representation learned from the proposed model, instructed by the supervision of few-shot anomalies, can facilitate the anomaly detector to identify anomalies.
  • Figure 2: The illustration of MetaGAD. The anomaly detector (target model) parameter $\Theta$ is optimized by the training loss and RAN (meta-learner) parameter $\Phi$ is optimized by the validation loss. Such meta-learning algorithm enables RAN and the anomaly detector enhance each other synergistically.
  • Figure 3: Ablation study of MetaGAD w.r.t. AUC-ROC on all datasets. Amazon P. and Amazon R. are abbreviations of Amazon Photo and Amazon Review, respectively.
  • Figure 4: The training and validation loss for Finetune and Meta. Finetune falles into the overfitting problem while Meta largely alleviates the issue.
  • Figure 5: Effect of cost weight $w$ on the performance of MetaGAD on three dataset with synthetic anomalies w.r.t. (a) AUC-ROC and (b) AUC-PR. The IR values of Cora, Citeseer and Amazon Photo are 216, 235 and 611, respectively. However, the optimal value of $w$ w.r.t. AUC-ROC (a) are 0.5, 1 and 5, respectively; the optimal value of $w$ w.r.t. AUC-PR (b) are 0.7, 0.6 and 1, respectively.
  • ...and 1 more figures